bug-m4
[Top][All Lists]
Advanced

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

Re: Compiler error of m4-1.4.13 on AIX using xlc


From: Bruno Haible
Subject: Re: Compiler error of m4-1.4.13 on AIX using xlc
Date: Thu, 21 May 2009 01:05:16 +0200
User-agent: KMail/1.9.9

Eric Blake asked:
> > BTW: The xlC-compiler (more: it's header files) on AIX supports a define
> > _LINUX_SOURCE_COMPAT which enables some linux compatibility behaviour (e.g.
> > malloc(0) returns a pointer to 0 bytes memory, not just NULL).
> 
> Should we be adding that to the list of pre-defined macros in
> gl_USE_SYSTEM_EXTENSIONS (and push it to autoconf as well)?

What are the effects of defining _LINUX_SOURCE_COMPAT on AIX 5.3?

- In <errno.h>, the value of ENOTEMPTY becomes different from the value of
  EEXIST.

- The functions
    malloc, realloc, calloc, valloc,
    strerror_r,
    scandir, alphasort, readdir_r,
    gethostbyname_r, gethostbyaddr_r,
    ptrace
  behave differently.

- The include file <sys/mtio.h> has a totally different contents.

- The include file <sys/reboot.h> declares a reboot() function.

- On 32-bit platforms, time_t is typedef'ed to 'long' instead of 'int'.
  (Matters mostly for printf statements and for C++.)

- The function sbrk() has a different prototype.

This is a lot of side effects. Much more than what _GNU_SOURCE and/or
__EXTENSIONS__ do. Therefore, I would leave _LINUX_SOURCE_COMPAT as an
option to the package maintainer, and not activate it by default in
gnulib.

Bruno




reply via email to

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