From: kagel AT quasar DOT bloomberg DOT com Date: Fri, 10 May 1996 09:38:47 -0400 Message-Id: <9605101338.AA06148@quasar.bloomberg.com > To: ugunther AT diamond DOT tufts DOT edu Cc: djgpp AT delorie DOT com In-Reply-To: <4mt6p0$rog@d2.tufts.edu> (ugunther@diamond.tufts.edu) Subject: Re: DJGPP warning: ... locatopn of previous def Reply-To: kagel AT dg1 DOT bloomberg DOT com From: ugunther AT diamond DOT tufts DOT edu (Ulrich Guenther) Date: 9 May 1996 16:33:36 GMT invoking djgpp2 (just installed) I get the error "c:/djgpp/include/math.h:57: warning: this is the location of the look at this line(57): ^^ previous definition" The prg runs anyway. The compiler is warning you that a function you have prototyped in your code is defined differently in math.h. The message immediately preceding this one is the one being referenced. This message also indicates that the definition in your code is at line 57. This usually happens when porting UNIX code to DJGPP as most UNIX compilers maintain the older definitions of functions or do not define all functions. UNIX programmers get used to adding the definitions in-code. Either way the UNIX compilers will pass them without notice but they can conflict with the stricter definitions in the DJGPP headers. Best to not define functions which are already defined in the headers. If you need reverse compatible code put the define in a #if defined(__unix__) or the safer #if defined( __DGUX__ ) or even #if !defined( __GNUC__ ). -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats