1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

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.
This commit is contained in:
Eli Zaretskii 2011-04-28 00:14:34 +03:00
parent 841a157789
commit fc3b729195
3 changed files with 51 additions and 0 deletions

View 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

View 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

30
nt/inc/inttypes.h Normal file
View File

@ -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