Problem building sharutils 4.14 on AIX 6.1

Thomas Jahns <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
Hello,

I built sharutils 4.14 on AIX 6.1 and initially got the following errors when
compiling scribble.c:

[...]
make[2]: Entering directory `/pf/sw/src/sharutils/sharutils-4.14-build/src'
  CC       scribble.o
"../lib/unistd.h", line 121.3: 1506-205 (S) #error "Please include config.h first."
"../lib/unistd.h", line 123.1: 1506-485 (S) Parameter declaration list is
incompatible with declarator for _GL_INLINE_HEADER_BEGIN.
"../lib/unistd.h", line 1851.1: 1506-276 (S) Syntax error: possible missing '{'?
"../../sharutils-4.14/src/scribble.c", line 15.5: 1506-045 (S) Undeclared
identifier scrib_buf_t.
"../../sharutils-4.14/src/scribble.c", line 15.21: 1506-045 (S) Undeclared
identifier sb_next.
"../../sharutils-4.14/src/scribble.c", line 16.21: 1506-190 (I) Automatic
constant sb_size does not have a value. Zero is being assumed.
"../../sharutils-4.14/src/scribble.c", line 21.8: 1506-166 (S) Definition of
function scrib_buf_t requires parentheses.
"../../sharutils-4.14/src/scribble.c", line 21.20: 1506-276 (S) Syntax error:
possible missing '{'?
[...]

So I gathered scribble.c indirectly included a home-brew version of unistd.h
that configure generated. I was able to fix above problem by adding an

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

to scribble.c.

Please find a corresponding patch attached.

Regards, Thomas Jahns
-- 
Thomas Jahns
DKRZ GmbH, Department: Application software

Deutsches Klimarechenzentrum
Bundesstraße 45a
D-20146 Hamburg

Phone: +49-40-460094-151
Fax: +49-40-460094-270
Email: Thomas Jahns <[email protected]>
sharutils-4.14.patch (text/x-patch, 247 B)
--- a/src/scribble.c	2013-10-21 13:11:52.000000000 +0200
+++ b/src/scribble.c	2013-10-21 13:05:26.000000000 +0200
@@ -1,4 +1,6 @@
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include "scribble.h"
smime.p7s (application/pkcs7-signature, 4.5 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.