Re: functions in different libraries on different OSes.

2002-10-10 Thread Russ Allbery
Stewart Brodie <[EMAIL PROTECTED]> writes: > I still tend to check for it on the basis that I check all other header > files, so I might as well check that one. There are systems that do not > have sys/types.h. That way, all header file checks are done the same > way. That also means that I al

Re: functions in different libraries on different OSes.

2002-10-10 Thread Stewart Brodie
In message <[EMAIL PROTECTED]> Russ Allbery <[EMAIL PROTECTED]> wrote: > Dan Kegel <[EMAIL PROTECTED]> writes: > > > Standard practice is probably to always write > > > #if HAVE_SYS_TYPES_H > > #include > > #endif > > There's no need to check for the existance of unless you're > at

Re: functions in different libraries on different OSes.

2002-10-09 Thread Earnie Boyd
Russ Allbery wrote: > Dan Kegel <[EMAIL PROTECTED]> writes: > > >>Standard practice is probably to always write > > >>#if HAVE_SYS_TYPES_H >>#include >>#endif > > > There's no need to check for the existance of unless you're > attempting portability far beyond that any normal software pack

Re: functions in different libraries on different OSes.

2002-10-09 Thread Russ Allbery
Dan Kegel <[EMAIL PROTECTED]> writes: > Standard practice is probably to always write > #if HAVE_SYS_TYPES_H > #include > #endif There's no need to check for the existance of unless you're attempting portability far beyond that any normal software package will need. It exists on pretty much

RE: functions in different libraries on different OSes.

2002-10-09 Thread Dan Kegel
Standard practice is probably to always write #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif I have a feeling autoconf gives you those preprocessor definitions for free. The more interesting question is how you get the link libraries right. I do explicit checks for

Re: functions in different libraries on different OSes.

2002-10-09 Thread Bruce Korb
Ollie Cook wrote: > There may be other methods of getting socket() on other OSes, for all I know. > > What is the correct way to diagnose how to get socket(), or any other function, > on a given OS, and to build the software appropriately, using autoconf? Search one (or both) autoconf archive s