rlcarr@athena.mit.edu (the Wizard of Speed and Time) (01/15/90)
I have Lattice C 5.04 (haven't applied either the 5.04a or 5.04b patches yet) and have discovered that the string.h and stdlib.h have conflicting prototypes in them. Specifically, one file has various memory functions (like memcpy) as taking void *'s while the other file shows them taking char *'s. Which is it? And have the patches fixed it? % setenv FLAME on How could Lattice not have found this out? Using string.h and stdlib.h together is a very basic thing to do. I really like their product, but errors like this drive me CRAZY! % setenv FLAME off Sigh. Rich Carreiro - Most Biased Boston Celtics Fan! "So long, farewell, and may ARPA: rlcarr@space.mit.edu the forces of evil become UUCP: ...!mit-eddie!space.mit.edu!rlcarr confused on the way to your BITNET: rlcarr@space.mit.edu door!" - George Carlin -- Rich Carreiro - Most Biased Boston Celtics Fan! "So long, farewell, and may ARPA: rlcarr@space.mit.edu the forces of evil become UUCP: ...!mit-eddie!space.mit.edu!rlcarr confused on the way to your BITNET: rlcarr@space.mit.edu door!" - George Carlin
walker@sas.UUCP (Doug Walker) (01/16/90)
In article <1990Jan15.020327.13614@athena.mit.edu> rlcarr@space.mit.edu (the Wizard of Speed and Time) writes: >I have Lattice C 5.04 (haven't applied either the 5.04a or 5.04b patches yet) >and have discovered that the string.h and stdlib.h have conflicting >prototypes in them. Specifically, one file has various memory functions >(like memcpy) as taking void *'s while the other file shows them taking >char *'s. Which is it? And have the patches fixed it? void * is an ANSI-ism that means 'take any kind of pointer'. char * is the pre-ANSI way of asking for a generic pointer, which meant you had to cast the pointer you were passing to char *. I suggest changing the char * declarations to void *, or simply #if 0'ing out the char * definitions. ***** =*|_o_o|\\=====Doug Walker, Software Distiller======================= *|. o.| || | o |// Apologies to those who send me mail. About 80% of ====== my replies bounce... usenet: ...mcnc!rti!sas!walker plink: dwalker bix: djwalker
riley@batcomputer.tn.cornell.edu (Daniel S. Riley) (01/17/90)
In article <1990Jan15.020327.13614@athena.mit.edu> rlcarr@space.mit.edu (the Wizard of Speed and Time) writes: >I have Lattice C 5.04 (haven't applied either the 5.04a or 5.04b patches yet) >and have discovered that the string.h and stdlib.h have conflicting >prototypes in them. Specifically, one file has various memory functions >(like memcpy) as taking void *'s while the other file shows them taking >char *'s. Which is it? And have the patches fixed it? Something must have gone wrong when you installed one of the patches. I have 5.04 installed, and memcpy (and the rest of the memory functions) are defined as void * in both string.h and stdlib.h. No conflicting declarations. If you started out with 5.02 or 5.00, go back and check the dates and make sure both were updated correctly. If you had modified one of them, you may have to go back to the originals and reapply the patches. (Ok, actually I have 5.04a, but the 5.04a patch doesn't touch the headers, it's just library module fixes.) Of course, if this is a Lattice supplied 5.04 disk (no user applied patches), then go on flaming. -Dan Riley (riley@tcgould.tn.cornell.edu, cornell!batcomputer!riley) -Wilson Laboratory, Cornell University
dlleigh@mit-amt.MEDIA.MIT.EDU (Darren Leigh) (01/18/90)
In article <9553@batcomputer.tn.cornell.edu> riley@tcgould.tn.cornell.edu (Daniel S. Riley) writes: >In article <1990Jan15.020327.13614@athena.mit.edu> rlcarr@space.mit.edu (the Wizard of Speed and Time) writes about the Lattice 5.04 stdlib.h and string.h discrepancy. >Something must have gone wrong when you installed one of the patches. I >have 5.04 installed, and memcpy (and the rest of the memory functions) are >defined as void * in both string.h and stdlib.h. No conflicting >declarations. If you started out with 5.02 or 5.00, go back and check the >dates and make sure both were updated correctly. If you had modified one of >them, you may have to go back to the originals and reapply the patches. >(Ok, actually I have 5.04a, but the 5.04a patch doesn't touch the headers, >it's just library module fixes.) > >Of course, if this is a Lattice supplied 5.04 disk (no user applied >patches), then go on flaming. I just installed the Lattice given patch and I had the exact same problem. It looks like the Lattice distribution is at fault. Darren Leigh dlleigh@media-lab.media.mit.edu mit-amt!dlleigh
ron@vicorp.UUCP (Ron Peterson) (01/25/90)
I too discovered this error and called Lattice about it. The statements in the string.h file are the correct ones. They will fix it in the next release.