summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-03-31 23:28:48 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-03-31 23:28:48 -0700
commitd1fdcab7425f36a34ddeaf304e2c6e3c471ba8db (patch)
treef59643a560ce58433a9a92dfe615dd18aecc0457 /m4
parent63139bfa89692ec666815f57d0658996577a80d3 (diff)
downloademacs-d1fdcab7425f36a34ddeaf304e2c6e3c471ba8db.tar.gz
Replace two copies of readlink code with single gnulib version.
Diffstat (limited to 'm4')
-rw-r--r--m4/gl-comp.m410
-rw-r--r--m4/ssize_t.m423
2 files changed, 33 insertions, 0 deletions
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4
index af3cae75abb..43cce9b3676 100644
--- a/m4/gl-comp.m4
+++ b/m4/gl-comp.m4
@@ -28,6 +28,7 @@ AC_DEFUN([gl_EARLY],
AC_REQUIRE([AC_PROG_RANLIB])
# Code from module arg-nonnull:
# Code from module c++defs:
+ # Code from module careadlinkat:
# Code from module crypto/md5:
# Code from module dosname:
# Code from module dtoastr:
@@ -46,6 +47,7 @@ AC_DEFUN([gl_EARLY],
# Code from module multiarch:
# Code from module readlink:
# Code from module socklen:
+ # Code from module ssize_t:
# Code from module stat:
# Code from module stdbool:
# Code from module stddef:
@@ -79,6 +81,8 @@ AC_DEFUN([gl_INIT],
gl_source_base='lib'
# Code from module arg-nonnull:
# Code from module c++defs:
+ # Code from module careadlinkat:
+ AC_CHECK_FUNCS_ONCE([readlinkat])
# Code from module crypto/md5:
gl_MD5
# Code from module dosname:
@@ -115,6 +119,8 @@ AC_DEFUN([gl_INIT],
gl_UNISTD_MODULE_INDICATOR([readlink])
# Code from module socklen:
gl_TYPE_SOCKLEN_T
+ # Code from module ssize_t:
+ gt_TYPE_SSIZE_T
# Code from module stat:
gl_FUNC_STAT
gl_SYS_STAT_MODULE_INDICATOR([stat])
@@ -287,6 +293,9 @@ AC_DEFUN([gl_FILE_LIST], [
build-aux/arg-nonnull.h
build-aux/c++defs.h
build-aux/warn-on-use.h
+ lib/allocator.h
+ lib/careadlinkat.c
+ lib/careadlinkat.h
lib/dosname.h
lib/dtoastr.c
lib/filemode.c
@@ -335,6 +344,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/multiarch.m4
m4/readlink.m4
m4/socklen.m4
+ m4/ssize_t.m4
m4/st_dm_mode.m4
m4/stat.m4
m4/stdbool.m4
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
new file mode 100644
index 00000000000..d7127521ebe
--- /dev/null
+++ b/m4/ssize_t.m4
@@ -0,0 +1,23 @@
+# ssize_t.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether ssize_t is defined.
+
+AC_DEFUN([gt_TYPE_SSIZE_T],
+[
+ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>]],
+ [[int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;]])],
+ [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
+ if test $gt_cv_ssize_t = no; then
+ AC_DEFINE([ssize_t], [int],
+ [Define as a signed type of the same size as size_t.])
+ fi
+])