mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Now you can specify the service name and port of the DB server via configure
--with-service-name specify inet service name (default=gds_db) --with-service-port specify inet service port (default=3050) So it's possible to run FB1 and FB2 together on the same machine.
This commit is contained in:
parent
a40d6fae15
commit
af691e2edc
54
configure.in
54
configure.in
@ -1,4 +1,4 @@
|
|||||||
dnl $Id: configure.in,v 1.63 2002-11-05 16:48:59 skywalker Exp $
|
dnl $Id: configure.in,v 1.64 2002-11-06 12:36:05 eku Exp $
|
||||||
|
|
||||||
dnl ############################# INITIALISATION ###############################
|
dnl ############################# INITIALISATION ###############################
|
||||||
|
|
||||||
@ -83,7 +83,6 @@ AC_ARG_ENABLE(raw-devices,
|
|||||||
no) RAW_DEVICES_FLG=N;;
|
no) RAW_DEVICES_FLG=N;;
|
||||||
*) AC_MSG_ERROR(bad value '${enableval}' for --enable-raw-devices);;
|
*) AC_MSG_ERROR(bad value '${enableval}' for --enable-raw-devices);;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
if test "$RAW_DEVICES_FLG" = "Y"; then
|
if test "$RAW_DEVICES_FLG" = "Y"; then
|
||||||
AC_DEFINE(SUPPORT_RAW_DEVICES)
|
AC_DEFINE(SUPPORT_RAW_DEVICES)
|
||||||
fi
|
fi
|
||||||
@ -121,6 +120,20 @@ AC_ARG_WITH(readline,
|
|||||||
esac])
|
esac])
|
||||||
AC_SUBST(READLINE_FLG)
|
AC_SUBST(READLINE_FLG)
|
||||||
|
|
||||||
|
FB_SERVICE_NAME=gdb_db
|
||||||
|
FB_SERVICE_PORT=3050
|
||||||
|
AC_ARG_WITH(service-name,
|
||||||
|
[ --with-service-name specify inet service name (default=gds_db)],
|
||||||
|
[FB_SERVICE_NAME=${withval}])
|
||||||
|
AC_ARG_WITH(service-port,
|
||||||
|
[ --with-service-port specify inet service port (default=3050)],
|
||||||
|
[FB_SERVICE_PORT=${withval}])
|
||||||
|
AC_DEFINE_UNQUOTED(FB_SERVICE_NAME,"$FB_SERVICE_NAME")
|
||||||
|
AC_DEFINE_UNQUOTED(FB_SERVICE_PORT,$FB_SERVICE_PORT)
|
||||||
|
AC_SUBST(FB_SERVICE_NAME)
|
||||||
|
AC_SUBST(FB_SERVICE_PORT)
|
||||||
|
|
||||||
|
|
||||||
dnl Check for system header files
|
dnl Check for system header files
|
||||||
AC_CHECK_HEADERS(assert.h)
|
AC_CHECK_HEADERS(assert.h)
|
||||||
AC_CHECK_HEADERS(ctype.h)
|
AC_CHECK_HEADERS(ctype.h)
|
||||||
@ -152,7 +165,6 @@ fi
|
|||||||
AC_CHECK_HEADERS(pwd.h)
|
AC_CHECK_HEADERS(pwd.h)
|
||||||
AC_CHECK_HEADERS(unistd.h)
|
AC_CHECK_HEADERS(unistd.h)
|
||||||
AC_CHECK_HEADERS(varargs.h)
|
AC_CHECK_HEADERS(varargs.h)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(crypt.h)
|
AC_CHECK_HEADERS(crypt.h)
|
||||||
|
|
||||||
|
|
||||||
@ -173,6 +185,7 @@ fi
|
|||||||
AC_CHECK_LIB(stdc++, main,,, $LIBS)
|
AC_CHECK_LIB(stdc++, main,,, $LIBS)
|
||||||
AC_CHECK_LIB(sfio, main,,, $LIBS) dnl Solaris only
|
AC_CHECK_LIB(sfio, main,,, $LIBS) dnl Solaris only
|
||||||
|
|
||||||
|
|
||||||
dnl Check for functions
|
dnl Check for functions
|
||||||
AC_CHECK_FUNCS(strlcpy strlcat)
|
AC_CHECK_FUNCS(strlcpy strlcat)
|
||||||
AC_CHECK_FUNCS(gettimeofday)
|
AC_CHECK_FUNCS(gettimeofday)
|
||||||
@ -237,14 +250,6 @@ AC_CHECK_TYPE(socklen_t,int)
|
|||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
AC_CHECK_SIZEOF(void*)
|
AC_CHECK_SIZEOF(void*)
|
||||||
|
|
||||||
dnl MOD: Check for /proc/self/exe mainly used on linux systems
|
|
||||||
dnl this is used to determine path to executable file.
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(for file /proc/self/exe)
|
|
||||||
AC_CHECK_FILES(/proc/self/exe)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dnl EKU: try to determine the alignment of long and double
|
dnl EKU: try to determine the alignment of long and double
|
||||||
dnl replaces ALIGNMENT and DOUBLE_ALIGN in src/jrd/common.h
|
dnl replaces ALIGNMENT and DOUBLE_ALIGN in src/jrd/common.h
|
||||||
AC_MSG_CHECKING(alignment of long)
|
AC_MSG_CHECKING(alignment of long)
|
||||||
@ -281,19 +286,24 @@ dnl
|
|||||||
dnl volunters are welcome!
|
dnl volunters are welcome!
|
||||||
|
|
||||||
|
|
||||||
|
dnl EKU: Add any platform specific tests below
|
||||||
|
|
||||||
|
case $PLATFORM in
|
||||||
|
LINUX)
|
||||||
|
dnl MOD: Check for /proc/self/exe mainly used on linux systems
|
||||||
|
dnl this is used to determine path to executable file.
|
||||||
|
AC_CHECK_FILES(/proc/self/exe)
|
||||||
|
;;
|
||||||
|
|
||||||
case $PLATFORM in
|
|
||||||
solx86)
|
solx86)
|
||||||
# this still not worked. Why knows why?
|
# kkuznetsov: this still not worked. Why knows why?
|
||||||
AC_DEFINE(GPRECOMMON_Files)
|
AC_DEFINE(GPRECOMMON_Files)
|
||||||
AC_SUBST(GPRECOMMON_Files, " thd.cpp ")
|
AC_SUBST(GPRECOMMON_Files, " thd.cpp ")
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
dnl ##################### DO NOT ADD ANY TESTS BELOW ###########################
|
dnl ##################### DO NOT ADD ANY TESTS BELOW ###########################
|
||||||
@ -515,7 +525,11 @@ gen/Makefile.embed.gpre:${MAKE_SRC_DIR}/Makefile.in.embed.gpre
|
|||||||
src/v5_examples/Makefile:${MAKE_SRC_DIR}/Makefile.in.example5
|
src/v5_examples/Makefile:${MAKE_SRC_DIR}/Makefile.in.example5
|
||||||
gen/Makefile.install:${MAKE_SRC_DIR}/Makefile.in.install
|
gen/Makefile.install:${MAKE_SRC_DIR}/Makefile.in.install
|
||||||
Makefile:Makefile.in
|
Makefile:Makefile.in
|
||||||
gen/install/makeInstallImage.sh:${INSTALL_SRC_DIR}/makeInstallImage.sh.in
|
dnl Linux start
|
||||||
|
dnl
|
||||||
|
dnl EKU: These files should reside in src/install/arch-specific/linux
|
||||||
|
dnl
|
||||||
|
dnl gen/install/makeInstallImage.sh:${INSTALL_SRC_DIR}/makeInstallImage.sh.in
|
||||||
gen/install/scripts/preinstall.sh:${INSTALL_SRC_DIR}/preinstall.sh.in
|
gen/install/scripts/preinstall.sh:${INSTALL_SRC_DIR}/preinstall.sh.in
|
||||||
gen/install/scripts/install.sh:${INSTALL_SRC_DIR}/install.sh.in
|
gen/install/scripts/install.sh:${INSTALL_SRC_DIR}/install.sh.in
|
||||||
gen/install/scripts/postinstall.sh:${INSTALL_SRC_DIR}/postinstall.sh.in
|
gen/install/scripts/postinstall.sh:${INSTALL_SRC_DIR}/postinstall.sh.in
|
||||||
@ -523,6 +537,7 @@ gen/install/scripts/preuninstall.sh:${INSTALL_SRC_DIR}/preuninstall.sh.in
|
|||||||
gen/install/scripts/postuninstall.sh:${INSTALL_SRC_DIR}/postuninstall.sh.in
|
gen/install/scripts/postuninstall.sh:${INSTALL_SRC_DIR}/postuninstall.sh.in
|
||||||
gen/install/install.sh:${INSTALL_SRC_DIR}/tarInstall.sh.in
|
gen/install/install.sh:${INSTALL_SRC_DIR}/tarInstall.sh.in
|
||||||
src/install/misc/firebird.xinetd
|
src/install/misc/firebird.xinetd
|
||||||
|
dnl Linux end
|
||||||
dnl SINIX-Z start
|
dnl SINIX-Z start
|
||||||
gen/install/sinixz/Makefile:src/install/arch-specific/sinixz/Makefile.in
|
gen/install/sinixz/Makefile:src/install/arch-specific/sinixz/Makefile.in
|
||||||
gen/install/sinixz/pkginfo:src/install/arch-specific/sinixz/pkginfo.in
|
gen/install/sinixz/pkginfo:src/install/arch-specific/sinixz/pkginfo.in
|
||||||
@ -560,6 +575,9 @@ case $FIREBIRD_ARCH_TYPE in
|
|||||||
classic) echo "Architecture : ClassicServer";;
|
classic) echo "Architecture : ClassicServer";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
echo "Service name : $FB_SERVICE_NAME"
|
||||||
|
echo "Service port : $FB_SERVICE_PORT"
|
||||||
|
|
||||||
case $PROD_BUILD_FLG in
|
case $PROD_BUILD_FLG in
|
||||||
Y) echo " Debug : disabled";;
|
Y) echo " Debug : disabled";;
|
||||||
N) echo " Debug : enabled";;
|
N) echo " Debug : enabled";;
|
||||||
|
@ -130,6 +130,10 @@
|
|||||||
/* Support databases on Raw Devices (UNIX only) */
|
/* Support databases on Raw Devices (UNIX only) */
|
||||||
#undef SUPPORT_RAW_DEVICES
|
#undef SUPPORT_RAW_DEVICES
|
||||||
|
|
||||||
|
/* Inet service name and port (UNIX only) */
|
||||||
|
#define FB_SERVICE_NAME "gdb_db"
|
||||||
|
#define FB_SERVICE_PORT 3050
|
||||||
|
|
||||||
/* Maximum allowed pathname length */
|
/* Maximum allowed pathname length */
|
||||||
#define MAXPATHLEN 260 // should correspond to MAX_PATH define in windef.h
|
#define MAXPATHLEN 260 // should correspond to MAX_PATH define in windef.h
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# $Header: /home/job/firebird/cvs-backup/firebird2/src/install/arch-specific/sinixz/postinstall.in,v 1.4 2002-09-24 12:58:43 eku Exp $
|
# $Header: /home/job/firebird/cvs-backup/firebird2/src/install/arch-specific/sinixz/postinstall.in,v 1.5 2002-11-06 12:36:06 eku Exp $
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# $Copyright:
|
# $Copyright:
|
||||||
# Copyright (C) Siemens Nixdorf Informationssysteme AG 1994 - 1998
|
# Copyright (C) Siemens Nixdorf Informationssysteme AG 1994 - 1998
|
||||||
@ -30,19 +30,19 @@ chmod 666 firebird.log
|
|||||||
# If TCP is installed, update both services and servers databases
|
# If TCP is installed, update both services and servers databases
|
||||||
#
|
#
|
||||||
if [ -f /etc/services ]; then
|
if [ -f /etc/services ]; then
|
||||||
grep -s gds_db /etc/services >/dev/null 2>&1
|
grep -s @FB_SERVICE_NAME@ /etc/services >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "Patching /etc/services..."
|
echo "Patching /etc/services..."
|
||||||
echo "gds_db 3050/tcp # InterBase Database Remote Protocol" >>/etc/services
|
echo "@FB_SERVICE_NAME@ @FB_SERVICE_PORT@/tcp # InterBase Database Remote Protocol" >>/etc/services
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/inetd.conf ]; then
|
if [ -f /etc/inetd.conf ]; then
|
||||||
grep -s gds_db /etc/inetd.conf >/dev/null 2>&1
|
grep -s @FB_SERVICE_NAME@ /etc/inetd.conf >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "Patching /etc/inetd.conf..."
|
echo "Patching /etc/inetd.conf..."
|
||||||
echo "" >> /etc/inetd.conf
|
echo "" >> /etc/inetd.conf
|
||||||
echo "# InterBase Database Remote Server" >> /etc/inetd.conf
|
echo "# InterBase Database Remote Server" >> /etc/inetd.conf
|
||||||
echo "gds_db stream tcp nowait.30000 root $FIREBIRD/bin/fb_inet_server fb_inet_server" >>/etc/inetd.conf
|
echo "@FB_SERVICE_NAME@ stream tcp nowait.30000 root $FIREBIRD/bin/fb_inet_server fb_inet_server" >>/etc/inetd.conf
|
||||||
echo "Restarting inetd..."
|
echo "Restarting inetd..."
|
||||||
kill -HUP `ps -e | grep inetd | awk '{print $1}'`
|
kill -HUP `ps -e | grep inetd | awk '{print $1}'`
|
||||||
fi
|
fi
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#ident "$Id: config.h.in,v 1.46 2002-11-06 07:21:30 eku Exp $"
|
#ident "$Id: config.h.in,v 1.47 2002-11-06 12:36:06 eku Exp $"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
|
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
|
||||||
@ -109,8 +109,12 @@
|
|||||||
/* Support databases on Raw Devices (UNIX only) */
|
/* Support databases on Raw Devices (UNIX only) */
|
||||||
#undef SUPPORT_RAW_DEVICES
|
#undef SUPPORT_RAW_DEVICES
|
||||||
|
|
||||||
/* Support /etc/proc/exe as link to current executable
|
/* Inet service name and port (UNIX only) */
|
||||||
* enables us to find path to install directory (Linux only) */
|
#define FB_SERVICE_NAME "gdb_db"
|
||||||
|
#define FB_SERVICE_PORT 3050
|
||||||
|
|
||||||
|
/* Support /proc/self/exe as link to current executable
|
||||||
|
enables us to find path to install directory (Linux only) */
|
||||||
#undef HAVE__PROC_SELF_EXE
|
#undef HAVE__PROC_SELF_EXE
|
||||||
|
|
||||||
/* CPU types */
|
/* CPU types */
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
$Id: inet.cpp,v 1.34 2002-11-06 07:08:47 eku Exp $
|
$Id: inet.cpp,v 1.35 2002-11-06 12:36:06 eku Exp $
|
||||||
*/
|
*/
|
||||||
#include "firebird.h"
|
#include "firebird.h"
|
||||||
#include "../jrd/ib_stdio.h"
|
#include "../jrd/ib_stdio.h"
|
||||||
@ -323,8 +323,6 @@ static ULONG inet_debug_timer(void)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PROTOCOL_NAME "gds_db"
|
|
||||||
|
|
||||||
|
|
||||||
#define MAX_DATA_LW 1448 /* Low Water mark */
|
#define MAX_DATA_LW 1448 /* Low Water mark */
|
||||||
#define MAX_DATA_HW 32768 /* High Water mark */
|
#define MAX_DATA_HW 32768 /* High Water mark */
|
||||||
@ -930,7 +928,7 @@ PORT DLL_EXPORT INET_connect(TEXT * name,
|
|||||||
status_vector[0] = gds_arg_gds;
|
status_vector[0] = gds_arg_gds;
|
||||||
status_vector[1] = 0;
|
status_vector[1] = 0;
|
||||||
status_vector[2] = gds_arg_end;
|
status_vector[2] = gds_arg_end;
|
||||||
protocol = PROTOCOL_NAME;
|
protocol = FB_SERVICE_NAME;
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
ISC_tcp_setup(ISC_wait, gds__completion_ast);
|
ISC_tcp_setup(ISC_wait, gds__completion_ast);
|
||||||
#endif
|
#endif
|
||||||
@ -1063,9 +1061,9 @@ PORT DLL_EXPORT INET_connect(TEXT * name,
|
|||||||
for zero-installation clients.
|
for zero-installation clients.
|
||||||
*/
|
*/
|
||||||
if (!service) {
|
if (!service) {
|
||||||
if (strcmp(protocol, PROTOCOL_NAME) == 0) {
|
if (strcmp(protocol, FB_SERVICE_NAME) == 0) {
|
||||||
/* apply hardwired translation */
|
/* apply hardwired translation */
|
||||||
address.sin_port = htons(3050);
|
address.sin_port = htons(FB_SERVICE_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* modification by FSG 23.MAR.2001 */
|
/* modification by FSG 23.MAR.2001 */
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
#define RPM_1SESSION 1 /* Accommodate multiple sessions, bit 30 */
|
#define RPM_1SESSION 1 /* Accommodate multiple sessions, bit 30 */
|
||||||
#define RPM_NOPRIV 19 /* Load program in non-priv mode, bit 12 */
|
#define RPM_NOPRIV 19 /* Load program in non-priv mode, bit 12 */
|
||||||
|
|
||||||
#define PROTOCOL_NAME "gds_db"
|
|
||||||
#define PROXY_FILE "proxy.pub"
|
#define PROXY_FILE "proxy.pub"
|
||||||
#define SERVER_NAME " gdsrserv.pub.starbase"
|
#define SERVER_NAME " gdsrserv.pub.starbase"
|
||||||
|
|
||||||
@ -442,7 +441,7 @@ PORT IPC_connect(TEXT * name,
|
|||||||
if (!ipcresult && flags == 1)
|
if (!ipcresult && flags == 1)
|
||||||
gds_socket = items[0];
|
gds_socket = items[0];
|
||||||
else
|
else
|
||||||
gds_socket = GDS_SOCKET;
|
gds_socket = FB_SERVER_PORT;
|
||||||
|
|
||||||
port = alloc_port(0);
|
port = alloc_port(0);
|
||||||
port->port_status_vector = status_vector;
|
port->port_status_vector = status_vector;
|
||||||
|
@ -30,8 +30,6 @@
|
|||||||
#pragma intrinsic IPCLOOKUP, IPCCONNECT, IPCDEST, IPCSHUTDOWN
|
#pragma intrinsic IPCLOOKUP, IPCCONNECT, IPCDEST, IPCSHUTDOWN
|
||||||
#pragma intrinsic INITOPT, ADDOPT, OPTOVERHEAD
|
#pragma intrinsic INITOPT, ADDOPT, OPTOVERHEAD
|
||||||
|
|
||||||
#define GDS_SOCKET 3050
|
|
||||||
|
|
||||||
#define IPC_CALL_SOCKET 3
|
#define IPC_CALL_SOCKET 3
|
||||||
#define IPC_TCP 4
|
#define IPC_TCP 4
|
||||||
#define IPC_GIVELEN 8
|
#define IPC_GIVELEN 8
|
||||||
|
@ -54,8 +54,6 @@
|
|||||||
|
|
||||||
#define ERRNO GetLastError()
|
#define ERRNO GetLastError()
|
||||||
|
|
||||||
#define PROTOCOL_NAME "gds_db"
|
|
||||||
|
|
||||||
#ifndef SYS_ERR
|
#ifndef SYS_ERR
|
||||||
#define SYS_ERR gds_arg_win32
|
#define SYS_ERR gds_arg_win32
|
||||||
#endif
|
#endif
|
||||||
@ -1125,7 +1123,7 @@ static STR make_pipe_name(
|
|||||||
*q++ = *p++;
|
*q++ = *p++;
|
||||||
|
|
||||||
if (!*p)
|
if (!*p)
|
||||||
protocol = PROTOCOL_NAME;
|
protocol = FB_SERVICE_NAME;
|
||||||
else if (*p == '@')
|
else if (*p == '@')
|
||||||
protocol = p + 1;
|
protocol = p + 1;
|
||||||
else {
|
else {
|
||||||
|
@ -77,8 +77,6 @@ extern "C" {
|
|||||||
#define ERRNO errno
|
#define ERRNO errno
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PROTOCOL_NAME "gds_db"
|
|
||||||
|
|
||||||
#ifndef SYS_ERR
|
#ifndef SYS_ERR
|
||||||
#define SYS_ERR gds_arg_win32
|
#define SYS_ERR gds_arg_win32
|
||||||
#endif
|
#endif
|
||||||
@ -1272,7 +1270,7 @@ ULONG connection_setup(TEXT * name, PACKET * packet, STATUS * status_vector)
|
|||||||
status_vector[0] = gds_arg_gds;
|
status_vector[0] = gds_arg_gds;
|
||||||
status_vector[1] = 0;
|
status_vector[1] = 0;
|
||||||
status_vector[2] = gds_arg_end;
|
status_vector[2] = gds_arg_end;
|
||||||
protocol = PROTOCOL_NAME;
|
protocol = FB_SERVICE_NAME;
|
||||||
|
|
||||||
/* Set up Inter-Net socket address */
|
/* Set up Inter-Net socket address */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user