Commit 5979d738 authored by Marc G. Fournier's avatar Marc G. Fournier

From: t-ishii@sra.co.jp

As Bruce mentioned, this is due to the conflict among changes we made.
Included patches should fix the problem(I changed all MB to
MULTIBYTE). Please let me know if you have further problem.

P.S. I did not include pathces to configure and gram.c to save the
file size(configure.in and gram.y modified).
parent 74b30a3a
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.44 1998/07/24 03:31:04 scrappy Exp $ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.45 1998/07/26 04:30:15 scrappy Exp $
# #
# NOTES # NOTES
# Essentially all Postgres make files include this file and use the # Essentially all Postgres make files include this file and use the
...@@ -151,7 +151,10 @@ X11_LIBS= -lX11 @X_EXTRA_LIBS@ ...@@ -151,7 +151,10 @@ X11_LIBS= -lX11 @X_EXTRA_LIBS@
# enable multi-byte support # enable multi-byte support
# choose one of: # choose one of:
# EUC_JP,EUC_CN,EUC_KR,EUC_TW,UNICODE,MULE_INTERNAL,LATIN1-5 # EUC_JP,EUC_CN,EUC_KR,EUC_TW,UNICODE,MULE_INTERNAL,LATIN1-5
MB=@MB@ MULTIBYTE=@MULTIBYTE@
ifdef MULTIBYTE
MBFLAGS = -DMULTIBYTE=$(MULTIBYTE)
endif
############################################################################## ##############################################################################
# #
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for access/common # Makefile for access/common
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.11 1998/06/16 07:29:18 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/access/common/Makefile,v 1.12 1998/07/26 04:30:16 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -13,8 +13,8 @@ include ../../../Makefile.global ...@@ -13,8 +13,8 @@ include ../../../Makefile.global
CFLAGS+=-I../.. CFLAGS+=-I../..
ifdef MB ifdef MULTIBYTE
CFLAGS+= -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = heaptuple.o heapvalid.o indextuple.o indexvalid.o printtup.o \ OBJS = heaptuple.o heapvalid.o indextuple.o indexvalid.o printtup.o \
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.30 1998/07/18 18:34:01 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.31 1998/07/26 04:30:16 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <utils/syscache.h> #include <utils/syscache.h>
#ifdef MULTIBYTE #ifdef MULTIBYTE
#include <commands/variable.h> #include <mb/pg_wchar.h>
#endif #endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the bootstrap module # Makefile for the bootstrap module
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.14 1998/07/24 03:31:06 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.15 1998/07/26 04:30:17 scrappy Exp $
# #
# #
# We must build bootparse.c and bootscanner.c with yacc and lex and sed, # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
...@@ -22,8 +22,8 @@ SRCDIR= ../.. ...@@ -22,8 +22,8 @@ SRCDIR= ../..
include ../../Makefile.global include ../../Makefile.global
CFLAGS += -I.. CFLAGS += -I..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
ifeq ($(CC), gcc) ifeq ($(CC), gcc)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.17 1998/07/24 03:31:07 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.18 1998/07/26 04:30:18 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "bootstrap/bootstrap.h" #include "bootstrap/bootstrap.h"
#include "catalog/heap.h" #include "catalog/heap.h"
#include "catalog/pg_am.h" #include "catalog/pg_am.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_attribute_mb.h" #include "catalog/pg_attribute_mb.h"
#include "catalog/pg_class_mb.h" #include "catalog/pg_class_mb.h"
#else #else
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.9 1998/07/24 03:31:08 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.10 1998/07/26 04:30:19 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "storage/block.h" #include "storage/block.h"
#include "storage/off.h" #include "storage/off.h"
#include "storage/itemptr.h" #include "storage/itemptr.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_attribute_mb.h" #include "catalog/pg_attribute_mb.h"
#else #else
#include "catalog/pg_attribute.h" #include "catalog/pg_attribute.h"
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "access/funcindex.h" #include "access/funcindex.h"
#include "storage/fd.h" #include "storage/fd.h"
#include "catalog/pg_am.h" #include "catalog/pg_am.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_class_mb.h" #include "catalog/pg_class_mb.h"
#else #else
#include "catalog/pg_class.h" #include "catalog/pg_class.h"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.45 1998/07/24 03:31:08 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.46 1998/07/26 04:30:19 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "catalog/catname.h" #include "catalog/catname.h"
#include "catalog/index.h" #include "catalog/index.h"
#include "catalog/pg_am.h" #include "catalog/pg_am.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_attribute_mb.h" #include "catalog/pg_attribute_mb.h"
#include "catalog/pg_class_mb.h" #include "catalog/pg_class_mb.h"
#else #else
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for catalog # Makefile for catalog
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.11 1998/07/24 03:31:09 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/catalog/Makefile,v 1.12 1998/07/26 04:30:20 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -24,7 +24,7 @@ SUBSYS.o: $(OBJS) ...@@ -24,7 +24,7 @@ SUBSYS.o: $(OBJS)
GENBKI= ./genbki.sh GENBKI= ./genbki.sh
ifdef MB ifdef MULTIBYTE
GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \ GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \
pg_database_mb.h pg_variable.h pg_shadow.h \ pg_database_mb.h pg_variable.h pg_shadow.h \
pg_group.h pg_log.h \ pg_group.h pg_log.h \
...@@ -36,7 +36,7 @@ GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \ ...@@ -36,7 +36,7 @@ GLOBALBKI_SRCS= $(addprefix ../../include/catalog/, \
) )
endif endif
ifdef MB ifdef MULTIBYTE
LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \ LOCALBKI_SRCS= $(addprefix ../../include/catalog/, \
pg_proc.h pg_type.h pg_attribute_mb.h pg_class_mb.h \ pg_proc.h pg_type.h pg_attribute_mb.h pg_class_mb.h \
pg_inherits.h pg_index.h pg_version.h pg_statistic.h \ pg_inherits.h pg_index.h pg_version.h pg_statistic.h \
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for commands # Makefile for commands
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/commands/Makefile,v 1.14 1998/07/24 03:31:11 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/commands/Makefile,v 1.15 1998/07/26 04:30:22 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -13,8 +13,8 @@ include ../../Makefile.global ...@@ -13,8 +13,8 @@ include ../../Makefile.global
CFLAGS += -I.. CFLAGS += -I..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = async.o creatinh.o command.o copy.o defind.o define.o \ OBJS = async.o creatinh.o command.o copy.o defind.o define.o \
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.24 1998/07/24 03:31:13 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.25 1998/07/26 04:30:22 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include <utils/excid.h> #include <utils/excid.h>
#include <utils/mcxt.h> #include <utils/mcxt.h>
#include <catalog/pg_proc.h> #include <catalog/pg_proc.h>
#ifdef MB #ifdef MULTIBYTE
#include <catalog/pg_class_mb.h> #include <catalog/pg_class_mb.h>
#else #else
#include <catalog/pg_class.h> #include <catalog/pg_class.h>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.50 1998/07/24 03:31:14 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.51 1998/07/26 04:30:23 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "commands/trigger.h" #include "commands/trigger.h"
#include <storage/fd.h> #include <storage/fd.h>
#ifdef MB #ifdef MULTIBYTE
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#endif #endif
...@@ -1016,14 +1016,14 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) ...@@ -1016,14 +1016,14 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
char c; char c;
int done = 0; int done = 0;
int i = 0; int i = 0;
#ifdef MB #ifdef MULTIBYTE
int mblen; int mblen;
int encoding; int encoding;
unsigned char s[2]; unsigned char s[2];
int j; int j;
#endif #endif
#ifdef MB #ifdef MULTIBYTE
encoding = pg_get_client_encoding(); encoding = pg_get_client_encoding();
s[1] = 0; s[1] = 0;
#endif #endif
...@@ -1129,7 +1129,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) ...@@ -1129,7 +1129,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
} }
if (!done) { if (!done) {
attribute[i++] = c; attribute[i++] = c;
#ifdef MB #ifdef MULTIBYTE
s[0] = c; s[0] = c;
mblen = pg_encoding_mblen(encoding, s); mblen = pg_encoding_mblen(encoding, s);
mblen--; mblen--;
...@@ -1145,7 +1145,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim) ...@@ -1145,7 +1145,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
elog(ERROR, "CopyReadAttribute - attribute length too long. line: %d", lineno); elog(ERROR, "CopyReadAttribute - attribute length too long. line: %d", lineno);
} }
attribute[i] = '\0'; attribute[i] = '\0';
#ifdef MB #ifdef MULTIBYTE
return(pg_client_to_server((unsigned char*)attribute, strlen(attribute))); return(pg_client_to_server((unsigned char*)attribute, strlen(attribute)));
#else #else
return (&attribute[0]); return (&attribute[0]);
...@@ -1157,20 +1157,20 @@ CopyAttributeOut(FILE *fp, unsigned char *server_string, char *delim, int is_arr ...@@ -1157,20 +1157,20 @@ CopyAttributeOut(FILE *fp, unsigned char *server_string, char *delim, int is_arr
{ {
unsigned char *string; unsigned char *string;
unsigned char c; unsigned char c;
#ifdef MB #ifdef MULTIBYTE
int mblen; int mblen;
int encoding; int encoding;
int i; int i;
#endif #endif
#ifdef MB #ifdef MULTIBYTE
string = pg_server_to_client(server_string, strlen(server_string)); string = pg_server_to_client(server_string, strlen(server_string));
encoding = pg_get_client_encoding(); encoding = pg_get_client_encoding();
#else #else
string = server_string; string = server_string;
#endif #endif
#ifdef MB #ifdef MULTIBYTE
for (; (mblen = pg_encoding_mblen(encoding, string)) && for (; (mblen = pg_encoding_mblen(encoding, string)) &&
((c = *string) != '\0'); string += mblen) ((c = *string) != '\0'); string += mblen)
#else #else
...@@ -1197,7 +1197,7 @@ CopyAttributeOut(FILE *fp, unsigned char *server_string, char *delim, int is_arr ...@@ -1197,7 +1197,7 @@ CopyAttributeOut(FILE *fp, unsigned char *server_string, char *delim, int is_arr
fputc('\\', fp); fputc('\\', fp);
} }
} }
#ifdef MB #ifdef MULTIBYTE
for (i=0;i<mblen;i++) { for (i=0;i<mblen;i++) {
fputc(*(string+i), fp); fputc(*(string+i), fp);
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.16 1998/07/24 03:31:15 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.17 1998/07/26 04:30:24 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "access/htup.h" #include "access/htup.h"
#include "access/relscan.h" #include "access/relscan.h"
#include "catalog/catname.h" #include "catalog/catname.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_database_mb.h" #include "catalog/pg_database_mb.h"
#else #else
#include "catalog/pg_database.h" #include "catalog/pg_database.h"
...@@ -47,7 +47,7 @@ static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel); ...@@ -47,7 +47,7 @@ static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel);
static void stop_vacuum(char *dbpath, char *dbname); static void stop_vacuum(char *dbpath, char *dbname);
void void
#ifdef MB #ifdef MULTIBYTE
createdb(char *dbname, char *dbpath, int encoding) createdb(char *dbname, char *dbpath, int encoding)
#else #else
createdb(char *dbname, char *dbpath) createdb(char *dbname, char *dbpath)
...@@ -98,7 +98,7 @@ createdb(char *dbname, char *dbpath) ...@@ -98,7 +98,7 @@ createdb(char *dbname, char *dbpath)
dbname, user_id, dbname); dbname, user_id, dbname);
#endif #endif
#ifdef MB #ifdef MULTIBYTE
sprintf(buf, "insert into pg_database (datname, datdba, encoding, datpath)" sprintf(buf, "insert into pg_database (datname, datdba, encoding, datpath)"
" values (\'%s\', \'%d\', \'%d\', \'%s\');", dbname, user_id, encoding, loc); " values (\'%s\', \'%d\', \'%d\', \'%s\');", dbname, user_id, encoding, loc);
#else #else
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.12 1998/07/24 03:31:19 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.13 1998/07/26 04:30:24 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <utils/excid.h> #include <utils/excid.h>
#include <utils/mcxt.h> #include <utils/mcxt.h>
#include <catalog/pg_proc.h> #include <catalog/pg_proc.h>
#ifdef MB #ifdef MULTIBYTE
#include <catalog/pg_class_mb.h> #include <catalog/pg_class_mb.h>
#else #else
#include <catalog/pg_class.h> #include <catalog/pg_class.h>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <miscadmin.h> #include <miscadmin.h>
#include <catalog/catname.h> #include <catalog/catname.h>
#ifdef MB #ifdef MULTIBYTE
#include <catalog/pg_database_mb.h> #include <catalog/pg_database_mb.h>
#else #else
#include <catalog/pg_database.h> #include <catalog/pg_database.h>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.67 1998/07/24 03:31:20 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.68 1998/07/26 04:30:25 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "catalog/catalog.h" #include "catalog/catalog.h"
#include "catalog/catname.h" #include "catalog/catname.h"
#include "catalog/index.h" #include "catalog/index.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_class_mb.h" #include "catalog/pg_class_mb.h"
#else #else
#include "catalog/pg_class.h" #include "catalog/pg_class.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Routines for handling of 'SET var TO', * Routines for handling of 'SET var TO',
* 'SHOW var' and 'RESET var' statements. * 'SHOW var' and 'RESET var' statements.
* *
* $Id: variable.c,v 1.9 1998/07/24 03:31:20 scrappy Exp $ * $Id: variable.c,v 1.10 1998/07/26 04:30:26 scrappy Exp $
* *
*/ */
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "utils/builtins.h" #include "utils/builtins.h"
#include "optimizer/internal.h" #include "optimizer/internal.h"
#ifdef MULTIBYTE #ifdef MULTIBYTE
#include "regex/pg_wchar.h" #include "mb/pg_wchar.h"
#endif #endif
extern Cost _cpu_page_wight_; extern Cost _cpu_page_wight_;
...@@ -522,54 +522,6 @@ reset_timezone() ...@@ -522,54 +522,6 @@ reset_timezone()
return TRUE; return TRUE;
} /* reset_timezone() */ } /* reset_timezone() */
#ifdef MULTIBYTE
/*-----------------------------------------------------------------------*/
bool
parse_client_encoding(const char *value)
{
int encoding;
encoding = pg_valid_client_encoding(value);
if (encoding < 0) {
elog(ERROR, "Client encoding %s is not supported", value);
} else {
if (pg_set_client_encoding(encoding)) {
elog(ERROR, "Conversion between %s and %s is not supported",
value, pg_encoding_to_char(MULTIBYTE));
}
}
return TRUE;
}
bool
show_client_encoding()
{
elog(NOTICE, "Current client encoding is %s",
pg_encoding_to_char(pg_get_client_encoding()));
return TRUE;
}
bool
reset_client_encoding()
{
int encoding;
char *env = getenv("PGCLIENTENCODING");
if (env) {
encoding = pg_char_to_encoding(env);
if (encoding < 0) {
encoding = MULTIBYTE;
}
} else {
encoding = MULTIBYTE;
}
pg_set_client_encoding(encoding);
return TRUE;
}
/*-----------------------------------------------------------------------*/
#endif
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
struct VariableParsers struct VariableParsers
{ {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for libpq subsystem (backend half of libpq interface) # Makefile for libpq subsystem (backend half of libpq interface)
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.12 1998/06/16 07:29:22 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/libpq/Makefile,v 1.13 1998/07/26 04:30:27 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -19,8 +19,8 @@ CFLAGS+= $(KRBFLAGS) ...@@ -19,8 +19,8 @@ CFLAGS+= $(KRBFLAGS)
LDFLAGS+= $(KRBLIBS) LDFLAGS+= $(KRBLIBS)
endif endif
ifdef MB ifdef MULTIBYTE
CFLAGS+= -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = be-dumpdata.o be-fsstubs.o be-pqexec.o pqcomprim.o\ OBJS = be-dumpdata.o be-fsstubs.o be-pqexec.o pqcomprim.o\
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.49 1998/07/18 18:34:03 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.50 1998/07/26 04:30:28 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
#include "libpq/libpq.h" /* where the declarations go */ #include "libpq/libpq.h" /* where the declarations go */
#include "storage/ipc.h" #include "storage/ipc.h"
#ifdef MULTIBYTE #ifdef MULTIBYTE
#include "commands/variable.h" #include "mb/pg_wchar.h"
#endif #endif
/* ---------------- /* ----------------
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for parser # Makefile for parser
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.18 1998/07/24 03:31:21 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.19 1998/07/26 04:30:30 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,8 +17,8 @@ ifeq ($(CC), gcc) ...@@ -17,8 +17,8 @@ ifeq ($(CC), gcc)
CFLAGS+= -Wno-error CFLAGS+= -Wno-error
endif endif
ifdef MB ifdef MULTIBYTE
CFLAGS+= -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_clause.o \ OBJS= analyze.o gram.o keywords.o parser.o parse_agg.o parse_clause.o \
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.18 1998/07/26 01:18:04 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.19 1998/07/26 04:30:31 scrappy Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "utils/elog.h" #include "utils/elog.h"
#include "access/xact.h" #include "access/xact.h"
#ifdef MB #ifdef MULTIBYTE
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#endif #endif
...@@ -2084,7 +2084,7 @@ CreatedbStmt: CREATE DATABASE database_name WITH opt_database1 opt_database2 ...@@ -2084,7 +2084,7 @@ CreatedbStmt: CREATE DATABASE database_name WITH opt_database1 opt_database2
} }
n->dbname = $3; n->dbname = $3;
n->dbpath = $5; n->dbpath = $5;
#ifdef MB #ifdef MULTIBYTE
if ($6 != NULL) { if ($6 != NULL) {
n->encoding = pg_char_to_encoding($6); n->encoding = pg_char_to_encoding($6);
if (n->encoding < 0) { if (n->encoding < 0) {
...@@ -2103,7 +2103,7 @@ CreatedbStmt: CREATE DATABASE database_name WITH opt_database1 opt_database2 ...@@ -2103,7 +2103,7 @@ CreatedbStmt: CREATE DATABASE database_name WITH opt_database1 opt_database2
CreatedbStmt *n = makeNode(CreatedbStmt); CreatedbStmt *n = makeNode(CreatedbStmt);
n->dbname = $3; n->dbname = $3;
n->dbpath = NULL; n->dbpath = NULL;
#ifdef MB #ifdef MULTIBYTE
n->encoding = GetTemplateEncoding(); n->encoding = GetTemplateEncoding();
#endif #endif
$$ = (Node *)n; $$ = (Node *)n;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for regex # Makefile for regex
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.7 1998/07/24 03:31:24 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/regex/Makefile,v 1.8 1998/07/26 04:30:34 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -15,8 +15,8 @@ CFLAGS += -I.. ...@@ -15,8 +15,8 @@ CFLAGS += -I..
CFLAGS += -DPOSIX_MISTAKE CFLAGS += -DPOSIX_MISTAKE
OBJS = regcomp.o regerror.o regexec.o regfree.o OBJS = regcomp.o regerror.o regexec.o regfree.o
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
all: SUBSYS.o all: SUBSYS.o
......
...@@ -118,19 +118,8 @@ extern "C" ...@@ -118,19 +118,8 @@ extern "C"
#define CODEMAX (BOL+5) /* highest code used */ #define CODEMAX (BOL+5) /* highest code used */
#ifdef MULTIBYTE #ifdef MULTIBYTE
# if MULTIBYTE == MULE_INTERNAL # define NONCHAR(c) ((c) > 16777216) /* 16777216 == 2^24 == 3 bytes */
# define NONCHAR(c) ((c) > 16777216) /* 16777216 == 2^24 == 3 bytes */ # define NNONCHAR (CODEMAX-16777216)
# define NNONCHAR (CODEMAX-16777216)
# elif MULTIBYTE == EUC_JP || MULTIBYTE == EUC_CN || MULTIBYTE == EUC_KR || MULTIBYTE == EUC_TW
# define NONCHAR(c) ((c) > USHRT_MAX)
# define NNONCHAR (CODEMAX-USHRT_MAX)
# elif MULTIBYTE == UNICODE
# define NONCHAR(c) ((c) > USHRT_MAX)
# define NNONCHAR (CODEMAX-USHRT_MAX)
# else /* assume 1 byte code such as ISO8859-1 */
# define NONCHAR(c) ((c) > UCHAR_MAX)
# define NNONCHAR (CODEMAX-UCHAR_MAX)
# endif
#else #else
# define NONCHAR(c) ((c) > CHAR_MAX) # define NONCHAR(c) ((c) > CHAR_MAX)
# define NNONCHAR (CODEMAX-CHAR_MAX) # define NNONCHAR (CODEMAX-CHAR_MAX)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for rewrite # Makefile for rewrite
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/rewrite/Makefile,v 1.7 1998/07/24 03:31:30 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/rewrite/Makefile,v 1.8 1998/07/26 04:30:37 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,8 +12,8 @@ SRCDIR = ../.. ...@@ -12,8 +12,8 @@ SRCDIR = ../..
include ../../Makefile.global include ../../Makefile.global
CFLAGS += -I.. CFLAGS += -I..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = rewriteRemove.o rewriteDefine.o \ OBJS = rewriteRemove.o rewriteDefine.o \
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.22 1998/07/24 03:31:31 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.23 1998/07/26 04:30:38 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "access/heapam.h" #include "access/heapam.h"
#include "catalog/catname.h" #include "catalog/catname.h"
#include "catalog/indexing.h" #include "catalog/indexing.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_class_mb.h" #include "catalog/pg_class_mb.h"
#else #else
#include "catalog/pg_class.h" #include "catalog/pg_class.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for storage/lmgr # Makefile for storage/lmgr
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Makefile,v 1.7 1998/07/24 03:31:32 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Makefile,v 1.8 1998/07/26 04:30:40 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,8 +12,8 @@ SRCDIR = ../../.. ...@@ -12,8 +12,8 @@ SRCDIR = ../../..
include ../../../Makefile.global include ../../../Makefile.global
CFLAGS += -I../.. CFLAGS += -I../..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = lmgr.o lock.o multi.o proc.o single.o OBJS = lmgr.o lock.o multi.o proc.o single.o
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.14 1998/07/24 03:31:33 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.15 1998/07/26 04:30:41 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "catalog/catname.h" #include "catalog/catname.h"
#include "catalog/catalog.h" #include "catalog/catalog.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_class_mb.h" #include "catalog/pg_class_mb.h"
#else #else
#include "catalog/pg_class.h" #include "catalog/pg_class.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for storage/smgr # Makefile for storage/smgr
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/storage/smgr/Makefile,v 1.7 1998/07/24 03:31:35 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/storage/smgr/Makefile,v 1.8 1998/07/26 04:30:43 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -13,8 +13,8 @@ include ../../../Makefile.global ...@@ -13,8 +13,8 @@ include ../../../Makefile.global
CFLAGS += -I../.. CFLAGS += -I../..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = md.o mm.o smgr.o smgrtype.o OBJS = md.o mm.o smgr.o smgrtype.o
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.34 1998/07/24 03:31:35 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.35 1998/07/26 04:30:44 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -568,11 +568,11 @@ mdblindwrt(char *dbstr, ...@@ -568,11 +568,11 @@ mdblindwrt(char *dbstr,
Oid owner, Oid owner,
id; id;
char *tmpPath; char *tmpPath;
#ifdef MB #ifdef MULTIBYTE
int tmpEncoding; int tmpEncoding;
#endif #endif
#ifdef MB #ifdef MULTIBYTE
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath, &tmpEncoding); GetRawDatabaseInfo(dbstr, &owner, &id, dbpath, &tmpEncoding);
#else #else
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath); GetRawDatabaseInfo(dbstr, &owner, &id, dbpath);
...@@ -614,11 +614,11 @@ mdblindwrt(char *dbstr, ...@@ -614,11 +614,11 @@ mdblindwrt(char *dbstr,
id; id;
char *tmpPath; char *tmpPath;
#ifdef MB #ifdef MULTIBYTE
int tmpEncoding; int tmpEncoding;
#endif #endif
#ifdef MB #ifdef MULTIBYTE
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath, &tmpEncoding); GetRawDatabaseInfo(dbstr, &owner, &id, dbpath, &tmpEncoding);
#else #else
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath); GetRawDatabaseInfo(dbstr, &owner, &id, dbpath);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for tcop # Makefile for tcop
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.17 1998/06/16 07:29:30 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.18 1998/07/26 04:30:46 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -13,8 +13,8 @@ include ../../Makefile.global ...@@ -13,8 +13,8 @@ include ../../Makefile.global
CFLAGS+= -I.. CFLAGS+= -I..
ifdef MB ifdef MULTIBYTE
CFLAGS+= -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
ifeq ($(CC), gcc) ifeq ($(CC), gcc)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.80 1998/07/18 18:34:09 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.81 1998/07/26 04:30:46 scrappy Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
#endif #endif
#ifdef MULTIBYTE #ifdef MULTIBYTE
#include "commands/variable.h" #include "mb/pg_wchar.h"
#endif #endif
/* ---------------- /* ----------------
...@@ -1339,7 +1339,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[]) ...@@ -1339,7 +1339,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if (!IsUnderPostmaster) if (!IsUnderPostmaster)
{ {
puts("\nPOSTGRES backend interactive interface"); puts("\nPOSTGRES backend interactive interface");
puts("$Revision: 1.80 $ $Date: 1998/07/18 18:34:09 $"); puts("$Revision: 1.81 $ $Date: 1998/07/26 04:30:46 $");
} }
/* ---------------- /* ----------------
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.43 1998/07/24 03:31:38 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.44 1998/07/26 04:30:48 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -558,7 +558,7 @@ ProcessUtility(Node *parsetree, ...@@ -558,7 +558,7 @@ ProcessUtility(Node *parsetree,
*ps_status = commandTag = "CREATEDB"; *ps_status = commandTag = "CREATEDB";
CHECK_IF_ABORTED(); CHECK_IF_ABORTED();
#ifdef MB #ifdef MULTIBYTE
createdb(stmt->dbname, stmt->dbpath, stmt->encoding); createdb(stmt->dbname, stmt->dbpath, stmt->encoding);
#else #else
createdb(stmt->dbname, stmt->dbpath); createdb(stmt->dbname, stmt->dbpath);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for utils # Makefile for utils
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.7 1998/07/24 03:31:39 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/utils/Makefile,v 1.8 1998/07/26 04:30:50 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -23,7 +23,7 @@ OBJS = fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o \ ...@@ -23,7 +23,7 @@ OBJS = fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o \
DIRS = adt cache error fmgr hash init misc mmgr sort time DIRS = adt cache error fmgr hash init misc mmgr sort time
ifdef MB ifdef MULTIBYTE
OBJS += mb/SUBSYS.o OBJS += mb/SUBSYS.o
DIRS += mb DIRS += mb
endif endif
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for utils/adt # Makefile for utils/adt
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.14 1998/07/08 13:57:05 thomas Exp $ # $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.15 1998/07/26 04:30:52 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -13,8 +13,8 @@ include ../../../Makefile.global ...@@ -13,8 +13,8 @@ include ../../../Makefile.global
CFLAGS += -I../.. CFLAGS += -I../..
ifdef MB ifdef MULTIBYTE
CFLAGS+=-DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o chunk.o \ OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o chunk.o \
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for utils/cache # Makefile for utils/cache
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/cache/Makefile,v 1.7 1998/07/24 03:31:46 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/utils/cache/Makefile,v 1.8 1998/07/26 04:30:54 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,8 +12,8 @@ SRCDIR = ../../.. ...@@ -12,8 +12,8 @@ SRCDIR = ../../..
include ../../../Makefile.global include ../../../Makefile.global
CFLAGS += -I../.. CFLAGS += -I../..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = catcache.o inval.o rel.o relcache.o syscache.o lsyscache.o fcache.o OBJS = catcache.o inval.o rel.o relcache.o syscache.o lsyscache.o fcache.o
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.13 1998/07/24 03:31:46 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.14 1998/07/26 04:30:55 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "catalog/pg_proc.h" #include "catalog/pg_proc.h"
#include "catalog/pg_language.h" #include "catalog/pg_language.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_class_mb.h" #include "catalog/pg_class_mb.h"
#else #else
#include "catalog/pg_class.h" #include "catalog/pg_class.h"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.42 1998/07/24 03:31:47 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.43 1998/07/26 04:30:57 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
#include "catalog/indexing.h" #include "catalog/indexing.h"
#include "catalog/pg_aggregate.h" #include "catalog/pg_aggregate.h"
#include "catalog/pg_attrdef.h" #include "catalog/pg_attrdef.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_attribute_mb.h" #include "catalog/pg_attribute_mb.h"
#else #else
#include "catalog/pg_attribute.h" #include "catalog/pg_attribute.h"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for utils/init # Makefile for utils/init
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/init/Makefile,v 1.8 1998/07/24 03:31:49 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/utils/init/Makefile,v 1.9 1998/07/26 04:31:00 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,8 +12,8 @@ SRCDIR = ../../.. ...@@ -12,8 +12,8 @@ SRCDIR = ../../..
include ../../../Makefile.global include ../../../Makefile.global
CFLAGS += -I../.. CFLAGS += -I../..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = enbl.o findbe.o globals.o miscinit.o postinit.o OBJS = enbl.o findbe.o globals.o miscinit.o postinit.o
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.17 1998/07/24 03:31:50 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.18 1998/07/26 04:31:01 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -234,8 +234,8 @@ SetDatabaseName(char *name) ...@@ -234,8 +234,8 @@ SetDatabaseName(char *name)
strcpy(DatabaseName, name); strcpy(DatabaseName, name);
} }
#ifndef MB #ifndef MULTIBYTE
/* even if MB is not enabled, this function is neccesary /* even if MULTIBYTE is not enabled, this function is neccesary
* since pg_proc.h does have. * since pg_proc.h does have.
*/ */
const char * const char *
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.31 1998/07/24 03:31:50 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.32 1998/07/26 04:31:01 scrappy Exp $
* *
* NOTES * NOTES
* InitPostgres() is the function called from PostgresMain * InitPostgres() is the function called from PostgresMain
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
#include "utils/inval.h" #include "utils/inval.h"
#include "catalog/catname.h" #include "catalog/catname.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_database_mb.h" #include "catalog/pg_database_mb.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#else #else
...@@ -83,7 +83,7 @@ static void InitStdio(void); ...@@ -83,7 +83,7 @@ static void InitStdio(void);
static void InitUserid(void); static void InitUserid(void);
extern char *ExpandDatabasePath(char *name); extern char *ExpandDatabasePath(char *name);
#ifdef MB #ifdef MULTIBYTE
extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding); extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding);
#else #else
extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path); extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path);
...@@ -128,12 +128,12 @@ InitMyDatabaseInfo(char *name) ...@@ -128,12 +128,12 @@ InitMyDatabaseInfo(char *name)
Oid owner; Oid owner;
char *path, char *path,
myPath[MAXPGPATH + 1]; myPath[MAXPGPATH + 1];
#ifdef MB #ifdef MULTIBYTE
int encoding; int encoding;
#endif #endif
SetDatabaseName(name); SetDatabaseName(name);
#ifdef MB #ifdef MULTIBYTE
GetRawDatabaseInfo(name, &owner, &MyDatabaseId, myPath, &encoding); GetRawDatabaseInfo(name, &owner, &MyDatabaseId, myPath, &encoding);
#else #else
GetRawDatabaseInfo(name, &owner, &MyDatabaseId, myPath); GetRawDatabaseInfo(name, &owner, &MyDatabaseId, myPath);
...@@ -147,7 +147,7 @@ InitMyDatabaseInfo(char *name) ...@@ -147,7 +147,7 @@ InitMyDatabaseInfo(char *name)
path = ExpandDatabasePath(myPath); path = ExpandDatabasePath(myPath);
SetDatabasePath(path); SetDatabasePath(path);
#ifdef MB #ifdef MULTIBYTE
SetDatabaseEncoding(encoding); SetDatabaseEncoding(encoding);
#endif #endif
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for utils/mb # Makefile for utils/mb
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/mb/Makefile,v 1.1 1998/07/24 03:31:54 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/utils/mb/Makefile,v 1.2 1998/07/26 04:31:03 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -12,8 +12,8 @@ SRCDIR = ../../.. ...@@ -12,8 +12,8 @@ SRCDIR = ../../..
include ../../../Makefile.global include ../../../Makefile.global
CFLAGS += -I../.. CFLAGS += -I../..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = common.o conv.o mbutils.o wchar.o wstrcmp.o wstrncmp.o variable.o OBJS = common.o conv.o mbutils.o wchar.o wstrcmp.o wstrncmp.o variable.o
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* client encoding and server internal encoding. * client encoding and server internal encoding.
* (currently mule internal code (mic) is used) * (currently mule internal code (mic) is used)
* Tatsuo Ishii * Tatsuo Ishii
* $Id: mbutils.c,v 1.1 1998/07/24 03:31:56 scrappy Exp $ */ * $Id: mbutils.c,v 1.2 1998/07/26 04:31:04 scrappy Exp $ */
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -183,7 +183,7 @@ int pg_mbstrlen_with_len(const unsigned char *mbstr, int limit) ...@@ -183,7 +183,7 @@ int pg_mbstrlen_with_len(const unsigned char *mbstr, int limit)
/* /*
* fuctions for utils/init * fuctions for utils/init
*/ */
static int DatabaseEncoding = MB; static int DatabaseEncoding = MULTIBYTE;
void void
SetDatabaseEncoding(int encoding) SetDatabaseEncoding(int encoding)
{ {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for utils/misc # Makefile for utils/misc
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.7 1998/07/24 03:31:58 scrappy Exp $ # $Header: /cvsroot/pgsql/src/backend/utils/misc/Makefile,v 1.8 1998/07/26 04:31:06 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -13,8 +13,8 @@ include ../../../Makefile.global ...@@ -13,8 +13,8 @@ include ../../../Makefile.global
CFLAGS += -I../.. CFLAGS += -I../..
ifdef MB ifdef MULTIBYTE
CFLAGS += -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS = database.o superuser.o OBJS = database.o superuser.o
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.12 1998/07/24 03:31:59 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.13 1998/07/26 04:31:07 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "access/heapam.h" #include "access/heapam.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/catname.h" #include "catalog/catname.h"
#ifdef MB #ifdef MULTIBYTE
#include "catalog/pg_database_mb.h" #include "catalog/pg_database_mb.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#else #else
...@@ -184,7 +184,7 @@ ExpandDatabasePath(char *dbpath) ...@@ -184,7 +184,7 @@ ExpandDatabasePath(char *dbpath)
* -------------------------------- * --------------------------------
*/ */
void void
#ifdef MB #ifdef MULTIBYTE
GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding) GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding)
#else #else
GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path) GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path)
...@@ -275,14 +275,23 @@ GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path) ...@@ -275,14 +275,23 @@ GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path)
* means of getting at sys cat attrs. * means of getting at sys cat attrs.
*/ */
tup_db = (Form_pg_database) GETSTRUCT(tup); tup_db = (Form_pg_database) GETSTRUCT(tup);
#ifdef MULTIBYTE
/* get encoding from template database.
This is the "default for default" for
create database command.
*/
if (strcmp("template1",tup_db->datname.data) == 0)
{
SetTemplateEncoding(tup_db->encoding);
}
#endif
if (strcmp(name, tup_db->datname.data) == 0) if (strcmp(name, tup_db->datname.data) == 0)
{ {
*db_id = tup->t_oid; *db_id = tup->t_oid;
strncpy(path, VARDATA(&(tup_db->datpath)), strncpy(path, VARDATA(&(tup_db->datpath)),
(VARSIZE(&(tup_db->datpath)) - VARHDRSZ)); (VARSIZE(&(tup_db->datpath)) - VARHDRSZ));
*(path + VARSIZE(&(tup_db->datpath)) - VARHDRSZ) = '\0'; *(path + VARSIZE(&(tup_db->datpath)) - VARHDRSZ) = '\0';
#ifdef MB #ifdef MULTIBYTE
*encoding = tup_db->encoding; *encoding = tup_db->encoding;
#endif #endif
goto done; goto done;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.14 1998/07/24 03:32:02 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/Makefile,v 1.15 1998/07/26 04:31:08 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,7 +17,7 @@ include ../Makefile.global ...@@ -17,7 +17,7 @@ include ../Makefile.global
DIRS = pg_id pg_version psql pg_dump pg_passwd cleardbdir createdb \ DIRS = pg_id pg_version psql pg_dump pg_passwd cleardbdir createdb \
createuser destroydb destroyuser initdb initlocation ipcclean createuser destroydb destroyuser initdb initlocation ipcclean
ifdef MB ifdef MULTIBYTE
DIRS += pg_encoding DIRS += pg_encoding
endif endif
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/createdb/Attic/Makefile,v 1.9 1998/07/24 03:32:04 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/createdb/Attic/Makefile,v 1.10 1998/07/26 04:31:12 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,7 +17,7 @@ include ../../Makefile.global ...@@ -17,7 +17,7 @@ include ../../Makefile.global
all: createdb all: createdb
createdb: createdb.sh createdb: createdb.sh
sed 's/__MB__/$(MB)/' createdb.sh > createdb sed 's/__MULTIBYTE__/$(MULTIBYTE)/' createdb.sh > createdb
install: createdb install: createdb
$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$< $(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/createdb/Attic/createdb.sh,v 1.9 1998/07/24 03:32:06 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/createdb/Attic/createdb.sh,v 1.10 1998/07/26 04:31:13 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
CMDNAME=`basename $0` CMDNAME=`basename $0`
MBENABLED=__MB__ MBENABLED=__MULTIBYTE__
MB= MB=
if [ -z "$USER" ]; then if [ -z "$USER" ]; then
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.10 1998/07/24 03:32:08 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/initdb/Makefile,v 1.11 1998/07/26 04:31:16 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -17,7 +17,7 @@ include ../../Makefile.global ...@@ -17,7 +17,7 @@ include ../../Makefile.global
all: initdb all: initdb
initdb: initdb.sh initdb: initdb.sh
sed 's/__MB__/$(MB)/' initdb.sh > initdb sed 's/__MULTIBYTE__/$(MULTIBYTE)/' initdb.sh > initdb
install: initdb install: initdb
$(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$< $(INSTALL) $(INSTL_EXE_OPTS) $< $(BINDIR)/$<
......
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.1 1998/07/24 03:32:10 scrappy Exp $ # $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/Makefile,v 1.2 1998/07/26 04:31:18 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -15,7 +15,7 @@ include ../../Makefile.global ...@@ -15,7 +15,7 @@ include ../../Makefile.global
OBJS= pg_encoding.o OBJS= pg_encoding.o
CFLAGS+= -DMB=$(MB) -I$(SRCDIR)/include CFLAGS+= $(MBFLAGS) -I$(SRCDIR)/include
all: pg_encoding all: pg_encoding
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.12 1998/06/16 07:29:37 momjian Exp $ # $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.13 1998/07/26 04:31:20 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -24,8 +24,8 @@ LDFLAGS+= $(KRBLIBS) ...@@ -24,8 +24,8 @@ LDFLAGS+= $(KRBLIBS)
CFLAGS+= $(KRBFLAGS) CFLAGS+= $(KRBFLAGS)
endif endif
ifdef MB ifdef MULTIBYTE
CFLAGS+= -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS= psql.o stringutils.o @STRDUP@ OBJS= psql.o stringutils.o @STRDUP@
......
...@@ -190,20 +190,20 @@ AC_ARG_ENABLE( ...@@ -190,20 +190,20 @@ AC_ARG_ENABLE(
AC_MSG_RESULT(disabled) AC_MSG_RESULT(disabled)
) )
AC_MSG_CHECKING(setting MB) AC_MSG_CHECKING(setting MULTIBYE)
AC_ARG_WITH(mb, AC_ARG_WITH(mb,
[ --with-mb=<encoding> enable multi-byte support ], [ --with-mb=<encoding> enable multi-byte support ],
[ [
case "$withval" in case "$withval" in
EUC_JP|EHC_CN|EUC_KR|EUC_TW|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5) EUC_JP|EHC_CN|EUC_KR|EUC_TW|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5)
MB="$withval"; MULTIBYTE="$withval";
AC_MSG_RESULT("enabled with $withval") AC_MSG_RESULT("enabled with $withval")
;; ;;
*) *)
AC_MSG_ERROR([*** You must supply an argument to the --with-mb option one of EUC_JP,EHC_CN,EUC_KR,EUC_TW,UNICODE,MULE_INTERNAL,LATIN1-5]) AC_MSG_ERROR([*** You must supply an argument to the --with-mb option one of EUC_JP,EHC_CN,EUC_KR,EUC_TW,UNICODE,MULE_INTERNAL,LATIN1-5])
;; ;;
esac esac
MB="$withval" MULTIBYTEB="$withval"
], ],
AC_MSG_RESULT("disabled") AC_MSG_RESULT("disabled")
) )
...@@ -325,7 +325,7 @@ AC_SUBST(DLSUFFIX) ...@@ -325,7 +325,7 @@ AC_SUBST(DLSUFFIX)
AC_SUBST(DL_LIB) AC_SUBST(DL_LIB)
AC_SUBST(USE_TCL) AC_SUBST(USE_TCL)
AC_SUBST(USE_PERL) AC_SUBST(USE_PERL)
AC_SUBST(MB) AC_SUBST(MULTIBYTE)
dnl Check for C++ support (allow override if needed) dnl Check for C++ support (allow override if needed)
HAVECXX='HAVE_Cplusplus=true' HAVECXX='HAVE_Cplusplus=true'
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: dbcommands.h,v 1.3 1998/07/24 03:32:19 scrappy Exp $ * $Id: dbcommands.h,v 1.4 1998/07/26 04:31:23 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
*/ */
#define SIGKILLDAEMON1 SIGTERM #define SIGKILLDAEMON1 SIGTERM
#ifdef MB #ifdef MULTIBYTE
extern void createdb(char *dbname, char *dbpath, int encoding); extern void createdb(char *dbname, char *dbpath, int encoding);
#else #else
extern void createdb(char *dbname, char *dbpath); extern void createdb(char *dbname, char *dbpath);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var' * Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements * statements
* *
* $Id: variable.h,v 1.4 1998/07/18 18:34:21 momjian Exp $ * $Id: variable.h,v 1.5 1998/07/26 04:31:24 scrappy Exp $
* *
*/ */
#ifndef VARIABLE_H #ifndef VARIABLE_H
...@@ -54,17 +54,5 @@ extern bool set_geqo(void); ...@@ -54,17 +54,5 @@ extern bool set_geqo(void);
extern bool show_geqo(void); extern bool show_geqo(void);
extern bool reset_geqo(void); extern bool reset_geqo(void);
extern bool parse_geqo(const char *); extern bool parse_geqo(const char *);
#ifdef MULTIBYTE
extern bool show_client_encoding(void);
extern bool reset_client_encoding(void);
extern bool parse_client_encoding(const char *);
extern int pg_set_client_encoding(int);
extern int pg_get_client_encoding(void);
extern unsigned char *pg_client_to_server(unsigned char *, int);
extern unsigned char *pg_server_to_client(unsigned char *, int);
extern int pg_valid_client_encoding(const char *);
extern const char *pg_encoding_to_char(int);
extern int pg_char_to_encoding(const char *);
#endif
#endif /* VARIABLE_H */ #endif /* VARIABLE_H */
/* $Id: pg_wchar.h,v 1.1 1998/07/24 03:32:24 scrappy Exp $ */ /* $Id: pg_wchar.h,v 1.2 1998/07/26 04:31:26 scrappy Exp $ */
#ifndef PG_WCHAR_H #ifndef PG_WCHAR_H
#define PG_WCHAR_H #define PG_WCHAR_H
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
/* followings are for client encoding only */ /* followings are for client encoding only */
#define SJIS 32 /* Shift JIS */ #define SJIS 32 /* Shift JIS */
#ifdef MB #ifdef MULTIBYTE
typedef unsigned int pg_wchar; typedef unsigned int pg_wchar;
#else #else
#define pg_wchar char #define pg_wchar char
...@@ -67,7 +67,7 @@ typedef unsigned int pg_wchar; ...@@ -67,7 +67,7 @@ typedef unsigned int pg_wchar;
#define LC_CNS11643_6 0xf9 /* CNS 11643-1992 Plane 6 */ #define LC_CNS11643_6 0xf9 /* CNS 11643-1992 Plane 6 */
#define LC_CNS11643_7 0xfa /* CNS 11643-1992 Plane 7 */ #define LC_CNS11643_7 0xfa /* CNS 11643-1992 Plane 7 */
#ifdef MB #ifdef MULTIBYTE
typedef struct { typedef struct {
int encoding; /* encoding symbol value */ int encoding; /* encoding symbol value */
char *name; /* encoding name */ char *name; /* encoding name */
...@@ -117,6 +117,6 @@ extern void SetDatabaseEncoding(int); ...@@ -117,6 +117,6 @@ extern void SetDatabaseEncoding(int);
extern void SetTemplateEncoding(int); extern void SetTemplateEncoding(int);
extern int GetTemplateEncoding(void); extern int GetTemplateEncoding(void);
#endif /* MB */ #endif /* MULTIBYTE */
#endif /* PG_WCHAR_H */ #endif /* PG_WCHAR_H */
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: miscadmin.h,v 1.28 1998/07/24 03:32:13 scrappy Exp $ * $Id: miscadmin.h,v 1.29 1998/07/26 04:31:23 scrappy Exp $
* *
* NOTES * NOTES
* some of the information in this file will be moved to * some of the information in this file will be moved to
...@@ -116,7 +116,7 @@ extern char *DatabaseName; ...@@ -116,7 +116,7 @@ extern char *DatabaseName;
extern char *DatabasePath; extern char *DatabasePath;
/* in utils/misc/database.c */ /* in utils/misc/database.c */
#ifdef MB #ifdef MULTIBYTE
extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding); extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path, int *encoding);
#else #else
extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path); extern void GetRawDatabaseInfo(char *name, Oid *owner, Oid *db_id, char *path);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: parsenodes.h,v 1.51 1998/07/24 03:32:26 scrappy Exp $ * $Id: parsenodes.h,v 1.52 1998/07/26 04:31:29 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -480,7 +480,7 @@ typedef struct CreatedbStmt ...@@ -480,7 +480,7 @@ typedef struct CreatedbStmt
NodeTag type; NodeTag type;
char *dbname; /* database to create */ char *dbname; /* database to create */
char *dbpath; /* location of database */ char *dbpath; /* location of database */
#ifdef MB #ifdef MULTIBYTE
int encoding; /* default encoding int encoding; /* default encoding
(see regex/pg_wchar.h) */ (see regex/pg_wchar.h) */
#endif #endif
......
...@@ -197,15 +197,7 @@ struct re_guts ...@@ -197,15 +197,7 @@ struct re_guts
/* misc utilities */ /* misc utilities */
#ifdef MULTIBYTE #ifdef MULTIBYTE
# if MULTIBYTE == MULE_INTERNAL # define OUT (16777216+1) /* 16777216 == 2^24 == 3 bytes */
# define OUT (16777216+1) /* 16777216 == 2^24 == 3 bytes */
# elif MULTIBYTE == EUC_JP || MULTIBYTE == EUC_CN || MULTIBYTE == EUC_KR || MULTIBYTE == EUC_TW
# define OUT (USHRT_MAX+1) /* 2 bytes */
# elif MULTIBYTE == UNICODE
# define OUT (USHRT_MAX+1) /* 2 bytes. assuming UCS-2 */
# else
# define OUT (UCHAR_MAX+1) /* other codes. assuming 1 byte */
# endif
#else #else
# define OUT (CHAR_MAX+1) /* a non-character value */ # define OUT (CHAR_MAX+1) /* a non-character value */
#endif #endif
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.24 1998/07/24 03:32:33 scrappy Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.25 1998/07/26 04:31:35 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -25,14 +25,14 @@ ifdef KRBVERS ...@@ -25,14 +25,14 @@ ifdef KRBVERS
CFLAGS+= $(KRBFLAGS) CFLAGS+= $(KRBFLAGS)
endif endif
ifdef MB ifdef MULTIBYTE
CFLAGS+= -DMB=$(MB) CFLAGS+= $(MBFLAGS)
endif endif
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \ OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
dllist.o pqsignal.o dllist.o pqsignal.o
ifdef MB ifdef MULTIBYTE
OBJS+= common.o wchar.o conv.o OBJS+= common.o wchar.o conv.o
endif endif
...@@ -42,7 +42,7 @@ install-shlib-dep := ...@@ -42,7 +42,7 @@ install-shlib-dep :=
ifeq ($(PORTNAME), linux) ifeq ($(PORTNAME), linux)
install-shlib-dep := install-shlib install-shlib-dep := install-shlib
shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := libpq.so.$(SO_MAJOR_VERSION)
LDFLAGS_SL = -shared -soname libpq.so.$(SO_MAJOR_VERSION) LDFLAGS_SL = -shared -soname libpq.so.$(SO_MAJOR_VERSION)
CFLAGS += $(CFLAGS_SL) CFLAGS += $(CFLAGS_SL)
endif endif
...@@ -104,6 +104,19 @@ fe-lobj.o: $(SRCDIR)/backend/fmgr.h ...@@ -104,6 +104,19 @@ fe-lobj.o: $(SRCDIR)/backend/fmgr.h
dllist.c: $(SRCDIR)/backend/lib/dllist.c dllist.c: $(SRCDIR)/backend/lib/dllist.c
-ln -s $(SRCDIR)/backend/lib/dllist.c . -ln -s $(SRCDIR)/backend/lib/dllist.c .
ifdef MULTIBYTE
# We need to compile this with special options for shared libs,
# so we can't use the object in $(SRCDIR)/backend
common.c: $(SRCDIR)/backend/utils/mb/common.c
-ln -s $(SRCDIR)/backend/utils/mb/common.c .
wchar.c: $(SRCDIR)/backend/utils/mb/wchar.c
-ln -s $(SRCDIR)/backend/utils/mb/wchar.c .
conv.c: $(SRCDIR)/backend/utils/mb/conv.c
-ln -s $(SRCDIR)/backend/utils/mb/conv.c .
endif
# The following rules cause dependencies in the backend directory to # The following rules cause dependencies in the backend directory to
# get made if they don't exist, but don't cause them to get remade if they # get made if they don't exist, but don't cause them to get remade if they
# are out of date. # are out of date.
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.76 1998/07/24 03:32:33 scrappy Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.77 1998/07/26 04:31:36 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include <crypt.h> #include <crypt.h>
#endif #endif
#ifdef MB #ifdef MULTIBYTE
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
#endif #endif
...@@ -792,7 +792,7 @@ PQsetenv(PGconn *conn) ...@@ -792,7 +792,7 @@ PQsetenv(PGconn *conn)
{ {
struct EnvironmentOptions *eo; struct EnvironmentOptions *eo;
char setQuery[80]; /* mjl: size okay? XXX */ char setQuery[80]; /* mjl: size okay? XXX */
#ifdef MB #ifdef MULTIBYTE
char *envname = "PGCLIENTENCODING"; char *envname = "PGCLIENTENCODING";
char envbuf[64]; char envbuf[64];
char *env; char *env;
...@@ -800,7 +800,7 @@ PQsetenv(PGconn *conn) ...@@ -800,7 +800,7 @@ PQsetenv(PGconn *conn)
PGresult *rtn; PGresult *rtn;
#endif #endif
#ifdef MB #ifdef MULTIBYTE
/* query server encoding */ /* query server encoding */
env = getenv(envname); env = getenv(envname);
if (!env) { if (!env) {
...@@ -815,7 +815,7 @@ PQsetenv(PGconn *conn) ...@@ -815,7 +815,7 @@ PQsetenv(PGconn *conn)
PQclear(rtn); PQclear(rtn);
} }
if (!encoding) { /* this should not happen */ if (!encoding) { /* this should not happen */
sprintf(envbuf,"%s=%s",envname,pg_encoding_to_char(MB)); sprintf(envbuf,"%s=%s",envname,pg_encoding_to_char(MULTIBYTE));
putenv(envbuf); putenv(envbuf);
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* didn't really belong there. * didn't really belong there.
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.7 1998/07/18 18:34:33 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.8 1998/07/26 04:31:36 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
#endif /* WIN32 */ #endif /* WIN32 */
#ifdef MULTIBYTE #ifdef MULTIBYTE
#include "regex/pg_wchar.h" #include "mb/pg_wchar.h"
#include "commands/variable.h"
#endif #endif
#ifdef TIOCGWINSZ #ifdef TIOCGWINSZ
......
#! /bin/sh #! /bin/sh
# $Header: /cvsroot/pgsql/src/test/mb/mbregress.sh,v 1.1 1998/07/24 03:32:40 scrappy Exp $ # $Header: /cvsroot/pgsql/src/test/mb/mbregress.sh,v 1.2 1998/07/26 04:31:38 scrappy Exp $
if echo '\c' | grep -s c >/dev/null 2>&1 if echo '\c' | grep -s c >/dev/null 2>&1
then then
...@@ -10,6 +10,10 @@ else ...@@ -10,6 +10,10 @@ else
ECHO_C='\c' ECHO_C='\c'
fi fi
if [ ! -d results ];then
mkdir results
fi
PSQL="psql -n -e -q" PSQL="psql -n -e -q"
tests="euc_jp sjis euc_kr euc_cn unicode mule_internal" tests="euc_jp sjis euc_kr euc_cn unicode mule_internal"
unset PGCLIENTENCODING unset PGCLIENTENCODING
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.15 1998/03/15 07:39:01 scrappy Exp $ # $Header: /cvsroot/pgsql/src/test/regress/GNUmakefile,v 1.16 1998/07/26 04:31:41 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -50,7 +50,7 @@ all: $(INFILES) ...@@ -50,7 +50,7 @@ all: $(INFILES)
# run the test # run the test
# #
runtest: $(INFILES) runtest: $(INFILES)
MB=$(MB);export MB; \ MULTIBYTE=$(MULTIBYTE);export MULTIBYTE; \
$(SHELL) ./regress.sh 2>&1 | tee regress.out $(SHELL) ./regress.sh 2>&1 | tee regress.out
@echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out" @echo "ACTUAL RESULTS OF REGRESSION TEST ARE NOW IN FILE regress.out"
......
#!/bin/sh #!/bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.19 1998/04/27 17:10:17 scrappy Exp $ # $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.20 1998/07/26 04:31:41 scrappy Exp $
# #
if echo '\c' | grep -s c >/dev/null 2>&1 if echo '\c' | grep -s c >/dev/null 2>&1
then then
...@@ -42,8 +42,8 @@ fi ...@@ -42,8 +42,8 @@ fi
echo "=============== running regression queries... =================" echo "=============== running regression queries... ================="
echo "" > regression.diffs echo "" > regression.diffs
if [ a$MB != a ];then if [ -n "$MULTIBYTE" ];then
mbtests=`echo $MB|tr "[A-Z]" "[a-z]"` mbtests=`echo $MULTIBYTE|tr "[A-Z]" "[a-z]"`
else else
mbtests="" mbtests=""
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment