This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
Re: _POSIX_SOURCE?
- To: Max TenEyck Woodbury <mtew at cds dot duke dot edu>
- Subject: Re: _POSIX_SOURCE?
- From: "Phil Frisbie, Jr." <phil at hawksoft dot com>
- Date: Thu, 02 Aug 2001 14:34:37 -0700
- CC: pthreads-win32 at sourceware dot cygnus dot com
- Organization: Hawk Software
- References: <3B699D81.69208419@cds.duke.edu>
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