Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src change #include <sys/endian.h> => #include <machine/endian.h...
details: https://anonhg.NetBSD.org/src/rev/96fd8ecf9681
branches: trunk
changeset: 588148:96fd8ecf9681
user: dogcow <dogcow%NetBSD.org@localhost>
date: Thu Feb 09 22:03:15 2006 +0000
description:
change #include <sys/endian.h> => #include <machine/endian.h> so that
it's (more) consistent in the tree; this, along with changing tools/compat's
autoconf detection from AC_CHECK_FUNCS to AC_CHECK_DECLS makes the vast
majority of htobe16 and friends' redefinition errors bite the dust.
Tested with -current and FreeBSD.
diffstat:
lib/libc/citrus/modules/citrus_iconv_std.c | 6 +-
lib/libc/citrus/modules/citrus_mapper_std.c | 6 +-
lib/libc/citrus/modules/citrus_utf1632.c | 6 +-
lib/libc/hash/rmd160/rmd160.c | 4 +-
lib/libc/uuid/uuid_stream.c | 6 +-
tools/compat/compat_defs.h | 38 +-
tools/compat/configure | 8297 +++++++++++++++++++-------
tools/compat/configure.ac | 4 +-
tools/compat/nbtool_config.h.in | 32 +-
usr.bin/mkcsmapper/lex.l | 6 +-
usr.bin/mkesdb/lex.l | 6 +-
11 files changed, 6166 insertions(+), 2245 deletions(-)
diffs (truncated from 11572 to 300 lines):
diff -r ea44ebf68c52 -r 96fd8ecf9681 lib/libc/citrus/modules/citrus_iconv_std.c
--- a/lib/libc/citrus/modules/citrus_iconv_std.c Thu Feb 09 20:13:43 2006 +0000
+++ b/lib/libc/citrus/modules/citrus_iconv_std.c Thu Feb 09 22:03:15 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_iconv_std.c,v 1.11 2005/10/29 18:02:04 tshiozak Exp $ */
+/* $NetBSD: citrus_iconv_std.c,v 1.12 2006/02/09 22:03:15 dogcow Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_iconv_std.c,v 1.11 2005/10/29 18:02:04 tshiozak Exp $");
+__RCSID("$NetBSD: citrus_iconv_std.c,v 1.12 2006/02/09 22:03:15 dogcow Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -37,7 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/endian.h>
+#include <machine/endian.h>
#include <sys/queue.h>
#include "citrus_namespace.h"
diff -r ea44ebf68c52 -r 96fd8ecf9681 lib/libc/citrus/modules/citrus_mapper_std.c
--- a/lib/libc/citrus/modules/citrus_mapper_std.c Thu Feb 09 20:13:43 2006 +0000
+++ b/lib/libc/citrus/modules/citrus_mapper_std.c Thu Feb 09 22:03:15 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_mapper_std.c,v 1.4 2004/12/21 11:25:43 yamt Exp $ */
+/* $NetBSD: citrus_mapper_std.c,v 1.5 2006/02/09 22:03:15 dogcow Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_mapper_std.c,v 1.4 2004/12/21 11:25:43 yamt Exp $");
+__RCSID("$NetBSD: citrus_mapper_std.c,v 1.5 2006/02/09 22:03:15 dogcow Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -38,7 +38,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
-#include <sys/endian.h>
+#include <machine/endian.h>
#include <sys/queue.h>
#include "citrus_namespace.h"
diff -r ea44ebf68c52 -r 96fd8ecf9681 lib/libc/citrus/modules/citrus_utf1632.c
--- a/lib/libc/citrus/modules/citrus_utf1632.c Thu Feb 09 20:13:43 2006 +0000
+++ b/lib/libc/citrus/modules/citrus_utf1632.c Thu Feb 09 22:03:15 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_utf1632.c,v 1.4 2005/10/29 18:02:04 tshiozak Exp $ */
+/* $NetBSD: citrus_utf1632.c,v 1.5 2006/02/09 22:03:15 dogcow Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_utf1632.c,v 1.4 2005/10/29 18:02:04 tshiozak Exp $");
+__RCSID("$NetBSD: citrus_utf1632.c,v 1.5 2006/02/09 22:03:15 dogcow Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -41,7 +41,7 @@
#include <limits.h>
#include <wchar.h>
#include <sys/types.h>
-#include <sys/endian.h>
+#include <machine/endian.h>
#include "citrus_namespace.h"
#include "citrus_types.h"
diff -r ea44ebf68c52 -r 96fd8ecf9681 lib/libc/hash/rmd160/rmd160.c
--- a/lib/libc/hash/rmd160/rmd160.c Thu Feb 09 20:13:43 2006 +0000
+++ b/lib/libc/hash/rmd160/rmd160.c Thu Feb 09 22:03:15 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rmd160.c,v 1.3 2005/09/25 22:20:59 elad Exp $ */
+/* $NetBSD: rmd160.c,v 1.4 2006/02/09 22:03:15 dogcow Exp $ */
/* $KAME: rmd160.c,v 1.2 2003/07/25 09:37:55 itojun Exp $ */
/* $OpenBSD: rmd160.c,v 1.3 2001/09/26 21:40:13 markus Exp $ */
/*
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#include <sys/param.h>
-#include <sys/endian.h>
+#include <machine/endian.h>
#include <string.h>
#include <crypto/rmd160.h>
diff -r ea44ebf68c52 -r 96fd8ecf9681 lib/libc/uuid/uuid_stream.c
--- a/lib/libc/uuid/uuid_stream.c Thu Feb 09 20:13:43 2006 +0000
+++ b/lib/libc/uuid/uuid_stream.c Thu Feb 09 22:03:15 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uuid_stream.c,v 1.1 2004/09/13 21:44:54 thorpej Exp $ */
+/* $NetBSD: uuid_stream.c,v 1.2 2006/02/09 22:03:15 dogcow Exp $ */
/*
* Copyright (c) 2002 Marcel Moolenaar
@@ -28,12 +28,12 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: uuid_stream.c,v 1.1 2004/09/13 21:44:54 thorpej Exp $");
+__RCSID("$NetBSD: uuid_stream.c,v 1.2 2006/02/09 22:03:15 dogcow Exp $");
#endif
#include "namespace.h"
-#include <sys/endian.h>
+#include <machine/endian.h>
#include <uuid.h>
/*
diff -r ea44ebf68c52 -r 96fd8ecf9681 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h Thu Feb 09 20:13:43 2006 +0000
+++ b/tools/compat/compat_defs.h Thu Feb 09 22:03:15 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_defs.h,v 1.48 2005/09/14 14:06:11 tron Exp $ */
+/* $NetBSD: compat_defs.h,v 1.49 2006/02/09 22:03:15 dogcow Exp $ */
#ifndef __NETBSD_COMPAT_DEFS_H__
#define __NETBSD_COMPAT_DEFS_H__
@@ -561,60 +561,60 @@
/* <sys/endian.h> */
#if WORDS_BIGENDIAN
-#if !HAVE_HTOBE16
+#if !HAVE_DECL_HTOBE16
#define htobe16(x) (x)
#endif
-#if !HAVE_HTOBE32
+#if !HAVE_DECL_HTOBE32
#define htobe32(x) (x)
#endif
-#if !HAVE_HTOBE64
+#if !HAVE_DECL_HTOBE64
#define htobe64(x) (x)
#endif
-#if !HAVE_HTOLE16
+#if !HAVE_DECL_HTOLE16
#define htole16(x) bswap16((u_int16_t)(x))
#endif
-#if !HAVE_HTOLE32
+#if !HAVE_DECL_HTOLE32
#define htole32(x) bswap32((u_int32_t)(x))
#endif
-#if !HAVE_HTOLE64
+#if !HAVE_DECL_HTOLE64
#define htole64(x) bswap64((u_int64_t)(x))
#endif
#else
-#if !HAVE_HTOBE16
+#if !HAVE_DECL_HTOBE16
#define htobe16(x) bswap16((u_int16_t)(x))
#endif
-#if !HAVE_HTOBE32
+#if !HAVE_DECL_HTOBE32
#define htobe32(x) bswap32((u_int32_t)(x))
#endif
-#if !HAVE_HTOBE64
+#if !HAVE_DECL_HTOBE64
#define htobe64(x) bswap64((u_int64_t)(x))
#endif
-#if !HAVE_HTOLE16
+#if !HAVE_DECL_HTOLE16
#define htole16(x) (x)
#endif
-#if !HAVE_HTOLE32
+#if !HAVE_DECL_HTOLE32
#define htole32(x) (x)
#endif
-#if !HAVE_HTOLE64
+#if !HAVE_DECL_HTOLE64
#define htole64(x) (x)
#endif
#endif
-#if !HAVE_BE16TOH
+#if !HAVE_DECL_BE16TOH
#define be16toh(x) htobe16(x)
#endif
-#if !HAVE_BE32TOH
+#if !HAVE_DECL_BE32TOH
#define be32toh(x) htobe32(x)
#endif
-#if !HAVE_BE64TOH
+#if !HAVE_DECL_BE64TOH
#define be64toh(x) htobe64(x)
#endif
-#if !HAVE_LE16TOH
+#if !HAVE_DECL_LE16TOH
#define le16toh(x) htole16(x)
#endif
-#if !HAVE_LE32TOH
+#if !HAVE_DECL_LE32TOH
#define le32toh(x) htole32(x)
#endif
-#if !HAVE_LE64TOH
+#if !HAVE_DECL_LE64TOH
#define le64toh(x) htole64(x)
#endif
diff -r ea44ebf68c52 -r 96fd8ecf9681 tools/compat/configure
--- a/tools/compat/configure Thu Feb 09 20:13:43 2006 +0000
+++ b/tools/compat/configure Thu Feb 09 22:03:15 2006 +0000
@@ -1,14 +1,83 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52 for libnbcompat noversion.
+# Generated by GNU Autoconf 2.59 for libnbcompat noversion.
#
# Report bugs to <lib-bug-people%NetBSD.org@localhost>.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
Home |
Main Index |
Thread Index |
Old Index