From: Eli Zaretskii Date: Wed, 27 Apr 2011 21:14:34 +0000 (+0300) Subject: Support inttypes.h and strtoumax in non-MinGW builds on Windows. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~195 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fc3b729195fbe5297aa23320f83adb11225b6ded;p=emacs.git 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. --- 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 + + * inc/inttypes.h: New file. + + * config.nt (HAVE_DECL_STRTOULL, HAVE_DECL_STRTOUMAX) + (HAVE_STRTOULL, HAVE_STRTOUMAX): New macros. + 2011-04-27 Daniel Colascione * 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 . */ /* 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 . */ + +#ifndef _REPL_INTTYPES_H +#define _REPL_INTTYPES_H + +#ifdef __MINGW32__ +#include_next +#else /* !__MINGW32__ */ +#define uintmax_t unsigned __int64 +#define strtoumax _strtoui64 +#endif /* !__MINGW32__ */ + +#endif