Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf586f86

Browse files
committed
Recognize that MSVC can support strtoll() and strtoull().
This is needed for full support of "long long" variables in ecpg, butthe previous patch for bug #15080 (commits51057fe et al) missed it.In MSVC versions where the functions don't exist under those names,we can nonetheless use _strtoi64() and _strtoui64().Like the previous patch, back-patch all the way.Dang Minh HuongDiscussion:https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org
1 parent7d5b403 commitf586f86

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

‎src/include/pg_config.h.win32

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,25 @@
385385
#define HAVE_STRONG_RANDOM 1
386386

387387
/* Define to 1 if you have the `strtoll' function. */
388-
//#define HAVE_STRTOLL 1
388+
#ifdef HAVE_LONG_LONG_INT_64
389+
#define HAVE_STRTOLL 1
390+
/* Before VS2013, use Microsoft's nonstandard equivalent function */
391+
#if (_MSC_VER < 1800)
392+
#define strtoll _strtoi64
393+
#endif
394+
#endif
389395

390396
/* Define to 1 if you have the `strtoq' function. */
391397
/* #undef HAVE_STRTOQ */
392398

393399
/* Define to 1 if you have the `strtoull' function. */
394-
//#define HAVE_STRTOULL 1
400+
#ifdef HAVE_LONG_LONG_INT_64
401+
#define HAVE_STRTOULL 1
402+
/* Before VS2013, use Microsoft's nonstandard equivalent function */
403+
#if (_MSC_VER < 1800)
404+
#define strtoull _strtoui64
405+
#endif
406+
#endif
395407

396408
/* Define to 1 if you have the `strtouq' function. */
397409
/* #undef HAVE_STRTOUQ */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp