Re: [Rd] can't compile on OSX: unsetenv header issues

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 08 Jan 2007 - 17:47:28 GMT

On Mon, 8 Jan 2007, Seth Falcon wrote:

> Hi,
>
> A recent change has R failing to compile (for me) on ppc OSX 10.4.8 like this:
>
> ../../../../R-devel/src/main/datetime.c: In function `reset_tz':
> ../../../../R-devel/src/main/datetime.c:511: error: void value not ignored as it ought to be
>
> I suspect there is some sort of configure magic that needs to happen
> to get the POSIX compatible unsetenv on OSX. Here's what I think is
> the relevant bit from stdlib.h, but I'm hoping someone with more OSX
> experience will recognize what needs to be done.

So do I, but does defining __DARWIN_UNIX03 at the head of that file (and sysutils.c) solve this?

OSes who adopt pretty standard function names with non-standard implementations used to be commonplace, but I had rather hoped we had seen the last of this after Single Unix Standard, POSIX ....

> #if __DARWIN_UNIX03
> int unsetenv(const char *) __DARWIN_ALIAS(unsetenv);
> #else /* !__DARWIN_UNIX03 */

> void unsetenv(const char *);
> #endif /* __DARWIN_UNIX03 */
>
>
> + seth
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue Jan 09 08:10:04 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 09 Jan 2007 - 08:31:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.