Ticket #2117: flex-2.5.34-isatty.patch

File flex-2.5.34-isatty.patch, 1.2 KB (added by Julio Meca Hansen, 17 years ago)
  • flex/scan.c

    Declare the isatty prototype all the time ... otherwise packages like
    doxygen and ttmkfdir fail to build.
    
    http://bugs.gentoo.org/119598
    
     
    41794179        yyfree((void *) b  );
    41804180}
    41814181
    4182 #ifndef __cplusplus
     4182#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
     4183#ifdef __cplusplus
     4184extern "C" {
     4185#endif
     4186#ifdef __THROW /* this is a gnuism */
     4187extern int isatty (int ) __THROW;
     4188#else
    41834189extern int isatty (int );
    4184 #endif /* __cplusplus */
     4190#endif
     4191#ifdef __cplusplus
     4192}
     4193#endif
     4194#endif
    41854195   
    41864196/* Initializes or reinitializes a buffer.
    41874197 * This function is sometimes called more than once on the same buffer,
  • flex/skel.c

     
    21832183  "[[",
    21842184  "    m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],,",
    21852185  "    [[",
    2186   "#ifndef __cplusplus",
     2186  "#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */",
     2187  "#ifdef __cplusplus",
     2188  "extern \"C\" {",
     2189  "#endif",
     2190  "#ifdef __THROW /* this is a gnuism */",
     2191  "extern int isatty M4_YY_PARAMS( int ) __THROW;",
     2192  "#else",
    21872193  "extern int isatty M4_YY_PARAMS( int );",
    2188   "#endif /* __cplusplus */",
     2194  "#endif",
     2195  "#ifdef __cplusplus",
     2196  "}",
     2197  "#endif",
     2198  "#endif",
    21892199  "    ]])",
    21902200  "]])",
    21912201  "%endif",