parse-datetime: avoid compilation failure on OpenBSD 4.7
authorJim Meyering <meyering@redhat.com>
Thu, 7 Oct 2010 21:15:00 +0000 (23:15 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 7 Oct 2010 21:19:32 +0000 (23:19 +0200)
* lib/parse-datetime.y (_STDLIB_H) [_STDLIB_H_]: Define.
This works around a compilation failure on OpenBSD 4.7:
http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3418

ChangeLog
lib/parse-datetime.y

index 45f2a69..f327621 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-07  Jim Meyering  <meyering@redhat.com>
+
+       parse-datetime: avoid compilation failure on OpenBSD 4.7
+       * lib/parse-datetime.y (_STDLIB_H) [_STDLIB_H_]: Define.
+       This works around a compilation failure on OpenBSD 4.7:
+       http://thread.gmane.org/gmane.comp.parsers.bison.bugs/3418
+
 2010-10-07  Eric Blake  <eblake@redhat.com>
 
        docs: update cygwin progress
index bc46e1c..a760e69 100644 (file)
 
 #include "xalloc.h"
 
+/* Bison's skeleton tests _STDLIB_H, while some stdlib.h headers
+   use _STDLIB_H_ as witness.  Map the latter to the one bison uses.  */
+/* FIXME: this is temporary.  Remove when we have a mechanism to ensure
+   that the version we're using is fixed, too.  */
+#ifdef _STDLIB_H_
+# undef _STDLIB_H
+# define _STDLIB_H 1
+#endif
 
 /* ISDIGIT differs from isdigit, as follows:
    - Its arg may be any int or unsigned int; it need not be an unsigned char