@@ -9201,6 +9201,29 @@ AC_DEFUN([gl_PREREQ_CANONICALIZE],
92019201 AC_CHECK_FUNCS ( getcwd )
92029202] )
92039203
9204+ # serial 7 -*- autoconf -*-
9205+
9206+ dnl From Jim Meyering.
9207+ dnl
9208+ dnl See if the glibc *_unlocked I/O macros or functions are available.
9209+ dnl Use only those *_unlocked macros or functions that are declared
9210+ dnl (because some of them were declared in Solaris 2.5.1 but were removed
9211+ dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
9212+ dnl on Solaris 2.6).
9213+
9214+ AC_DEFUN ( [ jm_FUNC_GLIBC_UNLOCKED_IO] ,
9215+ [
9216+ dnl Persuade glibc <stdio.h> to declare fgets_unlocked(), fputs_unlocked()
9217+ dnl etc.
9218+ AC_REQUIRE ( [ AC_GNU_SOURCE ] )
9219+
9220+ AC_CHECK_DECLS_ONCE (
9221+ [ clearerr_unlocked feof_unlocked ferror_unlocked
9222+ fflush_unlocked fgets_unlocked fputc_unlocked fputs_unlocked
9223+ fread_unlocked fwrite_unlocked getc_unlocked
9224+ getchar_unlocked putc_unlocked putchar_unlocked] )
9225+ ] )
9226+
92049227# error.m4 serial 2 (gettext-0.12)
92059228dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
92069229dnl This file is free software, distributed under the terms of the GNU
@@ -9229,12 +9252,72 @@ AC_DEFUN([gt_FUNC_ERROR_AT_LINE],
92299252AC_DEFUN ( [ jm_PREREQ_ERROR] ,
92309253[
92319254 AC_REQUIRE ( [ AC_HEADER_STDC ] )
9232- AC_CHECK_FUNCS_ONCE ( doprnt vprintf )
9255+ AC_REQUIRE ( [ AC_FUNC_VPRINTF ] )
92339256 AC_CHECK_FUNCS ( strerror )
92349257 AC_CHECK_DECLS ( [ strerror] )
92359258 AC_FUNC_STRERROR_R
92369259] )
92379260
9261+ # serial 1003
9262+ # Experimental replacement for the function in the latest CVS autoconf.
9263+ # Use with the error.c file in ../lib.
9264+
9265+ # Copyright 2001 Free Software Foundation, Inc.
9266+
9267+ # This program is free software; you can redistribute it and/or modify
9268+ # it under the terms of the GNU General Public License as published by
9269+ # the Free Software Foundation; either version 2, or (at your option)
9270+ # any later version.
9271+
9272+ # This program is distributed in the hope that it will be useful,
9273+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
9274+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9275+ # GNU General Public License for more details.
9276+
9277+ # You should have received a copy of the GNU General Public License
9278+ # along with this program; if not, write to the Free Software Foundation,
9279+ # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
9280+
9281+ undefine ( [ AC_FUNC_STRERROR_R ] )
9282+
9283+ # AC_FUNC_STRERROR_R
9284+ # ------------------
9285+ AC_DEFUN ( [ AC_FUNC_STRERROR_R ] ,
9286+ [ AC_CHECK_DECLS ( [ strerror_r] )
9287+ AC_CHECK_FUNCS ( [ strerror_r] )
9288+ AC_CACHE_CHECK ( [ whether strerror_r returns char *] ,
9289+ ac_cv_func_strerror_r_char_p ,
9290+ [
9291+ ac_cv_func_strerror_r_char_p=no
9292+ if test $ac_cv_have_decl_strerror_r = yes; then
9293+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ AC_INCLUDES_DEFAULT ] ,
9294+ [ [
9295+ char buf[ 100] ;
9296+ char x = *strerror_r (0, buf, sizeof buf);
9297+ char *p = strerror_r (0, buf, sizeof buf);
9298+ ] ] ) ] ,
9299+ ac_cv_func_strerror_r_char_p=yes )
9300+ else
9301+ # strerror_r is not declared. Choose between
9302+ # systems that have relatively inaccessible declarations for the
9303+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
9304+ # former has a strerror_r that returns char*, while the latter
9305+ # has a strerror_r that returns `int'.
9306+ # This test should segfault on the DEC system.
9307+ AC_RUN_IFELSE ( [ AC_LANG_PROGRAM ( [ AC_INCLUDES_DEFAULT
9308+ extern char *strerror_r ();] ,
9309+ [ [ char buf[ 100] ;
9310+ char x = *strerror_r (0, buf, sizeof buf);
9311+ exit (!isalpha (x));] ] ) ] ,
9312+ ac_cv_func_strerror_r_char_p=yes , , : )
9313+ fi
9314+ ] )
9315+ if test $ac_cv_func_strerror_r_char_p = yes; then
9316+ AC_DEFINE ( [ STRERROR_R_CHAR_P] , 1 ,
9317+ [ Define to 1 if strerror_r returns char *.] )
9318+ fi
9319+ ] ) # AC_FUNC_STRERROR_R
9320+
92389321# pathmax.m4 serial 1 (gettext-0.12)
92399322dnl Copyright (C) 2002 Free Software Foundation, Inc.
92409323dnl This file is free software, distributed under the terms of the GNU
0 commit comments