Declare the isatty prototype all the time ... otherwise packages like doxygen and ttmkfdir fail to build. http://bugs.gentoo.org/119598 --- flex/scan.c +++ flex/scan.c @@ -4179,9 +4179,19 @@ yyfree((void *) b ); } +#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */ -#ifndef __cplusplus +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __THROW /* this is a gnuism */ +extern int isatty (int ) __THROW; +#else extern int isatty (int ); +#endif -#endif /* __cplusplus */ +#ifdef __cplusplus +} +#endif +#endif /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, --- flex/skel.c +++ flex/skel.c @@ -2183,9 +2183,19 @@ "[[", " m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],,", " [[", + "#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */", - "#ifndef __cplusplus", + "#ifdef __cplusplus", + "extern \"C\" {", + "#endif", + "#ifdef __THROW /* this is a gnuism */", + "extern int isatty M4_YY_PARAMS( int ) __THROW;", + "#else", "extern int isatty M4_YY_PARAMS( int );", + "#endif", - "#endif /* __cplusplus */", + "#ifdef __cplusplus", + "}", + "#endif", + "#endif", " ]])", "]])", "%endif",