[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: porting stdioext to HP-NonStop
From: |
Joachim Schmitz |
Subject: |
RE: porting stdioext to HP-NonStop |
Date: |
Thu, 23 Dec 2010 12:00:40 +0100 |
Hi Bruno
OK, a couple of problems:
During compile of gllib:
NSIG missing, I added it to gllib/spwani.c, in a brute force fashion (#define
NSIG 32) without really know what I'm doing here...
"/bin/kill -l | wc -w" returns 33.
During compile of gltests:
Something very weird errors in test-allignof.c:
source='test-alignof.c' object='test-alignof.o' libtool=no DEPDIR=.deps
depmode=none /bin/sh ./../build-aux/depcomp cc -DHAVE_CONFIG_H -I.
-DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
-I/usr/local/include -g -Wnowarn -c -o test-alignof.o test-alignof.c
CHECK (char)
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/test-alignof.c", line 40:
error(197):
invalid size for bit field
...
alphasort missing, need to modify gllib/dirent.in.h? How?
source='test-dirent-c++.cc' object='test-dirent-c++.o' libtool=no
DEPDIR=.depsdepmode=none /bin/sh ./../build-aux/depcomp c++ -HAVE_CONFIG_H -I.
-DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
-I/usr/local/include -Wnowarn -c -o test-dirent-c++.o test-dirent-c++.cc
_GL_CXXALIAS_SYS_CAST (alphasort, int,
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/./../gllib/dirent.h", line 471:
error(363):
the global scope has no "alphasort"
gethostname missing (resp. not found, it is available and declared in
<netdb.h>), in various places. I added it to gllib/unistd.in.h
source='test-fcntl-h-c++.cc' object='test-fcntl-h-c++.o' libtool=no
DEPDIR=.deps depmode=none /bin/sh ./../build-aux/depcomp c++ -DHAVE_CONFIG_H
-I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
-I/usr/local/include -Wnowarn -c -o test-fcntl-h-c++.o test-fcntl-h-c++.cc
_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/./../gllib/unistd.h", line 972:
error(363):
the global scope has no "gethostname"
Problem with HOST_NAME_MAX (MAXHOSTNAMELEN is set to 64 in <arpa/nameser.h>,
added this to gllib/unistd.in.h, but don't think it belongs there):
char buf[HOST_NAME_MAX];
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/test-gethostname.c", line 38:
error(163):
incomplete type is not allowed
if (strlen (NOHOSTNAME) >= HOST_NAME_MAX)
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/test-gethostname.c", line 41:
error(123):
expected an expression
Incompatible prototype for inet_ntop
source='test-getaddrinfo.c' object='test-getaddrinfo.o' libtool=no
DEPDIR=.deps depmode=none /bin/sh ./../build-aux/depcomp cc -DHAVE_CONFIG_H
-I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
-I/usr/local/include -g -Wnowarn -c -o test-getaddrinfo.o test-getaddrinfo.c
extern const char *inet_ntop (int af, const void *restrict src,
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/./../gllib/arpa/inet.h", line
129: error(235):
declaration is incompatible with
"const char *inet_ntop(int, const void *, char *, size_t)" (declared
at line 421 of "/usr/include/netdb.h")
and connect, bind, sendto, setsockopt (socklen_t vs. size_t), 'fixed' it in
gllib/sys_socket.in.h (brute force, "#define socklen_t size_t")
source='test-sys_select-c++.cc' object='test-sys_select-c++.o' libtool=no
DEPDIR=.deps depmode=none /bin/sh ./../build-aux/depcomp c++ -DHAVE_CONFIG_H
-I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
-I/usr/local/include -Wnowarn -c -o test-sys_select-c++.o
test-sys_select-c++.cc
_GL_CXXALIAS_SYS (connect, int,
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/../gllib/sys/socket.h", line
560: error(232):
a value of type "extern "C" int (*)(int, const sockaddr *, size_t)"
cannot be used to initialize an entity of type
"int (*)(int, const sockaddr *, socklen_t)"
_GL_CXXALIAS_SYS (bind, int,
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/../gllib/sys/socket.h", line
615: error(232):
a value of type "extern "C" int (*)(int, const sockaddr *, size_t)"
cannot be used to initialize an entity of type
"int (*)(int, const sockaddr *, socklen_t)"
_GL_CXXALIAS_SYS (sendto, ssize_t,
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/../gllib/sys/socket.h", line
837: error(232):
a value of type "extern "C" ssize_t (*)(int, const void *, size_t,
int, const sockaddr *, size_t)" cannot be used to initialize an
entity of type "ssize_t (*)(int, const void *, size_t, int, const
sockaddr *, socklen_t)"
_GL_CXXALIAS_SYS (setsockopt, int, (int fd, int level, int optname,
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/../gllib/sys/socket.h", line
865: error(232):
a value of type
"extern "C" int (*)(int, int, int, const void *, size_t)" cannot be
used to initialize an entity of type
"int (*)(int, int, int, const void *, socklen_t)"
Our select() needs <sys/time.h> (for fd_set and friends), I added this to
gllib/sys_select.in.h
SA_RESTART and SA_RESETHAND are missing
source='test-sigaction.c' object='test-sigaction.o' libtool=no DEPDIR=.deps
depmode=none /bin/sh ./../build-aux/depcomp cc -DHAVE_CONFIG_H -I.
-DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
-I/usr/local/include -g -Wnowarn -c -o test-sigaction.o test-sigaction.c
ASSERT ((sa.sa_flags & SA_RESETHAND) == 0);
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/test-sigaction.c", line 67:
error(114):
identifier "SA_RESETHAND" is undefined
...
ASSERT ((old_sa.sa_flags & MASK_SA_FLAGS) == 0);
^
"/usr/local/Floss/gnulib/testdir-posix/gltests/test-sigaction.c", line 97:
error(114):
identifier "SA_RESTART" is undefined
rpl_printf missing (during linking) (and an empty .o file created)
**** ERROR **** [1210]:
test-stdio-c++.o (.rodata + 0x10): unresolved reference to rpl_printf.
Bye, Jojo
-----Original Message-----
From: Bruno Haible [mailto:address@hidden
Sent: Wednesday, December 22, 2010 5:59 PM
To: Joachim Schmitz
Cc: address@hidden; 'Eric Blake'; 'Chet Ramey'
Subject: Re: porting stdioext to HP-NonStop
Hello Joachim,
> $ ./stdioext-flags
> #define _IOERR 0x40
> #define _IOREAD 0x80
> #define _IOWRT 0x4
> #define _IORW 0x100
> #define _IORW 0x100
>
> Very nice.
>
> Downloaded, unpacked, modified gllib/stdio-impl.h as per above,
> configured, compiled, checked, all 33 tests passed!
Perfect! This was easier than I thought.
I'm checking in the patch below.
> I once tried, but failed, can you give me a full testdir with all gnulib
> features to run and check?
The one with all gnulib features is pretty big. A better next step is a testdir
with only the POSIX replacements part of gnulib. I created one through
$ ./gnulib-tool --create-testdir --dir=/tmp/testdir-posix \
--with-tests --with-c++-tests \
`./posix-modules`
and uploaded it to
http://www.haible.de/bruno/gnu/testdir-posix.tar.gz
> So that we can get this 'strange' platform sorted once and forever?
Well, the POSIX replacements part of gnulib is constantly growing:
We tackle more and more functions, add more checks to the unit tests and find
more platform bugs. So, if one platform passes all tests today, there may be
again five test failures in 6 months.
2010-12-22 Bruno Haible <address@hidden>
Port extended stdio modules to HP NonStop Kernel.
* lib/stdio-impl.h (_IOERR, _IOREAD, _IOWRT, _IORW) [__TANDEM]: New
macros.
* lib/fbufmode.c: Update comments.
* lib/fflush.c: Likewise.
* lib/fpurge.c: Likewise.
* lib/freadable.c: Likewise.
* lib/freadahead.c: Likewise.
* lib/freading.c: Likewise.
* lib/freadptr.c: Likewise.
* lib/freadseek.c: Likewise.
* lib/fseeko.c: Likewise.
* lib/fseterr.c: Likewise.
* lib/fwritable.c: Likewise.
* lib/fwriting.c: Likewise.
Reported by Joachim Schmitz <address@hidden>.
--- lib/stdio-impl.h.orig Wed Dec 22 17:33:17 2010
+++ lib/stdio-impl.h Wed Dec 22 17:32:54 2010
@@ -75,6 +75,17 @@
/* SystemV derived implementations. */
+#ifdef __TANDEM /* NonStop Kernel */
+# ifndef _IOERR
+/* These values were determined by the program 'stdioext-flags' at
+ <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
+# define _IOERR 0x40
+# define _IOREAD 0x80
+# define _IOWRT 0x4
+# define _IORW 0x100
+# endif
+#endif
+
#if defined _IOERR
# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */
--- lib/fbufmode.c.orig Wed Dec 22 17:33:16 2010
+++ lib/fbufmode.c Wed Dec 22 12:44:24 2010
@@ -50,7 +50,7 @@
return _IOFBF;
#elif defined __EMX__ /* emx+gcc */
return fp->_flags & (_IOLBF | _IONBF | _IOFBF);
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
# if HAVE___FLBF /* Solaris >= 7 */
if (__flbf (fp))
return _IOLBF;
--- lib/fflush.c.orig Wed Dec 22 17:33:16 2010
+++ lib/fflush.c Wed Dec 22 12:23:58 2010
@@ -60,7 +60,7 @@
fp->_ungetc_count = 0;
fp->_rcount = - fp->_rcount;
}
-# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
/* Nothing to do. */
# else /* other implementations */
fseeko (fp, 0, SEEK_CUR);
--- lib/fpurge.c.orig Wed Dec 22 17:33:16 2010
+++ lib/fpurge.c Wed Dec 22 12:24:10 2010
@@ -91,7 +91,7 @@
fp->_wcount = 0;
fp->_ungetc_count = 0;
return 0;
-# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
fp->_ptr = fp->_base;
if (fp->_ptr != NULL)
fp->_cnt = 0;
--- lib/freadable.c.orig Wed Dec 22 17:33:16 2010
+++ lib/freadable.c Wed Dec 22 12:24:21 2010
@@ -33,7 +33,7 @@
return (fp_->_flags & (__SRW | __SRD)) != 0;
#elif defined __EMX__ /* emx+gcc */
return (fp->_flags & (_IORW | _IOREAD)) != 0;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
return (fp->_flag & (_IORW | _IOREAD)) != 0;
#elif defined __QNX__ /* QNX */
return (fp->_Mode & 0x1 /* _MOPENR */) != 0;
--- lib/freadahead.c.orig Wed Dec 22 17:33:16 2010
+++ lib/freadahead.c Wed Dec 22 12:24:36 2010
@@ -48,7 +48,7 @@
/* equivalent to
(fp->_ungetc_count == 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount)
*/
return (fp->_rcount > 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount);
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
if ((fp_->_flag & _IOWRT) != 0)
return 0;
return fp_->_cnt;
--- lib/freading.c.orig Wed Dec 22 17:33:16 2010
+++ lib/freading.c Wed Dec 22 12:24:45 2010
@@ -39,7 +39,7 @@
return (fp_->_flags & __SRD) != 0;
#elif defined __EMX__ /* emx+gcc */
return (fp->_flags & _IOREAD) != 0;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
# if defined __sun /* Solaris */
return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0; # else
--- lib/freadptr.c.orig Wed Dec 22 17:33:16 2010
+++ lib/freadptr.c Wed Dec 22 12:24:55 2010
@@ -56,7 +56,7 @@
abort ();
*sizep = fp->_rcount;
return fp->_ptr;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
if ((fp_->_flag & _IOWRT) != 0)
return NULL;
size = fp_->_cnt;
--- lib/freadseek.c.orig Wed Dec 22 17:33:16 2010
+++ lib/freadseek.c Wed Dec 22 12:25:04 2010
@@ -42,7 +42,7 @@
#elif defined __EMX__ /* emx+gcc */
fp->_ptr += increment;
fp->_rcount -= increment;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
fp_->_ptr += increment;
fp_->_cnt -= increment;
#elif defined __UCLIBC__ /* uClibc */
--- lib/fseeko.c.orig Wed Dec 22 17:33:16 2010
+++ lib/fseeko.c Wed Dec 22 12:25:24 2010
@@ -69,7 +69,7 @@
&& fp->_rcount == 0
&& fp->_wcount == 0
&& fp->_ungetc_count == 0)
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
if (fp_->_ptr == fp_->_base
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
#elif defined __UCLIBC__ /* uClibc */
@@ -131,7 +131,7 @@
fp_->_flags &= ~__SEOF;
#elif defined __EMX__ /* emx+gcc */
fp->_flags &= ~_IOEOF;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
fp->_flag &= ~_IOEOF;
#elif defined __MINT__ /* Atari FreeMiNT */
fp->__offset = pos;
--- lib/fseterr.c.orig Wed Dec 22 17:33:16 2010
+++ lib/fseterr.c Wed Dec 22 12:18:20 2010
@@ -35,7 +35,7 @@
fp_->_flags |= __SERR;
#elif defined __EMX__ /* emx+gcc */
fp->_flags |= _IOERR;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
fp_->_flag |= _IOERR;
#elif defined __UCLIBC__ /* uClibc */
fp->__modeflags |= __FLAG_ERROR;
--- lib/fwritable.c.orig Wed Dec 22 17:33:16 2010
+++ lib/fwritable.c Wed Dec 22 12:25:41 2010
@@ -33,7 +33,7 @@
return (fp_->_flags & (__SRW | __SWR)) != 0;
#elif defined __EMX__ /* emx+gcc */
return (fp->_flags & (_IORW | _IOWRT)) != 0;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
return (fp->_flag & (_IORW | _IOWRT)) != 0;
#elif defined __QNX__ /* QNX */
return (fp->_Mode & 0x2 /* _MOPENW */) != 0;
--- lib/fwriting.c.orig Wed Dec 22 17:33:16 2010
+++ lib/fwriting.c Wed Dec 22 12:25:51 2010
@@ -33,7 +33,7 @@
return (fp_->_flags & __SWR) != 0;
#elif defined __EMX__ /* emx+gcc */
return (fp->_flags & _IOWRT) != 0;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris,
OpenServer, mingw, NonStop Kernel */
return (fp->_flag & _IOWRT) != 0;
#elif defined __UCLIBC__ /* uClibc */
return (fp->__modeflags & __FLAG_WRITING) != 0;
- Re: [bash-testers] Bash-4.2-beta available for FTP, Eric Blake, 2010/12/21
- Re: [bash-testers] Bash-4.2-beta available for FTP, Bruno Haible, 2010/12/21
- RE: [bash-testers] Bash-4.2-beta available for FTP, Joachim Schmitz, 2010/12/22
- Re: porting stdioext to HP-NonStop, Bruno Haible, 2010/12/22
- RE: porting stdioext to HP-NonStop, Joachim Schmitz, 2010/12/22
- Re: porting stdioext to HP-NonStop, Bruno Haible, 2010/12/22
- RE: porting stdioext to HP-NonStop,
Joachim Schmitz <=
- Re: <signal.h> on HP-NonStop, Bruno Haible, 2010/12/23
- RE: <signal.h> on HP-NonStop, Joachim Schmitz, 2010/12/23
- Re: <signal.h> on HP-NonStop, Bruno Haible, 2010/12/24
- Re: <signal.h> on HP-NonStop, Bruno Haible, 2010/12/24
- RE: <signal.h> on HP-NonStop, Joachim Schmitz, 2010/12/23
- list protocol [was: <signal.h> on HP-NonStop], Eric Blake, 2010/12/23
- Re: porting alignof to HP-NonStop, Bruno Haible, 2010/12/23
- RE: porting alignof to HP-NonStop, Joachim Schmitz, 2010/12/23
- Re: porting alignof to HP-NonStop, Bruno Haible, 2010/12/24
- Re: alphasort on HP-NonStop, Bruno Haible, 2010/12/23