_POSIX_SOURCE?

Phil Frisbie, Jr. phil@hawksoft.com
Thu Aug 2 14:41:00 GMT 2001


Unfortunately, it is not that simple...

First, pthread.h includes windows.h and winsock.h for some defines.

Second, the Windows headers do not recognize _POSIX_SOURCE, but they do
recognize _POSIX_ , but that just fixes some things like file IO and it does not
block non POSIX functions.

You can either closely look at the source code line by line looking for non
POSIX functions, or take your source code over to a Linux, Solaris, or other
POSIX system and 'try' to compile it :) That is how I am porting the GLTrace DLL
from Windows to Linux/Solaris.

Max TenEyck Woodbury wrote:
> 
> I have (a part of) an application that I have working under
> WinXX that I want to move to several other environments. I figured
> that making it POSIX compliant would be the first step in moving
> it, so I stripped the windows headers, inserted the corresponding
> POSIX headers and defined _POSIX_SOURCE and included the PT32 include
> directory in the header search path. I expected the compiler
> to point out all the function calls and definitions that I needed
> to change.
> 
> NADA!
> 
> No errors. And there should be loads of 'em!
> 
> Help?
> 
> mtew@cds.duke.edu


Phil Frisbie, Jr.
Lead Developer, Hawk Software
http://www.hawksoft.com



More information about the Pthreads-win32 mailing list