Re: conundrum: _C99_SOURCE vs. sigset
On Thu, Aug 03, 2006 at 03:47:34PM -0400, Mikhail Teterin wrote: > Hello! > > I'm trying to compile a program, which uses threads and has its own daemon > global variable. > > The variable's declaration results in an error: > > recsnap.C:50: error: `RTRString daemon' redeclared as different kind of symbol > /usr/include/stdlib.h:252: error: previous declaration of `int daemon(int, > int)' > > The daemon()'s declaration in stdlib.h can be turned off by declaring either > _C99_SOURCE or _ANSI_SOURCE. Unfortunately, both of these defines also turn > off the declaration of sigset_t and fd_set: > > /usr/include/pthread.h:233: error: expected `,' or `...' before '*' token > .../include/rtr/selectni.h:129: error: `fd_set' does not name a type > > Can this be solved -- without modifying the vendor's code? Thanks! Try -D_POSIX_C_SOURCE=200112. The macro _C99_SOURCE is for pure C99 code and _ANSI_SOURCE for C90 code. Both don't include the header. Stefan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: isnan() with gcc 3.2.2 on FreeBSD 5.0-C
On Mon, Mar 31, 2003 at 02:46:05PM +0800, Ying-Chieh Liao wrote: > the following code snippet works fine with gcc 2.95.4 on RELENG_4 > but failed on my -current > > > #include > #include > > using namespace std; > > int main(void) > { > cout << isnan(1.0) << endl; > return 0; > } > > > > test.cpp: In function `int main()': > test.cpp:8: `isnan' undeclared (first use this function) > test.cpp:8: (Each undeclared identifier is reported only once for each function >it appears in.) > > > what's wrong with my system ? or what can I do for it ? The isnan() macro is a new feature of C99 and thus not (yet) part of C++. Nevertheless you can use -D_GLIBCPP_USE_C99 to include this and some other non-standard C++ features. Regards, Stefan Farfeleder ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Power off problem
On Sun, Nov 17, 2002 at 07:33:30PM +0100, Michael Nottebrock wrote: > Ulrich 'Q' Spoerlein wrote: > > >halt -p or > >shutdown -p now > > ... does indeed not work on a lot of modern systems. All my athlon boxes > here will only poweroff with 5-CURRENT, thanks to acpi-support there. jhb has a patch that gives some basic acpi functionality to RELENG_4 (http://people.freebsd.org/~jhb/patches/acpi_4x.patch). With it I'm able to do halt -p on stable. Regards, Stefan Farfeleder To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message