なかだです。

At Mon, 16 Feb 2004 21:23:06 +0900,
H.Yamamoto wrote in [ruby-dev:22909]:
> ruby_1_8 ブランチで、マクロの多重定義の警告が出ました。
> 
>   compiling etc
>   MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
>           bcc32 -q -O -6 -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi -I. -IE:/ru
>   by-cvs/ruby_1_8 -IE:/ruby-cvs/ruby_1_8 -IE:/ruby-cvs/ruby_1_8/ext/etc -DHAVE_GET
>   LOGIN -I. -I./ -I./missing -c E:\ruby-cvs\ruby_1_8\ext\etc\etc.c
>   E:\ruby-cvs\ruby_1_8\ext\etc\etc.c:
>   警告 W8017 E:/ruby-cvs/ruby_1_8\config.h 41: マクロ 'HAVE_GETLOGIN' の重複定義

コマンドラインで -DHAVE_GETLOGIN しています。

ちょうど一昨日この辺をいじったので、バックポートすると何とかな
るかも知れません。


* bcc32/Makefile.sub, win32/Makefile.sub (config.h): define
  STACK_GROW_DIRECTION.

* bcc32/Makefile.sub (config.h): add newer checks.

* wince/Makefile.sub (config.h): define NEED_IO_SEEK_BETWEEN_RW.

Index: bcc32/Makefile.sub =================================================================== RCS file: /pub/cvs/ruby/src/ruby/bcc32/Makefile.sub,v retrieving revision 1.42.2.3 diff -u -2 -p -d -r1.42.2.3 Makefile.sub --- bcc32/Makefile.sub 16 Feb 2004 11:43:30 -0000 1.42.2.3 +++ bcc32/Makefile.sub 16 Feb 2004 12:40:01 -0000 @@ -210,45 +210,54 @@ config.h: @echo Creating $(@:.\=) @type > $@ &&| +\#define HAVE_SYS_TYPES_H 1 +\#define HAVE_SYS_STAT_H 1 +\#define HAVE_STDLIB_H 1 +\#define HAVE_STRING_H 1 +\#define HAVE_MEMORY_H 1 +\#define HAVE_OFF_T 1 +\#define SIZEOF_INT 4 +\#define SIZEOF_SHORT 2 +\#define SIZEOF_LONG 4 +\#define SIZEOF_LONG_LONG 0 +\#define SIZEOF___INT64 8 +\#define SIZEOF_OFF_T 4 +\#define SIZEOF_VOIDP 4 +\#define SIZEOF_FLOAT 4 +\#define SIZEOF_DOUBLE 8 \#define HAVE_PROTOTYPES 1 +\#define TOKEN_PASTE(x,y) x\#\#y \#define HAVE_STDARG_PROTOTYPES 1 -/* \#define HAVE_ATTR_NORETURN 1 */ \#define NORETURN(x) x -\#define TOKEN_PASTE(x,y) x\#\#y -\#define inline __inline -/* \#define HAVE_DIRENT_H 1 */ -/* \#define HAVE_UNISTD_H 1 */ -\#define HAVE_STDLIB_H 1 +\#define HAVE_DECL_SYS_NERR 1 \#define HAVE_LIMITS_H 1 -/* \#define HAVE_SYS_FILE_H 1 */ \#define HAVE_FCNTL_H 1 -/* \#define HAVE_PWD_H 1 */ -/* \#define HAVE_SYS_TIME_H 1 */ -/* \#define HAVE_SYS_TIMES_H 1 */ -/* \#define HAVE_SYS_PARAM_H 1 */ -/* \#define HAVE_SYS_WAIT_H 1 */ -\#define HAVE_STRING_H 1 \#define HAVE_UTIME_H 1 -\#define HAVE_MEMORY_H 1 -/* \#define HAVE_ST_BLKSIZE 1 */ +\#define HAVE_FLOAT_H 1 +\#define HAVE_STRUCT_STAT_ST_RDEV 1 \#define HAVE_ST_RDEV 1 -/* \#define GETGROUPS_T gid_t */ \#define GETGROUPS_T int \#define RETSIGTYPE void \#define HAVE_ALLOCA 1 -\#define vfork fork +\#define HAVE_DUP2 1 +\#define HAVE_MEMMOVE 1 +\#define HAVE_MKDIR 1 +\#define HAVE_STRCASECMP 1 +\#define HAVE_STRNCASECMP 1 +\#define HAVE_STRERROR 1 +\#define HAVE_STRFTIME 1 +\#define HAVE_STRCHR 1 +\#define HAVE_STRSTR 1 +\#define HAVE_STRTOD 1 +\#define HAVE_STRTOL 1 +\#define HAVE_STRTOUL 1 +\#define HAVE_ISNAN 1 +\#define HAVE_FINITE 1 \#define HAVE_FMOD 1 -/* \#define HAVE_RANDOM 1 */ \#define HAVE_WAITPID 1 -\#define HAVE_GETCWD 1 \#define HAVE_FSYNC 1 -/* \#define HAVE_TRUNCATE 1 */ +\#define HAVE_GETCWD 1 \#define HAVE_CHSIZE 1 \#define HAVE_TIMES 1 -/* \#define HAVE_UTIMES 1 */ -/* \#define HAVE_FCNTL 1 */ -/* \#define HAVE_SETITIMER 1 */ -/* \#define HAVE_GETGROUPS 1 */ -/* \#define HAVE_SIGPROCMASK 1 */ -\#define HAVE_GETLOGIN 1 +\#define HAVE_LINK 1 \#define HAVE_TELLDIR 1 \#define HAVE_SEEKDIR 1 @@ -256,9 +265,10 @@ config.h: \#define HAVE_SINH 1 \#define HAVE_TANH 1 - -\#define NEED_IO_SEEK_BETWEEN_RW 1 -\#define RSHIFT(x,y) ((x)>>y) +\#define RSHIFT(x,y) ((x)>>(int)y) \#define FILE_COUNT level \#define FILE_READPTR curp +\#define inline __inline +\#define NEED_IO_SEEK_BETWEEN_RW 1 +\#define STACK_GROW_DIRECTION -1 \#define DEFAULT_KCODE KCODE_NONE \#define DLEXT ".so" @@ -270,27 +280,4 @@ config.h: \#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)" \#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)" - -\#define SIZEOF_INT 4 -\#define SIZEOF_SHORT 2 -\#define SIZEOF_LONG 4 -\#define SIZEOF___INT64 8 -\#define SIZEOF_VOIDP 4 -\#define SIZEOF_FLOAT 4 -\#define SIZEOF_DOUBLE 8 - -\#define HAVE_DECL_SYS_NERR 1 -\#define HAVE_ISNAN 1 -\#define HAVE_FINITE 1 -\#define HAVE_MEMMOVE 1 -\#define HAVE_MKDIR 1 -\#define HAVE_STRCASECMP 1 -\#define HAVE_STRNCASECMP 1 -\#define HAVE_STRCHR 1 -\#define HAVE_STRERROR 1 -\#define HAVE_STRFTIME 1 -\#define HAVE_STRSTR 1 -\#define HAVE_STRTOD 1 -\#define HAVE_STRTOUL 1 -\#define HAVE_GETCWD 1 | Index: win32/Makefile.sub =================================================================== RCS file: /pub/cvs/ruby/src/ruby/win32/Makefile.sub,v retrieving revision 1.59.2.3 diff -u -2 -p -d -r1.59.2.3 Makefile.sub --- win32/Makefile.sub 26 Jan 2004 15:30:50 -0000 1.59.2.3 +++ win32/Makefile.sub 16 Feb 2004 12:38:12 -0000 @@ -208,5 +208,4 @@ config.h: #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 -#define HAVE_FLOAT_H 1 #define HAVE_OFF_T 1 #define SIZEOF_INT 4 @@ -228,11 +227,8 @@ config.h: #endif #define HAVE_DECL_SYS_NERR 1 -#define STDC_HEADERS 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 #define HAVE_LIMITS_H 1 #define HAVE_FCNTL_H 1 #define HAVE_SYS_UTIME_H 1 -#define HAVE_MEMORY_H 1 +#define HAVE_FLOAT_H 1 #define uid_t int #define gid_t int @@ -255,15 +251,15 @@ config.h: #define HAVE_STRTOL 1 #define HAVE_STRTOUL 1 -#define HAVE_GETCWD 1 #define HAVE_FLOCK 1 #define HAVE_VSNPRINTF 1 #define HAVE_ISNAN 1 #define HAVE_FINITE 1 +#define HAVE_HYPOT 1 #define HAVE_FMOD 1 #define HAVE_FREXP 1 -#define HAVE_HYPOT 1 #define HAVE_MODF 1 #define HAVE_WAITPID 1 #define HAVE_FSYNC 1 +#define HAVE_GETCWD 1 #define HAVE_CHSIZE 1 #define HAVE_TIMES 1 @@ -275,13 +271,13 @@ config.h: #define HAVE_SINH 1 #define HAVE_TANH 1 -#define HAVE_EXECVE 1 #define HAVE_TZNAME 1 #define HAVE_DAYLIGHT 1 #define SETPGRP_VOID 1 -#define inline __inline -#define NEED_IO_SEEK_BETWEEN_RW 1 #define RSHIFT(x,y) ((x)>>(int)y) #define FILE_COUNT _cnt #define FILE_READPTR _ptr +#define inline __inline +#define NEED_IO_SEEK_BETWEEN_RW 1 +#define STACK_GROW_DIRECTION -1 #define DEFAULT_KCODE KCODE_NONE #define DLEXT ".so" Index: wince/Makefile.sub =================================================================== RCS file: /pub/cvs/ruby/src/ruby/wince/Makefile.sub,v retrieving revision 1.16.2.1 diff -u -2 -p -d -r1.16.2.1 Makefile.sub --- wince/Makefile.sub 12 Jan 2004 02:46:40 -0000 1.16.2.1 +++ wince/Makefile.sub 16 Feb 2004 12:38:12 -0000 @@ -222,5 +222,4 @@ config.h: #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 -#define HAVE_FLOAT_H 1 #define HAVE_OFF_T 1 #define SIZEOF_INT 4 @@ -242,10 +241,7 @@ config.h: #endif #define HAVE_DECL_SYS_NERR 1 -#define STDC_HEADERS 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 #define HAVE_FCNTL_H 1 #define HAVE_SYS_UTIME_H 1 -#define HAVE_MEMORY_H 1 +#define HAVE_FLOAT_H 1 #define uid_t int #define gid_t int @@ -266,13 +262,13 @@ config.h: #define HAVE_STRTOL 1 #define HAVE_STRTOUL 1 -#define HAVE_GETCWD 1 #define HAVE_FLOCK 1 #define HAVE_VSNPRINTF 1 #define HAVE_FINITE 1 +#define HAVE_HYPOT 1 #define HAVE_FMOD 1 #define HAVE_FREXP 1 -#define HAVE_HYPOT 1 #define HAVE_MODF 1 #define HAVE_WAITPID 1 +#define HAVE_GETCWD 1 #define HAVE_CHSIZE 0 #define HAVE_TIMES 1 @@ -283,10 +279,10 @@ config.h: #define HAVE_SINH 1 #define HAVE_TANH 1 -#define HAVE_EXECVE 0 #define HAVE_TZNAME 1 #define HAVE_DAYLIGHT 1 #define SETPGRP_VOID 1 -#define inline __inline #define RSHIFT(x,y) ((x)>>(int)y) +#define inline __inline +#define NEED_IO_SEEK_BETWEEN_RW 1 #define DEFAULT_KCODE KCODE_NONE #define DLEXT ".so"
-- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦