c.h is the problem of msvc.

Started by Hiroshi Saitoover 19 years ago5 messages
#1Hiroshi Saito
z-saito@guitar.ocn.ne.jp
1 attachment(s)

Hi Bruce-san.

Umm, c.h is the problem of msvc.

getaddrinfo.c
..\..\include\c.h(63) : fatal error C1083: 'crtdefs.h': No such file or directory

<crtdefs.h> does not exist in vs2003...
problem is solved by removing this before vs2005.
moreover, nothing does not run short by it.

Regards,
Hiroshi Saito

Attachments:

msvc_c_patchapplication/octet-stream; name=msvc_c_patchDownload
--- src/include/c.h.orig	Sat Jul 15 01:38:59 2006
+++ src/include/c.h	Sat Jul 15 01:40:04 2006
@@ -60,7 +60,9 @@
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 #define	WIN32_ONLY_COMPILER
 #define errcode __vc_errcode
+#if (_MSC_VER > 1400)
 #include <crtdefs.h>
+#endif
 #undef errcode
 #endif
 
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Hiroshi Saito (#1)
Re: [PATCHES] c.h is the problem of msvc.

"Hiroshi Saito" <z-saito@guitar.ocn.ne.jp> writes:

--- src/include/c.h.orig	Sat Jul 15 01:38:59 2006
+++ src/include/c.h	Sat Jul 15 01:40:04 2006
@@ -60,7 +60,9 @@
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define	WIN32_ONLY_COMPILER
#define errcode __vc_errcode
+#if (_MSC_VER > 1400)
#include <crtdefs.h>
+#endif
#undef errcode
#endif

This patch certainly looks like it will break the __BORLANDC__ build ...

regards, tom lane

#3Hiroshi Saito
z-saito@guitar.ocn.ne.jp
In reply to: Hiroshi Saito (#1)
1 attachment(s)
Re: [PATCHES] c.h is the problem of msvc.

Ooops,
I am uncertain at the reason for not knowing __BORLANDC__...
It will be sure if __BORLANDC__ has the definition.
Thanks.

Regards,
Hiroshi Saito

From: "Tom Lane"

Show quoted text

"Hiroshi Saito" <z-saito@guitar.ocn.ne.jp> writes:

--- src/include/c.h.orig Sat Jul 15 01:38:59 2006
+++ src/include/c.h Sat Jul 15 01:40:04 2006
@@ -60,7 +60,9 @@
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define WIN32_ONLY_COMPILER
#define errcode __vc_errcode
+#if (_MSC_VER > 1400)
#include <crtdefs.h>
+#endif
#undef errcode
#endif

This patch certainly looks like it will break the __BORLANDC__ build ...

regards, tom lane

Attachments:

msvc_c_patchapplication/octet-stream; name=msvc_c_patchDownload
--- src/include/c.h.orig	Sat Jul 15 01:38:59 2006
+++ src/include/c.h	Sat Jul 15 01:40:04 2006
@@ -60,7 +60,9 @@
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 #define	WIN32_ONLY_COMPILER
 #define errcode __vc_errcode
+#if defined(__BORLANDC__) || (_MSC_VER > 1400)
 #include <crtdefs.h>
+#endif
 #undef errcode
 #endif
 
#4Bruce Momjian
bruce@momjian.us
In reply to: Hiroshi Saito (#3)
Re: [PATCHES] c.h is the problem of msvc.

Patch applied. Thanks.

---------------------------------------------------------------------------

Hiroshi Saito wrote:

Ooops,
I am uncertain at the reason for not knowing __BORLANDC__...
It will be sure if __BORLANDC__ has the definition.
Thanks.

Regards,
Hiroshi Saito

From: "Tom Lane"

"Hiroshi Saito" <z-saito@guitar.ocn.ne.jp> writes:

--- src/include/c.h.orig Sat Jul 15 01:38:59 2006
+++ src/include/c.h Sat Jul 15 01:40:04 2006
@@ -60,7 +60,9 @@
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define WIN32_ONLY_COMPILER
#define errcode __vc_errcode
+#if (_MSC_VER > 1400)
#include <crtdefs.h>
+#endif
#undef errcode
#endif

This patch certainly looks like it will break the __BORLANDC__ build ...

regards, tom lane

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#5Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#4)
1 attachment(s)
Re: [PATCHES] c.h is the problem of msvc.

Clarification, the attached version with the BORLAND adjustment is the
one that was applied.

---------------------------------------------------------------------------

Bruce Momjian wrote:

Patch applied. Thanks.

---------------------------------------------------------------------------

Hiroshi Saito wrote:

Ooops,
I am uncertain at the reason for not knowing __BORLANDC__...
It will be sure if __BORLANDC__ has the definition.
Thanks.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachments:

/rtmp/0text/plainDownload
--- src/include/c.h.orig	Sat Jul 15 01:38:59 2006
+++ src/include/c.h	Sat Jul 15 01:40:04 2006
@@ -60,7 +60,9 @@
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 #define	WIN32_ONLY_COMPILER
 #define errcode __vc_errcode
+#if defined(__BORLANDC__) || (_MSC_VER > 1400)
 #include <crtdefs.h>
+#endif
 #undef errcode
 #endif