projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git+ssh://metalzone.distorted.org.uk/~mdw/public-git/catacomb/
[u/mdw/catacomb]
/
mptypes.c
diff --git
a/mptypes.c
b/mptypes.c
index
3502ba3
..
922eae4
100644
(file)
--- a/
mptypes.c
+++ b/
mptypes.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id
: mptypes.c,v 1.5 2004/04/08 01:36:15 mdw Exp
$
+ * $Id$
*
* Generate `mptypes.h' header file for current architecture
*
*
* Generate `mptypes.h' header file for current architecture
*
@@
-34,6
+34,7
@@
#include <limits.h>
#if __STDC_VERSION__ >= 199900l
# include <stdint.h>
#include <limits.h>
#if __STDC_VERSION__ >= 199900l
# include <stdint.h>
+# include <inttypes.h>
#endif
/*----- Data types --------------------------------------------------------*/
#endif
/*----- Data types --------------------------------------------------------*/
@@
-55,15
+56,15
@@
/* --- Choose the largest integer type --- */
/* --- Choose the largest integer type --- */
-#if defined(UINTMAX_MAX)
+#if defined(UINTMAX_MAX)
&& defined(PRIuMAX)
typedef uintmax_t umax;
# define P_UMAX PRIuMAX
#elif defined(ULLONG_MAX)
__extension__ typedef unsigned long long umax;
typedef uintmax_t umax;
# define P_UMAX PRIuMAX
#elif defined(ULLONG_MAX)
__extension__ typedef unsigned long long umax;
-# define P_UMAX "
%
llu"
+# define P_UMAX "llu"
#else
typedef unsigned long umax;
#else
typedef unsigned long umax;
-# define P_UMAX "
%
lu"
+# define P_UMAX "lu"
#endif
/* --- Table of interesting types --- *
#endif
/* --- Table of interesting types --- *
@@
-175,11
+176,11
@@
int main(int argc, char *argv[])
printf("\
%stypedef %s mpw;\n\
#define MPW_BITS %u\n\
printf("\
%stypedef %s mpw;\n\
#define MPW_BITS %u\n\
-#define MPW_MAX %s" P_UMAX "%s\n\
+#define MPW_MAX %s
%
" P_UMAX "%s\n\
\n\
%stypedef %s mpd;\n\
#define MPD_BITS %u\n\
\n\
%stypedef %s mpd;\n\
#define MPD_BITS %u\n\
-#define MPD_MAX %s" P_UMAX "%s\n\
+#define MPD_MAX %s
%
" P_UMAX "%s\n\
\n\
#endif\n\
",
\n\
#endif\n\
",