Commit fd40942f authored by Bruce Momjian's avatar Bruce Momjian

Properly exit ODBC with 'X', allow linking on BSD/OS.

parent 618733de
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# GNUMakefile for psqlodbc (Postgres ODBC driver) # GNUMakefile for psqlodbc (Postgres ODBC driver)
# #
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.8 2000/12/16 18:14:25 petere Exp $ # $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.9 2001/02/10 05:50:27 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -24,7 +24,6 @@ OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \ ...@@ -24,7 +24,6 @@ OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX) gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)
SHLIB_LINK = $(filter -lm, $(LIBS)) SHLIB_LINK = $(filter -lm, $(LIBS))
all: all-lib all: all-lib
# Shared library stuff # Shared library stuff
...@@ -33,7 +32,13 @@ include $(top_srcdir)/src/Makefile.shlib ...@@ -33,7 +32,13 @@ include $(top_srcdir)/src/Makefile.shlib
# Symbols must be resolved to the version in the shared library because # Symbols must be resolved to the version in the shared library because
# the driver manager (e.g., iodbc) provides some symbols with the same # the driver manager (e.g., iodbc) provides some symbols with the same
# names and we don't want those. (This issue is probably ELF specific.) # names and we don't want those. (This issue is probably ELF specific.)
#
# BSD/OS fails with libc and crt1.o undefined symbols without this.
# bjm 2001-02-09
#
ifneq ($(PORTNAME), bsdi)
LINK.shared += $(shlib_symbolic) LINK.shared += $(shlib_symbolic)
endif
odbc_headers = isql.h isqlext.h iodbc.h odbc_headers = isql.h isqlext.h iodbc.h
odbc_includedir = $(includedir)/iodbc odbc_includedir = $(includedir)/iodbc
......
/* Module: bind.c /* Module: bind.c
* *
* Description: This module contains routines related to binding * Description: This module contains routines related to binding
......
/* Module: columninfo.c /* Module: columninfo.c
* *
* Description: This module contains routines related to * Description: This module contains routines related to
......
/* Module: connection.c /* Module: connection.c
* *
* Description: This module contains routines related to * Description: This module contains routines related to
......
/* Module: convert.c /* Module: convert.c
* *
* Description: This module contains routines related to * Description: This module contains routines related to
......
/* Module: dlg_specific.c /* Module: dlg_specific.c
* *
* Description: This module contains any specific code for handling * Description: This module contains any specific code for handling
......
/* Module: drvconn.c /* Module: drvconn.c
* *
* Description: This module contains only routines related to * Description: This module contains only routines related to
......
/* Module: environ.c /* Module: environ.c
* *
* Description: This module contains routines related to * Description: This module contains routines related to
......
/* Module: execute.c /* Module: execute.c
* *
* Description: This module contains routines related to * Description: This module contains routines related to
......
/* Module: info.c /* Module: info.c
* *
* Description: This module contains routines related to * Description: This module contains routines related to
......
/* Module: lobj.c /* Module: lobj.c
* *
* Description: This module contains routines related to manipulating * Description: This module contains routines related to manipulating
......
/* Module: misc.c /* Module: misc.c
* *
* Description: This module contains miscellaneous routines * Description: This module contains miscellaneous routines
......
/* Module: options.c /* Module: options.c
* *
* Description: This module contains routines for getting/setting * Description: This module contains routines for getting/setting
......
/* Module: parse.c /* Module: parse.c
* *
* Description: This module contains routines related to parsing SQL statements. * Description: This module contains routines related to parsing SQL statements.
......
/* Module: pgtypes.c /* Module: pgtypes.c
* *
* Description: This module contains routines for getting information * Description: This module contains routines for getting information
......
/* Module: psqlodbc.c /* Module: psqlodbc.c
* *
* Description: This module contains the main entry point (DllMain) for the library. * Description: This module contains the main entry point (DllMain) for the library.
......
/* Module: qresult.c /* Module: qresult.c
* *
* Description: This module contains functions related to * Description: This module contains functions related to
......
/* Module: results.c /* Module: results.c
* *
* Description: This module contains functions related to * Description: This module contains functions related to
......
/* Module: setup.c /* Module: setup.c
* *
* Description: This module contains the setup functions for * Description: This module contains the setup functions for
......
/* Module: socket.c /* Module: socket.c
* *
* Description: This module contains functions for low level socket * Description: This module contains functions for low level socket
...@@ -78,7 +77,11 @@ SOCK_Destructor(SocketClass *self) ...@@ -78,7 +77,11 @@ SOCK_Destructor(SocketClass *self)
{ {
if (self->socket != -1) { if (self->socket != -1) {
if ( ! shutdown(self->socket, 2)) /* no sends or receives */ if ( ! shutdown(self->socket, 2)) /* no sends or receives */
{
SOCK_put_char(self, 'X');
SOCK_flush_output(self);
closesocket(self->socket); closesocket(self->socket);
}
} }
if (self->buffer_in) if (self->buffer_in)
......
/* Module: statement.c /* Module: statement.c
* *
* Description: This module contains functions related to creating * Description: This module contains functions related to creating
......
/* Module: tuple.c /* Module: tuple.c
* *
* Description: This module contains functions for setting the data for individual * Description: This module contains functions for setting the data for individual
......
/* Module: tuplelist.c /* Module: tuplelist.c
* *
* Description: This module contains functions for creating a manual result set * Description: This module contains functions for creating a manual result set
......
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