I love code like this:

extern int errno; /* some systems don't have this in errno.h */

after the following in a central header:

#ifndef _WIN32
#include <sys/errno.h>
#else
#include <errno.h>
#endif

Sure, e.g. NetBSD doesn't define errno in sys/errno.h, but why should it?
So, let's just fix this.
This commit is contained in:
joerg 2005-12-16 15:52:03 +00:00
parent f8789810e4
commit 6d45e7e377
5 changed files with 60 additions and 1 deletions

View file

@ -1,7 +1,11 @@
$NetBSD: distinfo,v 1.2 2005/12/01 18:09:37 adrianp Exp $
$NetBSD: distinfo,v 1.3 2005/12/16 15:52:03 joerg Exp $
SHA1 (Unreal3.2.3.tar.gz) = 5820906434f0c9e2cd027882e85900a919a2065d
RMD160 (Unreal3.2.3.tar.gz) = e304e58457847fd371216d2e68293f7daad08dd5
Size (Unreal3.2.3.tar.gz) = 1881275 bytes
SHA1 (patch-aa) = 70dbd3e7c40f8be5e8e5f759845d9100770c269a
SHA1 (patch-ab) = b66ae1990e25479abe9087a9308a2185692fcba2
SHA1 (patch-ac) = 4c3e7219d03e93c2a3e8f735c350d919efdf8fbb
SHA1 (patch-ad) = 3bef7c197efb59def9e77114ad9356ef2f23fa26
SHA1 (patch-ae) = dc5f4d080d1027e229f9817d1d4f1e501124f7ba
SHA1 (patch-af) = 28d622375362bc77ec44ea6a3b1f3a0d05c60ce5

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ac,v 1.1 2005/12/16 15:52:03 joerg Exp $
--- include/h.h.orig 2005-12-16 15:19:27.000000000 +0000
+++ include/h.h
@@ -227,7 +227,7 @@ extern int vsnprintf (char *str, size_t
#ifdef _WIN32
extern MODVAR int dbufalloc, dbufblocks, debuglevel;
#else
-extern int dbufalloc, dbufblocks, debuglevel, errno, h_errno;
+extern int dbufalloc, dbufblocks, debuglevel, h_errno;
#endif
extern MODVAR short LastSlot; /* last used index in local client array */
extern MODVAR int OpenFiles; /* number of files currently open */

View file

@ -0,0 +1,16 @@
$NetBSD: patch-ad,v 1.1 2005/12/16 15:52:03 joerg Exp $
--- include/sys.h.orig 2005-03-13 21:02:46.000000000 +0000
+++ include/sys.h
@@ -43,11 +43,7 @@
#ifdef ISC202
#include <net/errno.h>
#else
-# ifndef _WIN32
-#include <sys/errno.h>
-# else
#include <errno.h>
-# endif
#endif
#include "setup.h"
#include <stdio.h>

View file

@ -0,0 +1,14 @@
$NetBSD: patch-ae,v 1.1 2005/12/16 15:52:03 joerg Exp $
--- src/socket.c.orig 2005-12-16 15:23:27.000000000 +0000
+++ src/socket.c
@@ -24,9 +24,6 @@
#include "h.h"
#include <signal.h>
#include "inet.h"
-#ifndef _WIN32
-extern int errno; /* ...seems that errno.h doesn't define this everywhere */
-#endif
#include <sys/types.h>
#ifndef _WIN32
#include <sys/socket.h>

View file

@ -0,0 +1,12 @@
$NetBSD: patch-af,v 1.1 2005/12/16 15:52:03 joerg Exp $
--- src/support.c.orig 2005-12-16 15:26:56.000000000 +0000
+++ src/support.c
@@ -40,7 +40,6 @@ static char sccsid[] = "@(#)support.c 2.
#include <sys/socket.h>
#include <string.h>
#include <utime.h>
-extern int errno; /* ...seems that errno.h doesn't define this everywhere */
#endif
extern void outofmemory();