This is the mail archive of the pthreads-win32@sourceware.cygnus.com mailing list for the pthreas-win32 project.


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

_POSIX_THREAD constant


To whom it may concern,

Can someone in a future version wrap the compile-time symbolic constant in
the 'pthread.h' header file as follows:

#ifndef _POSIX_THREADS
#define _POSIX_THREADS
#endif

This constant, as well as a few others, is generally set in the 'unistd.h'
header file at compile time (UNIX).  My WinNT/UNIX program uses this
constant to determine if POSIX threads are available at compile time and
uses different code segments depending on this check.  On WinNT I set this
variable explicitly in the make/project file (i.e. /D "_POSIX_THREADS")
since there is no 'unistd.h' header file.  This in turn leads to a 'warning
C4005: '_POSIX_THREADS' : macro redefinition' message.  I understand this is
a very minor issue, but this will eliminate this warning for those of us who
have cross-platform applications that need to determine at compile time if
POSIX threads are available.

Thanks,
Aurelio Medina
Bank of America, Distributed Systems Management
mailto:aureliom@crt.com <mailto:aureliom@crt.com> 


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