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

arthur_i_schwarz@west.raytheon.com arthur_i_schwarz@west.raytheon.com
Tue Oct 2 17:36:00 GMT 2001


>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:



More information about the Gcc-prs mailing list