Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include/arpa - remove bitypes.h fossil



details:   https://anonhg.NetBSD.org/src/rev/0f54decd603e
branches:  trunk
changeset: 955763:0f54decd603e
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Oct 10 19:51:48 2020 +0000

description:
- remove bitypes.h fossil
- define u_{char,short,int,long} if we don't have _NETBSD_SOURCE defined
  so that this compiles (and resolv.h since it includes this). This is
  the simplest solution. Others:
  - always define them (bad, pollutes namespace)
  - create <sys/utypes.h> (bad, overkill)
  - change them to unsigned {char, short, int long} (bad, too disruptive)

diffstat:

 include/arpa/nameser.h |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (30 lines):

diff -r 61025f957355 -r 0f54decd603e include/arpa/nameser.h
--- a/include/arpa/nameser.h    Sat Oct 10 19:42:19 2020 +0000
+++ b/include/arpa/nameser.h    Sat Oct 10 19:51:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nameser.h,v 1.25 2009/04/12 17:07:34 christos Exp $    */
+/*     $NetBSD: nameser.h,v 1.26 2020/10/10 19:51:48 christos Exp $    */
 
 /*
  * Portions Copyright (C) 2004, 2005, 2008, 2009  Internet Systems Consortium, Inc. ("ISC")
@@ -56,12 +56,15 @@
 #define BIND_4_COMPAT
 
 #include <sys/param.h>
-#if (!defined(BSD)) || (BSD < 199306)
-# include <sys/bitypes.h>
-#else
-# include <sys/types.h>
+#include <sys/types.h>
+#include <sys/cdefs.h>
+
+#if !defined(_NETBSD_SOURCE)
+typedef        unsigned char   u_char;
+typedef        unsigned short  u_short;
+typedef        unsigned int    u_int;
+typedef        unsigned long   u_long;
 #endif
-#include <sys/cdefs.h>
 
 /*%
  * Revision information.  This is the release date in YYYYMMDD format.



Home | Main Index | Thread Index | Old Index