Commit 10d43fdb authored by Paul Eggert's avatar Paul Eggert

* lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.

Add support for Tandem NonStop R series.
(_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
Use new macro.
parent 1fc2fce0
2006-10-11 Paul Eggert <eggert@cs.ucla.edu> 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
* lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
Add support for Tandem NonStop R series.
(_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
Use new macro.
* lib/rename-dest-slash.c: Include stdbool.h but not string.h. * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
(has_trailing_slash): Omit size arg; all callers changed. (has_trailing_slash): Omit size arg; all callers changed.
Omit 'inline', since it doesn't help performance and we'd Omit 'inline', since it doesn't help performance and we'd
......
...@@ -46,6 +46,16 @@ ...@@ -46,6 +46,16 @@
#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS #if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
# if defined _MSC_VER || defined __MINGW32__
# define _LONG_LONG_FORMAT_PREFIX "I64"
# elif defined _TNS_R_TARGET
/* Tandem NonStop R series and compatible platforms released before
July 2005 support %Ld but not %lld. */
# define _LONG_LONG_FORMAT_PREFIX "L"
# else
# define _LONG_LONG_FORMAT_PREFIX "ll"
# endif
# if !defined PRId8 || @PRI_MACROS_BROKEN@ # if !defined PRId8 || @PRI_MACROS_BROKEN@
# undef PRId8 # undef PRId8
# ifdef INT8_MAX # ifdef INT8_MAX
...@@ -157,10 +167,8 @@ ...@@ -157,10 +167,8 @@
# ifdef INT64_MAX # ifdef INT64_MAX
# if INT64_MAX == LONG_MAX # if INT64_MAX == LONG_MAX
# define _PRI64_PREFIX "l" # define _PRI64_PREFIX "l"
# elif defined _MSC_VER || defined __MINGW32__
# define _PRI64_PREFIX "I64"
# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
# define _PRI64_PREFIX "ll" # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
# endif # endif
# if !defined PRId64 || @PRI_MACROS_BROKEN@ # if !defined PRId64 || @PRI_MACROS_BROKEN@
# undef PRId64 # undef PRId64
...@@ -174,10 +182,8 @@ ...@@ -174,10 +182,8 @@
# ifdef UINT64_MAX # ifdef UINT64_MAX
# if UINT64_MAX == ULONG_MAX # if UINT64_MAX == ULONG_MAX
# define _PRIu64_PREFIX "l" # define _PRIu64_PREFIX "l"
# elif defined _MSC_VER || defined __MINGW32__
# define _PRIu64_PREFIX "I64"
# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
# define _PRIu64_PREFIX "ll" # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
# endif # endif
# if !defined PRIo64 || @PRI_MACROS_BROKEN@ # if !defined PRIo64 || @PRI_MACROS_BROKEN@
# undef PRIo64 # undef PRIo64
...@@ -650,10 +656,8 @@ ...@@ -650,10 +656,8 @@
# ifdef INT64_MAX # ifdef INT64_MAX
# if INT64_MAX == LONG_MAX # if INT64_MAX == LONG_MAX
# define _SCN64_PREFIX "l" # define _SCN64_PREFIX "l"
# elif defined _MSC_VER || defined __MINGW32__
# define _SCN64_PREFIX "I64"
# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 # elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
# define _SCN64_PREFIX "ll" # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
# endif # endif
# if !defined SCNd64 || @PRI_MACROS_BROKEN@ # if !defined SCNd64 || @PRI_MACROS_BROKEN@
# undef SCNd64 # undef SCNd64
...@@ -667,10 +671,8 @@ ...@@ -667,10 +671,8 @@
# ifdef UINT64_MAX # ifdef UINT64_MAX
# if UINT64_MAX == ULONG_MAX # if UINT64_MAX == ULONG_MAX
# define _SCNu64_PREFIX "l" # define _SCNu64_PREFIX "l"
# elif defined _MSC_VER || defined __MINGW32__
# define _SCNu64_PREFIX "I64"
# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 # elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
# define _SCNu64_PREFIX "ll" # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
# endif # endif
# if !defined SCNo64 || @PRI_MACROS_BROKEN@ # if !defined SCNo64 || @PRI_MACROS_BROKEN@
# undef SCNo64 # undef SCNo64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment