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 @@ #ifndef YY_ALWAYS_INTERACTIVE #ifndef 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 YY_PARAMS(( int )) __THROW; +#else extern int isatty YY_PARAMS(( int )); +#endif -#endif /* __cplusplus */ +#ifdef __cplusplus +} +#endif +#endif #endif /* !YY_NEVER_INTERACTIVE */ #endif /* !YY_ALWAYS_INTERACTIVE */ --- 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",