summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2011-04-28 00:14:34 +0300
committerEli Zaretskii <eliz@gnu.org>2011-04-28 00:14:34 +0300
commitfc3b729195fbe5297aa23320f83adb11225b6ded (patch)
tree287175524f95c436eb626353841415058458e3e3 /nt
parent841a157789735c330ff940080edadcea6846fff0 (diff)
downloademacs-fc3b729195fbe5297aa23320f83adb11225b6ded.tar.gz
Support inttypes.h and strtoumax in non-MinGW builds on Windows.
nt/inc/inttypes.h: New file. nt/config.nt (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX) (HAVE_STRTOULL, HAVE_STRTOUMAX): New macros.
Diffstat (limited to 'nt')
-rw-r--r--nt/ChangeLog7
-rw-r--r--nt/config.nt14
-rw-r--r--nt/inc/inttypes.h30
3 files changed, 51 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index ba260af7a78..4c0543ee008 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,10 @@
+2011-04-27 Eli Zaretskii <eliz@gnu.org>
+
+ * inc/inttypes.h: New file.
+
+ * config.nt (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX)
+ (HAVE_STRTOULL, HAVE_STRTOUMAX): New macros.
+
2011-04-27 Daniel Colascione <dan.colascione@gmail.com>
* cmdproxy.c (try_dequote_cmdline): Notice variable substitutions
diff --git a/nt/config.nt b/nt/config.nt
index 74217c9c048..a159234be7d 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -299,6 +299,20 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
+/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
+ don't. */
+#define HAVE_DECL_STRTOULL 1
+
+/* Define to 1 if you have the declaration of `strtoumax', and to 0 if you
+ don't. */
+#define HAVE_DECL_STRTOUMAX 1
+
+/* Define to 1 if you have the `strtoull' function. */
+#define HAVE_STRTOULL 1
+
+/* Define to 1 if you have the `strtoumax' function. */
+#define HAVE_STRTOUMAX 1
+
/* Define if you have the 'wchar_t' type. */
#define HAVE_WCHAR_T 1
diff --git a/nt/inc/inttypes.h b/nt/inc/inttypes.h
new file mode 100644
index 00000000000..8f9c6ede760
--- /dev/null
+++ b/nt/inc/inttypes.h
@@ -0,0 +1,30 @@
+/* Replacement inntypes.h file for building GNU Emacs on Windows with MSVC.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _REPL_INTTYPES_H
+#define _REPL_INTTYPES_H
+
+#ifdef __MINGW32__
+#include_next <inttypes.h>
+#else /* !__MINGW32__ */
+#define uintmax_t unsigned __int64
+#define strtoumax _strtoui64
+#endif /* !__MINGW32__ */
+
+#endif