Article View: mod.computers.ridge
Article #40Problem with <ndir.h> & <sys/types.h>
From: bogstad
Date: Sun, 18 May 1986 06:38
Date: Sun, 18 May 1986 06:38
34 lines
1270 bytes
1270 bytes
PROBLEM: Including /usr/include/ndir.h and /usr/include/sys/types.h results in "Incompatible types" message. REPEAT-BY: Create foo.c: #include <ndir.h> #include <sys/types.h> cc -c foo.c REASON: ndir.h uses #define for u_short and u_long rather then including types.h. FIX: In ndir.h change #define lines for u_short and u_long too: #ifdef ridge #include <sys/types.h> #else #define u_short unsigned short #define u_long unsigned long #endif This is safe against multiple includes of types.h because types.h uses a #define and #ifdef to make sure its body is not included more than once. Bill Bogstad bogstad@hopkins-eecs-bravo.arpa
Technical Details
Message-ID:
<8605180652.AA06641@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!decvax!decwrl!ucbvax!HOPKINS-EECS-BRAVO.ARPA!bogstadShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!decvax!decwrl!ucbvax!HOPKINS-EECS-BRAVO.ARPA!bogstad From: bogstad@HOPKINS-EECS-BRAVO.ARPA.UUCP Newsgroups: mod.computers.ridge Subject: Problem with <ndir.h> & <sys/types.h> Message-ID: <8605180652.AA06641@ucbvax.Berkeley.EDU> Date: Sun, 18-May-86 02:38:38 EDT Article-I.D.: ucbvax.8605180652.AA06641 Posted: Sun May 18 02:38:38 1986 Date-Received: Sun, 18-May-86 15:43:51 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 34 Approved: info-ridge@hopkins-eecs-bravo.arpa