Article View: gnu.gcc.help
Article #42797gcc 2.6.3 on Solaris 2.4 and __inline__
From: Neil McKellar
Date: Tue, 24 Oct 1995 00:00
Date: Tue, 24 Oct 1995 00:00
26 lines
1506 bytes
1506 bytes
On a Sparc running Solaris 2.4, gcc-2.6.3 seems to have problems with
the ntohl() routines in <sys/byteorder.h>. I'm compiling with the
barest possible command line:
cc -o <file> <file>.c
Gcc doesn't like the byteorder.h under /usr/include/sys, so it has one
of its own. Rather than simple NULL macro defines, it uses some
extern __inline__ declarations to simply return the passed argument.
This looks fine, and cc -E confirms that the include file gets the
right inline routines. However, when the linking stage starts up it
fails to find ntohl in the symbol table.
The linker I'm using is /usr/ccs/bin/ld.
Is this a problem with gcc, gcc's byteorder.h, or Solaris' version of
ld? As a work around, I've been able to compile this by simply adding
-I/usr/include, so that it gets the system header file (which doesn't
use inline routines).
Please email me, or reply here. (Email preferred.)
--
Neil McKellar |I should be in Transportation. I've 'ported
mckellar@cs.ualberta.ca|code to platforms most people have never even
|seen.
Technical Details
Message-ID:
<46jagp$q1t@scapa.cs.ualberta.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,4c38265be6eb607d,start X-Google-Attributes: gid11318c,public From: mckellar@cs.ualberta.ca (Neil McKellar) Subject: gcc 2.6.3 on Solaris 2.4 and __inline__ Date: 1995/10/24 Message-ID: <46jagp$q1t@scapa.cs.ualberta.ca> X-Deja-AN: 118051925 organization: Computing Science, U of Alberta, Edmonton, Canada newsgroups: gnu.gcc.help