From: Jim Meyering Date: Thu, 7 Oct 2010 21:15:00 +0000 (+0200) Subject: parse-datetime: avoid compilation failure on OpenBSD 4.7 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e43bb61e60a318da34628989e8a754aee18a285;p=pspp 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 --- diff --git a/ChangeLog b/ChangeLog index 45f2a69079..f327621a7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-10-07 Jim Meyering + + 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 docs: update cygwin progress diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y index bc46e1c853..a760e69a1c 100644 --- a/lib/parse-datetime.y +++ b/lib/parse-datetime.y @@ -68,6 +68,14 @@ #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