* interface functions to dictionary
*/
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include "postgres.h"
+
#include <ctype.h>
-#include "postgres.h"
-#include "fmgr.h"
-#include "utils/array.h"
#include "catalog/pg_type.h"
#include "executor/spi.h"
+#include "fmgr.h"
+#include "utils/array.h"
+#include "utils/memutils.h"
#include "dict.h"
#include "common.h"
static int
comparedict(const void *a, const void *b)
{
- return ((DictInfo *) a)->dict_id - ((DictInfo *) b)->dict_id;
+ if ( ((DictInfo *) a)->dict_id == ((DictInfo *) b)->dict_id )
+ return 0;
+ return ( ((DictInfo *) a)->dict_id < ((DictInfo *) b)->dict_id ) ? -1 : 1;
}
DictInfo *
* interface functions to tscfg
*/
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include "postgres.h"
+
#include <ctype.h>
#include <locale.h>
-#include "postgres.h"
-#include "fmgr.h"
-#include "utils/array.h"
#include "catalog/pg_type.h"
#include "executor/spi.h"
+#include "fmgr.h"
+#include "utils/array.h"
+#include "utils/memutils.h"
#include "ts_cfg.h"
#include "dict.h"
static int
comparecfg(const void *a, const void *b)
{
- return ((TSCfgInfo *) a)->id - ((TSCfgInfo *) b)->id;
+ if ( ((TSCfgInfo *) a)->id == ((TSCfgInfo *) b)->id )
+ return 0;
+ return ( ((TSCfgInfo *) a)->id < ((TSCfgInfo *) b)->id ) ? -1 : 1;
}
TSCfgInfo *
* interface functions to parser
*/
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+#include "postgres.h"
+
#include <ctype.h>
-#include "postgres.h"
-#include "fmgr.h"
-#include "utils/array.h"
#include "catalog/pg_type.h"
#include "executor/spi.h"
+#include "fmgr.h"
#include "funcapi.h"
+#include "utils/array.h"
+#include "utils/memutils.h"
#include "wparser.h"
#include "ts_cfg.h"
static int
compareprs(const void *a, const void *b)
{
- return ((WParserInfo *) a)->prs_id - ((WParserInfo *) b)->prs_id;
+ if ( ((WParserInfo *) a)->prs_id == ((WParserInfo *) b)->prs_id )
+ return 0;
+ return ( ((WParserInfo *) a)->prs_id < ((WParserInfo *) b)->prs_id ) ? -1 : 1;
}
WParserInfo *
main nodes optimizer port postmaster regex rewrite \
storage tcop utils $(top_builddir)/src/timezone
-OBJS := $(DIRS:%=%/SUBSYS.o)
+SUBSYSOBJS := $(DIRS:%=%/SUBSYS.o)
+
+OBJS := $(SUBSYSOBJS) $(top_builddir)/src/port/libpgport_srv.a
+
+# We put libpgport into OBJS, so remove it from LIBS
+LIBS := $(patsubst -lpgport, , $(LIBS))
ifeq ($(PORTNAME), qnx4)
# This file crashes qnx4's wlink and is therefore not in
# bootstrap/SUBSYS.o on that platform. (Wotta hack ... is it still
# necessary?) [ Yes, until the Watcom compiler goes open source it's
# effectively unsupported ]
-OBJS+= bootstrap/bootstrap.o
+OBJS += bootstrap/bootstrap.o
endif
-# Use server version of port library
-LIBS := $(patsubst -lpgport,-lpgport_srv, $(LIBS))
-
##########################################################################
all: submake-libpgport postgres $(POSTGRES_IMP)
+ $(CC) $(CFLAGS) $(LDFLAGS) -
Wl,--stack,4194304 -o $@$(X)
[email protected] $(OBJS) $(LIBS)
postgres.def: $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -
Wl,--stack=4194304 -o $@$(X)
[email protected] $(OBJS) $(WIN32RES) $(LIBS)
postgres.def: $(OBJS)
- $(DLLTOOL) --export-all --output-def $@ $^ $(top_builddir)/src/port/libpgport.a
+ $(DLLTOOL) --export-all --output-def $@ $^
libpostgres.a: postgres.def
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
endif # aix
# Parallel make trickery
-$(OBJS): $(DIRS:%=%-recursive) ;
+$(SUBSYSOBJS): $(DIRS:%=%-recursive) ;
.PHONY: $(DIRS:%=%-recursive)
# Update the commonly used headers before building the subdirectories