Please help us test the behavior of different Unices

Steven M. Schweda sms at antinode.info
Wed Mar 1 23:37:08 CET 2017


From: Justus Winter <justus at g10code.com>

> [...]  UNIX platforms that you care about.  (Care as in you want to be
> able to run GnuPG on it the future).

   I don't claim to care about any of the systems shown below, but
someone might.  (And my junk collection could use the exercise.)

> Building and running this program should be as easy as:
> 
>   % make test-unix-sockets && ./test-unix-sockets

   Thare's an optimist.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   HP-UX 11.11 (PA-RISC):

dy# uname -a
HP-UX dy B.11.11 U 9000/785 2012616114 unlimited-user license

dy# gcc --version
gcc (GCC) 4.4.2
[...]

dy# gcc -o test-unix-sockets test-unix-sockets.c

dy# ./test-unix-sockets
System: HP-UX:B.11.11:U
sizeof addr.sun_path: 92
Running test with strlen (cwd): 22, name: '/tmp/test-unix-sockets/socket'
  getsockname returned '/tmp/test-unix-sockets/socket', addrlen: 94
Running test with strlen (cwd): 22, name: 'socket'
  getsockname returned 'socket', addrlen: 94
Running test with strlen (cwd): 114, name: 'socket'
  getsockname returned 'socket', addrlen: 94
Running test with strlen (cwd): 1034, name: 'socket'
  getsockname returned 'socket', addrlen: 94

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   HP-UX 11.31 (IA64):

rux# uname -a
HP-UX rux B.11.31 U ia64 1678555272 unlimited-user license

rux# cc -V   
(Bundled) cc: HP C/aC++ B3910B A.06.12 [Oct 11 2006]

rux# cc -o test-unix-sockets test-unix-sockets.c
"test-unix-sockets.c", line 101: warning #2167-D: argument of type
          "socklen_t *" is incompatible with parameter of type "int *"
    if (getsockname (server, (struct sockaddr *) &addr, &addrlen) < 0)
                                                        ^

rux# ./test-unix-sockets                          
System: HP-UX:B.11.31:U
sizeof addr.sun_path: 92
Running test with strlen (cwd): 22, name: '/tmp/test-unix-sockets/socket'
  getsockname returned '/tmp/test-unix-sockets/socket', addrlen: 94
Running test with strlen (cwd): 22, name: 'socket'
  getsockname returned 'socket', addrlen: 94
Running test with strlen (cwd): 114, name: 'socket'
  getsockname returned 'socket', addrlen: 94
Running test with strlen (cwd): 1034, name: 'socket'
  getsockname returned 'socket', addrlen: 94

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Solaris 10 (SPARC):

ra# uname -a
SunOS ra 5.10 Generic_141444-09 sun4u sparc SUNW,UltraSPARC-IIi-cEngine

ra# cc -V
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
[...]

ra# cc -o test-unix-sockets test-unix-sockets.c
Undefined                       first referenced
 symbol                             in file
bind                                test-unix-sockets.o
getsockname                         test-unix-sockets.o
accept                              test-unix-sockets.o
listen                              test-unix-sockets.o
socket                              test-unix-sockets.o
connect                             test-unix-sockets.o
ld: fatal: Symbol referencing errors. No output written to test-unix-sockets

ra# cc -o test-unix-sockets test-unix-sockets.c -lsocket

ra# ./test-unix-sockets
System: SunOS:5.10:Generic_141444-09
sizeof addr.sun_path: 108
Running test with strlen (cwd): 22, name: '/tmp/test-unix-sockets/socket'
  getsockname returned '/tmp/test-unix-sockets/socket', addrlen: 110
Running test with strlen (cwd): 22, name: 'socket'
  getsockname returned 'socket', addrlen: 110
Running test with strlen (cwd): 130, name: 'socket'
  getsockname returned 'socket', addrlen: 110
Running test with strlen (cwd): 1102, name: 'socket'
  getsockname returned 'socket', addrlen: 110

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Solaris 11 (x86):

soli7# uname -a
SunOS soli7 5.11 11.1 i86pc i386 i86pc

soli7# cc -V
cc: Sun C 5.12 SunOS_i386 2011/11/16

soli7# cc -o test-unix-sockets test-unix-sockets.c
Undefined                       first referenced
 symbol                             in file
bind                                test-unix-sockets.o
getsockname                         test-unix-sockets.o
accept                              test-unix-sockets.o
listen                              test-unix-sockets.o
socket                              test-unix-sockets.o
connect                             test-unix-sockets.o
ld: fatal: symbol referencing errors. No output written to test-unix-sockets

soli7# cc -o test-unix-sockets test-unix-sockets.c -lsocket

soli7# ./test-unix-sockets
System: SunOS:5.11:11.1
sizeof addr.sun_path: 108
Running test with strlen (cwd): 22, name: '/tmp/test-unix-sockets/socket'
  getsockname returned '/tmp/test-unix-sockets/socket', addrlen: 110
Running test with strlen (cwd): 22, name: 'socket'
  getsockname returned 'socket', addrlen: 110
Running test with strlen (cwd): 130, name: 'socket'
  getsockname returned 'socket', addrlen: 110
Running test with strlen (cwd): 1102, name: 'socket'
  getsockname returned 'socket', addrlen: 110

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Tru64 V5.1B:

urtx# uname -a
OSF1 urtx.antinode.info V5.1 2650 alpha

urtx# sizer -v
HP Tru64 UNIX V5.1B (Rev. 2650); Wed Feb 17 22:59:59 CST 2016

urtx# cc -V
Compaq C V6.5-303 (dtk) on HP Tru64 UNIX V5.1B (Rev. 2650)
Compiler Driver V6.5-302 (dtk) cc Driver

urtx# cc -o test-unix-sockets test-unix-sockets.c
cc: Error: test-unix-sockets.c, line 57: In this declaration,
 "socklen_t" must specify a type. (badparsedecl)
  socklen_t addrlen;
--^
cc: Error: test-unix-sockets.c, line 99: In this statement, "addrlen" is
 not declared. (undeclared)
  addrlen = sizeof addr;
--^

urtx# cc -o test-unix-sockets -D_XOPEN_SOURCE=500 test-unix-sockets.c

urtx# ./test-unix-sockets
System: OSF1:V5.1:2650
sizeof addr.sun_path: 104
Running test with strlen (cwd): 22, name: '/tmp/test-unix-sockets/socket'
  getsockname returned '/tmp/test-unix-sockets/socket', addrlen: 106
Running test with strlen (cwd): 22, name: 'socket'
  getsockname returned 'socket', addrlen: 106
Running test with strlen (cwd): 126, name: 'socket'
  getsockname returned 'socket', addrlen: 106
Running test with strlen (cwd): 1062, name: 'socket'
  getsockname returned 'socket', addrlen: 106

------------------------------------------------------------------------

   Steven M. Schweda               sms at antinode-info
   382 South Warwick Street        (+1) 651-699-9818
   Saint Paul  MN  55105-2547



More information about the Gnupg-devel mailing list