diff options
| author | Paul Eggert | 2011-07-08 17:18:49 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-08 17:18:49 -0700 |
| commit | f6ce9b9abaeb1bf0bfc9e9fdb470efe4e81c58bb (patch) | |
| tree | 13f9d36cc2c580c084ca11498286a0b8a88cd951 | |
| parent | b29e7c21796215c189442b0ae18a70c35f350158 (diff) | |
| download | emacs-f6ce9b9abaeb1bf0bfc9e9fdb470efe4e81c58bb.tar.gz emacs-f6ce9b9abaeb1bf0bfc9e9fdb470efe4e81c58bb.zip | |
Add strtoimax module, needed for Solaris 8 port.
* Makefile.in (GNULIB_MODULES): Add strtoimax.
* lib/strtoll.c, m4/strtoimax.m4, m4/strtoll.m4: New files,
automatically imported from gnulib.
* lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | Makefile.in | 2 | ||||
| -rw-r--r-- | lib/gnulib.mk | 22 | ||||
| -rw-r--r-- | lib/strtoll.c | 33 | ||||
| -rw-r--r-- | m4/gl-comp.m4 | 31 | ||||
| -rw-r--r-- | m4/strtoimax.m4 | 23 | ||||
| -rw-r--r-- | m4/strtoll.m4 | 24 |
7 files changed, 141 insertions, 2 deletions
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-07-09 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Add strtoimax module, needed for Solaris 8 port. | ||
| 4 | * Makefile.in (GNULIB_MODULES): Add strtoimax. | ||
| 5 | * lib/strtoll.c, m4/strtoimax.m4, m4/strtoll.m4: New files, | ||
| 6 | automatically imported from gnulib. | ||
| 7 | * lib/gnulib.mk, m4/gl-comp.m4: Regenerate. | ||
| 8 | |||
| 1 | 2011-07-08 Paul Eggert <eggert@cs.ucla.edu> | 9 | 2011-07-08 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 10 | ||
| 3 | Add gnulib support for pthread_sigmask (Bug#9010). | 11 | Add gnulib support for pthread_sigmask (Bug#9010). |
diff --git a/Makefile.in b/Makefile.in index a3d85bad22a..ce7f3f1a3d8 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -337,7 +337,7 @@ GNULIB_MODULES = \ | |||
| 337 | dup2 \ | 337 | dup2 \ |
| 338 | filemode getloadavg getopt-gnu ignore-value intprops lstat \ | 338 | filemode getloadavg getopt-gnu ignore-value intprops lstat \ |
| 339 | mktime pthread_sigmask readlink \ | 339 | mktime pthread_sigmask readlink \ |
| 340 | socklen stdarg stdio strftime strtoumax symlink sys_stat | 340 | socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat |
| 341 | GNULIB_TOOL_FLAGS = \ | 341 | GNULIB_TOOL_FLAGS = \ |
| 342 | --conditional-dependencies --import --no-changelog --no-vc-files \ | 342 | --conditional-dependencies --import --no-changelog --no-vc-files \ |
| 343 | --makefile-name=gnulib.mk | 343 | --makefile-name=gnulib.mk |
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 25647f0399c..4341a5d184d 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | # the same distribution terms as the rest of that program. | 9 | # the same distribution terms as the rest of that program. |
| 10 | # | 10 | # |
| 11 | # Generated by gnulib-tool. | 11 | # Generated by gnulib-tool. |
| 12 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoumax symlink sys_stat | 12 | # Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | MOSTLYCLEANFILES += core *.stackdump | 15 | MOSTLYCLEANFILES += core *.stackdump |
| @@ -726,6 +726,26 @@ EXTRA_DIST += strftime.h | |||
| 726 | 726 | ||
| 727 | ## end gnulib module strftime | 727 | ## end gnulib module strftime |
| 728 | 728 | ||
| 729 | ## begin gnulib module strtoimax | ||
| 730 | |||
| 731 | |||
| 732 | EXTRA_DIST += strtoimax.c | ||
| 733 | |||
| 734 | EXTRA_libgnu_a_SOURCES += strtoimax.c | ||
| 735 | |||
| 736 | ## end gnulib module strtoimax | ||
| 737 | |||
| 738 | ## begin gnulib module strtoll | ||
| 739 | |||
| 740 | if gl_GNULIB_ENABLED_strtoll | ||
| 741 | |||
| 742 | endif | ||
| 743 | EXTRA_DIST += strtol.c strtoll.c | ||
| 744 | |||
| 745 | EXTRA_libgnu_a_SOURCES += strtol.c strtoll.c | ||
| 746 | |||
| 747 | ## end gnulib module strtoll | ||
| 748 | |||
| 729 | ## begin gnulib module strtoull | 749 | ## begin gnulib module strtoull |
| 730 | 750 | ||
| 731 | if gl_GNULIB_ENABLED_strtoull | 751 | if gl_GNULIB_ENABLED_strtoull |
diff --git a/lib/strtoll.c b/lib/strtoll.c new file mode 100644 index 00000000000..75afa4d9bc9 --- /dev/null +++ b/lib/strtoll.c | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* Function to parse a `long long int' from text. | ||
| 2 | Copyright (C) 1995-1997, 1999, 2001, 2009-2011 Free Software Foundation, | ||
| 3 | Inc. | ||
| 4 | This file is part of the GNU C Library. | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation; either version 3 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | #define QUAD 1 | ||
| 20 | |||
| 21 | #include <strtol.c> | ||
| 22 | |||
| 23 | #ifdef _LIBC | ||
| 24 | # ifdef SHARED | ||
| 25 | # include <shlib-compat.h> | ||
| 26 | |||
| 27 | # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2) | ||
| 28 | compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0); | ||
| 29 | # endif | ||
| 30 | |||
| 31 | # endif | ||
| 32 | weak_alias (strtoll, strtoq) | ||
| 33 | #endif | ||
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index 6c94e373871..8370c571655 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 | |||
| @@ -71,6 +71,8 @@ AC_DEFUN([gl_EARLY], | |||
| 71 | # Code from module stdio: | 71 | # Code from module stdio: |
| 72 | # Code from module stdlib: | 72 | # Code from module stdlib: |
| 73 | # Code from module strftime: | 73 | # Code from module strftime: |
| 74 | # Code from module strtoimax: | ||
| 75 | # Code from module strtoll: | ||
| 74 | # Code from module strtoull: | 76 | # Code from module strtoull: |
| 75 | # Code from module strtoumax: | 77 | # Code from module strtoumax: |
| 76 | # Code from module symlink: | 78 | # Code from module symlink: |
| @@ -164,6 +166,12 @@ gl_STDINT_H | |||
| 164 | gl_STDIO_H | 166 | gl_STDIO_H |
| 165 | gl_STDLIB_H | 167 | gl_STDLIB_H |
| 166 | gl_FUNC_GNU_STRFTIME | 168 | gl_FUNC_GNU_STRFTIME |
| 169 | gl_FUNC_STRTOIMAX | ||
| 170 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then | ||
| 171 | AC_LIBOBJ([strtoimax]) | ||
| 172 | gl_PREREQ_STRTOIMAX | ||
| 173 | fi | ||
| 174 | gl_INTTYPES_MODULE_INDICATOR([strtoimax]) | ||
| 167 | gl_FUNC_STRTOUMAX | 175 | gl_FUNC_STRTOUMAX |
| 168 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then | 176 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then |
| 169 | AC_LIBOBJ([strtoumax]) | 177 | AC_LIBOBJ([strtoumax]) |
| @@ -190,6 +198,7 @@ gl_UNISTD_H | |||
| 190 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false | 198 | gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false |
| 191 | gl_gnulib_enabled_sigprocmask=false | 199 | gl_gnulib_enabled_sigprocmask=false |
| 192 | gl_gnulib_enabled_stat=false | 200 | gl_gnulib_enabled_stat=false |
| 201 | gl_gnulib_enabled_strtoll=false | ||
| 193 | gl_gnulib_enabled_strtoull=false | 202 | gl_gnulib_enabled_strtoull=false |
| 194 | gl_gnulib_enabled_verify=false | 203 | gl_gnulib_enabled_verify=false |
| 195 | func_gl_gnulib_m4code_dosname () | 204 | func_gl_gnulib_m4code_dosname () |
| @@ -236,6 +245,18 @@ gl_SYS_STAT_MODULE_INDICATOR([stat]) | |||
| 236 | fi | 245 | fi |
| 237 | fi | 246 | fi |
| 238 | } | 247 | } |
| 248 | func_gl_gnulib_m4code_strtoll () | ||
| 249 | { | ||
| 250 | if ! $gl_gnulib_enabled_strtoll; then | ||
| 251 | gl_FUNC_STRTOLL | ||
| 252 | if test $HAVE_STRTOLL = 0; then | ||
| 253 | AC_LIBOBJ([strtoll]) | ||
| 254 | gl_PREREQ_STRTOLL | ||
| 255 | fi | ||
| 256 | gl_STDLIB_MODULE_INDICATOR([strtoll]) | ||
| 257 | gl_gnulib_enabled_strtoll=true | ||
| 258 | fi | ||
| 259 | } | ||
| 239 | func_gl_gnulib_m4code_strtoull () | 260 | func_gl_gnulib_m4code_strtoull () |
| 240 | { | 261 | { |
| 241 | if ! $gl_gnulib_enabled_strtoull; then | 262 | if ! $gl_gnulib_enabled_strtoull; then |
| @@ -269,6 +290,12 @@ gl_STDLIB_MODULE_INDICATOR([strtoull]) | |||
| 269 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then | 290 | if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then |
| 270 | func_gl_gnulib_m4code_stat | 291 | func_gl_gnulib_m4code_stat |
| 271 | fi | 292 | fi |
| 293 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then | ||
| 294 | func_gl_gnulib_m4code_verify | ||
| 295 | fi | ||
| 296 | if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then | ||
| 297 | func_gl_gnulib_m4code_strtoll | ||
| 298 | fi | ||
| 272 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then | 299 | if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then |
| 273 | func_gl_gnulib_m4code_verify | 300 | func_gl_gnulib_m4code_verify |
| 274 | fi | 301 | fi |
| @@ -280,6 +307,7 @@ gl_STDLIB_MODULE_INDICATOR([strtoull]) | |||
| 280 | AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) | 307 | AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) |
| 281 | AM_CONDITIONAL([gl_GNULIB_ENABLED_sigprocmask], [$gl_gnulib_enabled_sigprocmask]) | 308 | AM_CONDITIONAL([gl_GNULIB_ENABLED_sigprocmask], [$gl_gnulib_enabled_sigprocmask]) |
| 282 | AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat]) | 309 | AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat]) |
| 310 | AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoll], [$gl_gnulib_enabled_strtoll]) | ||
| 283 | AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoull], [$gl_gnulib_enabled_strtoull]) | 311 | AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoull], [$gl_gnulib_enabled_strtoull]) |
| 284 | AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify]) | 312 | AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify]) |
| 285 | # End of code from modules | 313 | # End of code from modules |
| @@ -473,6 +501,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 473 | lib/strftime.h | 501 | lib/strftime.h |
| 474 | lib/strtoimax.c | 502 | lib/strtoimax.c |
| 475 | lib/strtol.c | 503 | lib/strtol.c |
| 504 | lib/strtoll.c | ||
| 476 | lib/strtoul.c | 505 | lib/strtoul.c |
| 477 | lib/strtoull.c | 506 | lib/strtoull.c |
| 478 | lib/strtoumax.c | 507 | lib/strtoumax.c |
| @@ -517,6 +546,8 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 517 | m4/stdio_h.m4 | 546 | m4/stdio_h.m4 |
| 518 | m4/stdlib_h.m4 | 547 | m4/stdlib_h.m4 |
| 519 | m4/strftime.m4 | 548 | m4/strftime.m4 |
| 549 | m4/strtoimax.m4 | ||
| 550 | m4/strtoll.m4 | ||
| 520 | m4/strtoull.m4 | 551 | m4/strtoull.m4 |
| 521 | m4/strtoumax.m4 | 552 | m4/strtoumax.m4 |
| 522 | m4/symlink.m4 | 553 | m4/symlink.m4 |
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4 new file mode 100644 index 00000000000..47fb1bc9c38 --- /dev/null +++ b/m4/strtoimax.m4 | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # strtoimax.m4 serial 10 | ||
| 2 | dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_FUNC_STRTOIMAX], | ||
| 8 | [ | ||
| 9 | AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) | ||
| 10 | |||
| 11 | AC_CHECK_DECLS_ONCE([strtoimax]) | ||
| 12 | if test "$ac_cv_have_decl_strtoimax" != yes; then | ||
| 13 | HAVE_DECL_STRTOIMAX=0 | ||
| 14 | |||
| 15 | AC_CHECK_FUNCS([strtoimax]) | ||
| 16 | fi | ||
| 17 | ]) | ||
| 18 | |||
| 19 | # Prerequisites of lib/strtoimax.c. | ||
| 20 | AC_DEFUN([gl_PREREQ_STRTOIMAX], [ | ||
| 21 | AC_CHECK_DECLS([strtoll]) | ||
| 22 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | ||
| 23 | ]) | ||
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 new file mode 100644 index 00000000000..ed6a854b58c --- /dev/null +++ b/m4/strtoll.m4 | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # strtoll.m4 serial 7 | ||
| 2 | dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_FUNC_STRTOLL], | ||
| 8 | [ | ||
| 9 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) | ||
| 10 | dnl We don't need (and can't compile) the replacement strtoll | ||
| 11 | dnl unless the type 'long long int' exists. | ||
| 12 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | ||
| 13 | if test "$ac_cv_type_long_long_int" = yes; then | ||
| 14 | AC_CHECK_FUNCS([strtoll]) | ||
| 15 | if test $ac_cv_func_strtoll = no; then | ||
| 16 | HAVE_STRTOLL=0 | ||
| 17 | fi | ||
| 18 | fi | ||
| 19 | ]) | ||
| 20 | |||
| 21 | # Prerequisites of lib/strtoll.c. | ||
| 22 | AC_DEFUN([gl_PREREQ_STRTOLL], [ | ||
| 23 | : | ||
| 24 | ]) | ||