Re: (fwd) tin crashes on MacOS 10.4

Dennis Preiser <[email protected]> Wed, 30 Dec 2009 01:40:44 +0100
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On Wed, Dec 30, 2009 at 12:22:49AM +0100, Urs Janßen wrote:
> On Tue, Dec 29, 2009 at 03:57:23PM -0500, Thomas Dickey wrote:
>> ...or perhaps there's some Apple-define that turns on the bulk of things  
>> without aggravating anything.  There are several special cases in  
>> CF_XOPEN_SOURCE for other systems.
> 
> no MacOS X here but
> <http://svn.python.org/projects/python/branches/py3k/configure.in>
> has some comments on defining _XOPEN_SOURCE on various systems and if I
> didn't overlook something a fix for CF_XOPEN_SOURCE would be:
> 
> darwin*) #(vi
> 	CPPFLAGS="$CPPFLAGS -D_DARWIN_C_SOURCE"
> 	;;

No problems here with this (MacOS X 10.4).

I found an Apple developer document which says:

_DARWIN_C_SOURCE
    The _DARWIN_C_SOURCE macro (defined to any value), causes the UNIX™
    conforming variants to be used, but does not hide the extensions to
    the standards, as _POSIX_C_SOURCE and _XOPEN_SOURCE do. The
    _DARWIN_C_SOURCE macro can be used in conjunction with the
    _POSIX_C_SOURCE and _XOPEN_SOURCE macros, with the _DARWIN_C_SOURCE
    behavior overriding the other two, allowing the extensions to the
    standards to be visible.

    In addition, the _DARWIN_C_SOURCE macro will enable a few other
    extensions to the standards. These extensions occur where the SUSv3
    standard puts additional limitations on the functionality beyond
    that of legacy (and, typically, BSD) behavior. The extension
    variants use the $DARWIN_EXTSN suffix, and can also be enabled with
    separate macros. (See the macro descriptions below.)

and compat(5) says:

    Defining _POSIX_C_SOURCE or _DARWIN_C_SOURCE causes library and
    kernel calls to conform to the SUSv3 standards even if doing so
    would alter the behavior of functions used in 10.3.  Defining
    _POSIX_C_SOURCE also removes functions, types, and other interfaces
    that are not part of SUSv3 from the normal C namespace, unless
    _DARWIN_C_SOURCE is also defined (i.e., _DARWIN_C_SOURCE is
    _POSIX_C_SOURCE with non-POSIX extensions).  In any of these cases,
    the _DARWIN_FEATURE_UNIX_CONFORMANCE feature macro will be defined
    to the SUS conformance level (it is undefined otherwise).

    Starting in Mac OS X 10.5, if none of the macros _NONSTD_SOURCE,
    _POSIX_C_SOURCE or _DARWIN_C_SOURCE are defined, and the environment
    variable MACOSX_DEPLOYMENT_TARGET is either undefined or set to 10.5
    or greater (or equivalently, the gcc(1) option -mmacosx-version-min
    is either not specified or set to 10.5 or greater), then UNIX
    conformance will be on by default, and non-POSIX extensions will
    also be available (this is the equivalent of defining
    _DARWIN_C_SOURCE).  For version values less that 10.5, UNIX
    conformance will be off (the equivalent of defining _NONSTD_SOURCE).

Dennis