This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cygwin-1.5.23-2: /usr/include/ftw.h missing #include <features.h>

The following file, testfile.c,

    #include <ftw.h>

    void foo(void)

compiles without error using "gcc -c testfile.c" on HP-UX 10.20, 
SunOS 5.8 and Red Hat Linux 9, but on Cygwin, the following error 

    $ gcc -c testfile.c
    In file included from testfile.c:1:
    /usr/include/ftw.h:64: error: syntax error before "int"
    testfile.c:3: error: syntax error before "void"

The syntax error in /usr/include/ftw.h occurs because the symbol 
__BEGIN_DECLS is not defined.  The __BEGIN_DECLS symbol is not used 
in the HP-UX or SunOS versions of ftw.h, but it is used in the Red 
Hat version of ftw.h.  The salient difference between the Red Hat 
and Cygwin versions of ftw.h is that the Red Hat version includes 
features.h.  /usr/include/features.h on both systems includes 
sys/cdefs.h which is where __BEGIN_DECLS is defined.

I believe this is an error in Cygwin's implementation of 


Gary Johnson                 | Agilent Technologies     | Wireless Division
                             | Spokane, Washington, USA

Attachment: cygcheck.out
Description: Text document

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]