From: Bruno Haible Date: Fri, 9 Jun 2006 20:31:15 +0000 (+0000) Subject: Include , so that malloc(), free() get declared. X-Git-Tag: v0.15~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbf0229e36e45cc8b8d910c1f7cd131e210259af;p=thirdparty%2Fgettext.git Include , so that malloc(), free() get declared. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 930eea16c..27638c6d6 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,8 @@ +2006-06-04 Bruno Haible + + * gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Parenthesize. + Include stdlib.h. + 2006-05-17 Bruno Haible Cygwin portability. diff --git a/gettext-tools/lib/gettext.h b/gettext-tools/lib/gettext.h index 830f2fcf6..eb6c9459d 100644 --- a/gettext-tools/lib/gettext.h +++ b/gettext-tools/lib/gettext.h @@ -143,7 +143,11 @@ npgettext_aux (const char *domain, #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - __GNUC__ >= 3 || defined __cplusplus + (__GNUC__ >= 3 || defined __cplusplus) + +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS +#include +#endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) @@ -180,7 +184,7 @@ dcpgettext_expr (const char *domain, msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); -#if !(_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS) +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif @@ -226,7 +230,7 @@ dcnpgettext_expr (const char *domain, msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); -#if !(_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS) +#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif