public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* _POSIX_SOURCE?
@ 2001-08-02 11:29 Max TenEyck Woodbury
  2001-08-02 14:41 ` _POSIX_SOURCE? Phil Frisbie, Jr.
  0 siblings, 1 reply; 3+ messages in thread
From: Max TenEyck Woodbury @ 2001-08-02 11:29 UTC (permalink / raw)
  To: pthreads-win32

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: _POSIX_SOURCE?
  2001-08-02 11:29 _POSIX_SOURCE? Max TenEyck Woodbury
@ 2001-08-02 14:41 ` Phil Frisbie, Jr.
  2001-08-02 14:59   ` _POSIX_SOURCE? Max TenEyck Woodbury
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Frisbie, Jr. @ 2001-08-02 14:41 UTC (permalink / raw)
  To: Max TenEyck Woodbury; +Cc: pthreads-win32

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: _POSIX_SOURCE?
  2001-08-02 14:41 ` _POSIX_SOURCE? Phil Frisbie, Jr.
@ 2001-08-02 14:59   ` Max TenEyck Woodbury
  0 siblings, 0 replies; 3+ messages in thread
From: Max TenEyck Woodbury @ 2001-08-02 14:59 UTC (permalink / raw)
  To: pthreads-win32

"Phil Frisbie, Jr." wrote:
> ...
> 
> 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.

I expected that of the windows more or less, that's why I pulled all of them.

But the pthread.h header shouldn't include anything but POSIX stuff if _POSIX_SOURCE 
or _POSIX_C_SOURCE is defined. Could someone fix this? I'll be fixing this for
my own use of course, but I'd have to get the appropriate University official
to sign off on releasing it if I were to post it...

mtew@cds.duke.edu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-02 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-02 11:29 _POSIX_SOURCE? Max TenEyck Woodbury
2001-08-02 14:41 ` _POSIX_SOURCE? Phil Frisbie, Jr.
2001-08-02 14:59   ` _POSIX_SOURCE? Max TenEyck Woodbury

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).