make cross fails due to libchill
Joern Rennecke
amylaar@cygnus.co.uk
Thu Nov 19 12:42:00 GMT 1998
> I tried both to configure with --disable-chill and building with
> LANGUAGES='c c++', but to no avail. The build dies with:
>
> make[2]: Entering directory `/x/egcs-sh/sh-hms/libchill'
> /x/egcs-sh/gcc/xgcc -B/x/egcs-sh/gcc/ -B/usr/local/sh-hms/bin/ -c -I. -I/s/egcs/libchill -g -O2 /s/egcs/libchill/basicio.c
> /s/egcs/libchill/basicio.c: In function `makeName':
> /s/egcs/libchill/basicio.c:83: `_POSIX_PATH_MAX' undeclared (first use in this function)
> /s/egcs/libchill/basicio.c:83: (Each undeclared identifier is reported only once
> /s/egcs/libchill/basicio.c:83: for each function it appears in.)
> /s/egcs/libchill/basicio.c: In function `__modify':
> /s/egcs/libchill/basicio.c:225: `_POSIX_PATH_MAX' undeclared (first use in this function)
> make[2]: *** [basicio.o] Error 1
> make[2]: Leaving directory `/x/egcs-sh/sh-hms/libchill'
> make[1]: *** [all-target-libchill] Error 2
> make[1]: Leaving directory `/x/egcs-sh'
> make: *** [cross] Error 2
Since none of the implementors seem to be forthcoming with a solution,
I've made my own workaround:
Thu Nov 19 20:39:18 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* basicio.c (PATH_MAX): Define only to _POSIX_PATH_MAX if that is
defined. Otherwise, try MAXPATHLEN.
Index: basicio.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libchill/basicio.c,v
retrieving revision 1.2
diff -p -r1.2 basicio.c
*** basicio.c 1998/09/09 20:34:31 1.2
--- basicio.c 1998/11/19 20:33:14
***************
*** 38,44 ****
--- 38,50 ----
#include "fileio.h"
#ifndef PATH_MAX
+ #ifdef _POSIX_PATH_MAX
#define PATH_MAX _POSIX_PATH_MAX
+ #else
+ #ifdef MAXPATHLEN
+ #define PATH_MAX MAXPATHLEN
+ #endif
+ #endif
#endif
static
More information about the Gcc-bugs
mailing list