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 /m4 | |
| 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.
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/gl-comp.m4 | 31 | ||||
| -rw-r--r-- | m4/strtoimax.m4 | 23 | ||||
| -rw-r--r-- | m4/strtoll.m4 | 24 |
3 files changed, 78 insertions, 0 deletions
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 | ]) | ||