gsasl-commit
[Top][All Lists]
Advanced

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

CVS gsasl/lib/gl/m4


From: gsasl-commit
Subject: CVS gsasl/lib/gl/m4
Date: Sat, 27 Nov 2004 03:13:14 +0100

Update of /home/cvs/gsasl/lib/gl/m4
In directory dopio:/tmp/cvs-serv4145/gl/m4

Modified Files:
        gnulib.m4 
Added Files:
        size_max.m4 xsize.m4 
Log Message:
Add.

--- /home/cvs/gsasl/lib/gl/m4/gnulib.m4 2004/11/26 00:38:22     1.9
+++ /home/cvs/gsasl/lib/gl/m4/gnulib.m4 2004/11/27 02:13:13     1.10
@@ -8,7 +8,7 @@
 # Generated by gnulib-tool.
 #
 # Invoked as: gnulib-tool --import
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgl --source-base=gl 
--m4-base=gl/m4 --libtool --lgpl base64 dummy gettext stdbool strdup
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgl --source-base=gl 
--m4-base=gl/m4 --libtool --lgpl base64 dummy gettext stdbool strdup xsize
 
 AC_DEFUN([gl_EARLY],
 [
@@ -19,6 +19,7 @@
   dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
   AM_STDBOOL_H
   gl_FUNC_STRDUP
+  gl_XSIZE
 ])
 
 dnl Usage: gl_MODULES(module1 module2 ...)

--- /home/cvs/gsasl/lib/gl/m4/size_max.m4       2004/11/27 02:13:14     NONE
+++ /home/cvs/gsasl/lib/gl/m4/size_max.m4       2004/11/27 02:13:14     1.1
# size_max.m4 serial 2
dnl Copyright (C) 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License.  As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.

dnl From Bruno Haible.

AC_DEFUN([gl_SIZE_MAX],
[
  AC_CHECK_HEADERS(stdint.h)
  dnl First test whether the system already has SIZE_MAX.
  AC_MSG_CHECKING([for SIZE_MAX])
  result=
  AC_EGREP_CPP([Found it], [
#include <limits.h>
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef SIZE_MAX
Found it
#endif
], result=yes)
  if test -z "$result"; then
    dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
    dnl than the type 'unsigned long'.
    dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
    dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
    _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
      [#include <stddef.h>], result=?)
    _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
      [#include <stddef.h>], result=?)
    _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
      [#include <stddef.h>], result=?)
    if test "$fits_in_uint" = 1; then
      dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
      dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
      AC_TRY_COMPILE([#include <stddef.h>
        extern size_t foo;
        extern unsigned long foo;
        ], [], fits_in_uint=0)
    fi
    if test -z "$result"; then
      if test "$fits_in_uint" = 1; then
        result="$res_hi$res_lo"U
      else
        result="$res_hi$res_lo"UL
      fi
    else
      dnl Shouldn't happen, but who knows...
      result='~(size_t)0'
    fi
  fi
  AC_MSG_RESULT([$result])
  if test "$result" != yes; then
    AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
      [Define as the maximum value of type 'size_t', if the system doesn't 
define it.])
  fi
])
--- /home/cvs/gsasl/lib/gl/m4/xsize.m4  2004/11/27 02:13:14     NONE
+++ /home/cvs/gsasl/lib/gl/m4/xsize.m4  2004/11/27 02:13:14     1.1
# xsize.m4 serial 3
dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License.  As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.

AC_DEFUN([gl_XSIZE],
[
  dnl Prerequisites of lib/xsize.h.
  AC_REQUIRE([gl_SIZE_MAX])
  AC_REQUIRE([AC_C_INLINE])
  AC_CHECK_HEADERS(stdint.h)
])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]