Source-Changes-HG archive

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

[src/trunk]: src/tools/compat Add more SunOS types to tools/compat



details:   https://anonhg.NetBSD.org/src/rev/14fd6d5ad28c
branches:  trunk
changeset: 452152:14fd6d5ad28c
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jun 19 23:33:07 2019 +0000

description:
Add more SunOS types to tools/compat

Add fallback defintions of: uchar_t, ushort_t, uint_t, ulong_t.

Needed by the libctf code on Ubuntu 16.x.

diffstat:

 tools/compat/compat_defs.h |  18 +++++++++++++++++-
 tools/compat/configure.ac  |   3 ++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r 8e0a5994f5c1 -r 14fd6d5ad28c tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Wed Jun 19 21:39:53 2019 +0000
+++ b/tools/compat/compat_defs.h        Wed Jun 19 23:33:07 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_defs.h,v 1.115 2019/06/19 03:40:15 kamil Exp $  */
+/*     $NetBSD: compat_defs.h,v 1.116 2019/06/19 23:33:07 kamil Exp $  */
 
 #ifndef        __NETBSD_COMPAT_DEFS_H__
 #define        __NETBSD_COMPAT_DEFS_H__
@@ -79,6 +79,22 @@
 typedef unsigned short u_short;
 #endif
 
+#if !HAVE_UCHAR_T
+typedef unsigned char uchar_t;
+#endif
+
+#if !HAVE_USHORT_T
+typedef unsigned short ushort_t;
+#endif
+
+#if !HAVE_UINT_T
+typedef unsigned int uint_t;
+#endif
+
+#if !HAVE_ULONG_T
+typedef unsigned long ulong_t;
+#endif
+
 /* System headers needed for (re)definitions below. */
 
 #include <sys/types.h>
diff -r 8e0a5994f5c1 -r 14fd6d5ad28c tools/compat/configure.ac
--- a/tools/compat/configure.ac Wed Jun 19 21:39:53 2019 +0000
+++ b/tools/compat/configure.ac Wed Jun 19 23:33:07 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: configure.ac,v 1.95 2019/06/19 03:40:15 kamil Exp $
+#      $NetBSD: configure.ac,v 1.96 2019/06/19 23:33:07 kamil Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -98,6 +98,7 @@
 # Typedefs.
 AC_TYPE_SIZE_T
 AC_CHECK_TYPES([id_t, long long, u_long, u_char, u_short, u_int, u_quad_t])
+AC_CHECK_TYPES([uchar_t, ushort_t, uint_t, ulong_t])
 AC_CHECK_TYPE(socklen_t, [AC_DEFINE([HAVE_SOCKLEN_T], 1,
                          [Define if you have the socklen_t type.])],,
 [#include <sys/types.h>



Home | Main Index | Thread Index | Old Index