This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
install problem on AIX 4.1(?) - strrchr
- To: egcs-bugs at cygnus dot com
- Subject: install problem on AIX 4.1(?) - strrchr
- From: Yotam Medini <yotamm at tmai dot com>
- Date: Tue, 16 Sep 1997 18:17:48 -0700
- Cc: brian_barrick at tmai dot com
- Reply-To: yotam_medini at tmai dot com
On a an AIX machine:
curie:13> /bin/uname -a
AIX curie 1 4 000159135900
Installation of egcs fails in
xlc -c -DHAVE_LIBBSD=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1
-DHAVE_TERMIOS_H=1 -DHAVE_TERMIO_H=1 -DHAVE_STRINGS_H=1
-DHAVE_STRING_H=1 -DHAVE_VARARGS_H=1 -DHAVE_SYS_TIME_H=1
-DHAVE_SYS_FILE_H=1 -DHAVE_ALLOCA=1 -DHAVE_SETVBUF=1 -DHAVE_GETCWD=1
-DHAVE_MEMSET=1 -DHAVE_BZERO=1 -DHAVE_STRCHR=1 -DHAVE_STRCASECMP=1
-DHAVE_VFPRINTF=1 -DHAVE_VSPRINTF=1 -DHAVE_STRERROR=1
-DHAVE_SIGPROCMASK=1 -DHAVE_SIGSETMASK=1 -DHAVE_MEMCPY=1
-DHAVE_MEMMOVE=1 -DHAVE_STRDUP=1 -I. -I. -I./../libtxi install-info.c
"install-info.c", line 625.27: 1506-010 (E) Macro strrchr invoked with a null argument for parameter __s1.
"install-info.c", line 625.27: 1506-041 (E) The invocation of macro strrchr contains fewer arguments than required by the macro definition.
"install-info.c", line 625.18: 1506-275 (S) Unexpected text ',' ignored.
make[6]: *** [install-info.o] Error 1
egcs-970910/texinfo/util/install-info.c: line 265 has:
extern char *strrchr ();
The reason for failure is that the 'native' /usr/include/string.h has:
/*
* The following macro definitions cause the XLC compiler to inline
* these functions whenever possible.
*/
#ifdef __STR__
# define strcpy(__s1,__s2) __strcpy(__s1,__s2)
# define strcmp(__s1,__s2) __strcmp(__s1,__s2)
# ifndef __STR31__
# define strlen(__s1) __strlen(__s1)
# define strchr(__s1,__c) __strchr(__s1,__c)
# define strrchr(__s1,__c) __strrchr(__s1,__c)
....
I wonder, is this 'extern' line necessary. Is there any platform that
does not declare strrchr(.,.) in its string.h?
-- yotam