This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


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

other/4450: make install failed: /usr/include/win32api/windef.h redefined BOOL



>Number:         4450
>Category:       other
>Synopsis:       make install failed: /usr/include/win32api/windef.h redefined BOOL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 02 17:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     arthur schwarz
>Release:        gcc-3.0.1
>Organization:
>Environment:
cygwin under WinNT
>Description:
windef.h redefined BOOL at line 125 (__OBJC__ not defined). 

The problem occurs when compiling:

  /../gcc-3.0.1/libobjc/thr-objc.c

The expansion of the includes places 'objc.h' before 'windef.h' and both contain a definition of BOOL. Comments in windef.h (and windows.h) indicate that this is a known problem with no solution. I would like to help on this if I can. Is there a resource that I can read that describes the problem in more detail?

There is a cute trick used in 'gthr-win32.h' which may be relevant, to wit:

    <read in includes>
    #define BOOL
    #undef BOOL
    <read in more includes>

which if I understand correctly, since the macro BOOL takes precedence during parsing over the typedef BOOL allows the typedef to be masked.
>How-To-Repeat:
configure --enable-threads=win32
make bootstrap
make install
>Fix:
comment out the definition of BOOL in windef.h
>Release-Note:
>Audit-Trail:
>Unformatted:


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