www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/07/12:04:09

Date: Sun, 7 Nov 1999 16:56:11 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Hamilton, Eric" <EHamilton AT firewall1 DOT pelco DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Minor problems with header files
In-Reply-To: <DF9FCB2C6574D3118B8C009027B6FB924B5C21@localhost.pelco1>
Message-ID: <Pine.SUN.3.91.991107165521.12805G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 4 Nov 1999, Hamilton, Eric wrote:

> I always run gcc with every possiable warning message turned on.  I have
> been getting several (2) messages about "redefining" things.  I have
> modified three of the standard header files to eliminate this problem and
> have included them here.

Thanks for the report.  I prefer to solve these problems a bit 
differently (diffs attached).

Your message only had two headers, not three.  What is the third one
that you neede to modify?

--- include/unistd.h~0	Mon Jun 29 03:02:48 1998
+++ include/unistd.h	Fri Nov  5 12:38:48 1999
@@ -140,7 +140,9 @@
 int		sync(void);
 int		truncate(const char*, off_t);
 unsigned int	usleep(unsigned int _useconds);
+#ifndef vfork			/* in case they include sys/config.h */
 pid_t		vfork(void);
+#endif
 
 #endif /* !_POSIX_SOURCE */
 #endif /* !__STRICT_ANSI__ */
--- include/pc.h~0	Sun Jul 12 19:55:26 1998
+++ include/pc.h	Fri Nov  5 12:38:28 1999
@@ -30,7 +30,9 @@
 unsigned short	inpw(unsigned short _port);
 void		outp(unsigned short _port, unsigned char _data);
 void		outpw(unsigned short _port, unsigned short _data);
+#ifndef kbhit			/* in case they include conio.h */
 int		kbhit(void);
+#endif
 int		getkey(void);	/* ALT's have 0x100 set */
 int		getxkey(void);	/* ALT's have 0x100 set, 0xe0 sets 0x200 */
 


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019