bug-gnulib
[Top][All Lists]
Advanced

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

Re: mingw conflict between mkdtemp and sys_stat


From: Paul Eggert
Subject: Re: mingw conflict between mkdtemp and sys_stat
Date: Tue, 17 Oct 2006 21:03:09 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Eric Blake <address@hidden> writes:

> It just looks nicer if we provide gnulib
> modules with exported APIs that do not lie in the reserved namespace.

Sure, but can't you do something like the following (taken from
mktime.c)?  This minimizes the changes from libc and packages it
inside "#ifndef _LIBC" blocks that the libc maintainers can safely
ignore.  Admittedly it relies on undefined behavior since it defines
__something, but if that's a real problem we can fix it later.

#ifndef _LIBC
/* Portable standalone applications should supply a "time_r.h" that
   declares a POSIX-compliant localtime_r, for the benefit of older
   implementations that lack localtime_r or have a nonstandard one.
   See the gnulib time_r module for one way to implement this.  */
# include "time_r.h"
# undef __localtime_r
# define __localtime_r localtime_r
# define __mktime_internal mktime_internal
#endif




reply via email to

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