The following error messages occur when compiling scsh/network1.c:
neon:scsh-0.5.2$ cc -c -I./cig -I./scsh/regexp -DHAVE_CONFIG_H -I. -I. -O
-qsource -o scsh/network1.o scsh/network1.c
"scsh/network1.c", line 25.12: 1506-275 (S) Unexpected text 'int' encountered.
"scsh/network1.c", line 25.12: 1506-275 (S) Unexpected text ')' encountered.
"scsh/network1.c", line 25.19: 1506-276 (S) Syntax error: possible missing ')'?
"scsh/network1.c", line 25.12: 1506-343 (S) Redeclaration of h_errno_which
differs from previous declaration on line 55 of "/usr/include/netdb.h".
"scsh/network1.c", line 25.12: 1506-050 (I) Return type "int**" in
redeclaration is not compatible with the previous return type "void*".
"scsh/network1.c", line 36.10: 1506-045 (S) Undeclared identifier family.
"scsh/network1.c", line 59.22: 1506-045 (S) Undeclared identifier scheme_name.
"scsh/network1.c", line 64.21: 1506-045 (S) Undeclared identifier sockfd.
"scsh/network1.c", line 138.62: 1506-280 (W) Function argument assignment
between types "unsigned long*" and "int*" is not allowed.
"scsh/network1.c", line 161.63: 1506-280 (W) Function argument assignment
between types "unsigned long*" and "int*" is not allowed.
"scsh/network1.c", line 184.63: 1506-280 (W) Function argument assignment
between types "unsigned long*" and "int*" is not allowed.
"scsh/network1.c", line 235.51: 1506-280 (W) Function argument assignment
between types "unsigned long*" and "int*" is not allowed.
"scsh/network1.c", line 313.50: 1506-280 (W) Function argument assignment
between types "unsigned long*" and "int*" is not allowed.
"scsh/network1.c", line 327.50: 1506-280 (W) Function argument assignment
between types "unsigned long*" and "int*" is not allowed.
"scsh/network1.c", line 343.50: 1506-280 (W) Function argument assignment
between types "unsigned long*" and "int*" is not allowed.
Here is the expansion of the offending lines from the compiler listing:
24 |
25 | extern int h_errno;
25 + extern int (*(int *)h_errno_which());
"scsh/network1.c", line 25.12: 1506-275 (S)Unexpected text 'int' encountered.
"scsh/network1.c", line 25.12: 1506-275 (S)Unexpected text ')' encountered.
"scsh/network1.c", line 25.19: 1506-276 (S)Syntax error: possible missing ')'?
"scsh/network1.c", line 25.12: 1506-343 (S)Redeclaration of h_errno_which
differs from previous declaration on line 55 of "/usr/include/netdb.h".
"scsh/network1.c", line 25.12: 1506-050 (I)Return type "int**" in redeclaration
is not compatible with the previous return type "void*".
26 |
Here is the matching section from /usr/include/netdb.h:
#if _XOPEN_SOURCE_EXTENDED == 1
/*
* h_errno is provided by h_errno_which() routine.
* For non multi-threaded applications, it'll return the static h_errno
* for the multi-threaded ones, it'll return the per-thread value.
*/
extern void *h_errno_which(void);
#define h_errno (*(int *)h_errno_which())
The only way I found around it (and I do not know if it is the 'right' thing
to do) is to comment out the following line in ./scsh/network1.c:
*** ./scsh/network1.c.original Sun Jun 20 23:35:26 1999
--- ./scsh/network1.c Wed Jan 5 16:05:03 2000
***************
*** 22,28 ****
/* Make sure our exports match up w/the implementation: */
#include "network1.h"
! extern int h_errno;
/* to extract a 4 byte long value from a scheme string */
--- 22,28 ----
/* Make sure our exports match up w/the implementation: */
#include "network1.h"
! /* extern int h_errno; */
/* to extract a 4 byte long value from a scheme string */
--
Daniel Ortmann, IBM Circuit Technology, Rochester, MN 55901-7829
ortmann@vnet.ibm.com or ortmann@us.ibm.com and 507.253.6795 (external)
ortmann@rchland.ibm.com and tieline 8.553.6795 (internal)
ortmann@isl.net and 507.288.7732 (home)
"The answers are so simple, and we all know where to look,
but it's easier just to avoid the question." -- Kansas
|