]> code.delx.au - gnu-emacs/commitdiff
Support inttypes.h and strtoumax in non-MinGW builds on Windows.
authorEli Zaretskii <eliz@gnu.org>
Wed, 27 Apr 2011 21:14:34 +0000 (00:14 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 27 Apr 2011 21:14:34 +0000 (00:14 +0300)
 nt/inc/inttypes.h: New file.
 nt/config.nt (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX)
 (HAVE_STRTOULL, HAVE_STRTOUMAX): New macros.

nt/ChangeLog
nt/config.nt
nt/inc/inttypes.h [new file with mode: 0644]

index ba260af7a7829593d35f69b9d6ee7f9cc58b2ebe..4c0543ee0088b0a7183c99d922f89c1da68be0ea 100644 (file)
@@ -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
index 74217c9c048319b8d9317edf62e9690e36124108..a159234be7d2d8a22f48f310ccd7c9e195d8a917 100644 (file)
@@ -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 (file)
index 0000000..8f9c6ed
--- /dev/null
@@ -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