[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-indent] Build hiccup in indent 2.2.9 on MacOS X 10.3.7 - unprotecte
From: |
Jonathan Leffler |
Subject: |
[Bug-indent] Build hiccup in indent 2.2.9 on MacOS X 10.3.7 - unprotected <malloc.h> in man/texinfo2man.c |
Date: |
Tue, 01 Feb 2005 23:35:29 -0800 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041217 |
Hi,
When I configured indent 2.2.9 on a MacOS X 10.3.7 (Panther) machine,
everything compiled fine except man/texinfo2man.c, for which the
compiler complained it could not find a header for #include <malloc.h>.
A quick scan of the source shows that intl/plural.c has #include
<malloc.h> commented out (inside #if 0/#endif and inside a C comment),
and src/globs.c has it protected by #ifdef HAVE_MALLOC_H (and it
includes <stdlib.h> immediately afterwards), and src/wildexp.c only
compiles on _WIN32 and __CYGWIN__.
The attached patch basically puts #ifdef HAVE_MALLOC_H before #include
<malloc.h> and #else/#include <stdlib.h>/#endif after it - using
<stdlib.h> to provide declarations for malloc() and realloc().
The patch is a universal diff (-u) rather than a pure context diff
(-c) as requested in the README file; if that is not acceptable, I
will resubmit with the official -c patch format. The patch is created
between the original man/texinfo2man.c.old vs man/texinfo2man.c - old
vs new.
I hope this helps you.
--
Jonathan Leffler (address@hidden, address@hidden)
#include <disclaimer.h>
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
--- man/texinfo2man.c.old Thu Jan 17 11:28:51 2002
+++ man/texinfo2man.c Tue Feb 1 23:18:17 2005
@@ -1,5 +1,9 @@
#include <stdio.h>
+#ifdef HAVE_MALLOC_H
#include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
#include <string.h>
#include <ctype.h>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-indent] Build hiccup in indent 2.2.9 on MacOS X 10.3.7 - unprotected <malloc.h> in man/texinfo2man.c,
Jonathan Leffler <=