]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Include <stdlib.h>, so that malloc(), free() get declared.
authorBruno Haible <bruno@clisp.org>
Fri, 9 Jun 2006 20:31:15 +0000 (20:31 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:23 +0000 (12:13 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/gettext.h

index 930eea16cac8555c5fd992103324a807fccbdfdf..27638c6d691521b9a0334586549ae02cbf9299d1 100644 (file)
@@ -1,3 +1,8 @@
+2006-06-04  Bruno Haible  <bruno@clisp.org>
+
+       * gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Parenthesize.
+       Include stdlib.h.
+
 2006-05-17  Bruno Haible  <bruno@clisp.org>
 
        Cygwin portability.
index 830f2fcf6962a06dfcb7c12bc95e5a8497577e36..eb6c9459d6d9b9734887f25df862db5d68c8be6d 100644 (file)
@@ -143,7 +143,11 @@ npgettext_aux (const char *domain,
 #include <string.h>
 
 #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
-  __GNUC__ >= 3 || defined __cplusplus
+  (__GNUC__ >= 3 || defined __cplusplus)
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#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