*** src/include/storage/s_lock.h.orig	Sat Sep  5 03:58:58 1998
--- src/include/storage/s_lock.h	Sat Sep  5 03:59:39 1998
***************
*** 198,210 ****
  asm int
  tas(slock_t *s_lock)
  {
! 	%mem s_lock
! 	pushl % ebx
  	movl s_lock, %ebx
  	movl $255, %eax
  	lock
! 	xchgb % al, (%ebx)
! 	popl % ebx
  }
  
  #endif	 /* USE_UNIVEL_CC */
--- 198,210 ----
  asm int
  tas(slock_t *s_lock)
  {
! %mem s_lock
! 	pushl %ebx
  	movl s_lock, %ebx
  	movl $255, %eax
  	lock
! 	xchgb %al, (%ebx)
! 	popl %ebx
  }
  
  #endif	 /* USE_UNIVEL_CC */
*** src/interfaces/libpq++/Makefile.in.orig	Fri Sep 11 01:09:43 1998
--- src/interfaces/libpq++/Makefile.in	Fri Sep 11 01:08:30 1998
***************
*** 0 ****
--- 1,153 ----
+ #-------------------------------------------------------------------------
+ #
+ # Makefile
+ #    Makefile for libpq++ library
+ #
+ # Copyright (c) 1994, Regents of the University of California
+ #
+ #
+ # IDENTIFICATION
+ #    $Header: /usr/local/cvsroot/pgsql/src/interfaces/libpq++/Makefile,v 1.20 1998/08/22 04:24:35 momjian Exp $
+ #
+ #-------------------------------------------------------------------------
+ 
+ SRCDIR= ../..
+ include $(SRCDIR)/Makefile.global
+ SRCHEADERDIR = $(SRCDIR)/include
+ LIBPQHEADERDIR = $(SRCHEADERDIR)/libpq
+ 
+ LIBNAME= libpq++
+ 
+ CXX=@CXX@
+ 
+ # We have to override -Werror, which makes warnings, fatal, because we
+ # inevitably get the warning, "abstract declarator used as declaration"
+ # because of our inclusion of c.h and we don't know how to stop that.
+ 
+ ifeq ($(CXX), g++)
+ CXXFLAGS= $(CFLAGS) -Wno-error
+ else
+ CXXFLAGS= $(CFLAGS)
+ endif
+ 
+ INCLUDE_OPT= \
+              -I$(SRCDIR)/backend \
+              -I$(SRCHEADERDIR) \
+              -I$(LIBPQDIR)
+ 
+ CXXFLAGS+= $(INCLUDE_OPT)
+ #CXXFLAGS+= -DDEBUG
+ 
+ ifdef KRBVERS
+ CXXFLAGS+= $(KRBFLAGS)
+ endif
+ 
+ 
+ OBJS = pgenv.o pgconnection.o pgtransdb.o pgcursordb.o pglobject.o
+ 
+ # Shared library stuff
+ SHLIB := 
+ INSTALL-SHLIB-DEP :=
+ ifeq ($(PORTNAME), linux)
+   INSTALL-SHLIB-DEP := install-shlib
+   SHLIB := libpq++.so.1
+   LDFLAGS_SL = -shared -soname $(SHLIB)
+   CFLAGS += $(CFLAGS_SL)
+ endif
+ 
+ ifeq ($(PORTNAME), solaris)
+   INSTALL-SHLIB-DEP := install-shlib
+   SHLIB := libpq++.so.1
+   LDFLAGS_SL = -G -z text -shared -soname $(SHLIB)
+   CFLAGS += $(CFLAGS_SL)
+ endif
+ 
+ ifeq ($(PORTNAME), unixware)
+   install-shlib-dep := install-shlib
+   shlib := libpq.so.1
+   LDFLAGS_SL = -G -z text
+   CFLAGS += $(CFLAGS_SL)
+ endif
+ 
+ ifeq ($(PORTNAME), univel)
+   install-shlib-dep := install-shlib
+   shlib := libpq.so.1
+   LDFLAGS_SL = -G -z text
+   CFLAGS += $(CFLAGS_SL)
+ endif
+ 
+ ifeq ($(PORTNAME), hpux)
+   install-shlib-dep := install-shlib
+   shlib := libpq.sl
+   LDFLAGS_SL = -b
+   CFLAGS += $(CFLAGS_SL)
+ endif
+ 
+ all: $(LIBNAME).a $(SHLIB)
+ 
+ $(LIBNAME).a: $(OBJS)
+ ifdef MK_NO_LORDER
+ 	$(AR) $(AROPT) $(LIBNAME).a $(OBJS)
+ else
+ 	$(AR) $(AROPT) $(LIBNAME).a `lorder $(OBJS) | tsort`
+ endif
+ 	$(RANLIB) $(LIBNAME).a
+ 
+ $(SHLIB): $(OBJS)
+ 	$(LD) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(OBJS)
+ 
+ .PHONY: examples
+ examples:
+ 	$(MAKE) -C examples all
+ 
+ .PHONY: beforeinstall-headers install-headers 
+ .PHONY: install beforeinstall-lib install-$(LIBNAME) doc
+ 
+ install: install-headers install-$(LIBNAME) $(INSTALL-SHLIB-DEP) doc
+ 
+ LIBPGXXDIR = $(LIBNAME)
+ LIBPGXXHEADERDIR = $(HEADERDIR)/$(LIBPGXXDIR)
+ MAINHEADER = $(LIBNAME).h
+ LIBPGXXHEADERS = pgenv.h \
+ 		 pgconnection.h \
+ 		 pgdatabase.h \
+ 		 pgtransdb.h \
+ 		 pgcursordb.h \
+ 		 pglobject.h
+ 
+ install-headers: beforeinstall-headers $(MAINHEADER)
+ 	@$(INSTALL) $(INSTLOPTS) $(MAINHEADER) $(HEADERDIR)/$(MAINHEADER)
+ 	@for i in ${LIBPGXXHEADERS}; do \
+ 		echo "Installing $(LIBPGXXHEADERDIR)/$$i."; \
+ 		$(INSTALL) $(INSTLOPTS) $$i $(LIBPGXXHEADERDIR)/$$i; \
+ 	done
+ 
+ beforeinstall-headers:
+ 	@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
+ 	@if [ ! -d $(LIBPGXXHEADERDIR) ]; then mkdir $(LIBPGXXHEADERDIR); fi
+ 
+ beforeinstall-lib:
+ 	@if [ ! -d $(LIBDIR) ] ; then mkdir $(LIBDIR); fi
+ 
+ install-$(LIBNAME): $(LIBNAME).a beforeinstall-lib
+ 	$(INSTALL) $(INSTL_LIB_OPTS) $(LIBNAME).a $(LIBDIR)/$(LIBNAME).a
+ 
+ install-shlib: $(SHLIBNAME) beforeinstall-lib
+ 	$(INSTALL) $(INSTL_SHLIB_OPTS) $(SHLIB) $(LIBDIR)/$(SHLIB)
+ 	rm -f $(LIBDIR)/libpq++.so
+ 	ln -sf $(SHLIB) $(LIBDIR)/libpq++.so
+ 
+ 
+ doc:
+ 	$(MAKE) -C man install
+ 
+ clean:
+ 	rm -f $(LIBNAME).a $(OBJS)
+ 	$(MAKE) -C examples clean
+ 
+ dep depend:
+ 	$(CXX) -MM $(CXXFLAGS) *.cc > depend
+ 
+ ifeq (depend,$(wildcard depend))
+ include depend
+ endif
*** src/configure.orig	Fri Sep 11 01:02:49 1998
--- src/configure	Fri Sep 11 10:52:29 1998
***************
*** 3710,3717 ****
  fi
  
  
! echo $ac_n "checking whether 'long long int' is 64 bits using %Ld""... $ac_c" 1>&6
! echo "configure:3715: checking whether 'long long int' is 64 bits using %Ld" >&5
  if test "$cross_compiling" = yes; then
    echo "$ac_t""assuming not on target machine" 1>&6
  else
--- 3710,3717 ----
  fi
  
  
! echo $ac_n "checking whether 'long long int' is 64 bits using %lld""... $ac_c" 1>&6
! echo "configure:3715: checking whether 'long long int' is 64 bits using %lld" >&5
  if test "$cross_compiling" = yes; then
    echo "$ac_t""assuming not on target machine" 1>&6
  else
***************
*** 3720,3726 ****
  #include "confdefs.h"
  #include <stdio.h>
  typedef long long int int64;
! #define INT64_FORMAT "%Ld"
  
  int64 a = 20000001;
  int64 b = 40000005;
--- 3720,3726 ----
  #include "confdefs.h"
  #include <stdio.h>
  typedef long long int int64;
! #define INT64_FORMAT "%lld"
  
  int64 a = 20000001;
  int64 b = 40000005;
***************
*** 3754,3760 ****
  if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    cat >> confdefs.h <<\EOF
! #define HAVE_LONG_LONG_INT_64_Ld 1
  EOF
   echo "$ac_t""yes" 1>&6
  else
--- 3754,3760 ----
  if { (eval echo configure:3755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    cat >> confdefs.h <<\EOF
! #define HAVE_LONG_LONG_INT_64_lld 1
  EOF
   echo "$ac_t""yes" 1>&6
  else
***************
*** 6276,6282 ****
  
  ac_given_srcdir=$srcdir
  
! trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  EOF
  cat >> $CONFIG_STATUS <<EOF
  
--- 6276,6282 ----
  
  ac_given_srcdir=$srcdir
  
! trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpq++/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  EOF
  cat >> $CONFIG_STATUS <<EOF
  
***************
*** 6412,6418 ****
  
  cat >> $CONFIG_STATUS <<EOF
  
! CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h"}
  EOF
  cat >> $CONFIG_STATUS <<\EOF
  for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
--- 6412,6418 ----
  
  cat >> $CONFIG_STATUS <<EOF
  
! CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpq++/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h"}
  EOF
  cat >> $CONFIG_STATUS <<\EOF
  for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
*** src/configure.in.orig	Fri Sep 11 01:03:05 1998
--- src/configure.in	Fri Sep 11 10:52:31 1998
***************
*** 573,582 ****
  	AC_MSG_RESULT(no),
  	AC_MSG_RESULT(assuming not on target machine))
  
! AC_MSG_CHECKING(whether 'long long int' is 64 bits using %Ld)
  AC_TRY_RUN([#include <stdio.h>
  typedef long long int int64;
! #define INT64_FORMAT "%Ld"
  
  int64 a = 20000001;
  int64 b = 40000005;
--- 573,582 ----
  	AC_MSG_RESULT(no),
  	AC_MSG_RESULT(assuming not on target machine))
  
! AC_MSG_CHECKING(whether 'long long int' is 64 bits using %lld)
  AC_TRY_RUN([#include <stdio.h>
  typedef long long int int64;
! #define INT64_FORMAT "%lld"
  
  int64 a = 20000001;
  int64 b = 40000005;
***************
*** 606,612 ****
  main() {
    exit(! does_int64_work());
  }],
! 	[AC_DEFINE(HAVE_LONG_LONG_INT_64_Ld) AC_MSG_RESULT(yes)],
  	AC_MSG_RESULT(no),
  	AC_MSG_RESULT(assuming not on target machine))
  
--- 606,612 ----
  main() {
    exit(! does_int64_work());
  }],
! 	[AC_DEFINE(HAVE_LONG_LONG_INT_64_lld) AC_MSG_RESULT(yes)],
  	AC_MSG_RESULT(no),
  	AC_MSG_RESULT(assuming not on target machine))
  
***************
*** 848,851 ****
  	LDFLAGS="$ice_save_LDFLAGS"
  fi
  
! AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h)
--- 848,851 ----
  	LDFLAGS="$ice_save_LDFLAGS"
  fi
  
! AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpq++/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h)
