aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/pg_config.h.win322
-rw-r--r--src/interfaces/libpq/fe-secure.c5
-rw-r--r--src/interfaces/libpq/libpq-int.h7
-rw-r--r--src/timezone/ialloc.c6
-rw-r--r--src/timezone/zic.c8
-rw-r--r--src/tools/msvc/Project.pm13
-rw-r--r--src/tools/msvc/mkvcbuild.pl1
7 files changed, 25 insertions, 17 deletions
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index bffdae48fe8..9f3c1ac8699 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -366,7 +366,9 @@
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strerror' function. */
+#ifndef HAVE_STRERROR
#define HAVE_STRERROR 1
+#endif
/* Define to 1 if you have the `strerror_r' function. */
/* #undef HAVE_STRERROR_R */
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index c27abb0c19a..a471c0b11fe 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.90 2007/01/05 22:20:01 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.91 2007/01/26 17:45:41 neilc Exp $
*
* NOTES
* [ Most of these notes are wrong/obsolete, but perhaps not all ]
@@ -575,7 +575,6 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
char fnbuf[MAXPGPATH];
FILE *fp;
PGconn *conn = (PGconn *) SSL_get_app_data(ssl);
- int (*cb) () = NULL; /* how to read user password */
char sebuf[256];
if (!pqGetHomeDirectory(homedir, sizeof(homedir)))
@@ -642,7 +641,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
return 0;
}
#endif
- if (PEM_read_PrivateKey(fp, pkey, cb, NULL) == NULL)
+ if (PEM_read_PrivateKey(fp, pkey, NULL, NULL) == NULL)
{
char *err = SSLerrmessage();
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index 9fce1e39276..61e36bfba33 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.117 2007/01/05 22:20:01 momjian Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.118 2007/01/26 17:45:41 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -38,11 +38,6 @@
#include <signal.h>
#endif
-#ifdef WIN32_ONLY_COMPILER
-typedef int ssize_t; /* ssize_t doesn't exist in VC (at least not
- * VC6) */
-#endif
-
/* include stuff common to fe and be */
#include "getaddrinfo.h"
#include "libpq/pqcomm.h"
diff --git a/src/timezone/ialloc.c b/src/timezone/ialloc.c
index 547a786e34d..2b4dc17b3bd 100644
--- a/src/timezone/ialloc.c
+++ b/src/timezone/ialloc.c
@@ -3,7 +3,7 @@
* 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/timezone/ialloc.c,v 1.7 2005/10/15 02:49:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/timezone/ialloc.c,v 1.8 2007/01/26 17:45:42 neilc Exp $
*/
#include "postgres.h"
@@ -14,7 +14,7 @@
#define nonzero(n) (((n) == 0) ? 1 : (n))
char *
-imalloc(const int n)
+imalloc(int n)
{
return malloc((size_t) nonzero(n));
}
@@ -28,7 +28,7 @@ icalloc(int nelem, int elsize)
}
void *
-irealloc(void *pointer, const int size)
+irealloc(void *pointer, int size)
{
if (pointer == NULL)
return imalloc(size);
diff --git a/src/timezone/zic.c b/src/timezone/zic.c
index 0f272e8d6e5..af5fc36f152 100644
--- a/src/timezone/zic.c
+++ b/src/timezone/zic.c
@@ -3,7 +3,7 @@
* 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/timezone/zic.c,v 1.19 2006/10/24 15:11:03 tgl Exp $
+ * $PostgreSQL: pgsql/src/timezone/zic.c,v 1.20 2007/01/26 17:45:42 neilc Exp $
*/
#include "postgres.h"
@@ -104,10 +104,10 @@ struct zone
};
extern int link(const char *fromname, const char *toname);
-static void addtt(pg_time_t starttime, int type);
+static void addtt(const pg_time_t starttime, int type);
static int addtype(long gmtoff, const char *abbr, int isdst,
int ttisstd, int ttisgmt);
-static void leapadd(pg_time_t t, int positive, int rolling, int count);
+static void leapadd(const pg_time_t t, int positive, int rolling, int count);
static void adjleap(void);
static void associate(void);
static int ciequal(const char *ap, const char *bp);
@@ -146,7 +146,7 @@ static void rulesub(struct rule * rp,
const char *typep, const char *monthp,
const char *dayp, const char *timep);
static void setboundaries(void);
-static pg_time_t tadd(pg_time_t t1, long t2);
+static pg_time_t tadd(const pg_time_t t1, long t2);
static void usage(void);
static void writezone(const char *name);
static int yearistype(int year, const char *type);
diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm
index 362611114a0..437940c2747 100644
--- a/src/tools/msvc/Project.pm
+++ b/src/tools/msvc/Project.pm
@@ -23,7 +23,8 @@ sub new {
includes => '',
defines => ';',
solution => $solution,
- disablewarnings => '4018;4244;4273',
+ disablewarnings => '4018;4244;4273;4102',
+ disablelinkerwarnings => ''
};
bless $self;
@@ -242,6 +243,13 @@ sub AddResourceFile {
$self->AddFile("$dir\\win32ver.rc");
}
+sub DisableLinkerWarnings {
+ my ($self, $warnings) = @_;
+
+ $self->{disablelinkerwarnings} .= ';' unless ($self->{disablelinkerwarnings} eq '');
+ $self->{disablelinkerwarnings} .= $warnings;
+}
+
sub Save {
my ($self) = @_;
@@ -390,6 +398,9 @@ EOF
GenerateMapFile="FALSE" MapFileName=".\\$cfgname\\$self->{name}\\$self->{name}.map"
SubSystem="1" TargetMachine="1"
EOF
+ if ($self->{disablelinkerwarnings}) {
+ print $f "\t\tAdditionalOptions=\"/ignore:$self->{disablelinkerwarnings}\"\n";
+ }
if ($self->{implib}) {
my $l = $self->{implib};
$l =~ s/__CFGNAME__/$cfgname/g;
diff --git a/src/tools/msvc/mkvcbuild.pl b/src/tools/msvc/mkvcbuild.pl
index 2cb88c14b8d..0fcbbffb02c 100644
--- a/src/tools/msvc/mkvcbuild.pl
+++ b/src/tools/msvc/mkvcbuild.pl
@@ -135,6 +135,7 @@ $pgevent->AddFiles('src\bin\pgevent','pgevent.c','pgmsgevent.rc');
$pgevent->AddResourceFile('src\bin\pgevent','Eventlog message formatter');
$pgevent->RemoveFile('src\bin\pgevent\win32ver.rc');
$pgevent->UseDef('src\bin\pgevent\pgevent.def');
+$pgevent->DisableLinkerWarnings('4104');
my $psql = AddSimpleFrontend('psql', 1);
$psql->AddIncludeDir('src\bin\pg_dump');