NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/39331: unbalanced __BEGIN_DECLS / __END_DECLS in <sys/sched.h>



>Number:         39331
>Category:       lib
>Synopsis:       unbalanced __BEGIN_DECLS / __END_DECLS in <sys/sched.h>
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 10 08:35:00 +0000 2008
>Originator:     Arne H Juul
>Release:        NetBSD 4.99.72
>Organization:
        none
>Environment:
System: NetBSD inngang 4.99.72 NetBSD 4.99.72 (INNGANG 1.903) #4: Sat Aug 2 
10:28:28 CEST 2008 root@inngang:/usr/obj/sys/arch/i386/compile/INNGANG i386
Architecture: i386
Machine: i386
>Description:
        in <sys/sched.h> the __BEGIN_DECLS line is outside
        #if defined(_NETBSD_SOURCE)
        but the corresponding __END_DECLS is inside this ifdef;
        so depending on feature macros you'll get one but not the
        other one.  Seen when compiling mplayer-plugin-seamonkey
        from pkgsrc.
>How-To-Repeat:

Here's a pretty minimal C++ source file:

#define _XOPEN_SOURCE 1
#include <sys/sched.h>

int main(void) { return 0; }

which fails like this:
$ g++ t.cc
t.cc:4: error: expected `}' at end of input

>Fix:
        move the __BEGIN_DECLS one line down, or move the END_DECLS
        line so it's outside the corresponding #endif.



Home | Main Index | Thread Index | Old Index