/*
** useful function
*/
-bool isort(int4 *a, const int len);
+bool isort(int4 *a, int len);
ArrayType *new_intArrayType(int num);
ArrayType *copy_intArrayType(ArrayType *a);
ArrayType *resize_intArrayType(ArrayType *a, int num);
PG_MODULE_MAGIC;
-float4 trgm_limit = 0.3;
+float4 trgm_limit = 0.3f;
PG_FUNCTION_INFO_V1(set_limit);
Datum set_limit(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(get_covers);
Datum get_covers(PG_FUNCTION_ARGS);
-static float weights[] = {0.1, 0.2, 0.4, 1.0};
+static float weights[] = {0.1f, 0.2f, 0.4f, 1.0f};
#define wpos(wep) ( w[ WEP_GETWEIGHT(wep) ] )
word_distance(int4 w)
{
if (w > 100)
- return 1e-30;
+ return (float4)1e-30;
return 1.0 / (1.005 + 0.05 * exp(((float4) w) / 1.5 - 2));
}
calc_rank_and(w, t, q) : calc_rank_or(w, t, q);
if (res < 0)
- res = 1e-20;
+ res = (float)1e-20;
if ((method & RANK_NORM_LOGLENGTH) && t->size > 0)
res /= log((double) (cnt_length(t) + 1)) / log(2.0);
#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 */
*
*
* 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 ]
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)))
return 0;
}
#endif
- if (PEM_read_PrivateKey(fp, pkey, cb, NULL) == NULL)
+ if (PEM_read_PrivateKey(fp, pkey, NULL, NULL) == NULL)
{
char *err = SSLerrmessage();
* 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 $
*
*-------------------------------------------------------------------------
*/
#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"
* 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"
#define nonzero(n) (((n) == 0) ? 1 : (n))
char *
-imalloc(const int n)
+imalloc(int n)
{
return malloc((size_t) nonzero(n));
}
}
void *
-irealloc(void *pointer, const int size)
+irealloc(void *pointer, int size)
{
if (pointer == NULL)
return imalloc(size);
* 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"
};
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);
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);
includes => '',
defines => ';',
solution => $solution,
- disablewarnings => '4018;4244;4273',
+ disablewarnings => '4018;4244;4273;4102',
+ disablelinkerwarnings => ''
};
bless $self;
$self->AddFile("$dir\\win32ver.rc");
}
+sub DisableLinkerWarnings {
+ my ($self, $warnings) = @_;
+
+ $self->{disablelinkerwarnings} .= ';' unless ($self->{disablelinkerwarnings} eq '');
+ $self->{disablelinkerwarnings} .= $warnings;
+}
+
sub Save {
my ($self) = @_;
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;
$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');