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

Commitfda3e65

Browse files
committed
Fix up ecpg's configuration so it handles "long long int" in MSVC builds.
Although configure-based builds correctly define HAVE_LONG_LONG_INT whenappropriate (in both pg_config.h and ecpg_config.h), builds using the MSVCscripts failed to do so. This currently has no impact on the backend,since it uses that symbol nowhere; but it does prevent ecpg fromsupporting "long long int". Fix that.Also, adjust Solution.pm so that in the constructed ecpg_config.h file,the "#if (_MSC_VER > 1200)" covers only the LONG_LONG_INT-related#defines, not the whole file. AFAICS this was a thinko on somebody'spart: ENABLE_THREAD_SAFETY should always be defined in Windows builds,and in branches using USE_INTEGER_DATETIMES, the setting of that shouldn'tdepend on the compiler version either. If I'm wrong, I imagine thebuildfarm will say so.Per bug #15080 from Jonathan Allen; issue diagnosed by Michael Meskesand Andrew Gierth. Back-patch to all supported branches.Discussion:https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org
1 parentb9dac4a commitfda3e65

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎src/include/pg_config.h.win32

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@
232232
/* Define to 1 if `long int' works and is 64 bits. */
233233
/* #undef HAVE_LONG_INT_64 */
234234

235+
/* Define to 1 if the system has the type `long long int'. */
236+
#if (_MSC_VER > 1200)
237+
#define HAVE_LONG_LONG_INT 1
238+
#endif
239+
235240
/* Define to 1 if `long long int' works and is 64 bits. */
236241
#if (_MSC_VER > 1200)
237242
#define HAVE_LONG_LONG_INT_64 1

‎src/tools/msvc/Solution.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,11 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c
426426
|| confess"Could not open ecpg_config.h";
427427
print$o<<EOF;
428428
#if (_MSC_VER > 1200)
429+
#define HAVE_LONG_LONG_INT 1
429430
#define HAVE_LONG_LONG_INT_64 1
431+
#endif
430432
#define ENABLE_THREAD_SAFETY 1
431433
EOF
432-
print$o"#endif\n";
433434
close($o);
434435
}
435436

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp