mirror of
https://github.com/postgres/postgres.git
synced 2025-08-08 06:02:22 +03:00
Back-port several small portability fixes to get contrib building
cleanly on AIX in the 8.0 branch. Rocco Altier
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.12 2004/08/20 20:13:02 momjian Exp $
|
# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.12.4.1 2005/08/02 01:35:21 tgl Exp $
|
||||||
|
|
||||||
MODULE_big = cube
|
MODULE_big = cube
|
||||||
OBJS= cube.o cubeparse.o
|
OBJS= cube.o cubeparse.o
|
||||||
@@ -9,6 +9,7 @@ REGRESS = cube
|
|||||||
|
|
||||||
EXTRA_CLEAN = cubeparse.c cubeparse.h cubescan.c y.tab.c y.tab.h
|
EXTRA_CLEAN = cubeparse.c cubeparse.h cubescan.c y.tab.c y.tab.h
|
||||||
|
|
||||||
|
SHLIB_LINK += $(filter -lm, $(LIBS))
|
||||||
|
|
||||||
ifdef USE_PGXS
|
ifdef USE_PGXS
|
||||||
PGXS = $(shell pg_config --pgxs)
|
PGXS = $(shell pg_config --pgxs)
|
||||||
|
@@ -2,16 +2,15 @@
|
|||||||
* interface functions to dictionary
|
* interface functions to dictionary
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include "postgres.h"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "postgres.h"
|
|
||||||
#include "fmgr.h"
|
|
||||||
#include "utils/array.h"
|
|
||||||
#include "catalog/pg_type.h"
|
#include "catalog/pg_type.h"
|
||||||
#include "executor/spi.h"
|
#include "executor/spi.h"
|
||||||
|
#include "fmgr.h"
|
||||||
|
#include "utils/array.h"
|
||||||
|
#include "utils/memutils.h"
|
||||||
|
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@@ -2,10 +2,6 @@
|
|||||||
* example of dictionary
|
* example of dictionary
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
|
@@ -2,12 +2,10 @@
|
|||||||
* ISpell interface
|
* ISpell interface
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "ispell/spell.h"
|
#include "ispell/spell.h"
|
||||||
|
@@ -3,9 +3,6 @@
|
|||||||
* http://snowball.tartarus.org/
|
* http://snowball.tartarus.org/
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
|
@@ -2,13 +2,10 @@
|
|||||||
* ISpell interface
|
* ISpell interface
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
@@ -2,12 +2,10 @@
|
|||||||
* Simple config parser
|
* Simple config parser
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
@@ -2,11 +2,8 @@
|
|||||||
* simple but fast map from str to Oid
|
* simple but fast map from str to Oid
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
#include "snmap.h"
|
#include "snmap.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
@@ -2,17 +2,16 @@
|
|||||||
* interface functions to tscfg
|
* interface functions to tscfg
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include "postgres.h"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#include "postgres.h"
|
|
||||||
#include "fmgr.h"
|
|
||||||
#include "utils/array.h"
|
|
||||||
#include "catalog/pg_type.h"
|
#include "catalog/pg_type.h"
|
||||||
#include "executor/spi.h"
|
#include "executor/spi.h"
|
||||||
|
#include "fmgr.h"
|
||||||
|
#include "utils/array.h"
|
||||||
|
#include "utils/memutils.h"
|
||||||
|
|
||||||
#include "ts_cfg.h"
|
#include "ts_cfg.h"
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
|
@@ -2,17 +2,16 @@
|
|||||||
* interface functions to parser
|
* interface functions to parser
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
#include "postgres.h"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "postgres.h"
|
|
||||||
#include "fmgr.h"
|
|
||||||
#include "utils/array.h"
|
|
||||||
#include "catalog/pg_type.h"
|
#include "catalog/pg_type.h"
|
||||||
#include "executor/spi.h"
|
#include "executor/spi.h"
|
||||||
|
#include "fmgr.h"
|
||||||
#include "funcapi.h"
|
#include "funcapi.h"
|
||||||
|
#include "utils/array.h"
|
||||||
|
#include "utils/memutils.h"
|
||||||
|
|
||||||
#include "wparser.h"
|
#include "wparser.h"
|
||||||
#include "ts_cfg.h"
|
#include "ts_cfg.h"
|
||||||
|
@@ -2,11 +2,8 @@
|
|||||||
* default word parser
|
* default word parser
|
||||||
* Teodor Sigaev <teodor@sigaev.ru>
|
* Teodor Sigaev <teodor@sigaev.ru>
|
||||||
*/
|
*/
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
#include "utils/builtins.h"
|
#include "utils/builtins.h"
|
||||||
|
|
||||||
#include "dict.h"
|
#include "dict.h"
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 1994, Regents of the University of California
|
# Copyright (c) 1994, Regents of the University of California
|
||||||
#
|
#
|
||||||
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.107.4.1 2005/01/26 21:57:32 tgl Exp $
|
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.107.4.2 2005/08/02 01:35:22 tgl Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -17,7 +17,12 @@ DIRS := access bootstrap catalog parser commands executor lib libpq \
|
|||||||
main nodes optimizer port postmaster regex rewrite \
|
main nodes optimizer port postmaster regex rewrite \
|
||||||
storage tcop utils $(top_builddir)/src/timezone
|
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)
|
ifeq ($(PORTNAME), qnx4)
|
||||||
# This file crashes qnx4's wlink and is therefore not in
|
# This file crashes qnx4's wlink and is therefore not in
|
||||||
@@ -27,9 +32,6 @@ ifeq ($(PORTNAME), qnx4)
|
|||||||
OBJS += bootstrap/bootstrap.o
|
OBJS += bootstrap/bootstrap.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Use server version of port library
|
|
||||||
LIBS := $(patsubst -lpgport,-lpgport_srv, $(LIBS))
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
all: submake-libpgport postgres $(POSTGRES_IMP)
|
all: submake-libpgport postgres $(POSTGRES_IMP)
|
||||||
@@ -69,7 +71,7 @@ postgres: $(OBJS) $(DLLINIT) postgres.def libpostgres.a $(WIN32RES)
|
|||||||
rm -f $@.exp $@.base
|
rm -f $@.exp $@.base
|
||||||
|
|
||||||
postgres.def: $(OBJS)
|
postgres.def: $(OBJS)
|
||||||
$(DLLTOOL) --export-all --output-def $@ $^ $(top_builddir)/src/port/libpgport.a
|
$(DLLTOOL) --export-all --output-def $@ $^
|
||||||
|
|
||||||
libpostgres.a: postgres.def
|
libpostgres.a: postgres.def
|
||||||
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
|
$(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
|
||||||
@@ -98,7 +100,7 @@ endif
|
|||||||
endif # aix
|
endif # aix
|
||||||
|
|
||||||
# Parallel make trickery
|
# Parallel make trickery
|
||||||
$(OBJS): $(DIRS:%=%-recursive) ;
|
$(SUBSYSOBJS): $(DIRS:%=%-recursive) ;
|
||||||
|
|
||||||
.PHONY: $(DIRS:%=%-recursive)
|
.PHONY: $(DIRS:%=%-recursive)
|
||||||
# Update the commonly used headers before building the subdirectories
|
# Update the commonly used headers before building the subdirectories
|
||||||
|
@@ -35,19 +35,22 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/port/getopt_long.c,v 1.3 2003/11/29 19:52:13 pgsql Exp $
|
* $PostgreSQL: pgsql/src/port/getopt_long.c,v 1.3.4.1 2005/08/02 01:35:23 tgl Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "c.h"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "getopt_long.h"
|
#include "getopt_long.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_INT_OPTRESET
|
||||||
|
int optreset;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BADCH '?'
|
#define BADCH '?'
|
||||||
#define BADARG ':'
|
#define BADARG ':'
|
||||||
#define EMSG ""
|
#define EMSG ""
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
getopt_long(int argc, char *const argv[],
|
getopt_long(int argc, char *const argv[],
|
||||||
const char *optstring,
|
const char *optstring,
|
||||||
|
Reference in New Issue
Block a user