[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext and C usage
From: |
Bruno Haible |
Subject: |
Re: gettext and C usage |
Date: |
Thu, 28 Feb 2002 14:09:07 +0100 (CET) |
Paul Eggert writes:
> A Google search reports that some fairly recent non-GNU operating
> systems (HP-UX 11 and Solaris 7) have a locale.h that doesn't work
> with some GCC installations. Please see:
>
> http://sources.redhat.com/ml/bug-gnu-utils/2001-11/msg00065.html
This one also says "checking for stdlib.h... no". So it's definitely
a broken GCC installation.
> http://www.optix.org/~dxy/solaris/gnome-libs/1.2.13/CONFIG_LOG
Don't know what's happening here, but Solaris 2.7 definitely has
locale.h as well.
> Personally, I no longer bother to test for the following headers,
> which have been required for a dozen years by the C standard even for
> freestanding implementations:
>
> <float.h> <limits.h> <stdarg.h> <stddef.h>
I agree for <float.h> <limits.h> <stddef.h>. But <stdarg.h> is lacking
on SunOS 4.1.4 with cc. You need varargs on this platform; but at
least you can write
int
asprintf (result, format, va_alist)
char **result;
const char *format;
va_dcl
{
on this platform; no need to go back to old-old K&R C
int
asprintf (va_alist)
va_dcl
{
va_list ap;
char **result;
const char *format;
va_start(ap);
result = va_arg(ap,char **);
format = va_arg(ap,const char *);
Bruno