home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!uwm.edu!cs.utexas.edu!ut-emx!shrike!flash
- From: flash@austin.lockheed.com (James W. Melton)
- Newsgroups: comp.sys.sgi
- Subject: Re: Missing Prototypes - Solution!
- Keywords: prototypes, irix
- Message-ID: <1173@shrike.com>
- Date: 28 Aug 92 05:50:04 GMT
- Article-I.D.: shrike.1173
- References: <3419@ra.nrl.navy.mil>
- Organization: "Lockheed Austin Division, 6800 Burleson Rd, Austin, TX 78744
- Lines: 51
-
- In article <3419@ra.nrl.navy.mil> russo@rudedog.nrl.navy.mil (Kevin Russo) writes:
- >
- >Since we're all ANSI-fying our code these days, several people may
- >have run into the ol' missing prototype problem. It seems that the
- >prototype declarations for some system and library routines are not
- >anywhere to be found in the header files. (It's always the one you
- >want, too.)
- >
-
- Of course, these are just the ones supplied with the OS; add on
- your third party functions (like Sybase)...
-
- Which raises and interesting problem. We are also compiling all our
- code -fullwarn and attempting to resolve the warnings. So I entered
- from the man pages the prototypes for the Sybase functions we are
- using (an aside: Sybase said they included ANSI prototypes in
- 4.6.1, but we won't see them on SGI until 5.0 is released).
-
- One function has a parameter which is declared BYTE *. From the
- Sybase header files,
-
- typedef unsigned char BYTE;
-
- Now, the SGI compiler treats characters as unsigned by default
- (according to the CC man page). Use the -signed flag to get signed
- characters. However, the following code fragment will not compile
- under IRIX 4.0.1
-
- extern void foo (unsigned char *ptr);
-
- void bar(void)
- {
- char line[80];
-
- foo(line);
- }
-
- If char's are unsigned by default, why is there a difference
- between and an unsigned char * and a char *? I called the TAC, and
- the guy there didn't think it was a problem, but he filed a bug
- report for me anyway. Just an irritation, but one that shouldn't
- have been. There are enough other *real* problems to fix in the
- code! :-)
-
-
-
- --
- Jim Melton, novice guru
- email: flash@austin.lockheed.com | "So far as we know, our
- voice mail: (512) 386-4486 | computer has never had
- fax: (512) 386-4223 | an undetected error"
-