[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: different CVS_SERVER for different hosts

From: Mark D. Baushke
Subject: Re: different CVS_SERVER for different hosts
Date: Sat, 01 Nov 2003 00:11:20 -0800

Hash: SHA1

Paul Edwards <address@hidden> writes:

> I don't mind this.  Something that says "If you have a POSIX
> compliant compiler/library, but you are unable to run
> 'config' for some reason, then you need to copy posix/config.h
> to ./config.h, then if you have a make program that is compatible
> with gnu make version 1.35 you can type 'make', otherwise you
> need to compile all the files listed in compile.bat".

For what it may be worth, gnu make is at version 3.80 these days...
> I don't think that is more elegant.  If NANOSLEEP is part of
> the Posix specification then there's nothing wrong with having
> a big:
> #ifdef POSIX
> etc
> #endif
> somewhere.  Or simply have a posix-specific config file.

ISO/IEC 9945-1, ANSI/IEEE Std 1003.1 Second Edition 1996-07-12 specifies
that <time.h> will define what is needful to support a nanosleep() call.
nanosleep() was introduced in POSIX 1003.1b-1993, but was not part of

So, a program may or may not see nanosleep() in <time.h> depending on
the revision of the date of the POSIX 1003.1 specification being used
by the host.

There is a _POSIX_C_SOURCE macro which may have a value 199309L. The
POSIX specifix before it only had an _POSIX_SOURCE macro defined, but
the value was not specified...

The point here is that POSIX support is a mixture of common practise and
mandated minimum requirements. So, the configure script will likely still
be useful to determine the capabilities of the host system.

It is also entirely possible that an OS might support the nanosleep()
function call without being fully POSIX compliant...

> You may have a source file that is not Posix-specific, it
> will work on any C89 compiler, so it is silly to make
> source code posix-dependant when it doesn't need to be.

That is true and in fact much of what is in the CVS source base
abstracts what is needful in as portable a manner as possible.

> That should actually be the ultimate
> #else
> #endif
> If you have no way to sleep, in fact, C89 provides no such
> facility, then what do you expect to happen on such an
> environment where the ability to sleep does not exist?

Well, that might depend on the OS environment. Some systems might be
compatible with the Single UNIX Specification (SUSv2) as defined by the
Open Group in 1997 and allow for either or both of the usleep() call or
the select() function to be called with a timeout.

If neither of those is found, then the sleep() function may exist which
would conform to the ISO/IEC 9945-1:1990 (POSIX.1) standard.

If none of those are available, then I guess the processor is just going
to go into a hard polling loop...

> Ok, good news!  I've been able to compile it!  Here is what I
> have in mind.
> A directory called "posix" and in it, a README file, plus a
> compile.bat and a config.h, both below:

Derek is working on the infrastructure of the cvs trunk, so I'll trust
him worry about the details of your compile.bat and config.h submission.

        -- Mark
Version: GnuPG v1.2.3 (FreeBSD)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]