Forwarded from [email protected]: > I’m trying to port sed-4.1.5 (and 4.2.1) to HP NonStop and I’m having > a couple issues with it. > > [... snip 4.1.5 info as it didn't use gnulib ...] > > In sed-4.2.1: > > Some are due to our picky compiler (or a potential bug in either your > code or out implementation of acl()) , some due to differenences how > POSIX ACLs are implemented here: > > diff -u ./lib/file-has-acl.c.orig ./lib/file-has-acl.c > --- ./lib/file-has-acl.c.orig 2009-06-15 04:05:11.000000000 -0500 > +++ ./lib/file-has-acl.c 2010-09-28 12:24:41.000000000 -0500 > @@ -23,6 +23,10 @@ > > #include "acl-internal.h" > > +#ifdef __TANDEM > +#define GETACL ACL_GET > +typedef struct acl aclent_t; > +#endif > > #if USE_ACL && HAVE_ACL_GET_FILE > > @@ -367,7 +371,11 @@ > > for (;;) > { > +#ifdef __TANDEM /* picky compiler */ > + count = acl ((char *)name, GETACLCNT, 0, NULL); > +#else > count = acl (name, GETACLCNT, 0, NULL); > +#endif > > if (count < 0) > { > @@ -393,7 +401,11 @@ > errno = ENOMEM; > return -1; > } > +#ifdef __TANDEM /* picky compiler */ > + if (acl ((char *)name, GETACL, count, entries) == count) > +#else > if (acl (name, GETACL, count, entries) == count) > +#endif > { > if (acl_nontrivial (count, entries)) > { > diff -u ./lib/set-mode-acl.c.orig ./lib/set-mode-acl.c > --- ./lib/set-mode-acl.c.orig 2009-06-15 04:05:11.000000000 -0500 > +++ ./lib/set-mode-acl.c 2010-09-28 12:16:31.000000000 -0500 > @@ -26,6 +26,11 @@ > #include "gettext.h" > #define _(msgid) gettext (msgid) > > +#ifdef __TANDEM > +#define SETACL ACL_SET > +typedef struct acl aclent_t; > +#define MODE_INSIDE_ACL 1 > +#endif > > /* If DESC is a valid file descriptor use fchmod to change the > file's mode to MODE on systems that have fchown. On systems > @@ -384,7 +389,11 @@ > if (desc != -1) > ret = facl (desc, SETACL, sizeof (entries) / sizeof (aclent_t), > entries); > else > +#ifdef __TANDEM /* picky compiler */ > + ret = acl ((char *)name, SETACL, sizeof (entries) / sizeof (aclent_t), > entries); > +#else > ret = acl (name, SETACL, sizeof (entries) / sizeof (aclent_t), > entries); > +#endif > if (ret < 0) > { > if (errno == ENOSYS) > > There is something strange going on in lib/stdlib.h, gives me a very > strange error message: > > j...@\hpitug:/usr/local/Floss/sed-4.2.1 $ make > make all-recursive > Making all in lib > make all-recursive > source='btowc.c' object='btowc.o' libtool=no DEPDIR=.deps depmode=none bin/sh > ../build-aux/depcomp cc -DHAVE_CONFIG_H -I. -I.. -I../lib -I.. -I../lib > -I/usr/local/include -g -c btowc.c > struct random_data > ^ > "/usr/local/Floss/sed-4.2.1/lib/../lib/stdlib.h", line 64: error(123): > expected an expression > { > ^ > "/usr/local/Floss/sed-4.2.1/lib/../lib/stdlib.h", line 65: error(111): > expected a "]" > { > ^ > "/usr/local/Floss/sed-4.2.1/lib/../lib/stdlib.h", line 65: error(158): > expected a ";" > 3 errors detected in the compilation of "btowc.c". > c89: /usr/cmplr/ccombe exited, returning 2. > *** Error code 1 > > In lib/stdlib.h.in, somewhere before ‘struct random’ it goes horribly > wrong, haven’t yet been able to spot where, might be in lib/stdint.h?
Hope this helps, Paolo
