diff --git a/configure b/configure new file mode 100755 index 0000000000..6e4b481171 --- /dev/null +++ b/configure @@ -0,0 +1,4150 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by Autoconf 2.50. +# +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +cross_compiling=no +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Avoid depending upon Character Ranges. +ac_cr_az='abcdefghijklmnopqrstuvwxyz' +ac_cr_AZ='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +ac_cr_09='0123456789' +ac_cr_alnum=$ac_cr_az$ac_cr_AZ$ac_cr_09 + +# Sed expression to map a string onto a valid sh and CPP variable names. +ac_tr_sh="sed y%*+%pp%;s%[^_$ac_cr_alnum]%_%g" +ac_tr_cpp="sed y%*$ac_cr_az%P$ac_cr_AZ%;s%[^_$ac_cr_alnum]%_%g" + +ac_unique_file="src" + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$ac_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$ac_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir \ + exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + NONE ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: should be removed in autoconf 3.0. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat < if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +EOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue + cd $ac_subdir + # A "../" for each directory in /$ac_subdir. + ac_dots=`echo $ac_subdir | + sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_sub_srcdir=$srcdir ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_sub_srcdir=$srcdir/$ac_subdir ;; + *) # Relative path. + ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; + esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_sub_srcdir/configure.gnu; then + echo + $SHELL $ac_sub_srcdir/configure.gnu --help=recursive + elif test -f $ac_sub_srcdir/configure; then + echo + $SHELL $ac_sub_srcdir/configure --help=recursive + elif test -f $ac_sub_srcdir/configure.ac || + test -f $ac_sub_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\EOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +EOF + exit 0 +fi +exec 5>config.log +cat >&5 </dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +PATH = $PATH + +_ASUNAME +} >&5 + +cat >&5 <\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + echo >&5 + echo "## ----------------- ##" >&5 + echo "## Cache variables. ##" >&5 + echo "## ----------------- ##" >&5 + echo >&5 + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} >&5 + sed "/^$/d" confdefs.h >conftest.log + if test -s conftest.log; then + echo >&5 + echo "## ------------ ##" >&5 + echo "## confdefs.h. ##" >&5 + echo "## ------------ ##" >&5 + echo >&5 + cat conftest.log >&5 + fi + (echo; echo) >&5 + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" >&5 + echo "$as_me: exit $exit_status" >&5 + rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_status=$?; ac_signal='$ac_signal'; { (exit $ac_status); exit $ac_status; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:822: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + cat "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:833: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:841: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_suggest_removing_cache=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:857: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: WARNING: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_suggest_removing_cache=: ;; + ,set) + { echo "$as_me:861: WARNING: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: WARNING: \`$ac_var' was not set in the previous run" >&2;} + ac_suggest_removing_cache=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:867: WARNING: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: WARNING: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:869: WARNING: former value: $ac_old_val" >&5 +echo "$as_me: WARNING: former value: $ac_old_val" >&2;} + { echo "$as_me:871: WARNING: current value: $ac_new_val" >&5 +echo "$as_me: WARNING: current value: $ac_new_val" >&2;} + ac_suggest_removing_cache=: + fi;; + esac +done +if $ac_suggest_removing_cache; then + { echo "$as_me:878: WARNING: changes in the environment can compromise the build" >&5 +echo "$as_me: WARNING: changes in the environment can compromise the build" >&2;} + { echo "$as_me:880: WARNING: consider removing $cache_file and starting over" >&5 +echo "$as_me: WARNING: consider removing $cache_file and starting over" >&2;} +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac +echo "#! $SHELL" >conftest.sh +echo "exit 0" >>conftest.sh +chmod +x conftest.sh +if { (echo "$as_me:899: PATH=\".;.\"; conftest.sh") >&5 + (PATH=".;."; conftest.sh) 2>&5 + ac_status=$? + echo "$as_me:902: \$? = $ac_status" >&5 + (exit $ac_status); }; then + ac_path_separator=';' +else + ac_path_separator=: +fi +PATH_SEPARATOR="$ac_path_separator" +rm -f conftest.sh + +ac_aux_dir= +for ac_dir in src/makefiles/config $srcdir/src/makefiles/config; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:928: error: cannot find install-sh or install.sh in src/makefiles/config $srcdir/src/makefiles/config" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in src/makefiles/config $srcdir/src/makefiles/config" >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +if test "${ac_cv_prog_make_set+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo "$as_me:939: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:959: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:963: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +fi + +ac_config_headers="$ac_config_headers generated/jrd/autoconfig.h:src/makefiles/config/config.h.in" + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:974: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:978: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:987: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:991: error: $ac_config_sub $ac_cv_build_alias failed." >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:996: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +echo "$as_me:1003: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:1012: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:1017: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +echo "$as_me:1024: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:1033: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:1038: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +for ac_prog in mawk gawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:1056: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_AWK="$ac_prog" +echo "$as_me:1071: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:1079: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:1082: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:1097: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}gcc" +echo "$as_me:1112: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1120: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1123: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:1132: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="gcc" +echo "$as_me:1147: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1155: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1158: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:1171: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}cc" +echo "$as_me:1186: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1194: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1197: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1206: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="cc" +echo "$as_me:1221: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1229: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1232: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1245: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +fi +ac_cv_prog_CC="cc" +echo "$as_me:1265: found $ac_dir/$ac_word" >&5 +break +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" ${1+"$@"} + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1287: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1290: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:1301: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +echo "$as_me:1316: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1324: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1327: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:1340: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="$ac_prog" +echo "$as_me:1355: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1363: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1366: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + +test -z "$CC" && { { echo "$as_me:1378: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +cat >conftest.$ac_ext <<_ACEOF +#line 1383 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compiler, and finding out an intuition +# of exeext. +echo "$as_me:1399: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:1402: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:1405: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `ls a.exe conftest.exe a.* conftest conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1422: error: C compiler cannot create executables" >&5 +echo "$as_me: error: C compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:1428: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1433: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:1439: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1442: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:1449: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:1457: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1464: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:1466: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:1469: checking for executable suffix" >&5 +echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 +if { (eval echo "$as_me:1471: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1474: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:1490: error: cannot compute EXEEXT: cannot compile and link" >&5 +echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:1496: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:1502: checking for object suffix" >&5 +echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1508 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:1520: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1523: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1535: error: cannot compute OBJEXT: cannot compile" >&5 +echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:1542: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:1546: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1552 "configure" +#include "confdefs.h" + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1567: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1570: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1573: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1576: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:1588: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:1594: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1600 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1612: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1615: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1618: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1621: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:1631: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1658: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1661: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1664: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1667: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line 1679 "configure" +#include "confdefs.h" +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1692: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1695: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1698: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1701: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 1711 "configure" +#include "confdefs.h" +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1723: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1726: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1729: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1732: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +echo '#ifdef __cplusplus' >>confdefs.h +echo $ac_declaration >>confdefs.h +echo '#endif' >>confdefs.h + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:1766: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" +echo "$as_me:1781: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:1789: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:1792: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:1805: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CXX="$ac_prog" +echo "$as_me:1820: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:1828: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:1831: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + +echo "$as_me:1842: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1848 "configure" +#include "confdefs.h" + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1866: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1869: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1872: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:1884: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:1890: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1896 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1908: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1911: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1914: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1917: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cxx_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:1927: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line 1954 "configure" +#include "confdefs.h" +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1967: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1970: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1973: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1976: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 1986 "configure" +#include "confdefs.h" +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1998: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2001: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2004: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2007: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +echo '#ifdef __cplusplus' >>confdefs.h +echo $ac_declaration >>confdefs.h +echo '#endif' >>confdefs.h + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +for ac_prog in flex lex +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:2030: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_LEX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_LEX="$ac_prog" +echo "$as_me:2045: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + echo "$as_me:2053: result: $LEX" >&5 +echo "${ECHO_T}$LEX" >&6 +else + echo "$as_me:2056: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +if test -z "$LEXLIB" +then + echo "$as_me:2066: checking for yywrap in -lfl" >&5 +echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 +if test "${ac_cv_lib_fl_yywrap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 2074 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char yywrap (); +int +main () +{ +yywrap (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:2093: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2096: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:2099: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2102: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_fl_yywrap=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_fl_yywrap=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:2113: result: $ac_cv_lib_fl_yywrap" >&5 +echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 +if test $ac_cv_lib_fl_yywrap = yes; then + LEXLIB="-lfl" +else + echo "$as_me:2118: checking for yywrap in -ll" >&5 +echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 +if test "${ac_cv_lib_l_yywrap+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ll $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 2126 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char yywrap (); +int +main () +{ +yywrap (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:2145: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2148: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:2151: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2154: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_l_yywrap=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_l_yywrap=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:2165: result: $ac_cv_lib_l_yywrap" >&5 +echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 +if test $ac_cv_lib_l_yywrap = yes; then + LEXLIB="-ll" +fi + +fi + +fi + +if test "x$LEX" != "x:"; then + echo "$as_me:2176: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 +if test "${ac_cv_prog_lex_root+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # The minimal lex program is just a single line: %%. But some broken lexes +# (Solaris, I think it was) want two %% lines, so accommodate them. +echo '%% +%%' | $LEX +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { { echo "$as_me:2190: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } +fi +fi +echo "$as_me:2195: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +echo "$as_me:2199: checking whether yytext is a pointer" >&5 +echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 +if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS=$LIBS +LIBS="$LIBS $LEXLIB" +cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:2215: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2218: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:2221: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2224: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_lex_yytext_pointer=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_save_LIBS +rm -f "${LEX_OUTPUT_ROOT}.c" + +fi +echo "$as_me:2236: result: $ac_cv_prog_lex_yytext_pointer" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 +if test $ac_cv_prog_lex_yytext_pointer = yes; then + +cat >>confdefs.h <<\EOF +#define YYTEXT_POINTER 1 +EOF + +fi + +fi +echo "$as_me:2247: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:2251: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:2254: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:2261: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +echo "$as_me:2276: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:2284: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:2287: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:2296: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_RANLIB="ranlib" +echo "$as_me:2311: found $ac_dir/$ac_word" >&5 +break +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:2320: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:2323: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:2336: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_YACC="$ac_prog" +echo "$as_me:2351: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + echo "$as_me:2359: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6 +else + echo "$as_me:2362: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:2375: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + # break 2 since there is a loop in there. + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line 2397 "configure" +#include "confdefs.h" +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:2402: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2408: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 2431 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:2435: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2441: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break 2 +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:2478: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line 2488 "configure" +#include "confdefs.h" +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:2493: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2499: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 2522 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:2526: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2532: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:2560: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +for ac_header in unistd.h +do +ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` +echo "$as_me:2574: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2580 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2584: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2590: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2609: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2628 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2632: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2638: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2657: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2676 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2680: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2686: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2705: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2724 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2728: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2734: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2753: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2772 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2776: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2782: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2801: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2820 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2824: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2830: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2849: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2868 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2872: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2878: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2897: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2916 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2920: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2926: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2945: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2964 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:2968: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2974: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:2993: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3012 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3016: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3022: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3041: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3060 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3064: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3070: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3089: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$ac_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3108 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3112: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3118: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$ac_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$ac_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:3137: result: `eval echo '${'$ac_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$ac_ac_Header'}'`" >&6 +if test `eval echo '${'$ac_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +#line 3155 "configure" +#include "confdefs.h" +#include +#include + +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3172: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3175: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3178: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3181: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +#line 3185 "configure" +#include "confdefs.h" +#include +#include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3202: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3205: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3208: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3211: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + { { echo "$as_me:3227: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 3232 "configure" +#include "confdefs.h" +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3248: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3251: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3253: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3256: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_bigendian=yes +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_ext +fi +fi +fi +echo "$as_me:3269: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +if test $ac_cv_c_bigendian = yes; then + +cat >>confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + +case "$target_cpu" in +powerpc) cat >>confdefs.h <<\EOF +#define PowerPC 1 +EOF + ;; +esac + +case "$target" in +*-*-darwin*) MAKEFILE_PREFIX=prefix.darwin ; PLATFORM=DARWIN ; cat >>confdefs.h <<\EOF +#define DARWIN 1 +EOF +;; +*-*-freebsd*) MAKEFILE_PREFIX=prefix.freebsd ; PLATFORM=FREEBSD ; cat >>confdefs.h <<\EOF +#define FREEBSD 1 +EOF +;; +*-*-linux*) MAKEFILE_PREFIX=prefix.linux ; PLATFORM=LINUX ; cat >>confdefs.h <<\EOF +#define linux 1 +EOF + ;; +*-*-netbsd*) MAKEFILE_PREFIX=prefix.netbsd ; PLATFORM=NETBSD ; cat >>confdefs.h <<\EOF +#define NETBSD 1 +EOF + ;; +*-apollo-*) MAKEFILE_PREFIX=prefix.apollo ; PLATFORM=apollo ; cat >>confdefs.h <<\EOF +#define apollo 1 +EOF + ;; +*-*-hpux*) MAKEFILE_PREFIX=prefix.hpux ; PLATFORM=hpux ; cat >>confdefs.h <<\EOF +#define hpux 1 +EOF + ;; +esac + +ln -s ../src/makefiles/${MAKEFILE_PREFIX} generated/.prefix.platform + +ac_config_files="$ac_config_files generated/alice/Makefile:generated/.prefix.platform:src/makefiles/sfx.alice generated/burp/Makefile:generated/.prefix.platform:src/makefiles/sfx.burp generated/csv/Makefile:generated/.prefix.platform:src/makefiles/sfx.csv generated/dbs/Makefile:generated/.prefix.platform:src/makefiles/sfx.dbs generated/dsql/Makefile:generated/.prefix.platform:src/makefiles/sfx.dsql generated/dudley/Makefile:generated/.prefix.platform:src/makefiles/sfx.dudley generated/extlib/Makefile:generated/.prefix.platform:src/makefiles/sfx.extlib generated/gpre/Makefile:generated/.prefix.platform:src/makefiles/sfx.gpre generated/intl/Makefile:generated/.prefix.platform:src/makefiles/sfx.intl generated/isql/Makefile:generated/.prefix.platform:src/makefiles/sfx.isql generated/journal/Makefile:generated/.prefix.platform:src/makefiles/sfx.journal generated/jrd/Makefile:generated/.prefix.platform:src/makefiles/sfx.jrd generated/lock/Makefile:generated/.prefix.platform:src/makefiles/sfx.lock generated/msgs/Makefile:generated/.prefix.platform:src/makefiles/sfx.msgs generated/pipe/Makefile:generated/.prefix.platform:src/makefiles/sfx.pipe generated/pyxis/Makefile:generated/.prefix.platform:src/makefiles/sfx.pyxis generated/qli/Makefile:generated/.prefix.platform:src/makefiles/sfx.qli generated/remote/Makefile:generated/.prefix.platform:src/makefiles/sfx.remote generated/utilities/Makefile:generated/.prefix.platform:src/makefiles/sfx.utilities generated/wal/Makefile:generated/.prefix.platform:src/makefiles/sfx.wal generated/Makefile:generated/.prefix.platform:src/makefiles/sfx.firebird Makefile:src/makefiles/config/Makefile.in" +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overriden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$ac_cr_alnum]*_cv_[_$ac_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:3395: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +ac_cs_invocation="\$0 \$@" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +exec 6>&1 + +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\EOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +EOF + +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; + esac + + case $1 in + # Handling of the options. +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:3567: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; + + # Handling of arguments. + 'generated/alice/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/alice/Makefile:generated/.prefix.platform:src/makefiles/sfx.alice" ;; + 'generated/burp/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/burp/Makefile:generated/.prefix.platform:src/makefiles/sfx.burp" ;; + 'generated/csv/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/csv/Makefile:generated/.prefix.platform:src/makefiles/sfx.csv" ;; + 'generated/dbs/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/dbs/Makefile:generated/.prefix.platform:src/makefiles/sfx.dbs" ;; + 'generated/dsql/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/dsql/Makefile:generated/.prefix.platform:src/makefiles/sfx.dsql" ;; + 'generated/dudley/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/dudley/Makefile:generated/.prefix.platform:src/makefiles/sfx.dudley" ;; + 'generated/extlib/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/extlib/Makefile:generated/.prefix.platform:src/makefiles/sfx.extlib" ;; + 'generated/gpre/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/gpre/Makefile:generated/.prefix.platform:src/makefiles/sfx.gpre" ;; + 'generated/intl/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/intl/Makefile:generated/.prefix.platform:src/makefiles/sfx.intl" ;; + 'generated/isql/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/isql/Makefile:generated/.prefix.platform:src/makefiles/sfx.isql" ;; + 'generated/journal/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/journal/Makefile:generated/.prefix.platform:src/makefiles/sfx.journal" ;; + 'generated/jrd/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/jrd/Makefile:generated/.prefix.platform:src/makefiles/sfx.jrd" ;; + 'generated/lock/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/lock/Makefile:generated/.prefix.platform:src/makefiles/sfx.lock" ;; + 'generated/msgs/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/msgs/Makefile:generated/.prefix.platform:src/makefiles/sfx.msgs" ;; + 'generated/pipe/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/pipe/Makefile:generated/.prefix.platform:src/makefiles/sfx.pipe" ;; + 'generated/pyxis/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/pyxis/Makefile:generated/.prefix.platform:src/makefiles/sfx.pyxis" ;; + 'generated/qli/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/qli/Makefile:generated/.prefix.platform:src/makefiles/sfx.qli" ;; + 'generated/remote/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/remote/Makefile:generated/.prefix.platform:src/makefiles/sfx.remote" ;; + 'generated/utilities/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/utilities/Makefile:generated/.prefix.platform:src/makefiles/sfx.utilities" ;; + 'generated/wal/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/wal/Makefile:generated/.prefix.platform:src/makefiles/sfx.wal" ;; + 'generated/Makefile' ) CONFIG_FILES="$CONFIG_FILES generated/Makefile:generated/.prefix.platform:src/makefiles/sfx.firebird" ;; + 'Makefile' ) CONFIG_FILES="$CONFIG_FILES Makefile:src/makefiles/config/Makefile.in" ;; + 'generated/jrd/autoconfig.h' ) CONFIG_HEADERS="$CONFIG_HEADERS generated/jrd/autoconfig.h:src/makefiles/config/config.h.in" ;; + + # This is an error. + -*) { { echo "$as_me:3611: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + *) { { echo "$as_me:3616: error: invalid argument: $1" >&5 +echo "$as_me: error: invalid argument: $1" >&2;} + { (exit 1); exit 1; }; };; + esac + shift +done + +exec 5>>config.log +cat >&5 << _ACEOF + +## ----------------------- ## +## Running config.status. ## +## ----------------------- ## + +This file was extended by $as_me 2.50, executed with + > $ac_cs_invocation +on `(hostname || uname -n) 2>/dev/null | sed 1q` + +_ACEOF +EOF + +cat >>$CONFIG_STATUS <<\EOF +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit $?); exit $?; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + +EOF + +cat >>$CONFIG_STATUS <\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@DEFS@,$DEFS,;t t +s,@LIBS@,$LIBS,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@AWK@,$AWK,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@LEX@,$LEX,;t t +s,@LEXLIB@,$LEXLIB,;t t +s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t +s,@LN_S@,$LN_S,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@YACC@,$YACC,;t t +s,@CPP@,$CPP,;t t +s,@PLATFORM@,$PLATFORM,;t t +CEOF + +EOF + + cat >>$CONFIG_STATUS <<\EOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +EOF +cat >>$CONFIG_STATUS <<\EOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + + ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` + else + ac_dir_suffix= ac_dots= + fi + + case $srcdir in + .) ac_srcdir=. + if test -z "$ac_dots"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_dots$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_dots$srcdir ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:3852: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + configure_input="Generated automatically from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:3870: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:3883: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +EOF +cat >>$CONFIG_STATUS <<\EOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:3943: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:3954: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:3967: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +EOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\EOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +EOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\EOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +EOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # egrep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\EOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated automatically by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:4084: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + + fi + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +EOF + +cat >>$CONFIG_STATUS <<\EOF + +{ (exit 0); exit 0; } +EOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/src/alice/alice_meta.e b/src/alice/alice_meta.epp similarity index 89% rename from src/alice/alice_meta.e rename to src/alice/alice_meta.epp index ec66daee14..da79ac3ac5 100644 --- a/src/alice/alice_meta.e +++ b/src/alice/alice_meta.epp @@ -27,7 +27,7 @@ * *____________________________________________________________ * - * $Id: alice_meta.e,v 1.1.1.1 2001-05-23 13:25:33 tamlin Exp $ + * $Id: alice_meta.epp,v 1.1 2001-07-12 06:32:01 bellardo Exp $ */ #include @@ -43,6 +43,8 @@ #include "../jrd/gds_proto.h" #include "../jrd/thd_proto.h" +#include + /* Transaction Description Record */ #define TDR_VERSION 1 @@ -60,7 +62,7 @@ DATABASE DB = STATIC FILENAME "yachts.lnk"; #define DB tdgbl->db_handle -#define gds__trans tdgbl->tr_handle +#define gds_trans tdgbl->tr_handle static STR alloc_string(TEXT **); static USHORT get_capabilities(STATUS *); @@ -87,12 +89,12 @@ static struct rfr_tab_t rfr_table[] = { #ifdef GUI_TOOLS #define RETURN_ERROR(user_status) \ - { memcpy (user_status, gds__status, sizeof (gds__status)); \ - LONGJMP (tdgbl->alice_env, 1); } + { memcpy (user_status, gds_status, sizeof (gds_status)); \ + LONGJMP ((JMP_BUF)tdgbl->alice_env, 1); } #else #define RETURN_ERROR(user_status) \ - { ALICE_print_status (gds__status); \ - LONGJMP (tdgbl->alice_env, 1); } + { ALICE_print_status (gds_status); \ + LONGJMP ((JMP_BUF)tdgbl->alice_env, 1); } #endif @@ -147,8 +149,8 @@ void MET_get_state(STATUS * user_status, TDR trans) trans->tdr_state = TRA.RDB$TRANSACTION_STATE; END_FOR ON_ERROR RETURN_ERROR(user_status) END_ERROR; - gds__release_request(gds__status, GDS_REF(request)); - if (gds__status[1]) { + gds__release_request(gds_status, (void**) GDS_REF(request)); + if (gds_status[1]) { RETURN_ERROR(user_status) } @@ -184,11 +186,11 @@ TDR MET_get_transaction(STATUS * user_status, isc_db_handle handle, SLONG id) TRA IN RDB$TRANSACTIONS WITH TRA.RDB$TRANSACTION_ID = id AND TRA.RDB$TRANSACTION_DESCRIPTION NOT MISSING - trans = get_description(&TRA.RDB$TRANSACTION_DESCRIPTION); + trans = get_description((SLONG*)&TRA.RDB$TRANSACTION_DESCRIPTION); END_FOR ON_ERROR RETURN_ERROR(user_status) END_ERROR; - gds__release_request(gds__status, GDS_REF(request)); - if (gds__status[1]) { + gds__release_request(gds_status, (void**) GDS_REF(request)); + if (gds_status[1]) { RETURN_ERROR(user_status) } } @@ -284,8 +286,8 @@ static USHORT get_capabilities(STATUS * user_status) END_FOR ON_ERROR RETURN_ERROR(user_status) END_ERROR; } - gds__release_request(gds__status, GDS_REF(req)); - if (gds__status[1]) { + gds__release_request(gds_status, (void**) GDS_REF(req)); + if (gds_status[1]) { RETURN_ERROR(user_status) } @@ -336,7 +338,7 @@ static TDR get_description(SLONG blob_id[2]) case TDR_TRANSACTION_ID: id_length = *p++; - id = gds__vax_integer(p, id_length); + id = gds__vax_integer((UCHAR*) p, id_length); p += id_length; if (!trans) trans = ptr = (TDR) ALLOCD(type_tdr); @@ -382,7 +384,7 @@ static void parse_fullpath(TDR trans) /* start at the end of the full pathname */ - start = p = trans->tdr_fullpath->str_data; + start = p = (TEXT*) trans->tdr_fullpath->str_data; while (*p) p++; end = p; @@ -403,7 +405,7 @@ static void parse_fullpath(TDR trans) trans->tdr_filename = q + 1; trans->tdr_remote_site = (STR) ALLOCDV(type_str, q - p + 1); - strncpy(trans->tdr_remote_site->str_data, p, q - p); + strncpy((char*) trans->tdr_remote_site->str_data, (char*) p, q - p); trans->tdr_remote_site->str_data[q - p] = '\0'; } } @@ -462,10 +464,10 @@ static USHORT snarf_blob(SLONG blob_id[2], buffer[1] = 0; blob = NULL; - if (gds__open_blob(gds__status, - GDS_REF(DB), - GDS_REF(gds__trans), GDS_REF(blob), GDS_VAL(blob_id))) { - ALICE_print_status(gds__status); + if (gds__open_blob(gds_status, + (void**) GDS_REF(DB), + (void**) GDS_REF(gds_trans), (void**) GDS_REF(blob), (GDS_QUAD*) GDS_VAL(blob_id))) { + ALICE_print_status(gds_status); return 0; } @@ -478,11 +480,11 @@ static USHORT snarf_blob(SLONG blob_id[2], break; if (!(buffer_length = end - ptr)) break; - status = gds__get_segment(gds__status, - GDS_REF(blob), + status = gds__get_segment(gds_status, + (void**) GDS_REF(blob), GDS_REF(returned_length), buffer_length, GDS_VAL(ptr)); - if (status && status != gds__segment) + if (status && status != gds_segment) break; ptr += returned_length; } @@ -491,18 +493,18 @@ static USHORT snarf_blob(SLONG blob_id[2], if (!buffer_length) for (;;) { - status = gds__get_segment(gds__status, - GDS_REF(blob), + status = gds__get_segment(gds_status, + (void**) GDS_REF(blob), GDS_REF(returned_length), buffer_length, buffer); - if (status && status != gds__segment) + if (status && status != gds_segment) break; buffer_length += returned_length; } else buffer_length = 0; - gds__close_blob(gds__status, GDS_REF(blob)); + gds__close_blob(gds_status, (void**) GDS_REF(blob)); *ptr = 0; diff --git a/src/burp/backup.e b/src/burp/backup.epp similarity index 91% rename from src/burp/backup.e rename to src/burp/backup.epp index 23bcbce149..70e6798f73 100644 --- a/src/burp/backup.e +++ b/src/burp/backup.epp @@ -20,13 +20,9 @@ * All Rights Reserved. * Contributor(s): ______________________________________. * Toni Martir: Added verbose backup records as BACKUP_VERBOSE_INTERVAL - * - * 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE" - * conditionals, as the engine now fully supports - * readonly databases. */ /* -$Id: backup.e,v 1.2 2001-07-10 17:35:13 awharrison Exp $ +$Id: backup.epp,v 1.1 2001-07-12 06:32:01 bellardo Exp $ */ #include "../jrd/ib_stdio.h" @@ -135,9 +131,9 @@ static UCHAR debug_on = 0; /* able to turn this on in debug mode */ #endif -/* - table used to determine capabilities, checking for specific - fields in system relations +/* + table used to determine capabilities, checking for specific + fields in system relations */ typedef struct rfr_tab_t { @@ -148,8 +144,8 @@ typedef struct rfr_tab_t { static CONST struct rfr_tab_t rfr_table[] = { "RDB$INDICES", "RDB$INDEX_INACTIVE", BCK_idx_inactive, -/* Backup of V2 triggers no longer supported 1996-Aug-05 David Schnepper - "RDB$RELATIONS", "RDB$STORE_TRIGGER", BCK_triggers, +/* Backup of V2 triggers no longer supported 1996-Aug-05 David Schnepper + "RDB$RELATIONS", "RDB$STORE_TRIGGER", BCK_triggers, */ "RDB$RELATIONS", "RDB$EXTERNAL_FILE", BCK_external, "RDB$SECURITY_CLASSES", "RDB$SECURITY_CLASS", BCK_security, @@ -298,7 +294,7 @@ int BACKUP_backup(TEXT* dbb_file, TEXT* file_name) tdgbl->action->act_file = tdgbl->gbl_sw_files; } - MVOL_init_write(dbb_file, file_name, &tdgbl->io_cnt, &tdgbl->io_ptr); + MVOL_init_write((UCHAR*) dbb_file, (UCHAR*) file_name, &tdgbl->io_cnt, &tdgbl->io_ptr); /* Write database record */ @@ -410,7 +406,7 @@ int BACKUP_backup(TEXT* dbb_file, TEXT* file_name) X IN RDB$SECURITY_CLASSES WITH X.RDB$SECURITY_CLASS NOT STARTING "SQL$" PUT (rec_security_class); l = PUT_TEXT (att_class_security_class, X.RDB$SECURITY_CLASS); - MISC_terminate (X.RDB$SECURITY_CLASS, temp, l, sizeof(temp)); + MISC_terminate ((UCHAR*) X.RDB$SECURITY_CLASS, (UCHAR*) temp, l, sizeof(temp)); BURP_verbose (155, temp, NULL, NULL, NULL, NULL); /* msg 155 writing security class %s */ put_blr_blob (att_class_acl, (ISC_QUAD *)&X.RDB$ACL); @@ -454,7 +450,7 @@ int BACKUP_backup(TEXT* dbb_file, TEXT* file_name) /* Finish up */ PUT(rec_end); - MVOL_fini_write(&tdgbl->io_cnt, &tdgbl->io_ptr, &cumul_count_kb); + MVOL_fini_write(&tdgbl->io_cnt, &tdgbl->io_ptr, (int*) &cumul_count_kb); BURP_verbose(176, (TEXT *) cumul_count_kb, NULL, NULL, NULL, NULL); /* msg 176 closing file, committing, and finishing. %ld bytes written */ COMMIT; @@ -468,7 +464,7 @@ int BACKUP_backup(TEXT* dbb_file, TEXT* file_name) general_on_error (); END_ERROR; - FINISH; + FINISH ON_ERROR general_on_error (); END_ERROR; @@ -616,10 +612,10 @@ static FLD get_fields( REL relation) count = 1; fields = NULL; -/* if we have all capabilities, use the first request to get the - most performance out of the latest engine; if we don't - have one of the capabilities we must use the second set of - requests--this requires more code but it is well worth it +/* if we have all capabilities, use the first request to get the + most performance out of the latest engine; if we don't + have one of the capabilities we must use the second set of + requests--this requires more code but it is well worth it for the performance benefits, especially remotely--deej */ if ((tdgbl->BCK_capabilities & BCK_attributes_v3) && @@ -628,11 +624,11 @@ static FLD get_fields( REL relation) (tdgbl->BCK_capabilities & BCK_security)) { FOR (REQUEST_HANDLE tdgbl->handles_get_fields_req_handle1) - X IN RDB$RELATION_FIELDS CROSS - Y IN RDB$FIELDS WITH - X.RDB$FIELD_SOURCE = Y.RDB$FIELD_NAME AND + X IN RDB$RELATION_FIELDS CROSS + Y IN RDB$FIELDS WITH + X.RDB$FIELD_SOURCE = Y.RDB$FIELD_NAME AND X.RDB$RELATION_NAME EQ relation->rel_name - + field = (FLD) BURP_ALLOC_ZERO (sizeof (struct fld)); field->fld_number = count++; field->fld_type = Y.RDB$FIELD_TYPE; @@ -640,21 +636,21 @@ static FLD get_fields( REL relation) field->fld_length = Y.RDB$FIELD_LENGTH; field->fld_scale = Y.RDB$FIELD_SCALE; field->fld_id = X.RDB$FIELD_ID; - + if (!X.RDB$DESCRIPTION.NULL) { blob_id = &X.RDB$DESCRIPTION; if (blob_id->gds_quad_low || blob_id->gds_quad_high) field->fld_description = X.RDB$DESCRIPTION; } - + if (!X.RDB$QUERY_HEADER.NULL) { blob_id = &X.RDB$QUERY_HEADER; if (blob_id->gds_quad_low || blob_id->gds_quad_high) field->fld_query_header = X.RDB$QUERY_HEADER; } - + if (X.RDB$FIELD_POSITION.NULL) field->fld_flags |= FLD_position_missing; else @@ -664,7 +660,7 @@ static FLD get_fields( REL relation) field->fld_flags |= FLD_update_missing; else field->fld_update_flag = X.RDB$UPDATE_FLAG; - + copy (X.RDB$FIELD_NAME, field->fld_name, GDS_NAME_LEN - 1); copy (X.RDB$FIELD_SOURCE, field->fld_source, GDS_NAME_LEN - 1); copy (X.RDB$BASE_FIELD, field->fld_base, GDS_NAME_LEN - 1); @@ -672,62 +668,62 @@ static FLD get_fields( REL relation) copy (X.RDB$EDIT_STRING, field->fld_edit_string, sizeof (field->fld_edit_string) - 1); copy (X.RDB$COMPLEX_NAME, field->fld_complex_name, GDS_NAME_LEN - 1); - + blob_id = &Y.RDB$COMPUTED_BLR; if (blob_id->gds_quad_low || blob_id->gds_quad_high) field->fld_flags |= FLD_computed; field->fld_system_flag = X.RDB$SYSTEM_FLAG; - - copy (X.RDB$SECURITY_CLASS, field->fld_security_class, GDS_NAME_LEN - 1); - - /* use the fld_flags to mark the field as an array and + + copy (X.RDB$SECURITY_CLASS, field->fld_security_class, GDS_NAME_LEN - 1); + + /* use the fld_flags to mark the field as an array and to differentiate it from other blobs */ - + if (Y.RDB$DIMENSIONS) { field->fld_flags |= FLD_array; field->fld_dimensions = Y.RDB$DIMENSIONS; if (field->fld_dimensions < 0) - BURP_error_redirect (NULL_PTR, 52, field->fld_name, NULL); + BURP_error_redirect ((STATUS*) NULL_PTR, 52, field->fld_name, NULL); /* msg 52 array dimension for field %s is invalid */ get_ranges (field); } - + if (!X.RDB$NULL_FLAG.NULL) { field->fld_null_flag = X.RDB$NULL_FLAG; field->fld_flags |= FLD_null_flag; } - + if (!X.RDB$DEFAULT_VALUE.NULL) { blob_id = &X.RDB$DEFAULT_VALUE; if (blob_id->gds_quad_low || blob_id->gds_quad_high) field->fld_default_value = X.RDB$DEFAULT_VALUE; } - + if (!X.RDB$DEFAULT_SOURCE.NULL) { blob_id = &X.RDB$DEFAULT_SOURCE; if (blob_id->gds_quad_low || blob_id->gds_quad_high) field->fld_default_source = X.RDB$DEFAULT_SOURCE; } - + if (!(Y.RDB$CHARACTER_SET_ID.NULL)) { field->fld_character_set_id = Y.RDB$CHARACTER_SET_ID; field->fld_flags |= FLD_charset_flag; } - + if (!X.RDB$COLLATION_ID.NULL) { field->fld_collation_id = X.RDB$COLLATION_ID; field->fld_flags |= FLD_collate_flag; } - + field->fld_next = fields; fields = field; - + END_FOR; ON_ERROR general_on_error (); @@ -736,8 +732,8 @@ static FLD get_fields( REL relation) else { FOR (REQUEST_HANDLE tdgbl->handles_get_fields_req_handle1) - X IN RDB$RELATION_FIELDS CROSS Y IN RDB$FIELDS - WITH X.RDB$FIELD_SOURCE = Y.RDB$FIELD_NAME AND + X IN RDB$RELATION_FIELDS CROSS Y IN RDB$FIELDS + WITH X.RDB$FIELD_SOURCE = Y.RDB$FIELD_NAME AND X.RDB$RELATION_NAME EQ relation->rel_name field = (FLD) BURP_ALLOC_ZERO (sizeof (struct fld)); field->fld_number = count++; @@ -800,7 +796,7 @@ static FLD get_fields( REL relation) RFR IN RDB$RELATION_FIELDS WITH RFR.RDB$RELATION_NAME = relation->rel_name AND RFR.RDB$FIELD_NAME = X.RDB$FIELD_NAME - copy (RFR.RDB$SECURITY_CLASS, field->fld_security_class, GDS_NAME_LEN - 1); + copy (RFR.RDB$SECURITY_CLASS, field->fld_security_class, GDS_NAME_LEN - 1); END_FOR; ON_ERROR general_on_error (); @@ -808,14 +804,14 @@ static FLD get_fields( REL relation) if (tdgbl->BCK_capabilities & BCK_attributes_v3) FOR (REQUEST_HANDLE tdgbl->handles_get_fields_req_handle5) RF IN RDB$FIELDS WITH RF.RDB$FIELD_NAME = X.RDB$FIELD_SOURCE - /* use the fld_flags to mark the field as an array and + /* use the fld_flags to mark the field as an array and to differentiate it from other blobs */ if (RF.RDB$DIMENSIONS) { field->fld_flags |= FLD_array; field->fld_dimensions = RF.RDB$DIMENSIONS; if (field->fld_dimensions < 0) - BURP_error_redirect (NULL_PTR, 52, field->fld_name, NULL); + BURP_error_redirect ((STATUS*) NULL_PTR, 52, field->fld_name, NULL); /* msg 52 array dimension for field %s is invalid */ get_ranges (field); } @@ -826,10 +822,10 @@ static FLD get_fields( REL relation) if (tdgbl->BCK_capabilities & BCK_ods8) FOR (REQUEST_HANDLE tdgbl->handles_get_fields_req_handle6) X2 IN RDB$RELATION_FIELDS CROSS F2 IN RDB$FIELDS - WITH X2.RDB$FIELD_NAME = X.RDB$FIELD_NAME + WITH X2.RDB$FIELD_NAME = X.RDB$FIELD_NAME AND X2.RDB$RELATION_NAME EQ relation->rel_name AND X2.RDB$FIELD_SOURCE EQ F2.RDB$FIELD_NAME - + if (!X2.RDB$NULL_FLAG.NULL) { field->fld_null_flag = X2.RDB$NULL_FLAG; @@ -861,10 +857,10 @@ static FLD get_fields( REL relation) ON_ERROR general_on_error (); END_ERROR; - + field->fld_next = fields; fields = field; - + END_FOR; ON_ERROR general_on_error (); @@ -976,12 +972,12 @@ static SINT64 get_gen_id( TEXT * name) if (isc_compile_request(status_vector, GDS_REF(tdgbl->db_handle), - GDS_REF(gen_id_reqh), - blr_length, GDS_VAL(blr_buffer))) + (void**) GDS_REF(gen_id_reqh), + blr_length, (char*) GDS_VAL(blr_buffer))) /* if there's no gen_id, never mind ... */ return 0; - if (isc_start_request(status_vector, GDS_REF(gen_id_reqh), GDS_REF(isc_trans), /* use the same one generated by gpre */ + if (isc_start_request(status_vector, (void**) GDS_REF(gen_id_reqh), GDS_REF(isc_trans), /* use the same one generated by gpre */ 0)) BURP_error_redirect(status_vector, 25, NULL, NULL); /* msg 25 Failed in put_blr_gen_id */ @@ -989,7 +985,7 @@ static SINT64 get_gen_id( TEXT * name) if (tdgbl->BCK_capabilities & BCK_ods10) { if (isc_receive(status_vector, - GDS_REF(gen_id_reqh), + (void**) GDS_REF(gen_id_reqh), 0, sizeof(read_msg1), GDS_REF(read_msg1), @@ -1000,7 +996,7 @@ static SINT64 get_gen_id( TEXT * name) else { if (isc_receive(status_vector, - GDS_REF(gen_id_reqh), + (void**) GDS_REF(gen_id_reqh), 0, sizeof(read_msg0), GDS_REF(read_msg0), @@ -1010,7 +1006,7 @@ static SINT64 get_gen_id( TEXT * name) read_msg1 = (SINT64) read_msg0; } - isc_release_request(status_vector, GDS_REF(gen_id_reqh)); + isc_release_request(status_vector, (void**) GDS_REF(gen_id_reqh)); return read_msg1; } @@ -1025,7 +1021,7 @@ static void get_ranges( FLD field) ************************************** * * Functional description - * Fill in the range low and high bounds by reading + * Fill in the range low and high bounds by reading * the ranges in rdb$field_dimensions. * **************************************/ @@ -1041,24 +1037,24 @@ static void get_ranges( FLD field) /* Get the array dimensions in the rdb$field_dimensions */ FOR (REQUEST_HANDLE tdgbl->handles_get_ranges_req_handle1) - X IN RDB$FIELD_DIMENSIONS - WITH X.RDB$FIELD_NAME EQ field->fld_source - SORTED BY X.RDB$DIMENSION - + X IN RDB$FIELD_DIMENSIONS + WITH X.RDB$FIELD_NAME EQ field->fld_source + SORTED BY X.RDB$DIMENSION + if (count != X.RDB$DIMENSION) - BURP_error_redirect (NULL_PTR, 52, field->fld_name, NULL); + BURP_error_redirect ((STATUS*) NULL_PTR, 52, field->fld_name, NULL); /* msg 52 array dimension for field %s is invalid */ *rp++ = X.RDB$LOWER_BOUND; *rp++ = X.RDB$UPPER_BOUND; count++; - + END_FOR; ON_ERROR general_on_error (); END_ERROR; if (count != field->fld_dimensions) - BURP_error_redirect(NULL_PTR, 52, field->fld_name, NULL); + BURP_error_redirect((STATUS*) NULL_PTR, 52, field->fld_name, NULL); /* msg 52 array dimension for field %s is invalid */ } @@ -1067,7 +1063,7 @@ static void put_array( FLD field, REL relation, ISC_QUAD * blob_id) { /************************************** * - * p u t _ a r r a y + * p u t _ a r r a y * ************************************** * @@ -1089,7 +1085,7 @@ static void put_array( FLD field, REL relation, ISC_QUAD * blob_id) /* If the array is null, don't store it. It will be restored as null. */ - if (!blob_id->isc_quad_low && !blob_id->isc_quad_high) + if (!blob_id->gds_quad_low && !blob_id->gds_quad_high) return; xdr_buffer.lstr_allocated = 0; @@ -1177,9 +1173,9 @@ static void put_array( FLD field, REL relation, ISC_QUAD * blob_id) } if (isc_get_slice(status_vector, - GDS_REF(tdgbl->db_handle), GDS_REF(isc_trans), GDS_VAL(blob_id), blr_length, blr_buffer, 0, /* param length for subset of an array handling */ - (ULONG *) 0, /* param for subset of an array handling */ - slice_length, GDS_VAL(slice), GDS_REF(return_length))) + GDS_REF(tdgbl->db_handle), GDS_REF(isc_trans), GDS_VAL(blob_id), blr_length, (char*) blr_buffer, 0, /* param length for subset of an array handling */ + (SLONG *) 0, /* param for subset of an array handling */ + slice_length, GDS_VAL(slice), (SLONG*) GDS_REF(return_length))) { BURP_print(81, field->fld_name, NULL, NULL, NULL, NULL); /* msg 81 error accessing blob field %s -- continuing */ @@ -1285,7 +1281,7 @@ static void put_asciz( SCHAR attribute, TEXT * string) PUT(attribute); PUT(l); if (l) - (void) PUT_BLOCK(string, l); + (void) PUT_BLOCK((UCHAR*) string, l); } @@ -1312,7 +1308,7 @@ static void put_blob( FLD field, ISC_QUAD * blob_id, ULONG count) /* If the blob is null, don't store it. It will be restored as null. */ - if (!blob_id->isc_quad_high && !blob_id->isc_quad_low) + if (!blob_id->gds_quad_high && !blob_id->gds_quad_low) return; /* Open the blob and get it's vital statistics */ @@ -1336,7 +1332,7 @@ static void put_blob( FLD field, ISC_QUAD * blob_id, ULONG count) sizeof(blob_items), (SCHAR *) blob_items, sizeof(blob_info), - blob_info)) + (char*) blob_info)) { BURP_error_redirect(status_vector, 20, NULL, NULL); /* msg 20 isc_blob_info failed */ @@ -1350,9 +1346,9 @@ static void put_blob( FLD field, ISC_QUAD * blob_id, ULONG count) while ((item = *p++) != isc_info_end) { - l = (USHORT) isc_vax_integer(p, 2); + l = (USHORT) isc_vax_integer((char*) p, 2); p += 2; - n = (USHORT) isc_vax_integer(p, l); + n = (USHORT) isc_vax_integer((char*) p, l); p += l; switch (item) { @@ -1371,7 +1367,7 @@ static void put_blob( FLD field, ISC_QUAD * blob_id, ULONG count) break; default: - BURP_error_redirect(NULL_PTR, 21, (void *) item, NULL); + BURP_error_redirect((STATUS*) NULL_PTR, 21, (void *) item, NULL); /* msg 21 don't understand blob info item %ld */ } } @@ -1391,7 +1387,7 @@ static void put_blob( FLD field, ISC_QUAD * blob_id, ULONG count) GDS_REF(blob), GDS_REF(l), max_segment, - GDS_VAL(buffer))) + (char*) GDS_VAL(buffer))) { BURP_error_redirect(status_vector, 22, NULL, NULL); } @@ -1440,7 +1436,7 @@ static int put_blr_blob( SCHAR attribute, ISC_QUAD * blob_id) /* If the blob is null, don't store it. It will be restored as null. */ - if (!blob_id->isc_quad_high && !blob_id->isc_quad_low) + if (!blob_id->gds_quad_high && !blob_id->gds_quad_low) return FALSE; /* Open the blob and get it's vital statistics */ @@ -1462,7 +1458,7 @@ static int put_blr_blob( SCHAR attribute, ISC_QUAD * blob_id) sizeof(blr_items), (SCHAR *) blr_items, sizeof(blob_info), - blob_info)) + (char*) blob_info)) { BURP_error_redirect(status_vector, 20, NULL, NULL); /* msg 20 isc_blob_info failed */ @@ -1473,9 +1469,9 @@ static int put_blr_blob( SCHAR attribute, ISC_QUAD * blob_id) while ((item = *p++) != isc_info_end) { - l = (USHORT) isc_vax_integer(p, 2); + l = (USHORT) isc_vax_integer((char*) p, 2); p += 2; - n = (USHORT) isc_vax_integer(p, l); + n = (USHORT) isc_vax_integer((char*) p, l); p += l; switch (item) { @@ -1519,7 +1515,7 @@ static int put_blr_blob( SCHAR attribute, ISC_QUAD * blob_id) while (!isc_get_segment(status_vector, GDS_REF(blob), GDS_REF(l), - (USHORT) max_segment, GDS_VAL(buffer))) + (USHORT) max_segment, (char*) GDS_VAL(buffer))) { if (l) { @@ -1669,7 +1665,7 @@ static void put_data(REL relation) break; default: - BURP_error_redirect(NULL_PTR, 26, (void *) field->fld_type, NULL); + BURP_error_redirect((STATUS*) NULL_PTR, 26, (void *) field->fld_type, NULL); /* msg 26 datatype %ld not understood */ break; } @@ -1766,12 +1762,12 @@ static void put_data(REL relation) blr_length = blr - blr_buffer; if (isc_compile_request(status_vector, GDS_REF(tdgbl->db_handle), - GDS_REF(request), - blr_length, GDS_VAL(blr_buffer))) + (void**) GDS_REF(request), + blr_length, (SCHAR*) GDS_VAL(blr_buffer))) { BURP_error_redirect(status_vector, 27, NULL, NULL); /* msg 27 isc_compile_request failed */ - isc_print_blr(blr_buffer, NULL_PTR, NULL_PTR, 0); + isc_print_blr((char*) blr_buffer, (isc_callback)NULL_PTR, NULL_PTR, 0); } BURP_FREE(blr_buffer); @@ -1780,7 +1776,7 @@ static void put_data(REL relation) /* msg 142 writing data for relation %s */ if (isc_start_request(status_vector, - GDS_REF(request), + (void**) GDS_REF(request), GDS_REF(isc_trans), 0)) { @@ -1807,7 +1803,7 @@ static void put_data(REL relation) while (TRUE) { if (isc_receive(status_vector, - GDS_REF(request), + (void**) GDS_REF(request), 0, length, GDS_VAL(buffer), @@ -1874,7 +1870,7 @@ static void put_data(REL relation) BURP_verbose(108, (void *) records, NULL, NULL, NULL, NULL); /* msg 108 %ld records written */ - if (isc_release_request(status_vector, GDS_REF(request))) + if (isc_release_request(status_vector, (void**) GDS_REF(request))) BURP_error_redirect(status_vector, 30, NULL, NULL); /* msg 30 isc_release_request failed */ } @@ -1900,10 +1896,10 @@ static void put_index( REL relation) tdgbl = GET_THREAD_DATA; -/* if we have all capabilities, use the first request to get the - most performance out of the latest engine; if we don't - have one of the capabilities we must use the second set of - requests--this requires more code but it is well worth it +/* if we have all capabilities, use the first request to get the + most performance out of the latest engine; if we don't + have one of the capabilities we must use the second set of + requests--this requires more code but it is well worth it for the performance benefits, especially remotely--deej */ if ((tdgbl->BCK_capabilities & BCK_idx_inactive) && @@ -1911,54 +1907,54 @@ static void put_index( REL relation) (tdgbl->BCK_capabilities & BCK_ods8)) { FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle1) - X IN RDB$INDICES WITH + X IN RDB$INDICES WITH X.RDB$RELATION_NAME EQ relation->rel_name - + count = 0; FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle2) - I_S IN RDB$INDEX_SEGMENTS CROSS - RFR IN RDB$RELATION_FIELDS WITH - I_S.RDB$FIELD_NAME = RFR.RDB$FIELD_NAME AND - I_S.RDB$INDEX_NAME = X.RDB$INDEX_NAME AND - RFR.RDB$RELATION_NAME = relation->rel_name - + I_S IN RDB$INDEX_SEGMENTS CROSS + RFR IN RDB$RELATION_FIELDS WITH + I_S.RDB$FIELD_NAME = RFR.RDB$FIELD_NAME AND + I_S.RDB$INDEX_NAME = X.RDB$INDEX_NAME AND + RFR.RDB$RELATION_NAME = relation->rel_name + count++; - + END_FOR; ON_ERROR general_on_error (); END_ERROR; - - if (count != (ULONG) X.RDB$SEGMENT_COUNT) + + if (count != (ULONG) X.RDB$SEGMENT_COUNT) { BURP_print (180, X.RDB$INDEX_NAME, (void*) count, (void*) X.RDB$SEGMENT_COUNT, NULL, NULL); - continue; + continue; } - + PUT (rec_index); l = PUT_TEXT (att_index_name, X.RDB$INDEX_NAME); - MISC_terminate (X.RDB$INDEX_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$INDEX_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (151, temp, NULL, NULL, NULL, NULL); /* msg 151 writing index %s */ PUT_NUMERIC (att_segment_count, X.RDB$SEGMENT_COUNT); - PUT_NUMERIC (att_index_inactive, X.RDB$INDEX_INACTIVE); + PUT_NUMERIC (att_index_inactive, X.RDB$INDEX_INACTIVE); PUT_NUMERIC (att_index_unique_flag, X.RDB$UNIQUE_FLAG); - + FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle5) - Y IN RDB$INDEX_SEGMENTS WITH + Y IN RDB$INDEX_SEGMENTS WITH Y.RDB$INDEX_NAME EQ X.RDB$INDEX_NAME SORTED BY Y.RDB$FIELD_POSITION - + PUT_TEXT (att_index_field_name, Y.RDB$FIELD_NAME); - + END_FOR; ON_ERROR general_on_error (); END_ERROR; - + put_source_blob (att_index_description2, att_index_description, (ISC_QUAD *)&X.RDB$DESCRIPTION); PUT_NUMERIC (att_index_type, X.RDB$INDEX_TYPE); - + if (!X.RDB$EXPRESSION_SOURCE.NULL) put_source_blob (att_index_expression_source, att_index_expression_source, (ISC_QUAD *)&X.RDB$EXPRESSION_SOURCE); if (!X.RDB$EXPRESSION_BLR.NULL) @@ -1966,7 +1962,7 @@ static void put_index( REL relation) if (!X.RDB$FOREIGN_KEY.NULL) PUT_TEXT (att_index_foreign_key, X.RDB$FOREIGN_KEY); PUT (att_end); - + END_FOR; ON_ERROR general_on_error (); @@ -1975,49 +1971,49 @@ static void put_index( REL relation) else { FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle1) - X IN RDB$INDICES WITH + X IN RDB$INDICES WITH X.RDB$RELATION_NAME EQ relation->rel_name - + count = 0; FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle2) - I_S IN RDB$INDEX_SEGMENTS WITH + I_S IN RDB$INDEX_SEGMENTS WITH I_S.RDB$INDEX_NAME = X.RDB$INDEX_NAME match = FALSE; - + FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle3) - RFR IN RDB$RELATION_FIELDS WITH + RFR IN RDB$RELATION_FIELDS WITH I_S.RDB$FIELD_NAME = RFR.RDB$FIELD_NAME AND - RFR.RDB$RELATION_NAME = relation->rel_name + RFR.RDB$RELATION_NAME = relation->rel_name match = TRUE; END_FOR; ON_ERROR general_on_error (); END_ERROR; if (!match) - BURP_print (179, I_S.RDB$FIELD_NAME, X.RDB$INDEX_NAME, NULL, NULL, NULL); + BURP_print (179, I_S.RDB$FIELD_NAME, X.RDB$INDEX_NAME, NULL, NULL, NULL); else count++; END_FOR; ON_ERROR general_on_error (); END_ERROR; - - if (count != (ULONG) X.RDB$SEGMENT_COUNT) + + if (count != (ULONG) X.RDB$SEGMENT_COUNT) { BURP_print (180, X.RDB$INDEX_NAME, (void*) count, (void*) X.RDB$SEGMENT_COUNT, NULL, NULL); - continue; + continue; } - + PUT (rec_index); l = PUT_TEXT (att_index_name, X.RDB$INDEX_NAME); - MISC_terminate (X.RDB$INDEX_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$INDEX_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (151, temp, NULL, NULL, NULL, NULL); /* msg 151 writing index %s */ PUT_NUMERIC (att_segment_count, X.RDB$SEGMENT_COUNT); if (tdgbl->BCK_capabilities & BCK_idx_inactive) FOR (REQUEST_HANDLE tdgbl->handles_put_index_req_handle4) I IN RDB$INDICES WITH I.RDB$INDEX_NAME = X.RDB$INDEX_NAME - PUT_NUMERIC (att_index_inactive, I.RDB$INDEX_INACTIVE); + PUT_NUMERIC (att_index_inactive, I.RDB$INDEX_INACTIVE); END_FOR; ON_ERROR general_on_error (); @@ -2054,7 +2050,7 @@ static void put_index( REL relation) general_on_error (); END_ERROR; PUT (att_end); - + END_FOR; ON_ERROR general_on_error (); @@ -2089,7 +2085,7 @@ static int put_message( SCHAR attribute, TEXT * text, ULONG length) PUT(attribute); PUT(l); if (l) - (void) PUT_BLOCK(text, l); + (void) PUT_BLOCK((UCHAR*) text, l); return length; } @@ -2113,7 +2109,7 @@ static void put_numeric( SCHAR attribute, SLONG value) tdgbl = GET_THREAD_DATA; - vax_value = (SLONG) isc_vax_integer((UCHAR *) & value, sizeof(value)); + vax_value = (SLONG) isc_vax_integer((char *) & value, sizeof(value)); PUT(attribute); PUT(sizeof(value)); @@ -2245,7 +2241,7 @@ static void put_relation( REL relation) { PUT(rec_field); l = PUT_TEXT(att_field_name, field->fld_name); - MISC_terminate(field->fld_name, temp, l, sizeof(temp)); + MISC_terminate((UCHAR*) field->fld_name, (UCHAR*) temp, l, sizeof(temp)); BURP_verbose(144, temp, NULL, NULL, NULL, NULL); /* msg 144 writing field %s */ PUT_TEXT(att_field_source, field->fld_source); @@ -2363,7 +2359,7 @@ static int put_source_blob(SCHAR attribute, /* If the blob is null, don't store it. It will be restored as null. */ - if (!blob_id->isc_quad_high && !blob_id->isc_quad_low) + if (!blob_id->gds_quad_high && !blob_id->gds_quad_low) return FALSE; if (tdgbl->gbl_sw_old_descriptions && attribute != att_field_query_header) @@ -2388,7 +2384,7 @@ static int put_source_blob(SCHAR attribute, sizeof(source_items), (SCHAR *) source_items, sizeof(blob_info), - blob_info)) + (SCHAR*) blob_info)) { BURP_error_redirect(status_vector, 20, NULL, NULL); /* msg 20 isc_blob_info failed */ @@ -2399,9 +2395,9 @@ static int put_source_blob(SCHAR attribute, while ((item = *p++) != isc_info_end) { - l = (USHORT) isc_vax_integer(p, 2); + l = (USHORT) isc_vax_integer((SCHAR*) p, 2); p += 2; - n = (USHORT) isc_vax_integer(p, l); + n = (USHORT) isc_vax_integer((SCHAR*) p, l); p += l; switch (item) { @@ -2452,7 +2448,7 @@ static int put_source_blob(SCHAR attribute, GDS_REF(blob), GDS_REF(l), max_segment, - GDS_VAL(buffer))) + (SCHAR*) GDS_VAL(buffer))) { if (l) { @@ -2506,7 +2502,7 @@ static int put_text( SCHAR attribute, TEXT * text, SSHORT length) PUT(attribute); PUT(l); if (l) - (void) PUT_BLOCK(text, l); + (void) PUT_BLOCK((UCHAR*) text, l); return length; } @@ -2524,7 +2520,7 @@ static void put_trigger(enum trig_t type, * * Functional description * Write a trigger to the output file. - * NOTE: This is used backup pre-V3 triggers only + * NOTE: This is used backup pre-V3 triggers only * **************************************/ TGBL tdgbl; @@ -2552,7 +2548,7 @@ static void set_capabilities(void) ************************************** * * Functional description - * + * * set the capabilities bits for the * database being extracted to avoid * unpleasantness later. @@ -2574,7 +2570,7 @@ static void set_capabilities(void) { field = (TEXT *) rel_field_table->field; relation = (TEXT *) rel_field_table->relation; - FOR (REQUEST_HANDLE req) x IN RDB$RELATION_FIELDS + FOR (REQUEST_HANDLE req) x IN RDB$RELATION_FIELDS WITH x.RDB$RELATION_NAME = relation AND x.RDB$FIELD_NAME = field tdgbl->BCK_capabilities |= rel_field_table->bit_mask; @@ -2584,7 +2580,7 @@ static void set_capabilities(void) END_ERROR; } - isc_release_request(isc_status, GDS_REF(req)); + isc_release_request(isc_status, (void**) GDS_REF(req)); } @@ -2644,7 +2640,7 @@ static void write_character_sets(void) if (!X.RDB$FUNCTION_NAME.NULL) PUT_TEXT (att_charset_funct, X.RDB$FUNCTION_NAME); PUT_NUMERIC (att_charset_bytes_char, X.RDB$BYTES_PER_CHARACTER); - + PUT (att_end); END_FOR; ON_ERROR @@ -2660,13 +2656,13 @@ static void write_check_constraints(void) { /************************************** * - * w r i t e _ c h e c k _ c o n s t r a i n t s + * w r i t e _ c h e c k _ c o n s t r a i n t s * ************************************** * * Functional description * write a record in the burp file for - * each check constraint. + * each check constraint. * **************************************/ isc_req_handle req_handle1 = NULL; @@ -2678,7 +2674,7 @@ static void write_check_constraints(void) FOR (REQUEST_HANDLE req_handle1) X IN RDB$CHECK_CONSTRAINTS PUT (rec_chk_constraint); - + PUT_TEXT (att_chk_constraint_name, X.RDB$CONSTRAINT_NAME); if (!(X.RDB$TRIGGER_NAME.NULL)) PUT_TEXT (att_chk_trigger_name, X.RDB$TRIGGER_NAME); @@ -2725,7 +2721,7 @@ static void write_collations(void) put_source_blob (att_coll_description, att_coll_description, (ISC_QUAD *)&X.RDB$DESCRIPTION); if (!X.RDB$FUNCTION_NAME.NULL) PUT_TEXT (att_coll_funct, X.RDB$FUNCTION_NAME); - + PUT (att_end); END_FOR; ON_ERROR @@ -2747,7 +2743,7 @@ static void write_database( TEXT * dbb_file) * Functional description * write a physical database record and a * logical database record in the burp file for - * the database itself. + * the database itself. * **************************************/ STATUS status_vector[ISC_STATUS_LENGTH]; @@ -2767,7 +2763,7 @@ static void write_database( TEXT * dbb_file) if (isc_database_info(status_vector, GDS_REF(tdgbl->db_handle), sizeof(db_info_items), - (UCHAR *) db_info_items, sizeof(buffer), buffer)) + (SCHAR *) db_info_items, sizeof(buffer), buffer)) { BURP_error_redirect(status_vector, 31, NULL, NULL); /* msg 31 isc_database_info failed */ @@ -2837,10 +2833,10 @@ static void write_database( TEXT * dbb_file) PUT(rec_database); -/* if we have all capabilities, use the first request to get the - most performance out of the latest engine; if we don't - have one of the capabilities we must use the second set of - requests--this requires more code but it is well worth it +/* if we have all capabilities, use the first request to get the + most performance out of the latest engine; if we don't + have one of the capabilities we must use the second set of + requests--this requires more code but it is well worth it for the performance benefits, especially remotely--deej */ if ((tdgbl->BCK_capabilities & BCK_security) && @@ -2849,7 +2845,7 @@ static void write_database( TEXT * dbb_file) { FOR (REQUEST_HANDLE req_handle1) D IN RDB$DATABASE - + if (!D.RDB$SECURITY_CLASS.NULL) PUT_TEXT (att_database_security_class, D.RDB$SECURITY_CLASS); put_source_blob (att_database_description2, att_database_description, (ISC_QUAD *)&D.RDB$DESCRIPTION); @@ -2873,13 +2869,13 @@ static void write_database( TEXT * dbb_file) general_on_error (); END_ERROR; } - + if (tdgbl->BCK_capabilities & BCK_db_description) { FOR (REQUEST_HANDLE req_handle2) D IN RDB$DATABASE put_source_blob (att_database_description2, att_database_description, (ISC_QUAD *)&D.RDB$DESCRIPTION); - END_FOR; + END_FOR; ON_ERROR general_on_error (); END_ERROR; @@ -2897,22 +2893,22 @@ static void write_database( TEXT * dbb_file) END_ERROR; } } - + if (req_handle1) isc_release_request(req_status, &req_handle1); if (req_handle2) isc_release_request(req_status, &req_handle2); if (req_handle3) isc_release_request(req_status, &req_handle3); - + PUT(att_end); } -static void write_exceptions(void) +static void write_exceptions(void) { /************************************** - * + * * w r i t e _ e x c e p t i o n s * ************************************** @@ -2934,7 +2930,7 @@ static void write_exceptions(void) X IN RDB$EXCEPTIONS PUT (rec_exception); l = PUT_TEXT (att_exception_name, X.RDB$EXCEPTION_NAME); - MISC_terminate (X.RDB$EXCEPTION_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$EXCEPTION_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (198, temp, NULL, NULL, NULL, NULL); /* msg 198 writing exception %s */ PUT_MESSAGE (att_exception_msg, X.RDB$MESSAGE); @@ -2949,10 +2945,10 @@ static void write_exceptions(void) isc_release_request(req_status, &req_handle1); } -static void write_field_dimensions(void) +static void write_field_dimensions(void) { /************************************** - * + * * w r i t e _ f i e l d _ d i m e n s i o n s * ************************************** @@ -2983,13 +2979,13 @@ static void write_field_dimensions(void) if (req_handle1) isc_release_request(req_status, &req_handle1); -} +} -static void write_filters(void) +static void write_filters(void) { /************************************** - * + * * w r i t e _ f i l t e r s * ************************************** @@ -3011,7 +3007,7 @@ static void write_filters(void) X IN RDB$FILTERS PUT (rec_filter); l = PUT_TEXT (att_filter_name, X.RDB$FUNCTION_NAME); - MISC_terminate (X.RDB$FUNCTION_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$FUNCTION_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (145, temp, NULL, NULL, NULL, NULL); /* msg 145 writing filter %s */ put_source_blob (att_filter_description2, att_filter_description, (ISC_QUAD *)&X.RDB$DESCRIPTION); @@ -3029,10 +3025,10 @@ static void write_filters(void) isc_release_request(req_status, &req_handle1); } -static void write_functions(void) +static void write_functions(void) { /************************************** - * + * * w r i t e _ f u n c t i o n s * ************************************** @@ -3055,7 +3051,7 @@ static void write_functions(void) X IN RDB$FUNCTIONS PUT (rec_function); l = PUT_TEXT (att_function_name, X.RDB$FUNCTION_NAME); - MISC_terminate (X.RDB$FUNCTION_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$FUNCTION_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (147, temp, NULL, NULL, NULL, NULL); /* msg 147 writing function %.*s */ put_source_blob (att_function_description2, att_function_description, (ISC_QUAD *)&X.RDB$DESCRIPTION); @@ -3075,9 +3071,9 @@ static void write_functions(void) if (req_handle1) isc_release_request(req_status, &req_handle1); -} +} -static void write_function_args( GDS_NAME funcptr) +static void write_function_args( GDS_NAME funcptr) { /************************************** * @@ -3088,28 +3084,28 @@ static void write_function_args( GDS_NAME funcptr) * Functional description * write all arguments for a function. * - **************************************/ + **************************************/ SSHORT l; TEXT temp[32]; TGBL tdgbl; tdgbl = GET_THREAD_DATA; - /* if we have all capabilities, use the first request to get the - most performance out of the latest engine; if we don't - have one of the capabilities we must use the second set of - requests--this requires more code but it is well worth it + /* if we have all capabilities, use the first request to get the + most performance out of the latest engine; if we don't + have one of the capabilities we must use the second set of + requests--this requires more code but it is well worth it for the performance benefits, especially remotely--deej */ if (tdgbl->BCK_capabilities & BCK_ods10) { FOR (REQUEST_HANDLE tdgbl->handles_write_function_args_req_handle1) - X IN RDB$FUNCTION_ARGUMENTS WITH + X IN RDB$FUNCTION_ARGUMENTS WITH X.RDB$FUNCTION_NAME EQ funcptr - + PUT (rec_function_arg); l = PUT_TEXT (att_functionarg_name, X.RDB$FUNCTION_NAME); - MISC_terminate (X.RDB$FUNCTION_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$FUNCTION_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (141, temp, NULL, NULL, NULL, NULL); /* msg 141 writing argument for function %s */ PUT_NUMERIC (att_functionarg_position, X.RDB$ARGUMENT_POSITION); @@ -3120,7 +3116,7 @@ static void write_function_args( GDS_NAME funcptr) PUT_NUMERIC (att_functionarg_field_sub_type, X.RDB$FIELD_SUB_TYPE); if (!(X.RDB$CHARACTER_SET_ID.NULL)) PUT_NUMERIC (att_functionarg_character_set, X.RDB$CHARACTER_SET_ID); - + if (!(X.RDB$FIELD_PRECISION.NULL)) PUT_NUMERIC (att_functionarg_field_precision, X.RDB$FIELD_PRECISION); PUT (att_end); @@ -3132,12 +3128,12 @@ static void write_function_args( GDS_NAME funcptr) else { FOR (REQUEST_HANDLE tdgbl->handles_write_function_args_req_handle1) - X IN RDB$FUNCTION_ARGUMENTS WITH + X IN RDB$FUNCTION_ARGUMENTS WITH X.RDB$FUNCTION_NAME EQ funcptr - + PUT (rec_function_arg); l = PUT_TEXT (att_functionarg_name, X.RDB$FUNCTION_NAME); - MISC_terminate (X.RDB$FUNCTION_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$FUNCTION_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (141, temp, NULL, NULL, NULL, NULL); /* msg 141 writing argument for function %s */ PUT_NUMERIC (att_functionarg_position, X.RDB$ARGUMENT_POSITION); @@ -3146,27 +3142,27 @@ static void write_function_args( GDS_NAME funcptr) PUT_NUMERIC (att_functionarg_field_scale, X.RDB$FIELD_SCALE); PUT_NUMERIC (att_functionarg_field_length, X.RDB$FIELD_LENGTH); PUT_NUMERIC (att_functionarg_field_sub_type, X.RDB$FIELD_SUB_TYPE); - + if (tdgbl->BCK_capabilities & BCK_ods8) { FOR (REQUEST_HANDLE tdgbl->handles_write_function_args_req_handle2) - X2 IN RDB$FUNCTION_ARGUMENTS WITH - X2.RDB$FUNCTION_NAME EQ funcptr AND + X2 IN RDB$FUNCTION_ARGUMENTS WITH + X2.RDB$FUNCTION_NAME EQ funcptr AND X2.RDB$ARGUMENT_POSITION = X.RDB$ARGUMENT_POSITION; - + if (!(X2.RDB$CHARACTER_SET_ID.NULL)) PUT_NUMERIC (att_functionarg_character_set, X2.RDB$CHARACTER_SET_ID); /* Note that BCK_ods10 canNOT be set if we're in this ``else'' branch. Hence there is no need to test that bit and store the RDB$FIELD_PRECISION. */ - + END_FOR; ON_ERROR general_on_error (); END_ERROR; } PUT (att_end); - + END_FOR; ON_ERROR general_on_error (); @@ -3175,7 +3171,7 @@ static void write_function_args( GDS_NAME funcptr) } -static void write_generators(void) +static void write_generators(void) { /************************************** * @@ -3210,10 +3206,10 @@ static void write_generators(void) if (req_handle1) isc_release_request(req_status, &req_handle1); -} +} -static void write_global_fields(void) +static void write_global_fields(void) { /************************************** * @@ -3223,7 +3219,7 @@ static void write_global_fields(void) * * Functional description * write a record in the burp file for - * each global field. + * each global field. * **************************************/ SSHORT l; @@ -3235,10 +3231,10 @@ static void write_global_fields(void) tdgbl = GET_THREAD_DATA; - /* if we have all capabilities, use the first request to get the - most performance out of the latest engine; if we don't - have one of the capabilities we must use the second set of - requests--this requires more code but it is well worth it + /* if we have all capabilities, use the first request to get the + most performance out of the latest engine; if we don't + have one of the capabilities we must use the second set of + requests--this requires more code but it is well worth it for the performance benefits, especially remotely--deej */ if ((tdgbl->BCK_capabilities & BCK_attributes_v3) && @@ -3246,13 +3242,13 @@ static void write_global_fields(void) (tdgbl->BCK_capabilities & BCK_ods10)) { FOR (REQUEST_HANDLE req_handle1) - X IN RDB$FIELDS WITH - X.RDB$SYSTEM_FLAG NE 1 OR + X IN RDB$FIELDS WITH + X.RDB$SYSTEM_FLAG NE 1 OR X.RDB$SYSTEM_FLAG MISSING - + PUT (rec_global_field); l = PUT_TEXT (att_field_name, X.RDB$FIELD_NAME); - MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$FIELD_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (149, temp, NULL, NULL, NULL, NULL); /* msg 149 writing global field %.*s */ if (X.RDB$QUERY_NAME [0] != ' ') @@ -3275,10 +3271,10 @@ static void write_global_fields(void) if (X.RDB$SYSTEM_FLAG) PUT_NUMERIC (att_field_system_flag, X.RDB$SYSTEM_FLAG); put_source_blob (att_field_description2, att_field_description, (ISC_QUAD *)&X.RDB$DESCRIPTION); - + if (X.RDB$EXTERNAL_LENGTH) PUT_NUMERIC (att_field_external_length, X.RDB$EXTERNAL_LENGTH); - if (X.RDB$EXTERNAL_TYPE) + if (X.RDB$EXTERNAL_TYPE) PUT_NUMERIC (att_field_external_type, X.RDB$EXTERNAL_TYPE); if (X.RDB$EXTERNAL_SCALE) PUT_NUMERIC (att_field_external_scale, X.RDB$EXTERNAL_SCALE); @@ -3296,12 +3292,12 @@ static void write_global_fields(void) PUT_NUMERIC (att_field_character_set, X.RDB$CHARACTER_SET_ID); if (!(X.RDB$COLLATION_ID.NULL)) PUT_NUMERIC (att_field_collation_id, X.RDB$COLLATION_ID); - + if (!(X.RDB$FIELD_PRECISION.NULL)) PUT_NUMERIC (att_field_precision, X.RDB$FIELD_PRECISION); - + PUT (att_end); - + END_FOR; ON_ERROR general_on_error (); @@ -3310,13 +3306,13 @@ static void write_global_fields(void) else { FOR (REQUEST_HANDLE req_handle1) - X IN RDB$FIELDS WITH - X.RDB$SYSTEM_FLAG NE 1 OR + X IN RDB$FIELDS WITH + X.RDB$SYSTEM_FLAG NE 1 OR X.RDB$SYSTEM_FLAG MISSING - + PUT (rec_global_field); l = PUT_TEXT (att_field_name, X.RDB$FIELD_NAME); - MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$FIELD_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (149, temp, NULL, NULL, NULL, NULL); /* msg 149 writing global field %.*s */ if (X.RDB$QUERY_NAME [0] != ' ') @@ -3343,10 +3339,10 @@ static void write_global_fields(void) { FOR (REQUEST_HANDLE req_handle2) F IN RDB$FIELDS WITH F.RDB$FIELD_NAME = X.RDB$FIELD_NAME - + if (F.RDB$EXTERNAL_LENGTH) PUT_NUMERIC (att_field_external_length, F.RDB$EXTERNAL_LENGTH); - if (F.RDB$EXTERNAL_TYPE) + if (F.RDB$EXTERNAL_TYPE) PUT_NUMERIC (att_field_external_type, F.RDB$EXTERNAL_TYPE); if (F.RDB$EXTERNAL_SCALE) PUT_NUMERIC (att_field_external_scale, F.RDB$EXTERNAL_SCALE); @@ -3373,7 +3369,7 @@ static void write_global_fields(void) PUT_NUMERIC (att_field_character_set, F.RDB$CHARACTER_SET_ID); if (!(F.RDB$COLLATION_ID.NULL)) PUT_NUMERIC (att_field_collation_id, F.RDB$COLLATION_ID); - + if (tdgbl->BCK_capabilities & BCK_ods10) { FOR (REQUEST_HANDLE req_handle4) @@ -3408,10 +3404,10 @@ static void write_global_fields(void) } -static void write_procedures(void) +static void write_procedures(void) { /************************************** - * + * * w r i t e _ p r o c e d u r e s * ************************************** @@ -3434,7 +3430,7 @@ static void write_procedures(void) X IN RDB$PROCEDURES PUT (rec_procedure); l = PUT_TEXT (att_procedure_name, X.RDB$PROCEDURE_NAME); - MISC_terminate (X.RDB$PROCEDURE_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$PROCEDURE_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (193, temp, NULL, NULL, NULL, NULL); /* msg 193 writing stored procedure %.*s */ PUT_NUMERIC (att_procedure_inputs, X.RDB$PROCEDURE_INPUTS); @@ -3457,10 +3453,10 @@ static void write_procedures(void) if (req_handle1) isc_release_request(req_status, &req_handle1); -} +} -static void write_procedure_prms( GDS_NAME procptr) +static void write_procedure_prms( GDS_NAME procptr) { /************************************** * @@ -3471,7 +3467,7 @@ static void write_procedure_prms( GDS_NAME procptr) * Functional description * write all parameters of a stored procedure. * - **************************************/ + **************************************/ SSHORT l; TEXT temp[32]; @@ -3483,7 +3479,7 @@ static void write_procedure_prms( GDS_NAME procptr) X IN RDB$PROCEDURE_PARAMETERS WITH X.RDB$PROCEDURE_NAME EQ procptr PUT (rec_procedure_prm); l = PUT_TEXT (att_procedureprm_name, X.RDB$PARAMETER_NAME); - MISC_terminate (X.RDB$PARAMETER_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$PARAMETER_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (194, temp, NULL, NULL, NULL, NULL); /* msg 194 writing parameter %s for stored procedure */ PUT_NUMERIC (att_procedureprm_number, X.RDB$PARAMETER_NUMBER); @@ -3495,20 +3491,20 @@ static void write_procedure_prms( GDS_NAME procptr) ON_ERROR general_on_error (); END_ERROR; -} +} -static void write_ref_constraints(void) +static void write_ref_constraints(void) { /************************************** * - * w r i t e _ r e f _ c o n s t r a i n t s + * w r i t e _ r e f _ c o n s t r a i n t s * ************************************** * * Functional description * write a record in the burp file for - * each referential constraint. + * each referential constraint. * **************************************/ isc_req_handle req_handle1 = NULL; @@ -3535,17 +3531,17 @@ static void write_ref_constraints(void) isc_release_request(req_status, &req_handle1); } -static void write_rel_constraints(void) +static void write_rel_constraints(void) { /************************************** * - * w r i t e _ r e l _ c o n s t r a i n t s + * w r i t e _ r e l _ c o n s t r a i n t s * ************************************** * * Functional description * write a record in the burp file for - * each relation constraint. + * each relation constraint. * **************************************/ SSHORT l; @@ -3560,7 +3556,7 @@ static void write_rel_constraints(void) X IN RDB$RELATION_CONSTRAINTS PUT (rec_rel_constraint); l = PUT_TEXT (att_rel_constraint_name, X.RDB$CONSTRAINT_NAME); - MISC_terminate (X.RDB$CONSTRAINT_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$CONSTRAINT_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (207, temp, NULL, NULL, NULL, NULL); /* msg 207 writing constraint %s */ PUT_MESSAGE (att_rel_constraint_type, X.RDB$CONSTRAINT_TYPE); @@ -3579,7 +3575,7 @@ static void write_rel_constraints(void) isc_release_request(req_status, &req_handle1); } -static void write_relations(void) +static void write_relations(void) { /************************************** * @@ -3589,7 +3585,7 @@ static void write_relations(void) * * Functional description * write a record in the burp file for - * each relation. + * each relation. * **************************************/ SSHORT l, flags; @@ -3602,10 +3598,10 @@ static void write_relations(void) tdgbl = GET_THREAD_DATA; - /* if we have all capabilities, use the first request to get the - most performance out of the latest engine; if we don't - have one of the capabilities we must use the second set of - requests--this requires more code but it is well worth it + /* if we have all capabilities, use the first request to get the + most performance out of the latest engine; if we don't + have one of the capabilities we must use the second set of + requests--this requires more code but it is well worth it for the performance benefits, especially remotely--deej */ if ((tdgbl->BCK_capabilities & BCK_ods8) && @@ -3613,20 +3609,20 @@ static void write_relations(void) (tdgbl->BCK_capabilities & BCK_attributes_v3)) { FOR (REQUEST_HANDLE req_handle1) - X IN RDB$RELATIONS WITH X.RDB$SYSTEM_FLAG NE 1 OR + X IN RDB$RELATIONS WITH X.RDB$SYSTEM_FLAG NE 1 OR X.RDB$SYSTEM_FLAG MISSING - + flags = 0; PUT (rec_relation); l = put_text (att_relation_name, X.RDB$RELATION_NAME, 31); - MISC_terminate (X.RDB$RELATION_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$RELATION_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (153, temp, NULL, NULL, NULL, NULL); /* msg 153 writing relation %.*s */ - + /* RDB$VIEW_BLR must be the forst blob field in the backup file. * RESTORE.E makes this assumption in get_relation(). */ - + if (put_blr_blob (att_relation_view_blr, (ISC_QUAD *)&X.RDB$VIEW_BLR)) flags |= REL_view; if (X.RDB$SYSTEM_FLAG) @@ -3635,20 +3631,20 @@ static void write_relations(void) PUT_NUMERIC (att_relation_flags, X.RDB$FLAGS); if (!X.RDB$SECURITY_CLASS.NULL) PUT_TEXT (att_relation_security_class, X.RDB$SECURITY_CLASS); - + put_source_blob (att_relation_description2, att_relation_description, (ISC_QUAD *)&X.RDB$DESCRIPTION); put_source_blob (att_relation_view_source2, att_relation_view_source, (ISC_QUAD *)&X.RDB$VIEW_SOURCE); - + put_source_blob (att_relation_ext_description2, att_relation_ext_description, (ISC_QUAD *)&X.RDB$EXTERNAL_DESCRIPTION); put_text (att_relation_owner_name, X.RDB$OWNER_NAME, 31); if (!X.RDB$EXTERNAL_FILE.NULL) if (!tdgbl->gbl_sw_convert_ext_tables) { - put_text (att_relation_ext_file_name, X.RDB$EXTERNAL_FILE, 253); + put_text (att_relation_ext_file_name, X.RDB$EXTERNAL_FILE, 253); flags |= REL_external; } - - PUT (att_end); + + PUT (att_end); relation = (REL) BURP_ALLOC_ZERO (sizeof (struct rel)); relation->rel_next = tdgbl->relations; tdgbl->relations = relation; @@ -3664,20 +3660,20 @@ static void write_relations(void) else { FOR (REQUEST_HANDLE req_handle1) - X IN RDB$RELATIONS WITH X.RDB$SYSTEM_FLAG NE 1 OR + X IN RDB$RELATIONS WITH X.RDB$SYSTEM_FLAG NE 1 OR X.RDB$SYSTEM_FLAG MISSING - + flags = 0; PUT (rec_relation); l = put_text (att_relation_name, X.RDB$RELATION_NAME, 31); - MISC_terminate (X.RDB$RELATION_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$RELATION_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (153, temp, NULL, NULL, NULL, NULL); /* msg 153 writing relation %.*s */ - + /* RDB$VIEW_BLR must be the first blob field in the backup file. * RESTORE.E makes this assumption in get_relation(). */ - + if (put_blr_blob (att_relation_view_blr, (ISC_QUAD *)&X.RDB$VIEW_BLR)) flags |= REL_view; if (X.RDB$SYSTEM_FLAG) @@ -3716,7 +3712,7 @@ static void write_relations(void) { if (!tdgbl->gbl_sw_convert_ext_tables) { - put_text (att_relation_ext_file_name, R.RDB$EXTERNAL_FILE, 253); + put_text (att_relation_ext_file_name, R.RDB$EXTERNAL_FILE, 253); flags |= REL_external; } } @@ -3725,7 +3721,7 @@ static void write_relations(void) general_on_error (); END_ERROR; } - PUT (att_end); + PUT (att_end); relation = (REL) BURP_ALLOC_ZERO (sizeof (struct rel)); relation->rel_next = tdgbl->relations; tdgbl->relations = relation; @@ -3750,7 +3746,7 @@ static void write_relations(void) } -static void write_shadow_files(void) +static void write_shadow_files(void) { /************************************** * @@ -3771,12 +3767,12 @@ static void write_shadow_files(void) tdgbl = GET_THREAD_DATA; FOR (REQUEST_HANDLE req_handle1) - X IN RDB$FILES + X IN RDB$FILES WITH X.RDB$SHADOW_NUMBER NOT MISSING AND X.RDB$SHADOW_NUMBER NE 0 PUT (rec_files); l = PUT_TEXT (att_file_filename, X.RDB$FILE_NAME); - MISC_terminate (X.RDB$FILE_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$FILE_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (163, temp, NULL, NULL, NULL, NULL); /* msg 163 writing shadow file %s */ PUT_NUMERIC (att_file_sequence, X.RDB$FILE_SEQUENCE); @@ -3792,9 +3788,9 @@ static void write_shadow_files(void) if (req_handle1) isc_release_request(req_status, &req_handle1); -} +} -static void write_sql_roles(void) +static void write_sql_roles(void) { /************************************** * @@ -3804,7 +3800,7 @@ static void write_sql_roles(void) * * Functional description * write a record in the burp file for - * each SQL roles. + * each SQL roles. * **************************************/ isc_req_handle req_handle1 = NULL; @@ -3817,15 +3813,15 @@ static void write_sql_roles(void) FOR (REQUEST_HANDLE req_handle1) X IN RDB$ROLES - + PUT (rec_sql_roles); l = put_text (att_role_name, X.RDB$ROLE_NAME, 31); PUT_TEXT (att_role_owner_name, X.RDB$OWNER_NAME); PUT (att_end); - MISC_terminate (X.RDB$ROLE_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$ROLE_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (249, temp, NULL, NULL, NULL, NULL); /* msg 249 writing SQL role: %s */ - + END_FOR; ON_ERROR general_on_error (); @@ -3833,7 +3829,7 @@ static void write_sql_roles(void) if (req_handle1) isc_release_request(req_status, &req_handle1); -} +} static void write_triggers(void) { @@ -3855,25 +3851,25 @@ static void write_triggers(void) tdgbl = GET_THREAD_DATA; - /* if we have all capabilities, use the first request to get the - most performance out of the latest engine; if we don't - have one of the capabilities we must use the second set of - requests--this requires more code but it is well worth it + /* if we have all capabilities, use the first request to get the + most performance out of the latest engine; if we don't + have one of the capabilities we must use the second set of + requests--this requires more code but it is well worth it for the performance benefits, especially remotely--deej */ if (tdgbl->BCK_capabilities & BCK_ods8) { FOR (REQUEST_HANDLE req_handle1) - X IN RDB$TRIGGERS WITH - X.RDB$SYSTEM_FLAG NE 1 OR + X IN RDB$TRIGGERS WITH + X.RDB$SYSTEM_FLAG NE 1 OR X.RDB$SYSTEM_FLAG MISSING - + PUT (rec_trigger); l = PUT_TEXT (att_trig_name, X.RDB$TRIGGER_NAME); - MISC_terminate (X.RDB$TRIGGER_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$TRIGGER_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (156, temp, NULL, NULL, NULL, NULL); /* msg 156 writing trigger %s */ - + PUT_TEXT (att_trig_relation_name, X.RDB$RELATION_NAME); PUT_NUMERIC (att_trig_sequence, X.RDB$TRIGGER_SEQUENCE); PUT_NUMERIC (att_trig_type, X.RDB$TRIGGER_TYPE); @@ -3882,12 +3878,12 @@ static void write_triggers(void) put_source_blob (att_trig_description2, att_trig_description, (ISC_QUAD *)&X.RDB$DESCRIPTION); PUT_NUMERIC (att_trig_system_flag, X.RDB$SYSTEM_FLAG); PUT_NUMERIC (att_trig_inactive, X.RDB$TRIGGER_INACTIVE); - + if (!(X.RDB$FLAGS.NULL)) PUT_NUMERIC (att_trig_flags, X.RDB$FLAGS); - + PUT (att_end); - + END_FOR; ON_ERROR general_on_error (); @@ -3896,16 +3892,16 @@ static void write_triggers(void) else { FOR (REQUEST_HANDLE req_handle1) - X IN RDB$TRIGGERS WITH - X.RDB$SYSTEM_FLAG NE 1 OR + X IN RDB$TRIGGERS WITH + X.RDB$SYSTEM_FLAG NE 1 OR X.RDB$SYSTEM_FLAG MISSING - + PUT (rec_trigger); l = PUT_TEXT (att_trig_name, X.RDB$TRIGGER_NAME); - MISC_terminate (X.RDB$TRIGGER_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$TRIGGER_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (156, temp, NULL, NULL, NULL, NULL); /* msg 156 writing trigger %s */ - + PUT_TEXT (att_trig_relation_name, X.RDB$RELATION_NAME); PUT_NUMERIC (att_trig_sequence, X.RDB$TRIGGER_SEQUENCE); PUT_NUMERIC (att_trig_type, X.RDB$TRIGGER_TYPE); @@ -3914,24 +3910,24 @@ static void write_triggers(void) put_source_blob (att_trig_description2, att_trig_description, (ISC_QUAD *)&X.RDB$DESCRIPTION); PUT_NUMERIC (att_trig_system_flag, X.RDB$SYSTEM_FLAG); PUT_NUMERIC (att_trig_inactive, X.RDB$TRIGGER_INACTIVE); - + if (tdgbl->BCK_capabilities & BCK_ods8) { FOR (REQUEST_HANDLE req_handle2) - Y IN RDB$TRIGGERS WITH + Y IN RDB$TRIGGERS WITH X.RDB$TRIGGER_NAME = Y.RDB$TRIGGER_NAME - + if (!(Y.RDB$FLAGS.NULL)) PUT_NUMERIC (att_trig_flags, Y.RDB$FLAGS); - + END_FOR; ON_ERROR general_on_error (); END_ERROR; } - + PUT (att_end); - + END_FOR; ON_ERROR general_on_error (); @@ -3945,7 +3941,7 @@ static void write_triggers(void) } -static void write_trigger_messages(void) +static void write_trigger_messages(void) { /************************************** * @@ -3970,10 +3966,10 @@ static void write_trigger_messages(void) T IN RDB$TRIGGERS CROSS X IN RDB$TRIGGER_MESSAGES OVER RDB$TRIGGER_NAME WITH T.RDB$SYSTEM_FLAG NE 1 OR T.RDB$SYSTEM_FLAG MISSING; - + PUT (rec_trigger_message); l = PUT_TEXT (att_trigmsg_name, X.RDB$TRIGGER_NAME); - MISC_terminate (X.RDB$TRIGGER_NAME, temp, l, sizeof (temp)); + MISC_terminate ((UCHAR*) X.RDB$TRIGGER_NAME, (UCHAR*) temp, l, sizeof (temp)); BURP_verbose (157, temp, NULL, NULL, NULL, NULL); /* msg 157 writing trigger message for *s */ PUT_NUMERIC (att_trigmsg_number, X.RDB$MESSAGE_NUMBER); @@ -3988,10 +3984,10 @@ static void write_trigger_messages(void) isc_release_request(req_status, &req_handle1); } -static void write_types(void) +static void write_types(void) { /************************************** - * + * * w r i t e _ t y p e s * ************************************** @@ -4004,11 +4000,11 @@ static void write_types(void) isc_req_handle req_handle1 = NULL; long req_status[20]; TGBL tdgbl; - + tdgbl = GET_THREAD_DATA; FOR (REQUEST_HANDLE req_handle1) - X IN RDB$TYPES WITH X.RDB$SYSTEM_FLAG NE 1 OR + X IN RDB$TYPES WITH X.RDB$SYSTEM_FLAG NE 1 OR X.RDB$SYSTEM_FLAG MISSING PUT (rec_type); PUT_TEXT (att_type_name, X.RDB$TYPE_NAME); @@ -4027,10 +4023,10 @@ static void write_types(void) if (req_handle1) isc_release_request(req_status, &req_handle1); -} +} -static void write_user_privileges(void) +static void write_user_privileges(void) { /************************************** * @@ -4048,16 +4044,16 @@ static void write_user_privileges(void) isc_req_handle req_handle1 = NULL; long req_status[20]; TGBL tdgbl; - + tdgbl = GET_THREAD_DATA; - + if (tdgbl->BCK_capabilities & BCK_ods8) { FOR (REQUEST_HANDLE req_handle1) X IN RDB$USER_PRIVILEGES PUT (rec_user_privilege); l = PUT_TEXT (att_priv_user, X.RDB$USER); - MISC_terminate (X.RDB$USER, temp, l, sizeof(temp)); + MISC_terminate ((UCHAR*) X.RDB$USER, (UCHAR*) temp, l, sizeof(temp)); BURP_verbose (152, temp, NULL, NULL, NULL, NULL); /* msg 152 writing privilege for user %s */ PUT_TEXT (att_priv_grantor, X.RDB$GRANTOR); @@ -4080,7 +4076,7 @@ static void write_user_privileges(void) X IN RDB$USER_PRIVILEGES PUT (rec_user_privilege); l = PUT_TEXT (att_priv_user, X.RDB$USER); - MISC_terminate (X.RDB$USER, temp, l, sizeof(temp)); + MISC_terminate ((UCHAR*) X.RDB$USER, (UCHAR*) temp, l, sizeof(temp)); BURP_verbose (152, temp, NULL, NULL, NULL, NULL); /* msg 152 writing privilege for user %s */ PUT_TEXT (att_priv_grantor, X.RDB$GRANTOR); @@ -4098,4 +4094,4 @@ static void write_user_privileges(void) if (req_handle1) isc_release_request(req_status, &req_handle1); -} \ No newline at end of file +} diff --git a/src/burp/restore.e b/src/burp/restore.e deleted file mode 100644 index 2a9caa2d73..0000000000 --- a/src/burp/restore.e +++ /dev/null @@ -1,7158 +0,0 @@ -/* - * PROGRAM: JRD Backup and Restore Program - * MODULE: restore.e - * DESCRIPTION: Restore routine - * - * The contents of this file are subject to the Interbase Public - * License Version 1.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy - * of the License at http://www.Inprise.com/IPL.html - * - * Software distributed under the License is distributed on an - * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express - * or implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code was created by Inprise Corporation - * and its predecessors. Portions created by Inprise Corporation are - * Copyright (C) Inprise Corporation. - * - * All Rights Reserved. - * Contributor(s): ______________________________________. - * Toni Martir: Verbose records restored as RESTORE_VERBOSE_INTERVAL, - * also verbose restoring indexes as DEFERRED when verbose - * - * 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE" - * conditionals, as the engine now fully supports - * readonly databases. - */ -/* -$Id: restore.e,v 1.2 2001-07-10 17:35:13 awharrison Exp $ -*/ - -#include "../jrd/ib_stdio.h" -#include -#include -#include "../burp/burp.h" -#include "../jrd/align.h" -#include "../jrd/common.h" -#include "../jrd/flags.h" -#include "../jrd/license.h" -#include "../jrd/obj.h" -#include "../jrd/ods.h" -#include "../burp/burp_proto.h" -#include "../burp/canon_proto.h" -#include "../burp/misc_proto.h" -#include "../burp/mvol_proto.h" -#include "../burp/resto_proto.h" -#include "../intl/charsets.h" -#include "../jrd/gdsassert.h" -#include "../remote/protocol.h" - -/* For netware the follow DB handle is #defined to be a value stored */ -/* in thread data. This is also done for other statics generated by */ -/* GPRE. This is to avoid multiple threading problems with module */ -/* level statics. */ -DATABASE DB = STATIC FILENAME "yachts.lnk"; - -#define DB tdgbl->db_handle -#define gds__trans tdgbl->tr_handle -#define isc_status tdgbl->status - -/*** -#define DEBUG 1 -***/ - -#define STUFF(byte) {*blr++ = (UCHAR) (byte);} -#define STUFF_WORD(word) {STUFF (word); STUFF ((word) >> 8);} -#define STUFF_LONG(lword) {STUFF_WORD (lword); STUFF_WORD ((lword) >> 16);} -#define STUFF_INT64(i64) {STUFF_LONG (i64); STUFF_LONG ((i64) >> 32);} - -#define DB_VERSION_DDL4 4 /* ods4 db */ -#define DB_VERSION_DDL5 5 /* ods5 db */ -#define DB_VERSION_DDL8 8 /* ods8 db */ -#define DB_VERSION_CURRENT DB_VERSION_DDL8 /* v4.0 is ods8 */ -#define FOREIGN_KEY "FOREIGN KEY" - -#define DEFERRED_ACTIVE 3 /* RDB$INDEX_INACTIVE setting for Foreign Keys - * This setting is used temporarily while - * restoring a database. This was required - * in order to differentiate a partial - * "inactive" state of SOME indices from - * "inactive" state of ALL indices (gbak -i) - * -bsriram, 11-May-1999 BUG: 10016 - */ - -#define RESTORE_VERBOSE_INTERVAL 10000 -#define cvtbl_len 28 -static CONST struct s_t_cvtbl { - SSHORT sub_type; - SSHORT character_set_id; - SSHORT collation_id; -} sub_type_cvtbl[] = { - /* NOTE: The magic numbers for collation_id come from ordinal - * position of the COLLATION() entries in jrd/intlnames.h - */ - 101, CS_DOS_437, 1, /* PDOX_ASCII */ - 102, CS_DOS_437, 2, /* PDOX_INTL */ - 106, CS_DOS_437, 3, /* PDOX_SWEDFIN */ - 160, CS_DOS_850, 0, /* codepoint collation */ - 107, CS_DOS_865, 0, /* codepoint collation */ - 105, CS_DOS_865, 1, /* PDOX_NORDAN4 */ - 139, CS_LATIN1, 1, /* DA_DA */ - 140, CS_LATIN1, 2, /* DU_NL */ - 141, CS_LATIN1, 3, /* FI_FI */ - 142, CS_LATIN1, 4, /* FR_FR */ - 143, CS_LATIN1, 5, /* FR_CA */ - 144, CS_LATIN1, 6, /* DE_DE */ - 145, CS_LATIN1, 7, /* IS_IS */ - 146, CS_LATIN1, 8, /* IT_IT */ - 148, CS_LATIN1, 9, /* NO_NO */ - 149, CS_LATIN1, 10, /* ES_ES */ - 151, CS_LATIN1, 11, /* SV_SV */ - 152, CS_LATIN1, 12, /* EN_UK */ - 153, CS_LATIN1, 14, /* EN_US */ - 154, CS_LATIN1, 15, /* PT_PT */ - 180, CS_NEXT, 1, /* NXT_US */ - 181, CS_NEXT, 2, /* NXT_GERMANY */ - 182, CS_NEXT, 3, /* NXT_FRANCE */ - 183, CS_NEXT, 4, /* NXT_ITALY */ - 184, CS_NEXT, 5, /* NXT_SPAIN */ - 201, CS_UNICODE_FSS, 0, /* codepoint collation */ - 220, CS_SJIS, 0, /* codepoint collation */ - 230, CS_EUCJ, 0 /* codepoint collation */ -}; - -static void add_files(UCHAR *); -static void bad_attribute(UCHAR, ATT_TYPE, USHORT); -static USHORT check_db_version(void); -static void create_database(UCHAR *); -static void decompress(UCHAR *, USHORT); -static void eat_blob(void); -static REL find_relation(TEXT *); -static int get_acl(TEXT *, ISC_QUAD *, ISC_QUAD *); -static void get_array(REL, UCHAR *); -static void get_blob(FLD, UCHAR *); -static void get_blr_blob(ISC_QUAD *, USHORT); -static BOOLEAN get_character_set(void); -static BOOLEAN get_chk_constraint(void); -static BOOLEAN get_collation(void); -static REC_TYPE get_data(REL); -static BOOLEAN get_exception(void); -static FLD get_field(REL); -static BOOLEAN get_field_dimensions(void); -static BOOLEAN get_files(void); -static BOOLEAN get_filter(void); -static BOOLEAN get_function(void); -static void get_function_arg(GDS_NAME); -static BOOLEAN get_generator(void); -static BOOLEAN get_global_field(void); -static BOOLEAN get_index(REL); -static void get_misc_blob(ISC_QUAD *, USHORT, USHORT); -static SLONG get_numeric(void); -static SINT64 get_int64(void); -static BOOLEAN get_procedure(void); -static BOOLEAN get_procedure_prm(GDS_NAME); -static BOOLEAN get_ref_constraint(void); -static BOOLEAN get_rel_constraint(void); -static BOOLEAN get_relation(void); -static BOOLEAN get_relation_data(void); -static BOOLEAN get_sql_roles(void); -static BOOLEAN get_security_class(void); -static void get_source_blob(ISC_QUAD *, USHORT); -static USHORT get_text(TEXT *, ULONG); -static BOOLEAN get_trigger(void); -static BOOLEAN get_trigger_message(void); -static BOOLEAN get_trigger_old(REL); -static BOOLEAN get_type(void); -static BOOLEAN get_user_privilege(void); -static BOOLEAN get_view(REL); -static void ignore_array(REL); -static void ignore_blob(void); -static REC_TYPE ignore_data(REL); -static void realign(UCHAR *, REL); -static USHORT recompute_length(REL); -static BOOLEAN restore(TEXT *, TEXT *); -static void restore_security_class(TEXT *, TEXT *); -static void store_blr_gen_id(GDS_NAME, SINT64); -static void stuff_string(SCHAR **, TEXT *); -static void update_global_field(void); -static void general_on_error(void); -static BOOLEAN bug_8183(TGBL); - -static UCHAR debug_on = 0; /* able to turn this on in the debugger */ - -static USHORT flag_on_line = TRUE; /* indicates whether we will bring - the database on-line : - TRUE - we will - FALSE - we will not */ -#ifdef sparc -static CONST SSHORT old_sparcs[] = - { 0, 0, 0, 2, 0, 0, 0, 0, 2, 4, 4, 4, 8, 8, 0, 0, 8, 8, 8 }; -#endif - -#define GET() (--(tdgbl->io_cnt) >= 0 ? *(tdgbl->io_ptr)++ : MVOL_read (&tdgbl->io_cnt, &tdgbl->io_ptr)) -#define GET_SKIP(n) MVOL_skip_block (tdgbl, n) -#define GET_BLOCK(p,n) MVOL_read_block (tdgbl, (p), (n)) -#define GET_ATTRIBUTE(att) ((att) = (ATT_TYPE) GET()) -#define GET_RECORD(att) ((att) = (REC_TYPE) GET()) - -/* When skipping started, scan_next_attr will be changed from NO_SKIP */ -/* to BEFORE_SKIP. When scanning for next valid attribute after skipping, */ -/* it will flip-flop between BEFORE_SKIP and AFTER_SKIP. When next valid */ -/* attribute is found, it will be changed back to NO_SKIP by 'SKIP_SCAN' */ - -#define NO_SKIP 0 /* Not in skipping and scanning mode */ -#define BEFORE_SKIP 1 /* After skipping, before scanning next byte for valid attribute */ -#define AFTER_SKIP 2 /* After skipping and after scanning next byte for valid attribute */ - -#define SKIP_INIT (scan_next_attr = NO_SKIP) -#define SKIP_SCAN (scan_next_attr == AFTER_SKIP ? \ - scan_next_attr = BEFORE_SKIP : \ - scan_next_attr == BEFORE_SKIP ? \ - scan_next_attr = NO_SKIP : 0) -/* User Privilege Flags */ - -#define USER_PRIV_USER 1 -#define USER_PRIV_GRANTOR 2 -#define USER_PRIV_PRIVILEGE 4 -#define USER_PRIV_GRANT_OPTION 8 -#define USER_PRIV_OBJECT_NAME 16 -#define USER_PRIV_FIELD_NAME 32 -#define USER_PRIV_USER_TYPE 64 -#define USER_PRIV_OBJECT_TYPE 128 - - - -int RESTORE_restore( TEXT * file_name, TEXT * database_name) -{ -/************************************** - * - * R E S T O R E _ r e s t o r e - * - ************************************** - * - * Functional description - * Recreate a database from a backup. - * - **************************************/ - int cumul_count_kb; - REL relation; - PRC procedure; - isc_req_handle req_handle1 = NULL, req_handle2 = NULL, req_handle4 = NULL; - long req_status[20]; - TGBL tdgbl; - long db_handle; - UCHAR dpb[128], *d, *q; - SSHORT l; - isc_req_handle req_handle3 = NULL; - TEXT index_name[32]; - long error_code; - - tdgbl = GET_THREAD_DATA; - - tdgbl->io_ptr = (UCHAR *) NULL; - tdgbl->io_cnt = 0; - - tdgbl->relations = (REL) NULL; - tdgbl->procedures = (PRC) 0; - tdgbl->RESTORE_format = 0; - tdgbl->global_trans = 0; - - tdgbl->gbl_sw_transportable = tdgbl->gbl_sw_compress = FALSE; - - if (!restore(file_name, database_name)) - return FINI_ERROR; - - BURP_verbose(76, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); -/* msg 76 creating indexes */ - - COMMIT; - ON_ERROR - /* Fix for bug_no 8055: - don't throw away the database just because an index - could not be made */ - while (error_code = tdgbl->status_vector[1]) - { - switch (error_code) - { - case gds__sort_mem_err: - case gds__no_dup: - strcpy(index_name, (TEXT *)tdgbl->status_vector[3]); - BURP_print_status(tdgbl->status_vector); - FOR (REQUEST_HANDLE req_handle3) - IDX IN RDB$INDICES WITH IDX.RDB$INDEX_NAME EQ index_name - { - BURP_verbose(243,index_name,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); - MODIFY IDX USING IDX.RDB$INDEX_INACTIVE = TRUE; - } - BURP_print(240, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 240 Index \"%s\" failed to activate because: */ - if ( error_code == gds__no_dup ) - { - BURP_print(241, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 241 The unique index has duplicate values or NULLs */ - BURP_print(242, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 242 Delete or Update duplicate values or NULLs, and activate index with */ - } - else - { - BURP_print(244, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 244 Not enough disk space to create the sort file for an index */ - BURP_print(245, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 245 Set the TMP environment variable to a directory on a filesystem that does have enough space, and activate index with */ - } - BURP_print(243, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 243 ALTER INDEX \"%s\" ACTIVE; */ - END_MODIFY; - END_FOR; - /* don't bring the database on-line */ - flag_on_line = FALSE; - break; - default: - general_on_error (); - break; - } - COMMIT - ON_ERROR - continue; - END_ERROR - } - END_ERROR; -/* Activate the indices for foreign keys and do another commit */ - if (!(tdgbl->gbl_sw_deactivate_indexes)) { - - /* Block added to verbose index creation by Toni Martir */ - if (tdgbl->gbl_sw_verbose) { - EXEC SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED - NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - - /* Activate first indexes that are not foreign keys */ - FOR (REQUEST_HANDLE req_handle1) IDS IN RDB$INDICES WITH - IDS.RDB$INDEX_INACTIVE EQ DEFERRED_ACTIVE AND - IDS.RDB$FOREIGN_KEY MISSING - MODIFY IDS USING IDS.RDB$INDEX_INACTIVE=FALSE; - END_MODIFY; - ON_ERROR - general_on_error(); - END_ERROR; - - SAVE - /* existing ON_ERROR continues past error, beck */ - ON_ERROR - BURP_print (173, IDS.RDB$INDEX_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - BURP_print_status (tdgbl->status); - MODIFY IDS USING - IDS.RDB$INDEX_INACTIVE = TRUE; - END_MODIFY; - ON_ERROR - general_on_error (); - END_ERROR; - END_ERROR; - BURP_verbose(122,IDS.RDB$INDEX_NAME,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - if (req_handle1) - isc_release_request(req_status, &req_handle1); - COMMIT; - ON_ERROR - general_on_error (); - END_ERROR; - } - - - EXEC SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - - /* Only activate Foreign keys that have been marked for deferred - * activation. - * -bsriram, 11-May-1999 BUG: 10016 - */ - FOR (REQUEST_HANDLE req_handle1) - CNST IN RDB$RELATION_CONSTRAINTS - CROSS IDS IN RDB$INDICES WITH - CNST.RDB$CONSTRAINT_TYPE EQ FOREIGN_KEY AND - CNST.RDB$INDEX_NAME EQ IDS.RDB$INDEX_NAME AND - IDS.RDB$INDEX_INACTIVE EQ DEFERRED_ACTIVE - - - MODIFY IDS USING - IDS.RDB$INDEX_INACTIVE = FALSE; - END_MODIFY; - ON_ERROR - general_on_error (); - END_ERROR; - - SAVE - /* existing ON_ERROR continues past error, beck */ - ON_ERROR - BURP_print (173, IDS.RDB$INDEX_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - BURP_print_status (tdgbl->status); - MODIFY IDS USING - IDS.RDB$INDEX_INACTIVE = TRUE; - END_MODIFY; - ON_ERROR - general_on_error (); - END_ERROR; - END_ERROR; - BURP_verbose(122,IDS.RDB$INDEX_NAME,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - if (req_handle1) - isc_release_request(req_status, &req_handle1); - COMMIT; - ON_ERROR - general_on_error (); - END_ERROR; - } - - if (tdgbl->global_trans) - { - EXEC SQL COMMIT TRANSACTION tdgbl->global_trans; - if (gds__status[1]) - general_on_error(); - /* Check to see if there is a warning */ - if (gds__status[0] == gds_arg_gds && - gds__status[1] == 0 && - gds__status[2] != gds_arg_end) - { - BURP_print_warning(gds__status); - } - } - - EXEC SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; -/* -** Change ownership of any procedures necessary -*/ - - for (procedure = tdgbl->procedures; procedure; - procedure = procedure->prc_next) - if (procedure->prc_owner[0]) - FOR (REQUEST_HANDLE req_handle4) - X IN RDB$PROCEDURES WITH X.RDB$PROCEDURE_NAME EQ procedure->prc_name - - MODIFY X - strcpy (X.RDB$OWNER_NAME, procedure->prc_owner); - END_MODIFY; - ON_ERROR - if (req_handle4) - isc_release_request (req_status, &req_handle4); - general_on_error (); - END_ERROR; - - restore_security_class (procedure->prc_owner, X.RDB$SECURITY_CLASS); - - END_FOR; - ON_ERROR - if (req_handle4) - { - isc_release_request(req_status, &req_handle4); - } - general_on_error (); - END_ERROR; - - if (req_handle4) - isc_release_request(req_status, &req_handle4); - -/* Change ownership of any relations necessary */ - - for (relation = tdgbl->relations; relation; relation = relation->rel_next) - if (relation->rel_owner[0]) - FOR (REQUEST_HANDLE req_handle2) - X IN RDB$RELATIONS WITH X.RDB$RELATION_NAME EQ relation->rel_name - MODIFY X - strcpy (X.RDB$OWNER_NAME, relation->rel_owner); - END_MODIFY; - ON_ERROR - if (req_handle2) - isc_release_request (req_status, &req_handle2); - general_on_error (); - END_ERROR; - - restore_security_class (relation->rel_owner, X.RDB$SECURITY_CLASS); - restore_security_class (relation->rel_owner, X.RDB$DEFAULT_CLASS); - - END_FOR; - ON_ERROR - if (req_handle2) - isc_release_request (req_status, &req_handle2); - general_on_error (); - END_ERROR; - if (req_handle2) - isc_release_request(req_status, &req_handle2); - -/* Now that changing ownership of tables is over, it is safe to - update the database security class in RDB$DATABASE */ - - if (tdgbl->database_security_class[0]) { /* Do it only if it's not NULL */ - FOR (REQUEST_HANDLE req_handle1) - X IN RDB$DATABASE - MODIFY X USING - strncpy(X.RDB$SECURITY_CLASS, tdgbl->database_security_class, - sizeof(X.RDB$SECURITY_CLASS)); - END_MODIFY; - ON_ERROR - if (req_handle1) - isc_release_request (req_status, &req_handle1); - general_on_error (); - END_ERROR; - END_FOR; - ON_ERROR - if (req_handle1) - isc_release_request (req_status, &req_handle1); - general_on_error (); - END_ERROR; - - if (req_handle1) - isc_release_request(req_status, &req_handle1); - } - - COMMIT; - ON_ERROR - general_on_error (); - END_ERROR; - -/* Check to see if there is a warning */ - if (gds__status[0] == gds_arg_gds && gds__status[1] == 0 - && gds__status[2] != gds_arg_end) - BURP_print_warning(gds__status); - - BURP_verbose(88, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); -/* msg 88 finishing, closing, and going home */ - - MVOL_fini_read(&cumul_count_kb); - -/* attach database again to put it online */ - - d = dpb; - *d++ = (UCHAR) gds__dpb_version1; - - if (flag_on_line) { - *d++ = (UCHAR) gds__dpb_online; - *d++ = 0; - } - - if (tdgbl->gbl_sw_user) { - *d++ = (UCHAR) gds__dpb_user_name; - *d++ = (UCHAR) strlen(tdgbl->gbl_sw_user); - for (q = tdgbl->gbl_sw_user; *q;) - *d++ = *q++; - } - - if (tdgbl->gbl_sw_password) { - if (!tdgbl->gbl_sw_service_thd) - *d++ = (UCHAR) gds__dpb_password; - else - *d++ = (UCHAR) gds__dpb_password_enc; - *d++ = (UCHAR) strlen(tdgbl->gbl_sw_password); - for (q = tdgbl->gbl_sw_password; *q;) - *d++ = *q++; - } - -/* set sync writes to engine default */ - *d++ = (UCHAR) gds__dpb_force_write; - *d++ = 1; - *d++ = (UCHAR) tdgbl->hdr_forced_writes; /* set forced writes to the value which was in the header */ - - l = d - dpb; - db_handle = 0; - if (isc_attach_database(tdgbl->status_vector, 0, GDS_VAL(database_name), - (isc_db_handle *) GDS_REF(db_handle), l, dpb)) - general_on_error(); - if (isc_detach_database - (tdgbl->status_vector, - (isc_db_handle *) GDS_REF(db_handle))) general_on_error(); - - FINISH; - ON_ERROR - general_on_error (); - END_ERROR; - - if (!flag_on_line) { - BURP_print(246, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 246 Database is not online due to failure to activate one or more indices. */ - BURP_print(247, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 247 Run gfix -online to bring database online without active indices. */ - return FINI_DB_NOT_ONLINE; - } - -/* If the database is to be restored ReadOnly, set it to read_only now! */ - if (tdgbl->gbl_sw_mode == TRUE && tdgbl->gbl_sw_mode_val == TRUE) { - BURP_verbose(280, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 280: setting database to read-only access */ - - d = dpb; - *d++ = (UCHAR) gds__dpb_version1; - if (tdgbl->gbl_sw_user) { - *d++ = (UCHAR) gds__dpb_user_name; - *d++ = (UCHAR) strlen(tdgbl->gbl_sw_user); - for (q = tdgbl->gbl_sw_user; *q;) - *d++ = *q++; - } - - if (tdgbl->gbl_sw_password) { - if (!tdgbl->gbl_sw_service_thd) - *d++ = (UCHAR) gds__dpb_password; - else - *d++ = (UCHAR) gds__dpb_password_enc; - *d++ = (UCHAR) strlen(tdgbl->gbl_sw_password); - for (q = tdgbl->gbl_sw_password; *q;) - *d++ = *q++; - } - - *d++ = (UCHAR) isc_dpb_set_db_readonly; - *d++ = 1; - *d++ = TRUE; /* set database to readOnly mode */ - l = d - dpb; - db_handle = 0; - if (isc_attach_database - (tdgbl->status_vector, 0, GDS_VAL(database_name), - (isc_db_handle *) GDS_REF(db_handle), l, dpb)) - general_on_error(); - if (isc_detach_database - (tdgbl->status_vector, (isc_db_handle *) GDS_REF(db_handle))) - general_on_error(); - - } - - return FINI_OK; -} - - -static void add_files( UCHAR * file_name) -{ -/************************************** - * - * a d d _ f i l e s - * - ************************************** - * - * Functional description - * This should be a multi-file database. - * Store files and starting - * addresses & commit this much. - * - **************************************/ - SLONG start, count; - FIL file; - isc_req_handle req_handle1 = NULL; - long req_status[20]; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - -/* store the RDB$FILES records */ - - start = 201; - count = 0; - - for (file = tdgbl->gbl_sw_files; file; file = file->fil_next) { - if (strcmp(file->fil_name, file_name)) { - count++; - STORE (REQUEST_HANDLE req_handle1) - X IN RDB$FILES - strcpy (X.RDB$FILE_NAME, file->fil_name); - X.RDB$FILE_START = start; - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - if (req_handle1) - isc_release_request(req_status, &req_handle1); - BURP_verbose(57, file->fil_name, (void *) start, NULL_PTR, - NULL_PTR, NULL_PTR); - /* msg 57 adding file %s, starting at page %ld */ - } - else if (((signed long) file->fil_length) >= start - 1) - ((signed long) file->fil_length) -= start - 1; - else { - BURP_print(96, (void *) file->fil_length, (void *) (start - 1), - NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 96 length given for initial file (%ld) is less than minimum (%ld) */ - file->fil_length = 0; - } - - start += file->fil_length; - } - - if (count) { - BURP_verbose(70, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 70 committing secondary files */ - COMMIT - /* existing ON_ERROR continues past error, beck */ - ON_ERROR - BURP_print (174, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 174 cannot commit files */ - BURP_print_status (tdgbl->status_vector); - ROLLBACK; - ON_ERROR - general_on_error (); - END_ERROR; - END_ERROR; - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - } -} - - -static void bad_attribute( - UCHAR scan_next_attr, - ATT_TYPE bad_attr, USHORT type) -{ -/************************************** - * - * b a d _ a t t r i b u t e - * - ************************************** - * - * Functional description - * We ran into an unsupported attribute. - * but it isn't the end of the world. - * We will try to skip some bad data and - * look for next valid attribute to continue the process. - * - **************************************/ - SSHORT skip_l; - TEXT t_name[128]; - SLONG skip_count; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - skip_count = 0; - - if (!tdgbl->gbl_sw_skip_count) { - gds__msg_format(NULL_PTR, 12, type, sizeof(t_name), t_name, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - BURP_print(80, t_name, (void *) bad_attr, NULL_PTR, NULL_PTR, - NULL_PTR); - /* msg 80 don't recognize %s attribute %ld -- continuing */ - skip_l = GET(); - if (skip_l) - GET_SKIP(skip_l); - } - else { - if (scan_next_attr == NO_SKIP) { - skip_count = tdgbl->gbl_sw_skip_count; - GET_SKIP(skip_count); - BURP_print(203, (void *) skip_count, (void *) bad_attr, NULL_PTR, - NULL_PTR, NULL_PTR); - /*msg 203: skipped %d bytes after reading a bad attribute %d */ - } - else { - skip_count++; - BURP_print(205, (void *) skip_count, (void *) bad_attr, NULL_PTR, - NULL_PTR, NULL_PTR); - /* msg 205: skipped %d bytes looking for next valid attribute, encountered attribute %d */ - } - scan_next_attr = AFTER_SKIP; - } -} - - -static USHORT check_db_version(void) -{ -/************************************** - * - * c h e c k _ d b _ v e r s i o n - * - ************************************** - * - * Functional description - * Find the version number of the database. - * - **************************************/ - USHORT db_version; - isc_req_handle req_handle1 = NULL, req_handle2 = NULL; - long req_status[20]; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - db_version = DB_VERSION_DDL4; - FOR (REQUEST_HANDLE req_handle1) - FIRST 1 X IN RDB$RELATIONS - WITH X.RDB$RELATION_NAME = "RDB$TRIGGERS" - db_version = DB_VERSION_DDL5; - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - if (req_handle1) - isc_release_request(req_status, &req_handle1); - FOR (REQUEST_HANDLE req_handle2) - FIRST 1 X IN RDB$RELATIONS - WITH X.RDB$RELATION_NAME = "RDB$PROCEDURES" - db_version = DB_VERSION_DDL8; - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - if (req_handle2) - isc_release_request(req_status, &req_handle2); - - return db_version; -} - - -static void create_database( UCHAR * file_name) -{ -/************************************** - * - * c r e a t e _ d a t a b a s e - * - ************************************** - * - * Functional description - * create the new database, looking - * to see if there are any interesting - * things to do. - * - **************************************/ - SSHORT l; - STATUS status_vector[ISC_STATUS_LENGTH]; - REC_TYPE record; - ATT_TYPE attribute; - UCHAR dpb[128], *d, *q; - ULONG page_size, sweep_interval, page_buffers; - USHORT no_reserve, forced_writes; - TGBL tdgbl; - USHORT SQL_dialect; - BOOLEAN db_read_only, SQL_dialect_flag = FALSE; - - tdgbl = GET_THREAD_DATA; - -/* Get (physical) database record */ - - page_size = DEFAULT_PAGE_SIZE; - sweep_interval = -1; - no_reserve = FALSE; - db_read_only = FALSE; - forced_writes = 2; /* default for the current platform */ - page_buffers = 0; - - if (GET_RECORD(record) == rec_physical_db) { - while (GET_ATTRIBUTE(attribute) != att_end) - switch (attribute) { - case att_SQL_dialect: - SQL_dialect_flag = (USHORT) TRUE; - SQL_dialect = get_numeric(); - break; - - case att_page_size: - page_size = get_numeric(); - break; - - case att_sweep_interval: - sweep_interval = get_numeric(); - break; - - case att_forced_writes: - forced_writes = (USHORT) get_numeric(); - break; - - case att_no_reserve: - no_reserve = (USHORT) get_numeric(); - break; - - case att_db_read_only: - db_read_only = (UCHAR) get_numeric(); - break; - - case att_page_buffers: - page_buffers = get_numeric(); - break; - - default: - l = GET(); - if (l) - GET_SKIP(l); - break; - } - GET_RECORD(record); - } - - if (record != rec_database) - BURP_error_redirect(NULL_PTR, 32, 0, 0); -/* msg 32 Expected database description record */ - - if (tdgbl->gbl_sw_page_size && (tdgbl->gbl_sw_page_size < page_size)) { - BURP_print(110, (void *) page_size, (void *) tdgbl->gbl_sw_page_size, - NULL_PTR, NULL_PTR, NULL_PTR); -/* msg 110 Reducing the database page size from %ld bytes to %ld bytes */ - } - - if (tdgbl->gbl_sw_page_size) - page_size = tdgbl->gbl_sw_page_size; - - tdgbl->hdr_forced_writes = forced_writes; - - if (tdgbl->gbl_sw_no_reserve) - no_reserve = tdgbl->gbl_sw_no_reserve; - -/* Override attribute setting with user requirement */ - if (tdgbl->gbl_sw_mode == TRUE) - db_read_only = tdgbl->gbl_sw_mode_val; - else { - /* No access mode specified by user. Use attribute settings. Since the - * database is set to readOnly only after making it Online in - * RESTORE_restore(), pass on this information through Global structures */ - tdgbl->gbl_sw_mode = TRUE; - tdgbl->gbl_sw_mode_val = db_read_only; - } - - if (tdgbl->gbl_sw_page_buffers) - page_buffers = tdgbl->gbl_sw_page_buffers; - - d = dpb; - *d++ = (UCHAR) isc_dpb_version1; - *d++ = (UCHAR) isc_dpb_page_size; - *d++ = 2; - *d++ = 0; - *d++ = (UCHAR) (page_size >> 8); - *d++ = (UCHAR) isc_dpb_gbak_attach; - *d++ = (UCHAR) strlen(GDS_VERSION); - for (q = GDS_VERSION; *q;) - *d++ = *q++; - - if (sweep_interval != -1) { - *d++ = (UCHAR) isc_dpb_sweep_interval; - *d++ = 4; - *d++ = (UCHAR) sweep_interval; - *d++ = (UCHAR) (sweep_interval >> 8); - *d++ = (UCHAR) (sweep_interval >> 16); - *d++ = (UCHAR) (sweep_interval >> 24); - } -/* If the database is to be restored "read_only", fillup the data pages */ - if (no_reserve || db_read_only) - { - *d++ = (UCHAR) isc_dpb_no_reserve; - *d++ = 1; - *d++ = TRUE; - } - if (tdgbl->gbl_sw_user) { - *d++ = (UCHAR) isc_dpb_user_name; - *d++ = (UCHAR) strlen(tdgbl->gbl_sw_user); - for (q = tdgbl->gbl_sw_user; *q;) - *d++ = *q++; - } - if (tdgbl->gbl_sw_password) { - if (!tdgbl->gbl_sw_service_thd) - *d++ = (UCHAR) isc_dpb_password; - else - *d++ = (UCHAR) isc_dpb_password_enc; - *d++ = (UCHAR) strlen(tdgbl->gbl_sw_password); - for (q = tdgbl->gbl_sw_password; *q;) - *d++ = *q++; - } - if (page_buffers) { - *d++ = (UCHAR) isc_dpb_set_page_buffers; - *d++ = 4; - *d++ = (UCHAR) page_buffers; - *d++ = (UCHAR) (page_buffers >> 8); - *d++ = (UCHAR) (page_buffers >> 16); - *d++ = (UCHAR) (page_buffers >> 24); - } - -/* Turn off sync writes during restore */ - *d++ = (UCHAR) isc_dpb_force_write; - *d++ = 1; - *d++ = 0; - -/* -** -** which SQL dialect that this database speaks -** When we restore backup files that came from prior -** to V6, we force the SQL database dialect to 1 -** -*/ - - *d++ = (UCHAR) isc_dpb_sql_dialect; - *d++ = 1; - if (SQL_dialect_flag == TRUE) - *d++ = (UCHAR) SQL_dialect; - else - *d++ = (UCHAR) SQL_DIALECT_V5; - -/* start database up shut down */ - *d++ = (UCHAR) isc_dpb_shutdown; - *d++ = 1; - *d++ = (UCHAR) isc_dpb_shut_attachment; - *d++ = (UCHAR) isc_dpb_shutdown_delay; - *d++ = 2; - *d++ = 0; - *d++ = 0; - - l = d - dpb; - - if (isc_create_database(status_vector, - 0, - GDS_VAL(file_name), - GDS_REF(tdgbl->db_handle), l, dpb, 0)) { - BURP_error_redirect(status_vector, 33, file_name, 0); -/* msg 33 failed to create database %s */ - } - - if (tdgbl->gbl_sw_version) { - BURP_print(139, file_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 139 Version(s) for database "%s" */ - isc_version(&tdgbl->db_handle, BURP_output_version, "\t%s\n"); - } - - BURP_verbose(74, file_name, (void *) page_size, NULL_PTR, NULL_PTR, - NULL_PTR); -/* msg 74 created database %s, page_size %ld bytes */ -} - - -static void decompress( UCHAR * buffer, USHORT length) -{ -/************************************** - * - * d e c o m p r e s s - * - ************************************** - * - * Functional description - * Get a number of compressed bytes. - * - **************************************/ - UCHAR c, *p, *end; - SSHORT count; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - p = buffer; - end = p + length; - - while (p < end) { - /* This change was made to restore National Semi-Conductor's corrupted */ - /* gbak file and it is in the code base now. -Andrew */ - - count = (SCHAR) GET(); - if (count > 0) { - if (end - p < count) { - BURP_print(202, (void *) count, (void *) (end - p), NULL_PTR, - NULL_PTR, NULL_PTR); - /* msg 202: adjusting a decompression length error: invalid length %d was adjusted to %d */ - count = end - p; - } - p = GET_BLOCK(p, count); - } - else if (count < 0) { - if (end + count < p) { - BURP_print(202, (void *) count, (void *) (p - end), NULL_PTR, - NULL_PTR, NULL_PTR); - /* msg 202: adjusting a decompression length error: invalid length %d was adjusted to %d */ - count = p - end; - } - c = GET(); - memset(p, c, -count); - p += -count; - } - } - - if (p > end) - BURP_error_redirect(NULL_PTR, 34, 0, 0); - /* msg 34 RESTORE: decompression length error */ -} - - -static void eat_blob(void) -{ -/************************************** - * - * e a t _ b l o b - * - ************************************** - * - * Functional description - * Discard a blob from backup file - * - **************************************/ - SLONG length; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - length = get_numeric(); - - GET_SKIP(length); -} - - -static REL find_relation( TEXT * name) -{ -/************************************** - * - * f i n d _ r e l a t i o n - * - ************************************** - * - * Functional description - * Given a relation name, find the relation block. If there isn't - * one, produce a fatal error. - * - **************************************/ - TEXT *p, *q; - REL relation; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - for (relation = tdgbl->relations; relation; relation = relation->rel_next) - for (p = relation->rel_name, q = name; *p == *q; p++, q++) - if (!*p) - return relation; - - BURP_error_redirect(NULL_PTR, 35, name, 0); -/* msg 35 can't find relation %s */ - - return NULL; -} - - -static void general_on_error(void) -{ -/************************************** - * - * g e n e r a l _ o n _ e r r o r - * - ************************************** - * - * Functional description - * Handle any general ON_ERROR clause during restore. - * - **************************************/ - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - BURP_print_status(tdgbl->status); - BURP_abort(); -} - - -static int get_acl( - TEXT * owner_nm, - ISC_QUAD * blob_id, ISC_QUAD * new_blob_id) -{ -/************************************** - * - * g e t _ a c l - * - ************************************** - * - * Functional description - * - * open the blob that contains the ACL list - * get the ACL list of a relation - * replace the owner of the relation in the ACL list with - * the creator of the relation - * create a new blob - * store the new ACL list in the new blob - * - **************************************/ - - static CONST SCHAR blr_items[] = { - isc_info_blob_max_segment, - isc_info_blob_total_length, - isc_info_blob_num_segments - }; - STATUS status_vector[ISC_STATUS_LENGTH]; - SLONG length, n; - SLONG *blob; - UCHAR *p, blob_info[32], item, *buffer, static_buffer[1024], - *new_buffer, *end_buffer; - USHORT l, max_segment, num_segments, new_len = 0; - TGBL tdgbl; - UCHAR *c_1, *from, *to, owner_nm_len; - SLONG id_person_len, cnt; - isc_blob_handle blob_handle = NULL; - - tdgbl = GET_THREAD_DATA; - new_buffer = NULL_PTR; - -/* If the blob is null, don't store it. It will be restored as null. */ - - if (!blob_id->isc_quad_high && !blob_id->isc_quad_low) - return FALSE; - -/* Open the blob and get it's vital statistics */ - - blob = NULL; - - if (isc_open_blob(status_vector, GDS_REF(tdgbl->db_handle), - GDS_REF(gds__trans), GDS_REF(blob), GDS_VAL(blob_id))) - /* msg 24 gds__open_blob failed */ - BURP_error_redirect(status_vector, 24, NULL, NULL); - - if (isc_blob_info(status_vector, GDS_REF(blob), sizeof(blr_items), - (UCHAR *) blr_items, sizeof(blob_info), blob_info)) - /* msg 20 gds__blob_info failed */ - BURP_error_redirect(status_vector, 20, NULL, NULL); - - length = 0; - p = blob_info; - - while ((item = *p++) != gds__info_end) { - l = (USHORT) gds__vax_integer(p, 2); - p += 2; - n = gds__vax_integer(p, l); - p += l; - switch (item) { - case isc_info_blob_max_segment: - max_segment = (USHORT) n; - break; - - case isc_info_blob_total_length: - length = n; - break; - - case isc_info_blob_num_segments: - num_segments = (USHORT) n; - /* - ** we assume that the ACL list was written out as - ** in one big segment - ** - */ - if (num_segments > 1) - assert(num_segments > 1); - break; - - default: - /* msg 79 don't understand blob info item %ld */ - BURP_print(79, (void *) item, NULL, NULL, NULL, NULL); - return FALSE; - } - } - - if (!length) { - if (isc_close_blob(status_vector, GDS_REF(blob))) - /* msg 23 gds__close_blob failed */ - BURP_error_redirect(status_vector, 23, NULL, NULL); - return FALSE; - } - -/* Rdb sometimes gets the length messed up */ - - if (length < max_segment) - length = max_segment; - -/* -** Allocate a buffer large enough for the largest segment and start -** grinding. -*/ - - if (!max_segment || max_segment <= sizeof(static_buffer)) - buffer = static_buffer; - else - buffer = BURP_ALLOC(max_segment); - - isc_get_segment(status_vector, - GDS_REF(blob), GDS_REF(l), max_segment, GDS_VAL(buffer)); - - if (isc_close_blob(status_vector, GDS_REF(blob))) { - if (buffer != static_buffer) - BURP_FREE(buffer); - /* msg 23 gds__close_blob failed */ - BURP_error_redirect(status_vector, 23, NULL, NULL); - } - - from = buffer + 3; /* skip ACL_version, ACL_id_list, and id_person */ - id_person_len = (int) *from; - - c_1 = owner_nm; - owner_nm_len = strlen(owner_nm); - - new_buffer = BURP_ALLOC(length - id_person_len + owner_nm_len); - - from = buffer; - to = new_buffer; - *to++ = *from++; /* copy ACL_verion */ - *to++ = *from++; /* copy ACL_id_list */ - *to++ = *from++; /* copy id_person */ - *to++ = owner_nm_len; - new_len = new_len + 4; - from = buffer + id_person_len + 4; - for (cnt = 0; cnt < owner_nm_len; cnt++) { - *to++ = *c_1++; - new_len++; - } - - end_buffer = buffer + length; - for (from = buffer + id_person_len + 4; from < end_buffer; from++) { - *to++ = *from; - new_len++; - } - - if (isc_create_blob2(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(gds__trans), - GDS_REF(blob_handle), - GDS_VAL(new_blob_id), 0, NULL)) { - if (buffer != static_buffer) - BURP_FREE(buffer); - if (new_buffer != NULL_PTR) - BURP_FREE(new_buffer); - /* msg 37 gds__create_blob failed */ - BURP_error_redirect(status_vector, 37, 0, 0); - } - - if (isc_put_segment(status_vector, - GDS_REF(blob_handle), new_len, GDS_VAL(new_buffer))) { - if (buffer != static_buffer) - BURP_FREE(buffer); - if (new_buffer != NULL_PTR) - BURP_FREE(new_buffer); - /* msg 38 gds__put_segment failed */ - BURP_error_redirect(status_vector, 38, 0, 0); - } - - if (isc_close_blob(status_vector, GDS_REF(blob_handle))) { - if (buffer != static_buffer) - BURP_FREE(buffer); - if (new_buffer != NULL_PTR) - BURP_FREE(new_buffer); - /* msg 23 gds__close_blob failed */ - BURP_error_redirect(status_vector, 23, 0, 0); - } - - if (buffer != static_buffer) - BURP_FREE(buffer); - - if (new_buffer != NULL_PTR) - BURP_FREE(new_buffer); - - return TRUE; -} - - -static void get_array( REL relation, UCHAR * record_buffer) -{ -/************************************** - * - * g e t _ a r r a y - * - ************************************** - * - * Functional description - * Read array data from input file to nice, - * shiney, new array. - * - **************************************/ - FLD field; - ATT_TYPE attribute; - STATUS status_vector[ISC_STATUS_LENGTH]; - SLONG last_element_dim[MAX_DIMENSION]; - SLONG fld_ranges[2 * MAX_DIMENSION]; - SLONG *blob_id, return_length, slice_length, *range, *end_ranges, lcount; - USHORT blr_length, count, field_number, field_length; - UCHAR *buffer, *p; - SCHAR *blr, blr_buffer[200]; /* enough for a sdl with 16 dimensions */ - LSTRING xdr_buffer, xdr_slice; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - -/* don't free something you don't allocate */ - - xdr_buffer.lstr_allocated = 0; - -/* Pick up attributes */ - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_blob_data) - switch (attribute) { - case att_blob_field_number: - field_number = (USHORT) get_numeric(); - for (field = relation->rel_fields; field; field = field->fld_next) - if (field->fld_number == field_number) - break; - if (!field) - BURP_error_redirect(NULL_PTR, 36, 0, 0); - /* msg 36 Can't find field for blob */ - - field_length = field->fld_length; - if (field->fld_type == blr_varying) - field_length += sizeof(USHORT); - slice_length = field_length; - /** - Copy the ranges onto a buffer and let the program - mess with the copy rather than the original - **/ - memcpy(fld_ranges, field->fld_ranges, sizeof(fld_ranges)); - break; - - case att_array_dimensions: - field->fld_dimensions = (SSHORT) get_numeric(); - end_ranges = fld_ranges + 2 * field->fld_dimensions; - for (range = fld_ranges; range < end_ranges; range += 2) { - if (GET_ATTRIBUTE(attribute) != att_array_range_low) - bad_attribute(scan_next_attr, attribute, 58); - /* msg 58 array */ - else - range[0] = get_numeric(); - if (GET_ATTRIBUTE(attribute) != att_array_range_high) - bad_attribute(scan_next_attr, attribute, 58); - /* msg 58 array */ - else - range[1] = get_numeric(); - slice_length *= (range[1] - range[0] + 1); - } - break; - - default: - bad_attribute(scan_next_attr, attribute, 58); - /* msg 58 array */ - break; - } - - return_length = GET(); - return_length |= GET() << 8; - return_length |= GET() << 16; - return_length |= GET() << 24; - - blob_id = (SLONG *) ((UCHAR *) record_buffer + field->fld_offset); - - if (return_length != slice_length) { - int current_dim, divisor, elements_remaining; - int data_at, elements_written, upper, lower, dont_write; - int i1, i2, i3; - /* Ugh! The full array wasn't returned and versions of gbak prior to - V3.2I don't explicitly signal this. We must recompute the top - element to restore. - - Double Ugh! gbak (Versions prior to 5.0) while backing up calculates - the top dimensions incorrectly So whatever was written as top dimensions - is useless. 5.0 gbak has written correct dimensions, but what the heck - we'll calculate it again - */ - - elements_remaining = return_length / field_length; - /** - Backup (versions prior to 5.0) has surely written wrong dimensions. - Ignore whatever is read in fld_ranges and calculate the dimensions - of the last element. field->fld_ranges has the max dimensions. - last_element_dim holds only the upper bounds of each dimension. - **/ - for (i1 = 0, i3 = 0; i1 < field->fld_dimensions; i1++) { - divisor = 1; - for (i2 = (2 * (i1 + 1) + 1); i2 <= field->fld_dimensions * 2; - i2 += 2) - divisor *= - (field->fld_ranges[i2] - field->fld_ranges[i2 - 1] + 1); - last_element_dim[i1] = - (elements_remaining - 1) / divisor + field->fld_ranges[i3]; - elements_remaining -= - (last_element_dim[i1] - field->fld_ranges[i3]) * divisor; - i3 += 2; - } -#ifdef DEBUG - ib_fprintf(ib_stderr, - "\nLast element upper bounds read from backup file:\n"); - for (current_dim = 1; current_dim < field->fld_dimensions * 2; - current_dim += 2) - ib_fprintf(ib_stderr, "%d ", fld_ranges[current_dim]); - ib_fprintf(ib_stderr, "\nCalculated Last element upper bounds :\n"); - for (current_dim = 0; current_dim < field->fld_dimensions; - current_dim++) - ib_fprintf(ib_stderr, "%d ", last_element_dim[current_dim]); - ib_fprintf(ib_stderr, "return_length = %d\n", return_length); - ib_fprintf(ib_stderr, "elements_returned = %d\n", - return_length / field_length); - ib_fprintf(ib_stderr, "Max dims["); - for (current_dim = 1; current_dim < field->fld_dimensions * 2; - current_dim += 2) - ib_fprintf(ib_stderr, "%d ", field->fld_ranges[current_dim]); - ib_fprintf(ib_stderr, "]"); -#endif - data_at = 0; - /** - We have an irregurlar shaped slice to write. The following for loop - chops the array into writable rectangular/square slice and sends it - to the engine. When the loop cycles through all dimensions, we would - have written the whole of the irregular slice. - **/ - for (current_dim = 0; current_dim < field->fld_dimensions; - current_dim++) { - blr = blr_buffer; - dont_write = 0; - - /* build the sdl */ - - STUFF(gds__sdl_version1); - - STUFF(gds__sdl_struct); - STUFF(1); - - if (field->fld_type == blr_text || field->fld_type == blr_varying) { - if (field->fld_type == blr_text) - STUFF(blr_text2) - else - STUFF(blr_varying2); - STUFF_WORD(field->fld_character_set_id); - STUFF_WORD(field->fld_length); - } - else if (field->fld_type == blr_short || - field->fld_type == blr_long || - field->fld_type == blr_quad) { - STUFF(field->fld_type); - STUFF(field->fld_scale); - } - else - STUFF(field->fld_type); - - - STUFF(gds__sdl_relation); - stuff_string(&blr, relation->rel_name); - STUFF(gds__sdl_field); - stuff_string(&blr, field->fld_name); - - /* each element spec starts here */ - -#ifdef DEBUG - ib_fprintf(ib_stderr, "\nBounds written ["); -#endif - elements_written = 1; - end_ranges = field->fld_ranges + 2 * field->fld_dimensions; - /** - Here is the important work. Calculate the the bounds to be written - so that the resulting slice is a rectangular/square slice. - For a 2 dimensional array of size 1..N, 1..M, which is partially - filled, we have already calculated the dims of last element. Say - if this was x,y (x is row, y is column) then we do - isc_put_slice(1..x-1, 1..M); - isc_put_slice(x..x, 1..y); - similarly for a 3D array [N,M,K] whose last element dims are (x,y,z) - isc_put_slice(1..x-1, 1..M, 1..K); - isc_put_slice(x..x, 1..y-1, 1..K); - isc_put_slice(x..x, y..y, 1..z); - This is applicable for any number of dimensions. - Special cases: - for example in case of a 2D array (10,10) and if the last element - dims were (1,2), we would just do a isc_put_slice(1..1, 1..2). - This is applied for any number of dimensions. - **/ - for (range = field->fld_ranges, count = 0; range < end_ranges; - range += 2, count++) { - STUFF(gds__sdl_do2); - STUFF(count); - /** - Normally we loop through all dimensions chopping off slices - and writing them. This works fine but this also means that - we blindly put slices without actually figuring out if we - really need to do so. For eg: if we have a 2D array of - size [10,4] and the last element dims are [6,4] then all - we need to do is is to put one slice as - isc_put_slice(1..6,1..4) - rather than looping through the dimensions and putting - isc_put_slice(1..5,1..4) - isc_put_slice(6..6,1..4) - we could extend this logic to any no of dims. The following - if condition figures out such cases. This combined with - the Special case should optimize the no of isc_put_slice - we perform. - **/ - if (current_dim + 1 == field->fld_dimensions - 1 && - field->fld_dimensions - count == 2 && - last_element_dim[count + 1] == range[3]) { - STUFF(gds__sdl_long_integer); - STUFF_LONG(range[0]); - lower = range[0]; - STUFF(gds__sdl_long_integer); - STUFF_LONG(last_element_dim[count]); - upper = last_element_dim[count]; - elements_written *= (upper - lower + 1); - range += 2; - count++; - STUFF(gds__sdl_do2); - STUFF(count); - STUFF(gds__sdl_long_integer); - STUFF_LONG(range[0]); - lower = range[0]; - STUFF(gds__sdl_long_integer); - STUFF_LONG(last_element_dim[count]); - upper = last_element_dim[count]; - elements_written *= (upper - lower + 1); - ++current_dim; - break; - - } - if (current_dim == count) { - STUFF(gds__sdl_long_integer); - STUFF_LONG(range[0]); - lower = range[0]; - STUFF(gds__sdl_long_integer); - upper = (current_dim == field->fld_dimensions - 1) ? - last_element_dim[count] : (last_element_dim[count] - - 1); - if (upper < range[0]) { - /** - see Special Case above - **/ - dont_write = 1; - break; - } - STUFF_LONG(upper); - } - else if (current_dim < count) { - STUFF(gds__sdl_long_integer); - STUFF_LONG(range[0]); - STUFF(gds__sdl_long_integer); - STUFF_LONG(range[1]); - upper = range[1]; - lower = range[0]; - } - else if (current_dim > count) { - STUFF(gds__sdl_long_integer); - STUFF_LONG(last_element_dim[count]); - STUFF(gds__sdl_long_integer); - STUFF_LONG(last_element_dim[count]); - upper = lower = last_element_dim[count]; - } - elements_written *= (upper - lower + 1); -#ifdef DEBUG - ib_fprintf(ib_stderr, "%d..%d ", lower, upper); -#endif - } - if (dont_write) - continue; -#ifdef DEBUG - ib_fprintf(ib_stderr, "]"); - ib_fprintf(ib_stderr, "\n Elements Written=%d ", - elements_written); -#endif - - STUFF(gds__sdl_element); - STUFF(1); - STUFF(gds__sdl_scalar); - STUFF(0); - STUFF(field->fld_dimensions); - - for (count = 0; count < field->fld_dimensions; count++) { - STUFF(gds__sdl_variable); - STUFF(count); - } - - STUFF(gds__sdl_eoc); - -#ifdef DEBUG - if (debug_on) - PRETTY_print_sdl(blr_buffer, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); -#endif - - blr_length = blr - blr_buffer; - - if (data_at == 0) { - buffer = BURP_ALLOC(return_length); - - if (tdgbl->gbl_sw_transportable) { - if (GET_ATTRIBUTE(attribute) != att_xdr_array) - /* msg 55 Expected XDR record length */ - BURP_error_redirect(NULL_PTR, 55, 0, 0); - else { - xdr_buffer.lstr_allocated = GET(); - xdr_buffer.lstr_allocated |= GET() << 8; - xdr_buffer.lstr_allocated |= GET() << 16; - xdr_buffer.lstr_allocated |= GET() << 24; - lcount = xdr_buffer.lstr_length = - xdr_buffer.lstr_allocated; - xdr_buffer.lstr_address = - BURP_ALLOC(xdr_buffer.lstr_allocated); - xdr_slice.lstr_allocated = xdr_slice.lstr_length = - return_length; - xdr_slice.lstr_address = buffer; - p = xdr_buffer.lstr_address; - } - } - else { - p = buffer; - lcount = return_length; - } - - if (lcount) - (void) GET_BLOCK(p, lcount); - - if (tdgbl->gbl_sw_transportable) - CAN_slice(&xdr_buffer, &xdr_slice, FALSE, blr_length, - blr_buffer); - } - - if (isc_put_slice(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(gds__trans), (ISC_QUAD *) GDS_VAL(blob_id), blr_length, blr_buffer, 0, /* param length for subset of an array handling */ - (ISC_LONG *) 0, /* param for subset of an array handling */ - elements_written * field->fld_length, - GDS_VAL(buffer + data_at))) { - BURP_print(81, field->fld_name, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); - /* msg 81 error accessing blob field %s -- continuing */ - BURP_print_status(status_vector); -#ifdef DEBUG - PRETTY_print_sdl(blr_buffer, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); -#endif - return; - } - data_at += elements_written * field->fld_length; -#ifdef DEBUG - ib_fprintf(ib_stderr, "next data_at = %d\n", data_at); -#endif - } - } - else { - /** This is the regular case we've got the entire array **/ - blr = blr_buffer; - - /* build the sdl */ - - STUFF(gds__sdl_version1); - - STUFF(gds__sdl_struct); - STUFF(1); - - if (field->fld_type == blr_text || field->fld_type == blr_varying) { - if (field->fld_type == blr_text) - STUFF(blr_text2) - else - STUFF(blr_varying2); - STUFF_WORD(field->fld_character_set_id); - STUFF_WORD(field->fld_length); - } - else if (field->fld_type == blr_short || - field->fld_type == blr_long || field->fld_type == blr_quad) { - STUFF(field->fld_type); - STUFF(field->fld_scale); - } - else - STUFF(field->fld_type); - - - STUFF(gds__sdl_relation); - stuff_string(&blr, relation->rel_name); - STUFF(gds__sdl_field); - stuff_string(&blr, field->fld_name); - - /* each element spec starts here */ - - for (range = fld_ranges, count = 0; range < end_ranges; - range += 2, count++) { - STUFF(gds__sdl_do2); - STUFF(count); - STUFF(gds__sdl_long_integer); - STUFF_LONG(range[0]); - STUFF(gds__sdl_long_integer); - STUFF_LONG(range[1]); - } - - STUFF(gds__sdl_element); - STUFF(1); - STUFF(gds__sdl_scalar); - STUFF(0); - STUFF(field->fld_dimensions); - - for (count = 0; count < field->fld_dimensions; count++) { - STUFF(gds__sdl_variable); - STUFF(count); - } - - STUFF(gds__sdl_eoc); - -#ifdef DEBUG - if (debug_on) - PRETTY_print_sdl(blr_buffer, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); -#endif - - blr_length = blr - blr_buffer; - - buffer = BURP_ALLOC(return_length); - - if (tdgbl->gbl_sw_transportable) { - if (GET_ATTRIBUTE(attribute) != att_xdr_array) - BURP_error_redirect(NULL_PTR, 55, 0, 0); - /* msg 55 Expected XDR record length */ - else { - xdr_buffer.lstr_allocated = GET(); - xdr_buffer.lstr_allocated |= GET() << 8; - xdr_buffer.lstr_allocated |= GET() << 16; - xdr_buffer.lstr_allocated |= GET() << 24; - lcount = xdr_buffer.lstr_length = xdr_buffer.lstr_allocated; - xdr_buffer.lstr_address = - BURP_ALLOC(xdr_buffer.lstr_allocated); - xdr_slice.lstr_allocated = xdr_slice.lstr_length = - return_length; - xdr_slice.lstr_address = buffer; - p = xdr_buffer.lstr_address; - } - } - else { - p = buffer; - lcount = return_length; - } - - if (lcount) - (void) GET_BLOCK(p, lcount); - - if (tdgbl->gbl_sw_transportable) - CAN_slice(&xdr_buffer, &xdr_slice, FALSE, blr_length, blr_buffer); - - - if (isc_put_slice(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(gds__trans), (ISC_QUAD *) GDS_VAL(blob_id), blr_length, blr_buffer, 0, /* param length for subset of an array handling */ - (ISC_LONG *) 0, /* param for subset of an array handling */ - return_length, GDS_VAL(buffer))) { - BURP_print(81, field->fld_name, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); - /* msg 81 error accessing blob field %s -- continuing */ - BURP_print_status(status_vector); -#ifdef DEBUG - PRETTY_print_sdl(blr_buffer, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); -#endif - return; - } - } - - BURP_FREE(buffer); - if (tdgbl->gbl_sw_transportable && xdr_buffer.lstr_allocated) - BURP_FREE(xdr_buffer.lstr_address); -} - - -static void get_blob( FLD fields, UCHAR * record_buffer) -{ -/************************************** - * - * g e t _ b l o b - * - ************************************** - * - * Functional description - * Read blob attributes and copy data from input file to nice, - * shiny, new blob. - * - **************************************/ - FLD field; - ATT_TYPE attribute; - STATUS status_vector[ISC_STATUS_LENGTH]; - ULONG segments; - ISC_QUAD *blob_id; - SLONG *blob; - USHORT field_number, max_segment, length; - UCHAR *buffer, static_buffer[1024]; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - -/* Pick up attributes */ - - segments = 0; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_blob_data) - switch (attribute) { - case att_blob_field_number: - field_number = (USHORT) get_numeric(); - break; - - case att_blob_max_segment: - max_segment = (USHORT) get_numeric(); - break; - - case att_blob_number_segments: - segments = get_numeric(); - break; - - case att_blob_type: - (void) get_numeric(); - break; - - default: - bad_attribute(scan_next_attr, attribute, 64); - /* msg 64 blob */ - break; - } - -/* Find the field associated with the blob */ - - for (field = fields; field; field = field->fld_next) - if (field->fld_number == field_number) - break; - - if (!field) - BURP_error_redirect(NULL_PTR, 36, 0, 0); - /* msg 36 Can't find field for blob */ - -/* Create new blob */ - - blob_id = (ISC_QUAD*) ((UCHAR *) record_buffer + field->fld_offset); - blob = NULL; - - if (isc_create_blob(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(gds__trans), - GDS_REF(blob), (ISC_QUAD *) GDS_VAL(blob_id))) - BURP_error_redirect(status_vector, 37, 0, 0); - /* msg 37 gds__create_blob failed */ - -/* Allocate blob buffer is static buffer is too short */ - - if (!max_segment || max_segment <= sizeof(static_buffer)) - buffer = static_buffer; - else - buffer = BURP_ALLOC(max_segment); - -/* Eat up blob segments */ - - for (; segments > 0; --segments) { - length = GET(); - length |= GET() << 8; - if (length) { - (void) GET_BLOCK(buffer, length); - } - if (isc_put_segment(status_vector, - GDS_REF(blob), - length, - GDS_VAL(buffer))) - BURP_error_redirect(status_vector, 38, 0, 0); - /* msg 38 gds__put_segment failed */ - } - - if (isc_close_blob(status_vector, GDS_REF(blob))) - BURP_error_redirect(status_vector, 23, 0, 0); - /* msg 23 gds__close_blob failed */ - - if (buffer != static_buffer) - BURP_FREE(buffer); -} - - -static void get_blr_blob( ISC_QUAD * blob_id, USHORT glb_trans) -{ -/************************************** - * - * g e t _ b l r _ b l o b - * - ************************************** - * - * Functional description - * Read blob attributes and copy data from input file to nice, - * shiney, new blob. - * - **************************************/ - STATUS status_vector[ISC_STATUS_LENGTH]; - SLONG *blob; - USHORT length, l; - UCHAR *buffer, static_buffer[1024], *p; - isc_tr_handle local_trans; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - length = (USHORT) get_numeric(); - -/* Create new blob */ - - blob = NULL; - - if (glb_trans && tdgbl->global_trans) - local_trans = tdgbl->global_trans; - else - local_trans = gds__trans; - - if (isc_create_blob(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(local_trans), - GDS_REF(blob), - GDS_VAL(blob_id))) - BURP_error_redirect(status_vector, 37, 0, 0); - /* msg 37 gds__create_blob failed */ - -/* Allocate blob buffer is static buffer is too short */ - - if (!length || length + 1 <= sizeof(static_buffer)) - buffer = static_buffer; - else { - l = length + 1; - buffer = BURP_ALLOC(l); - } - - if (l = length) { - p = buffer; - p = GET_BLOCK(p, l); - } - -/* Make sure it has an eoc */ - if ((*--p) != blr_eoc) { - length++; - *++p = blr_eoc; - } - - if (isc_put_segment(status_vector, - GDS_REF(blob), - length, - GDS_VAL(buffer))) - BURP_error_redirect(status_vector, 38, 0, 0); - /* msg 38 gds__put_segment failed */ - - if (isc_close_blob(status_vector, GDS_REF(blob))) - BURP_error_redirect(status_vector, 23, 0, 0); - /* msg 23 gds__close_blob failed */ - - if (buffer != static_buffer) - BURP_FREE(buffer); -} - - -static BOOLEAN get_character_set(void) -{ -/************************************** - * - * g e t _ c h a r a c t e r _ s e t s - * - ************************************** - * - * Functional description - * Restore data for user defined character sets - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_character_sets_req_handle1) - X IN RDB$CHARACTER_SETS - X.RDB$CHARACTER_SET_NAME.NULL = TRUE; - X.RDB$FORM_OF_USE.NULL = TRUE; - X.RDB$NUMBER_OF_CHARACTERS.NULL = TRUE; - X.RDB$DEFAULT_COLLATE_NAME.NULL = TRUE; - X.RDB$CHARACTER_SET_ID.NULL = TRUE; - X.RDB$SYSTEM_FLAG.NULL = TRUE; - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$FUNCTION_NAME.NULL = TRUE; - X.RDB$BYTES_PER_CHARACTER.NULL = TRUE; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - - case att_charset_name: - X.RDB$CHARACTER_SET_NAME.NULL = FALSE; - get_text (X.RDB$CHARACTER_SET_NAME, sizeof (X.RDB$CHARACTER_SET_NAME)); - BURP_verbose (msgVerbose_restore_charset, X.RDB$CHARACTER_SET_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - break; - - case att_charset_form: - X.RDB$FORM_OF_USE.NULL = FALSE; - get_text (X.RDB$FORM_OF_USE, sizeof (X.RDB$FORM_OF_USE)); - break; - - case att_charset_numchar: - X.RDB$NUMBER_OF_CHARACTERS.NULL = FALSE; - X.RDB$NUMBER_OF_CHARACTERS = (USHORT) get_numeric(); - break; - - case att_charset_coll: - X.RDB$DEFAULT_COLLATE_NAME.NULL = FALSE; - get_text (X.RDB$DEFAULT_COLLATE_NAME, sizeof (X.RDB$DEFAULT_COLLATE_NAME)); - break; - - case att_charset_id: - X.RDB$CHARACTER_SET_ID.NULL = FALSE; - X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); - break; - - case att_charset_sysflag: - X.RDB$SYSTEM_FLAG.NULL = FALSE; - X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); - break; - - case att_charset_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - case att_charset_funct: - X.RDB$FUNCTION_NAME.NULL = FALSE; - get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); - break; - - case att_charset_bytes_char: - X.RDB$BYTES_PER_CHARACTER.NULL = FALSE; - X.RDB$BYTES_PER_CHARACTER = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, msgErr_restore_charset); - /* RDB$CHARSETS */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_chk_constraint(void) -{ -/************************************** - * - * g e t _ c h k _ c o n s t r a i n t - * - ************************************** - * - * Functional description - * Restore data for check constraints. - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_chk_constraint_req_handle1) - X IN RDB$CHECK_CONSTRAINTS - X.RDB$CONSTRAINT_NAME.NULL = TRUE; - X.RDB$TRIGGER_NAME.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_chk_constraint_name: - X.RDB$CONSTRAINT_NAME.NULL = FALSE; - get_text (X.RDB$CONSTRAINT_NAME, sizeof (X.RDB$CONSTRAINT_NAME)); - break; - - case att_chk_trigger_name: - X.RDB$TRIGGER_NAME.NULL = FALSE; - get_text (X.RDB$TRIGGER_NAME, sizeof (X.RDB$TRIGGER_NAME)); - break; - - default: - bad_attribute (scan_next_attr, attribute, 208); - /* msg 208 relation constraint */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_collation(void) -{ -/************************************** - * - * g e t _ c o l l a t i o n - * - ************************************** - * - * Functional description - * Restore data for user defined collations - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_collation_req_handle1) - X IN RDB$COLLATIONS - X.RDB$COLLATION_NAME.NULL = TRUE; - X.RDB$COLLATION_ID.NULL = TRUE; - X.RDB$CHARACTER_SET_ID.NULL = TRUE; - X.RDB$COLLATION_ATTRIBUTES.NULL = TRUE; - X.RDB$SYSTEM_FLAG.NULL = TRUE; - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$FUNCTION_NAME.NULL = TRUE; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - - case att_coll_name: - X.RDB$COLLATION_NAME.NULL = FALSE; - get_text (X.RDB$COLLATION_NAME, sizeof (X.RDB$COLLATION_NAME)); - BURP_verbose (msgVerbose_restore_collation, X.RDB$COLLATION_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - break; - - case att_coll_id: - X.RDB$COLLATION_ID.NULL = FALSE; - X.RDB$COLLATION_ID = (USHORT) get_numeric(); - break; - - case att_coll_cs_id: - X.RDB$CHARACTER_SET_ID.NULL = FALSE; - X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); - break; - - case att_coll_attr: - X.RDB$COLLATION_ATTRIBUTES.NULL = FALSE; - X.RDB$COLLATION_ATTRIBUTES = (USHORT) get_numeric(); - break; - - case att_coll_subtype: /* No longer used: 93-11-15 DBS */ - /* still present to handle V4 R&D - gbak files */ - (void) get_numeric(); - break; - - case att_coll_sysflag: - X.RDB$SYSTEM_FLAG.NULL = FALSE; - X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); - break; - - case att_coll_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - case att_coll_funct: - X.RDB$FUNCTION_NAME.NULL = FALSE; - get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); - break; - - default: - bad_attribute (scan_next_attr, attribute, msgErr_restore_collation); - /* Bad RDB$COLLATION */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static REC_TYPE get_data( REL relation) -{ -/************************************** - * - * g e t _ d a t a - * - ************************************** - * - * Functional description - * Write data records for a relation. - * - **************************************/ - FLD field; - int *request, records; - TEXT *p; - SCHAR *blr, *blr_buffer; - RCRD_OFFSET offset; - USHORT l; - ULONG length, old_length; - SSHORT count, blr_length, alignment, dtype; - SSHORT *buffer; - LSTRING data; - STATUS status_vector[ISC_STATUS_LENGTH]; - SLONG *blob_id; - REC_TYPE record; - TGBL tdgbl; - isc_req_handle req_handle = NULL; - TEXT index_name[32]; - long error_code; - - tdgbl = GET_THREAD_DATA; - -/* If we're only doing meta-data, ignore data records */ - - if (tdgbl->gbl_sw_meta) - return ignore_data(relation); - -/* Start by counting the interesting fields */ - - offset = length = 0; - count = 0; - - for (field = relation->rel_fields; field; field = field->fld_next) - if (!(field->fld_flags & FLD_computed)) { - count++; - length += field->fld_name_length; - } - - if (tdgbl->RESTORE_format >= 2) - count += count; - -/* Time to generate blr to store data. Whoppee. */ - - blr = blr_buffer = (SCHAR *) BURP_ALLOC(200 + length + count * 18); - STUFF(blr_version4); - STUFF(blr_begin); - STUFF(blr_message); - STUFF(0); /* Message number */ - STUFF_WORD(count); /* Number of fields, counting eof */ - count = 0; - - for (field = relation->rel_fields; field; field = field->fld_next) { - if (field->fld_flags & FLD_computed) - continue; - - /* arrays are of various fld_types but are really blobs */ - - dtype = field->fld_type; - length = field->fld_length; - alignment = 4; - - if (field->fld_flags & FLD_array) - dtype = blr_blob; - - if (dtype <= DTYPE_BLR_MAX) { - l = gds_cvt_blr_dtype[dtype]; - alignment = type_alignments[l]; - if (l = type_lengths[l]) - length = l; - } - - switch (dtype) { - case blr_text: - case blr_varying: - if (dtype == blr_text) - STUFF(blr_text2) - else - STUFF(blr_varying2); - STUFF_WORD(field->fld_character_set_id); - STUFF_WORD(field->fld_length); - if (dtype == blr_varying) - length += sizeof(USHORT); - break; - - case blr_short: - case blr_long: - case blr_quad: - case blr_int64: - STUFF(field->fld_type); - STUFF(field->fld_scale); - break; - - case blr_float: - case blr_double: - case blr_timestamp: - case blr_sql_time: - case blr_sql_date: - STUFF(field->fld_type); - break; - - case blr_blob: - alignment = type_alignments[dtype_blob]; - length = type_lengths[dtype_blob]; - STUFF(blr_quad); - STUFF(0); - break; - - default: -#ifdef SUPERSERVER - BURP_svc_error(26, isc_arg_number, field->fld_type, - 0, NULL, 0, NULL, 0, NULL, 0, NULL); -#else - BURP_error(26, (void *) field->fld_type, 0, 0, 0, 0); - /* msg 26 datatype %ld not understood */ -#endif - break; - } - if (alignment) - offset = FB_ALIGN(offset, alignment); - field->fld_offset = offset; - field->fld_parameter = count++; - offset += length; - } - -/* If this is format version 2, build fields for null flags */ - - if (tdgbl->RESTORE_format >= 2) - for (field = relation->rel_fields; field; field = field->fld_next) { - if (field->fld_flags & FLD_computed) - continue; - STUFF(blr_short); - STUFF(0); - offset = FB_ALIGN(offset, sizeof(SSHORT)); - field->fld_missing_parameter = count++; - offset += sizeof(SSHORT); - } - - length = offset; - -/* Build STORE statement */ - - STUFF(blr_receive); - STUFF(0); - STUFF(blr_store); - STUFF(blr_relation); - stuff_string(&blr, relation->rel_name); - STUFF(0); /* context variable */ - STUFF(blr_begin); - - for (field = relation->rel_fields; field; field = field->fld_next) { - if (field->fld_flags & FLD_computed) - continue; - STUFF(blr_assignment); - if (tdgbl->RESTORE_format >= 2) { - STUFF(blr_parameter2); - STUFF(0); - STUFF_WORD(field->fld_parameter); - STUFF_WORD(field->fld_missing_parameter); - } - else { - STUFF(blr_parameter); - STUFF(0); - STUFF_WORD(field->fld_parameter); - } - STUFF(blr_field); - STUFF(0); - stuff_string(&blr, field->fld_name); - } - - STUFF(blr_end); - STUFF(blr_end); - STUFF(blr_eoc); - -/* Compile request */ - -#ifdef DEBUG - isc_print_blr(blr_buffer, NULL_PTR, NULL_PTR, 0); -#endif - - request = NULL; - blr_length = blr - blr_buffer; - if (isc_compile_request(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(request), - blr_length, GDS_VAL(blr_buffer))) { - isc_print_blr(blr_buffer, NULL_PTR, NULL_PTR, 0); - if (!tdgbl->gbl_sw_incremental) - BURP_error_redirect(status_vector, 27, 0, 0); -/* msg 27 gds__compile_request failed */ - else { - BURP_print_status(status_vector); - BURP_FREE(blr_buffer); - return ignore_data(relation); - } - } - - BURP_FREE(blr_buffer); - buffer = NULL; - - data.lstr_allocated = records = 0; - - BURP_verbose(124, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); -/* msg 124 restoring data for relation %s */ - - data.lstr_address = NULL; - old_length = 0; - - while (TRUE) { - if (GET() != att_data_length) - BURP_error_redirect(NULL_PTR, 39, 0, 0); -/* msg 39 expected record length */ - l = (USHORT) get_numeric(); - if (!tdgbl->gbl_sw_transportable && l != length) { - if (!old_length) - old_length = recompute_length(relation); - if (l != old_length) -#ifdef SUPERSERVER - BURP_svc_error(40, isc_arg_number, length, isc_arg_number, l, - 0, NULL, 0, NULL, 0, NULL); -#else - BURP_error(40, (void *) length, (void *) l, 0, 0, 0); -/* msg 40 wrong length record, expected %ld encountered %ld */ -#endif - } - if (!buffer) - buffer = (SSHORT *) BURP_ALLOC(MAX(length, l)); - - if (tdgbl->gbl_sw_transportable) - if (GET() != att_xdr_length) - BURP_error_redirect(NULL_PTR, 55, 0, 0); -/* msg 55 Expected XDR record length */ - else { - data.lstr_length = l = (USHORT) get_numeric(); - if (l > data.lstr_allocated) { - data.lstr_allocated = l; - if (data.lstr_address) - BURP_FREE(data.lstr_address); - data.lstr_address = - (UCHAR *) BURP_ALLOC(data.lstr_allocated); - } - p = (TEXT *) data.lstr_address; - } - else - p = (TEXT *) buffer; - if (GET() != att_data_data) - BURP_error_redirect(NULL_PTR, 41, 0, 0); -/* msg 41 expected data attribute */ - - if (tdgbl->gbl_sw_compress) - decompress(p, l); - else { - (void) GET_BLOCK(p, l); - } - - if (old_length) - realign((UCHAR *) buffer, relation); - - if (tdgbl->gbl_sw_transportable) - CAN_encode_decode(relation, &data, (UCHAR *) buffer, FALSE); - - records++; - - if ((records % RESTORE_VERBOSE_INTERVAL) == 0) - BURP_verbose(107, (void *) records, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); - - for (field = relation->rel_fields; field; field = field->fld_next) - if ((field->fld_type == blr_blob) - || (field->fld_flags & FLD_array)) { - blob_id = (SLONG *) ((SCHAR *) buffer + field->fld_offset); - blob_id[0] = blob_id[1] = 0; - } - - GET_RECORD(record); - while (record == rec_blob || record == rec_array) { - if (record == rec_blob) - get_blob(relation->rel_fields, (UCHAR *) buffer); - - else if (record == rec_array) - get_array(relation, (UCHAR *) buffer); - - GET_RECORD(record); - } - - - if (isc_start_and_send(status_vector, - GDS_REF(request), - GDS_REF(gds__trans), - 0, - (USHORT) length, - GDS_VAL(buffer), - 0)) - if (status_vector[1] == gds__not_valid) - if (tdgbl->gbl_sw_incremental) { - BURP_print(138, relation->rel_name, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); -/* msg 138 validation error on field in relation %s */ - BURP_print_status(status_vector); - } - else - BURP_error_redirect(status_vector, 47, 0, 0); -/* msg 47 warning -- record could not be restored */ - else if (tdgbl->gbl_sw_incremental) { - BURP_print(114, relation->rel_name, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); -/* msg 114 restore failed for record in relation %s */ - BURP_print_status(status_vector); - } - else - BURP_error_redirect(status_vector, 48, 0, 0); -/* msg 48 gds__send failed */ - if (record != rec_data) - break; - } - - BURP_FREE(buffer); - if (data.lstr_address) - BURP_FREE(data.lstr_address); - - isc_release_request(status_vector, GDS_REF(request)); - if (tdgbl->gbl_sw_incremental) { - BURP_verbose(72, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); - /* msg 72 committing data for relation %s */ - COMMIT - /* existing ON_ERROR continues past error, beck */ - ON_ERROR - - /* Fix for bug_no 8055: - don't throw away the database just because an index - could not be made */ - while (error_code = tdgbl->status_vector[1]) - { - switch (error_code) - { - case gds__sort_mem_err: - case gds__no_dup: - strcpy(index_name, (TEXT *)tdgbl->status_vector[3]); - BURP_print_status(tdgbl->status_vector); - FOR (REQUEST_HANDLE req_handle) - IDX IN RDB$INDICES WITH IDX.RDB$INDEX_NAME EQ index_name - MODIFY IDX USING IDX.RDB$INDEX_INACTIVE = TRUE; - BURP_print(240, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 240 Index \"%s\" failed to activate because: */ - if ( error_code == gds__no_dup ) - { - BURP_print(241, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 241 The unique index has duplicate values or NULLs */ - BURP_print(242, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 242 Delete or Update duplicate values or NULLs, and activate index with */ - } - else - { - BURP_print(244, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 244 Not enough disk space to create the sort file for an index */ - BURP_print(245, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 245 Set the TMP environment variable to a directory on a filesystem that does have enough space, and activate index with */ - } - BURP_print(243, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 243 ALTER INDEX \"%s\" ACTIVE; */ - END_MODIFY; - END_FOR; - /* don't bring the database on-line */ - flag_on_line = FALSE; - /* commit one more time */ - COMMIT - ON_ERROR - continue; - END_ERROR - break; - default: - BURP_print (69, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 69 commit failed on relation %s */ - BURP_print_status (tdgbl->status_vector); - ROLLBACK; - ON_ERROR - general_on_error (); - END_ERROR; - break; - } /* end of switch */ - } /* end of while */ - END_ERROR; - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - } - BURP_verbose(107, (void *) records, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); -/* msg 107 %ld records restored */ - - return record; -} - - -static BOOLEAN get_exception(void) -{ -/************************************** - * - * g e t _ e x c e p t i o n - * - ************************************** - * - * Functional description - * Reconstruct a exception. - * - **************************************/ - ATT_TYPE attribute; - TEXT temp[32]; - ULONG l; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_exception_req_handle1) - X IN RDB$EXCEPTIONS - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$MESSAGE.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_exception_name: - l = get_text (X.RDB$EXCEPTION_NAME, sizeof (X.RDB$EXCEPTION_NAME)); - MISC_terminate (X.RDB$EXCEPTION_NAME, temp, l, sizeof (temp)); - BURP_verbose (199, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 199 restoring exception %s */ - break; - - case att_exception_description: - get_misc_blob (&X.RDB$DESCRIPTION, 0, 0); - X.RDB$DESCRIPTION.NULL = FALSE; - break; - - case att_exception_description2: - get_source_blob (&X.RDB$DESCRIPTION, 0); - X.RDB$DESCRIPTION.NULL = FALSE; - break; - - case att_exception_msg: - get_text (X.RDB$MESSAGE, sizeof (X.RDB$MESSAGE)); - X.RDB$MESSAGE.NULL = FALSE; - break; - - default: - bad_attribute (scan_next_attr, attribute, 89); - /* msg 89 function */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN cvt_v3_to_v4_intl( - SSHORT dtype, - SSHORT * scale, - SSHORT * sub_type, - SSHORT * character_set_id, -SSHORT * collation_id) -{ -/************************************** - * - * c v t _ v 3 _ t o _ v 4 _ i n t l - * - ************************************** - * - * Functional description - * Convert a V3 scale / sub_type to V4 character_set / collate_sequence - * - * Version 3.2 & 3.3 of InterBase used different methodologies - * to tag international text character sets and country collation - * sequences. This routine will convert a V3 metadata definition - * into the corresponding V4 definition. - * - * In V3.x, sub-type 0 is normal text, subtype 1 is "text that can - * contain a NULL byte, and can therefore not be represented - * using a c-string datatype, always use fixed". - * - * Return TRUE if a conversion was performed, FALSE otherwise. - * - **************************************/ - SSHORT i; - - switch (dtype) { - case blr_text2: - case blr_varying2: - case blr_cstring2: - - case blr_text: - case blr_varying: - case blr_cstring: - - /* Japanese V3.2 used SCALE 5 to indicate SJIS text */ - if (*scale == 5 && ((*sub_type == 0) || (*sub_type == 1))) { - *character_set_id = CS_JIS_0208; - *collation_id = 0; - BURP_verbose(237, (void *) *scale, (void *) *character_set_id, - (void *) *collation_id, NULL_PTR, NULL_PTR); - /* msg 237: Converted V3 scale: %d to - character_set_id: %d and callate_id: %d. */ - *scale = 0; - return TRUE; - } - - /* Japanese V3.2 used SCALE 6 to indicate EUCJ text */ - if (*scale == 6 && (*sub_type == 0 || *sub_type == 1)) { - *character_set_id = CS_EUCJ; - *collation_id = 0; - BURP_verbose(237, (void *) *scale, (void *) *character_set_id, - (void *) *collation_id, NULL_PTR, NULL_PTR); - /* msg 237: Converted V3 scale: %d to - character_set_id: %d and callate_id: %d. */ - *scale = 0; - return TRUE; - } - - /* V3.3 used SCALE 0 and Subtypes in range 100 - 255 for - European text types and collations */ - - if (*scale != 0) - return FALSE; - - if (*sub_type == 0 || *sub_type == 1) - /* Do not process sub_type 0,1 conversion */ - return FALSE; - - for (i = 0; i < cvtbl_len; i++) - if (sub_type_cvtbl[i].sub_type == *sub_type) { - *character_set_id = sub_type_cvtbl[i].character_set_id; - *collation_id = sub_type_cvtbl[i].collation_id; - - BURP_verbose(236, (void *) *sub_type, - (void *) *character_set_id, - (void *) *collation_id, NULL_PTR, NULL_PTR); - /* msg 236: Converted V3 sub_type: %d to - character_set_id: %d and callate_id: %d. */ - - *sub_type = 0; - return TRUE; - } - return FALSE; - - default: - /* Do not process sub_type conversion on non-text field */ - return FALSE; - } - -} - -static FLD get_field( REL relation) -{ -/************************************** - * - * g e t _ f i e l d - * - ************************************** - * - * Functional description - * Reconstruct a local field. - * - **************************************/ - FLD field; - ATT_TYPE attribute; - USHORT n, global_tr = FALSE; - SLONG *rp; - UCHAR scan_next_attr; - TGBL tdgbl; - FLD f; - isc_tr_handle local_trans; - - tdgbl = GET_THREAD_DATA; - -/* If it is a view and there is a global transaction then use it */ - - if ((relation->rel_flags & REL_view) && (tdgbl->global_trans)) { - local_trans = tdgbl->global_trans; - global_tr = TRUE; - } - else - local_trans = gds__trans; - - field = (FLD) BURP_ALLOC_ZERO(sizeof(struct fld)); - - STORE (TRANSACTION_HANDLE local_trans - REQUEST_HANDLE tdgbl->handles_get_field_req_handle1) - X IN RDB$RELATION_FIELDS - strcpy (X.RDB$RELATION_NAME, relation->rel_name); - X.RDB$FIELD_POSITION = 0; - memset (X.RDB$QUERY_NAME, ' ', sizeof (X.RDB$QUERY_NAME)); - X.RDB$VIEW_CONTEXT.NULL = TRUE; - X.RDB$BASE_FIELD.NULL = TRUE; - X.RDB$SECURITY_CLASS.NULL = TRUE; - X.RDB$QUERY_NAME.NULL = TRUE; - X.RDB$QUERY_HEADER.NULL = TRUE; - X.RDB$EDIT_STRING.NULL = TRUE; - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$FIELD_POSITION.NULL = TRUE; - X.RDB$SYSTEM_FLAG.NULL = TRUE; - X.RDB$COMPLEX_NAME.NULL = TRUE; - X.RDB$UPDATE_FLAG.NULL = TRUE; - X.RDB$DEFAULT_SOURCE.NULL = TRUE; - X.RDB$DEFAULT_VALUE.NULL = TRUE; - X.RDB$NULL_FLAG.NULL = TRUE; - X.RDB$COLLATION_ID.NULL = TRUE; - SKIP_INIT; - while (GET_ATTRIBUTE (attribute) != att_end) - switch (SKIP_SCAN, attribute) - { - case att_field_name: - field->fld_name_length = - get_text (field->fld_name, sizeof (field->fld_name)); - BURP_verbose (115, field->fld_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 115 restoring field %s */ - strcpy (X.RDB$FIELD_NAME, field->fld_name); - break; - - case att_field_source: - get_text (X.RDB$FIELD_SOURCE, sizeof (X.RDB$FIELD_SOURCE)); - break; - - case att_field_security_class: - get_text (X.RDB$SECURITY_CLASS, sizeof (X.RDB$SECURITY_CLASS)); - X.RDB$SECURITY_CLASS.NULL = FALSE; - break; - - case att_field_query_name: - get_text (X.RDB$QUERY_NAME, sizeof (X.RDB$QUERY_NAME)); - X.RDB$QUERY_NAME.NULL = FALSE; - break; - - case att_field_query_header: - X.RDB$QUERY_HEADER.NULL = FALSE; - get_source_blob (&X.RDB$QUERY_HEADER, global_tr); - break; - - case att_field_edit_string: - get_text (X.RDB$EDIT_STRING, sizeof (X.RDB$EDIT_STRING)); - X.RDB$EDIT_STRING.NULL = FALSE; - break; - - case att_field_position: - X.RDB$FIELD_POSITION.NULL = FALSE; - X.RDB$FIELD_POSITION = (USHORT) get_numeric(); - break; - - case att_field_number: - field->fld_number = (USHORT) get_numeric(); - break; - - case att_field_type: - field->fld_type = (USHORT) get_numeric(); - break; - - case att_field_length: - field->fld_length = (USHORT) get_numeric(); - break; - - case att_field_scale: - field->fld_scale = (USHORT) get_numeric(); - break; - - case att_field_sub_type: - field->fld_sub_type = (USHORT) get_numeric(); - break; - - case att_field_system_flag: - X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); - X.RDB$SYSTEM_FLAG.NULL = FALSE; - break; - - case att_view_context: - X.RDB$VIEW_CONTEXT = (USHORT) get_numeric(); - X.RDB$VIEW_CONTEXT.NULL = FALSE; - break; - - case att_field_computed_flag: - if (get_numeric()) - field->fld_flags |= FLD_computed; - break; - - case att_base_field: - get_text (X.RDB$BASE_FIELD, sizeof (X.RDB$BASE_FIELD)); - X.RDB$BASE_FIELD.NULL = FALSE; - break; - - case att_field_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_misc_blob (&X.RDB$DESCRIPTION, 1, global_tr); - break; - - case att_field_description2: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, (UCHAR) global_tr); - break; - - case att_field_complex_name: - get_text (X.RDB$COMPLEX_NAME, sizeof (X.RDB$COMPLEX_NAME)); - X.RDB$COMPLEX_NAME.NULL = FALSE; - break; - - case att_field_dimensions: - field->fld_dimensions = (USHORT) get_numeric(); - field->fld_flags |= FLD_array; - for (rp = field->fld_ranges, n = field->fld_dimensions; n; rp+=2, n--) - { - if (GET_ATTRIBUTE (attribute) != att_field_range_low) - bad_attribute (scan_next_attr, attribute, 58); - /* msg 58 array */ - else - *rp = get_numeric(); - if (GET_ATTRIBUTE (attribute) != att_field_range_high) - bad_attribute (scan_next_attr, attribute, 58); - /* msg 58 array */ - else - *(rp+1) = get_numeric(); - } - break; - - case att_field_update_flag: - X.RDB$UPDATE_FLAG.NULL = FALSE; - X.RDB$UPDATE_FLAG = (USHORT) get_numeric(); - break; - - case att_field_character_length: - field->fld_character_length = (USHORT) get_numeric(); - break; - - case att_field_default_source: - X.RDB$DEFAULT_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$DEFAULT_SOURCE, global_tr); - break; - - case att_field_default_value: - X.RDB$DEFAULT_VALUE.NULL = FALSE; - get_blr_blob (&X.RDB$DEFAULT_VALUE, global_tr); - break; - - case att_field_null_flag: - X.RDB$NULL_FLAG.NULL = FALSE; - X.RDB$NULL_FLAG = (USHORT) get_numeric(); - break; - - case att_field_character_set: - field->fld_character_set_id = (USHORT) get_numeric(); - break; - - case att_field_collation_id: - field->fld_collation_id = (USHORT) get_numeric(); - X.RDB$COLLATION_ID.NULL = FALSE; - X.RDB$COLLATION_ID = field->fld_collation_id; - break; - - default: - bad_attribute (scan_next_attr, attribute, 84); - /* msg 84 field */ - break; - } - - /* For migration from V3.3 to V4.0 format of International text - * information - search the list of global fields which were - * remapped from V3.3 format into V4.0 format. If we find that - * this local field's source is one of those global fields, then - * remap the local field's information. This is used to compose - * the BLR which sends data to the newly restored database. - */ - for (f = tdgbl->v3_cvt_fld_list; f; f = f->fld_next) - { - if (!strcmp(X.RDB$FIELD_SOURCE, f->fld_name)) - { - field->fld_sub_type = f->fld_sub_type; - field->fld_scale = f->fld_scale; - field->fld_character_set_id = f->fld_character_set_id; - field->fld_collation_id = f->fld_collation_id; - break; - } - } - - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return field; -} - - -static BOOLEAN get_field_dimensions(void) -{ -/************************************** - * - * g e t _ f i e l d _ d i m e n s i o n s - * - ************************************** - * - * Functional description - * Get array field dimensions in rdb$field_dimensions. - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_field_dimensions_req_handle1) - X IN RDB$FIELD_DIMENSIONS - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - { - switch (attribute) - { - case att_field_name: - get_text (X.RDB$FIELD_NAME, sizeof (X.RDB$FIELD_NAME)); - break; - - case att_field_dimensions: - X.RDB$DIMENSION = (USHORT) get_numeric(); - break; - - case att_field_range_low: - X.RDB$LOWER_BOUND = get_numeric(); - break; - - case att_field_range_high: - X.RDB$UPPER_BOUND = get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 58); - /* msg 58 array */ - break; - } - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_files(void) -{ -/************************************** - * - * g e t _ f i l e s - * - ************************************** - * - * Functional description - * Get any files that were stored; let - * somebody else worry about what to do with them. - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_files_req_handle1) - X IN RDB$FILES - X.RDB$FILE_FLAGS = 0; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_file_filename: - get_text (X.RDB$FILE_NAME, sizeof (X.RDB$FILE_NAME)); - BURP_verbose (116, - /* msg 116 restoring file %s */ - X.RDB$FILE_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - break; - - case att_file_sequence: - X.RDB$FILE_SEQUENCE = (USHORT) get_numeric(); - break; - - case att_file_start: - X.RDB$FILE_START = get_numeric(); - break; - - case att_file_length: - X.RDB$FILE_LENGTH = get_numeric(); - break; - - case att_file_flags: - X.RDB$FILE_FLAGS |= get_numeric(); - break; - - case att_shadow_number: - X.RDB$SHADOW_NUMBER = (USHORT) get_numeric(); - if (tdgbl->gbl_sw_kill && X.RDB$SHADOW_NUMBER) - X.RDB$FILE_FLAGS |= FILE_inactive; - break; - - default: - bad_attribute (scan_next_attr, attribute, 85); - /* msg 85 file */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_filter(void) -{ -/************************************** - * - * g e t _ f i l t e r - * - ************************************** - * - * Functional description - * Get a type definition in rdb$filters. - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_filter_req_handle1) - X IN RDB$FILTERS - X.RDB$DESCRIPTION.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - { - switch (attribute) - { - case att_filter_name: - get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); - BURP_verbose (117, X.RDB$FUNCTION_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 117 restoring filter %s */ - break; - - case att_filter_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); - break; - - case att_filter_description2: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - case att_filter_module_name: - get_text (X.RDB$MODULE_NAME, sizeof (X.RDB$MODULE_NAME)); - break; - - case att_filter_entrypoint: - get_text (X.RDB$ENTRYPOINT, sizeof (X.RDB$ENTRYPOINT)); - break; - - case att_filter_input_sub_type: - X.RDB$INPUT_SUB_TYPE = (USHORT) get_numeric(); - break; - - case att_filter_output_sub_type: - X.RDB$OUTPUT_SUB_TYPE = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 87); - /* msg 87 filter */ - break; - } - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_function(void) -{ -/************************************** - * - * g e t _ f u n c t i o n - * - ************************************** - * - * Functional description - * Reconstruct a function. - * - **************************************/ - ATT_TYPE attribute; - GDS_NAME function_name; - TEXT temp[32]; - SSHORT l; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_function_req_handle1) - X IN RDB$FUNCTIONS - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_function_name: - l = get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); - MISC_terminate (X.RDB$FUNCTION_NAME, temp, l, sizeof (temp)); - BURP_verbose (118, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 118 restoring function %s */ - break; - - case att_function_description: - get_misc_blob (&X.RDB$DESCRIPTION, 0, 0); - break; - - case att_function_description2: - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - case att_function_module_name: - get_text (X.RDB$MODULE_NAME, sizeof (X.RDB$MODULE_NAME)); - break; - - case att_function_entrypoint: - get_text (X.RDB$ENTRYPOINT, sizeof (X.RDB$ENTRYPOINT)); - break; - - case att_function_return_arg: - X.RDB$RETURN_ARGUMENT = (USHORT) get_numeric(); - break; - - case att_function_query_name: - get_text (X.RDB$QUERY_NAME, sizeof (X.RDB$QUERY_NAME)); - break; - - case att_function_type: - X.RDB$FUNCTION_TYPE = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 89); - /* msg 89 function */ - break; - } - strcpy (function_name, X.RDB$FUNCTION_NAME); - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - -/* at the end of args for a function is the rec_function_end marker */ - while (GET() == rec_function_arg) - get_function_arg(function_name); - - return TRUE; -} - - -static void get_function_arg( GDS_NAME funcptr) -{ -/************************************** - * - * g e t _ f u n c t i o n _ a r g - * - ************************************** - * - * Functional description - * Reconstruct function argument. - * - **************************************/ - ATT_TYPE attribute; - SSHORT l; - TEXT temp[32]; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - if (tdgbl->RESTORE_format >= 6) { - /* with RDB$FIELD_PRECISION */ - STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1) - X IN RDB$FUNCTION_ARGUMENTS - X.RDB$FIELD_SUB_TYPE.NULL = TRUE; - X.RDB$CHARACTER_SET_ID.NULL = TRUE; - X.RDB$FIELD_PRECISION.NULL = TRUE; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_functionarg_name: - l = get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); - MISC_terminate (X.RDB$FUNCTION_NAME, temp, l, sizeof (temp)); - BURP_verbose (119, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 119 restoring argument for function %s */ - break; - - case att_functionarg_position: - X.RDB$ARGUMENT_POSITION = (USHORT) get_numeric(); - break; - - case att_functionarg_mechanism: - X.RDB$MECHANISM = (USHORT) get_numeric(); - break; - - case att_functionarg_field_type: - X.RDB$FIELD_TYPE = (USHORT) get_numeric(); - break; - - case att_functionarg_field_scale: - X.RDB$FIELD_SCALE = (USHORT) get_numeric(); - break; - - case att_functionarg_field_length: - X.RDB$FIELD_LENGTH = (USHORT) get_numeric(); - break; - - case att_functionarg_field_sub_type: - X.RDB$FIELD_SUB_TYPE.NULL = FALSE; - X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(); - break; - - case att_functionarg_character_set: - X.RDB$CHARACTER_SET_ID.NULL = FALSE; - X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); - break; - - case att_functionarg_field_precision: - X.RDB$FIELD_PRECISION.NULL = FALSE; - X.RDB$FIELD_PRECISION = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 90); - /* msg 90 function argument */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - } - else { - /* without RDB$FIELD_PRECISION */ - STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1) - X IN RDB$FUNCTION_ARGUMENTS - X.RDB$FIELD_SUB_TYPE.NULL = TRUE; - X.RDB$CHARACTER_SET_ID.NULL = TRUE; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_functionarg_name: - l = get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); - MISC_terminate (X.RDB$FUNCTION_NAME, temp, l, sizeof (temp)); - BURP_verbose (119, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 119 restoring argument for function %s */ - break; - - case att_functionarg_position: - X.RDB$ARGUMENT_POSITION = (USHORT) get_numeric(); - break; - - case att_functionarg_mechanism: - X.RDB$MECHANISM = (USHORT) get_numeric(); - break; - - case att_functionarg_field_type: - X.RDB$FIELD_TYPE = (USHORT) get_numeric(); - break; - - case att_functionarg_field_scale: - X.RDB$FIELD_SCALE = (USHORT) get_numeric(); - break; - - case att_functionarg_field_length: - X.RDB$FIELD_LENGTH = (USHORT) get_numeric(); - break; - - case att_functionarg_field_sub_type: - X.RDB$FIELD_SUB_TYPE.NULL = FALSE; - X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(); - break; - - case att_functionarg_character_set: - X.RDB$CHARACTER_SET_ID.NULL = FALSE; - X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 90); - /* msg 90 function argument */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - } -} - - -static BOOLEAN get_generator(void) -{ -/************************************** - * - * g e t _ g e n e r a t o r - * - ************************************** - * - * Functional description - * Pick up a gen-id. Like most things, there is ughly history. - * In the modern world, gen_id are free floating records. In the - * bad old days they were attributes of relations. Handle both - * nicely. - * - **************************************/ - SINT64 value; - TEXT name[32]; - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_end) - switch (attribute) { - case att_gen_generator: - get_text(name, sizeof(name)); - break; - - case att_gen_value: - /* IB v5 or earlier, gen_id value is an SLONG */ - value = (SINT64) get_numeric(); - break; - - case att_gen_value_int64: - /* IB v6 or later, gen_id value is an SINT64 */ - value = get_int64(); - break; - - default: - bad_attribute(scan_next_attr, attribute, 93); - /* msg 93 index */ - break; - } - - store_blr_gen_id(name, value); - - return TRUE; -} - - -static BOOLEAN get_global_field(void) -{ -/************************************** - * - * g e t _ g l o b a l _ f i e l d - * - ************************************** - * - * Functional description - * Reconstruct a global field. - * - **************************************/ - ATT_TYPE attribute; - TEXT temp[32]; - SSHORT l; - GFLD gfld; - UCHAR scan_next_attr; - TGBL tdgbl; - SSHORT save_subtype; - - tdgbl = GET_THREAD_DATA; - - gfld = (GFLD) NULL_PTR; - - if (tdgbl->RESTORE_format >= 6) { - /* with rdb$field_precision */ - STORE (REQUEST_HANDLE tdgbl->handles_get_global_field_req_handle1) - X IN RDB$FIELDS - - X.RDB$FIELD_SCALE = X.RDB$SEGMENT_LENGTH = 0; - X.RDB$CHARACTER_SET_ID = X.RDB$COLLATION_ID = 0; - X.RDB$FIELD_SUB_TYPE = 0; - X.RDB$COMPUTED_BLR.NULL = TRUE; - X.RDB$COMPUTED_SOURCE.NULL = TRUE; - X.RDB$QUERY_NAME.NULL = TRUE; - X.RDB$EDIT_STRING.NULL = TRUE; - X.RDB$QUERY_HEADER.NULL = TRUE; - X.RDB$MISSING_VALUE.NULL = TRUE; - X.RDB$DEFAULT_VALUE.NULL = TRUE; - X.RDB$VALIDATION_BLR.NULL = TRUE; - X.RDB$VALIDATION_SOURCE.NULL = TRUE; - X.RDB$SYSTEM_FLAG.NULL = TRUE; - X.RDB$NULL_FLAG.NULL = TRUE; - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$DIMENSIONS.NULL = TRUE; - X.RDB$EXTERNAL_LENGTH.NULL = TRUE; - X.RDB$EXTERNAL_TYPE.NULL = TRUE; - X.RDB$EXTERNAL_SCALE.NULL = TRUE; - X.RDB$SEGMENT_LENGTH.NULL = TRUE; - X.RDB$CHARACTER_LENGTH.NULL = TRUE; - X.RDB$MISSING_SOURCE.NULL = TRUE; - X.RDB$DEFAULT_SOURCE.NULL = TRUE; - X.RDB$FIELD_SUB_TYPE.NULL = TRUE; - X.RDB$CHARACTER_SET_ID.NULL = TRUE; - X.RDB$COLLATION_ID.NULL = TRUE; - X.RDB$FIELD_PRECISION.NULL = TRUE; - - memset (X.RDB$QUERY_NAME, ' ', sizeof (X.RDB$QUERY_NAME)); - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_field_name: - l = get_text (X.RDB$FIELD_NAME, sizeof (X.RDB$FIELD_NAME)); - MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof (temp)); - BURP_verbose (121, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 121 restoring global field %s */ - break; - - case att_field_query_name: - get_text (X.RDB$QUERY_NAME, sizeof (X.RDB$QUERY_NAME)); - X.RDB$QUERY_NAME.NULL = FALSE; - break; - - case att_field_edit_string: - get_text (X.RDB$EDIT_STRING, sizeof (X.RDB$EDIT_STRING)); - X.RDB$EDIT_STRING.NULL = FALSE; - break; - - case att_field_query_header: - X.RDB$QUERY_HEADER.NULL = FALSE; - get_source_blob (&X.RDB$QUERY_HEADER, 0); - break; - - case att_field_type: - X.RDB$FIELD_TYPE = (USHORT) get_numeric(); - break; - - case att_field_length: - X.RDB$FIELD_LENGTH = (USHORT) get_numeric(); - break; - - case att_field_scale: - X.RDB$FIELD_SCALE = (USHORT) get_numeric(); - X.RDB$FIELD_SCALE.NULL = FALSE; - break; - - case att_field_sub_type: - X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(); - X.RDB$FIELD_SUB_TYPE.NULL = FALSE; - break; - - case att_field_segment_length: - X.RDB$SEGMENT_LENGTH = (USHORT) get_numeric(); - if (X.RDB$SEGMENT_LENGTH) - X.RDB$SEGMENT_LENGTH.NULL = FALSE; - break; - - case att_field_computed_blr: - X.RDB$COMPUTED_BLR.NULL = FALSE; - get_blr_blob (&X.RDB$COMPUTED_BLR, 0); - break; - - case att_field_computed_source: - X.RDB$COMPUTED_SOURCE.NULL = FALSE; - get_misc_blob (&X.RDB$COMPUTED_SOURCE, 1, 0); - break; - - case att_field_computed_source2: - X.RDB$COMPUTED_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$COMPUTED_SOURCE, 0); - break; - - case att_field_validation_blr: - if (tdgbl->gbl_sw_novalidity) - eat_blob(); - else - { - /* if we are going against a V4.0 database, - * restore the global fields in 2 phases. - */ - - if (tdgbl->global_trans) - { - if (!gfld) - gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); - - get_blr_blob (&gfld->gfld_vb, 1); - gfld->gfld_flags |= GFLD_validation_blr; - } - else - { - X.RDB$VALIDATION_BLR.NULL = FALSE; - get_blr_blob (&X.RDB$VALIDATION_BLR, 0); - } - } - break; - - case att_field_validation_source: - if (tdgbl->gbl_sw_novalidity) - eat_blob(); - else - { - /* if we are going against a V4.0 database, - * restore the global fields in 2 phases. - */ - - if (tdgbl->global_trans) - { - if (!gfld) - gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); - - get_misc_blob (&gfld->gfld_vs, 0, 1); - gfld->gfld_flags |= GFLD_validation_source; - } - else - { - X.RDB$VALIDATION_SOURCE.NULL = FALSE; - get_misc_blob (&X.RDB$VALIDATION_SOURCE, 0, 0); - } - } - break; - - case att_field_validation_source2: - if (tdgbl->gbl_sw_novalidity) - eat_blob(); - else - { - /* if we are going against a V4.0 database, - * restore the global fields in 2 phases. - */ - - if (tdgbl->global_trans) - { - if (!gfld) - gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); - - get_source_blob (&gfld->gfld_vs2, 1); - gfld->gfld_flags |= GFLD_validation_source2; - } - else - { - X.RDB$VALIDATION_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$VALIDATION_SOURCE, 0); - } - } - break; - - case att_field_missing_value: - X.RDB$MISSING_VALUE.NULL = FALSE; - get_blr_blob (&X.RDB$MISSING_VALUE, 0); - break; - - case att_field_default_value: - X.RDB$DEFAULT_VALUE.NULL = FALSE; - get_blr_blob (&X.RDB$DEFAULT_VALUE, 0); - break; - - case att_field_system_flag: - X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); - X.RDB$SYSTEM_FLAG.NULL = FALSE; - break; - - case att_field_null_flag: - X.RDB$NULL_FLAG = (USHORT) get_numeric(); - X.RDB$NULL_FLAG.NULL = FALSE; - break; - - case att_field_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); - break; - - case att_field_description2: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - case att_field_external_length: - X.RDB$EXTERNAL_LENGTH.NULL = FALSE; - X.RDB$EXTERNAL_LENGTH = (USHORT) get_numeric(); - break; - - case att_field_external_scale: - X.RDB$EXTERNAL_SCALE.NULL = FALSE; - X.RDB$EXTERNAL_SCALE = (USHORT) get_numeric(); - break; - - case att_field_external_type: - X.RDB$EXTERNAL_TYPE.NULL = FALSE; - X.RDB$EXTERNAL_TYPE = (USHORT) get_numeric(); - break; - - case att_field_dimensions: - X.RDB$DIMENSIONS.NULL = FALSE; - X.RDB$DIMENSIONS = (USHORT) get_numeric(); - break; - - case att_field_character_length: - X.RDB$CHARACTER_LENGTH.NULL = FALSE; - X.RDB$CHARACTER_LENGTH = (USHORT) get_numeric(); - break; - - case att_field_default_source: - X.RDB$DEFAULT_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$DEFAULT_SOURCE, 0); - break; - - case att_field_missing_source: - X.RDB$MISSING_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$MISSING_SOURCE, 0); - break; - - case att_field_character_set: - X.RDB$CHARACTER_SET_ID.NULL = FALSE; - X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); - break; - - case att_field_collation_id: - X.RDB$COLLATION_ID.NULL = FALSE; - X.RDB$COLLATION_ID = (USHORT) get_numeric(); - break; - - case att_field_precision: - X.RDB$FIELD_PRECISION.NULL = FALSE; - X.RDB$FIELD_PRECISION = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 92); /* msg 92 global field */ - break; - } - if (X.RDB$FIELD_TYPE <= DTYPE_BLR_MAX) - { - l = gds_cvt_blr_dtype [X.RDB$FIELD_TYPE]; - if (l = type_lengths [l]) - X.RDB$FIELD_LENGTH = l; - } - - if (gfld) - strcpy (gfld->gfld_name, X.RDB$FIELD_NAME); - - /* V3.3 used a different method from V4.0 for encoding International - * text character set & collation information. Here we are - * looking at the metadata information, deciding if it is - * the V3.3 method, and converting it to the V4.0 method so - * V3.3 customers can migrate their database to V4.0. - */ - save_subtype = X.RDB$FIELD_SUB_TYPE; - if (X.RDB$CHARACTER_SET_ID.NULL && - X.RDB$COLLATION_ID.NULL && - cvt_v3_to_v4_intl (X.RDB$FIELD_TYPE, &X.RDB$FIELD_SCALE, - &X.RDB$FIELD_SUB_TYPE, &X.RDB$CHARACTER_SET_ID, - &X.RDB$COLLATION_ID)) - { - FLD f; - - /* If some value was reset, set the NULL flag */ - if (save_subtype && !X.RDB$FIELD_SUB_TYPE) - X.RDB$FIELD_SUB_TYPE.NULL = TRUE; - X.RDB$CHARACTER_SET_ID.NULL = FALSE; - X.RDB$COLLATION_ID.NULL = FALSE; - - /* Add an entry to the converted-field link list - * so we can also convert local fields based on this - * global field - */ - - f = (FLD) BURP_ALLOC_ZERO (sizeof(struct fld)); - strcpy (f->fld_name, X.RDB$FIELD_NAME); - f->fld_sub_type = X.RDB$FIELD_SUB_TYPE; - f->fld_scale = X.RDB$FIELD_SCALE; - f->fld_character_set_id = X.RDB$CHARACTER_SET_ID; - f->fld_collation_id = X.RDB$COLLATION_ID; - f->fld_next = tdgbl->v3_cvt_fld_list; - tdgbl->v3_cvt_fld_list = f; - } - - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - } - else { /* RESTORE_format < 6 */ - - /* without rdb$field_precision */ - - STORE (REQUEST_HANDLE tdgbl->handles_get_global_field_req_handle1) - X IN RDB$FIELDS - - X.RDB$FIELD_SCALE = X.RDB$SEGMENT_LENGTH = 0; - X.RDB$CHARACTER_SET_ID = X.RDB$COLLATION_ID = 0; - X.RDB$FIELD_SUB_TYPE = 0; - X.RDB$COMPUTED_BLR.NULL = TRUE; - X.RDB$COMPUTED_SOURCE.NULL = TRUE; - X.RDB$QUERY_NAME.NULL = TRUE; - X.RDB$EDIT_STRING.NULL = TRUE; - X.RDB$QUERY_HEADER.NULL = TRUE; - X.RDB$MISSING_VALUE.NULL = TRUE; - X.RDB$DEFAULT_VALUE.NULL = TRUE; - X.RDB$VALIDATION_BLR.NULL = TRUE; - X.RDB$VALIDATION_SOURCE.NULL = TRUE; - X.RDB$SYSTEM_FLAG.NULL = TRUE; - X.RDB$NULL_FLAG.NULL = TRUE; - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$DIMENSIONS.NULL = TRUE; - X.RDB$EXTERNAL_LENGTH.NULL = TRUE; - X.RDB$EXTERNAL_TYPE.NULL = TRUE; - X.RDB$EXTERNAL_SCALE.NULL = TRUE; - X.RDB$SEGMENT_LENGTH.NULL = TRUE; - X.RDB$CHARACTER_LENGTH.NULL = TRUE; - X.RDB$MISSING_SOURCE.NULL = TRUE; - X.RDB$DEFAULT_SOURCE.NULL = TRUE; - X.RDB$FIELD_SUB_TYPE.NULL = TRUE; - X.RDB$CHARACTER_SET_ID.NULL = TRUE; - X.RDB$COLLATION_ID.NULL = TRUE; - - memset (X.RDB$QUERY_NAME, ' ', sizeof (X.RDB$QUERY_NAME)); - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_field_name: - l = get_text (X.RDB$FIELD_NAME, sizeof (X.RDB$FIELD_NAME)); - MISC_terminate (X.RDB$FIELD_NAME, temp, l, sizeof (temp)); - BURP_verbose (121, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 121 restoring global field %s */ - break; - - case att_field_query_name: - get_text (X.RDB$QUERY_NAME, sizeof (X.RDB$QUERY_NAME)); - X.RDB$QUERY_NAME.NULL = FALSE; - break; - - case att_field_edit_string: - get_text (X.RDB$EDIT_STRING, sizeof (X.RDB$EDIT_STRING)); - X.RDB$EDIT_STRING.NULL = FALSE; - break; - - case att_field_query_header: - X.RDB$QUERY_HEADER.NULL = FALSE; - get_source_blob (&X.RDB$QUERY_HEADER, 0); - break; - - case att_field_type: - X.RDB$FIELD_TYPE = (USHORT) get_numeric(); - break; - - case att_field_length: - X.RDB$FIELD_LENGTH = (USHORT) get_numeric(); - break; - - case att_field_scale: - X.RDB$FIELD_SCALE = (USHORT) get_numeric(); - X.RDB$FIELD_SCALE.NULL = FALSE; - break; - - case att_field_sub_type: - X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(); - X.RDB$FIELD_SUB_TYPE.NULL = FALSE; - break; - - case att_field_segment_length: - X.RDB$SEGMENT_LENGTH = (USHORT) get_numeric(); - if (X.RDB$SEGMENT_LENGTH) - X.RDB$SEGMENT_LENGTH.NULL = FALSE; - break; - - case att_field_computed_blr: - X.RDB$COMPUTED_BLR.NULL = FALSE; - get_blr_blob (&X.RDB$COMPUTED_BLR, 0); - break; - - case att_field_computed_source: - X.RDB$COMPUTED_SOURCE.NULL = FALSE; - get_misc_blob (&X.RDB$COMPUTED_SOURCE, 1, 0); - break; - - case att_field_computed_source2: - X.RDB$COMPUTED_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$COMPUTED_SOURCE, 0); - break; - - case att_field_validation_blr: - if (tdgbl->gbl_sw_novalidity) - eat_blob(); - else - { - /* if we are going against a V4.0 database, - * restore the global fields in 2 phases. - */ - - if (tdgbl->global_trans) - { - if (!gfld) - gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); - - get_blr_blob (&gfld->gfld_vb, 1); - gfld->gfld_flags |= GFLD_validation_blr; - } - else - { - X.RDB$VALIDATION_BLR.NULL = FALSE; - get_blr_blob (&X.RDB$VALIDATION_BLR, 0); - } - } - break; - - case att_field_validation_source: - if (tdgbl->gbl_sw_novalidity) - eat_blob(); - else - { - /* if we are going against a V4.0 database, - * restore the global fields in 2 phases. - */ - - if (tdgbl->global_trans) - { - if (!gfld) - gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); - - get_misc_blob (&gfld->gfld_vs, 0, 1); - gfld->gfld_flags |= GFLD_validation_source; - } - else - { - X.RDB$VALIDATION_SOURCE.NULL = FALSE; - get_misc_blob (&X.RDB$VALIDATION_SOURCE, 0, 0); - } - } - break; - - case att_field_validation_source2: - if (tdgbl->gbl_sw_novalidity) - eat_blob(); - else - { - /* if we are going against a V4.0 database, - * restore the global fields in 2 phases. - */ - - if (tdgbl->global_trans) - { - if (!gfld) - gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); - - get_source_blob (&gfld->gfld_vs2, 1); - gfld->gfld_flags |= GFLD_validation_source2; - } - else - { - X.RDB$VALIDATION_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$VALIDATION_SOURCE, 0); - } - } - break; - - case att_field_missing_value: - X.RDB$MISSING_VALUE.NULL = FALSE; - get_blr_blob (&X.RDB$MISSING_VALUE, 0); - break; - - case att_field_default_value: - X.RDB$DEFAULT_VALUE.NULL = FALSE; - get_blr_blob (&X.RDB$DEFAULT_VALUE, 0); - break; - - case att_field_system_flag: - X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); - X.RDB$SYSTEM_FLAG.NULL = FALSE; - break; - - case att_field_null_flag: - X.RDB$NULL_FLAG = (USHORT) get_numeric(); - X.RDB$NULL_FLAG.NULL = FALSE; - break; - - case att_field_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); - break; - - case att_field_description2: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - case att_field_external_length: - X.RDB$EXTERNAL_LENGTH.NULL = FALSE; - X.RDB$EXTERNAL_LENGTH = (USHORT) get_numeric(); - break; - - case att_field_external_scale: - X.RDB$EXTERNAL_SCALE.NULL = FALSE; - X.RDB$EXTERNAL_SCALE = (USHORT) get_numeric(); - break; - - case att_field_external_type: - X.RDB$EXTERNAL_TYPE.NULL = FALSE; - X.RDB$EXTERNAL_TYPE = (USHORT) get_numeric(); - break; - - case att_field_dimensions: - X.RDB$DIMENSIONS.NULL = FALSE; - X.RDB$DIMENSIONS = (USHORT) get_numeric(); - break; - - case att_field_character_length: - X.RDB$CHARACTER_LENGTH.NULL = FALSE; - X.RDB$CHARACTER_LENGTH = (USHORT) get_numeric(); - break; - - case att_field_default_source: - X.RDB$DEFAULT_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$DEFAULT_SOURCE, 0); - break; - - case att_field_missing_source: - X.RDB$MISSING_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$MISSING_SOURCE, 0); - break; - - case att_field_character_set: - X.RDB$CHARACTER_SET_ID.NULL = FALSE; - X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); - break; - - case att_field_collation_id: - X.RDB$COLLATION_ID.NULL = FALSE; - X.RDB$COLLATION_ID = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 92); /* msg 92 global field */ - break; - } - if (X.RDB$FIELD_TYPE <= DTYPE_BLR_MAX) - { - l = gds_cvt_blr_dtype [X.RDB$FIELD_TYPE]; - if (l = type_lengths [l]) - X.RDB$FIELD_LENGTH = l; - } - - if (gfld) - strcpy (gfld->gfld_name, X.RDB$FIELD_NAME); - - /* V3.3 used a different method from V4.0 for encoding International - * text character set & collation information. Here we are - * looking at the metadata information, deciding if it is - * the V3.3 method, and converting it to the V4.0 method so - * V3.3 customers can migrate their database to V4.0. - */ - save_subtype = X.RDB$FIELD_SUB_TYPE; - if (X.RDB$CHARACTER_SET_ID.NULL && - X.RDB$COLLATION_ID.NULL && - cvt_v3_to_v4_intl (X.RDB$FIELD_TYPE, &X.RDB$FIELD_SCALE, - &X.RDB$FIELD_SUB_TYPE, &X.RDB$CHARACTER_SET_ID, - &X.RDB$COLLATION_ID)) - { - FLD f; - - /* If some value was reset, set the NULL flag */ - if (save_subtype && !X.RDB$FIELD_SUB_TYPE) - X.RDB$FIELD_SUB_TYPE.NULL = TRUE; - X.RDB$CHARACTER_SET_ID.NULL = FALSE; - X.RDB$COLLATION_ID.NULL = FALSE; - - /* Add an entry to the converted-field link list - * so we can also convert local fields based on this - * global field - */ - - f = (FLD) BURP_ALLOC_ZERO (sizeof(struct fld)); - strcpy (f->fld_name, X.RDB$FIELD_NAME); - f->fld_sub_type = X.RDB$FIELD_SUB_TYPE; - f->fld_scale = X.RDB$FIELD_SCALE; - f->fld_character_set_id = X.RDB$CHARACTER_SET_ID; - f->fld_collation_id = X.RDB$COLLATION_ID; - f->fld_next = tdgbl->v3_cvt_fld_list; - tdgbl->v3_cvt_fld_list = f; - } - - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - } - if (gfld) { - gfld->gfld_next = tdgbl->gbl_global_fields; - tdgbl->gbl_global_fields = gfld; - } - - return TRUE; -} - - -static BOOLEAN get_index( REL relation) -{ -/************************************** - * - * g e t _ i n d e x - * - ************************************** - * - * Functional description - * Build an index. At the end stop - * and check that all fields are defined. - * If any fields are missing, delete the - * index. - * - **************************************/ - SSHORT count, segments; - TEXT index_name[32]; - ATT_TYPE attribute; - BOOLEAN foreign_index = FALSE; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - count = segments = 0; - - STORE (REQUEST_HANDLE tdgbl->handles_get_index_req_handle1) - X IN RDB$INDICES - strcpy (X.RDB$RELATION_NAME, relation->rel_name); - X.RDB$UNIQUE_FLAG = 0; - if (!tdgbl->gbl_sw_deactivate_indexes) - X.RDB$INDEX_INACTIVE = FALSE; - else - X.RDB$INDEX_INACTIVE = TRUE; - X.RDB$INDEX_TYPE.NULL = TRUE; - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$FOREIGN_KEY.NULL = TRUE; - X.RDB$EXPRESSION_SOURCE.NULL = TRUE; - X.RDB$EXPRESSION_BLR.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_index_name: - (void) get_text (X.RDB$INDEX_NAME, sizeof (X.RDB$INDEX_NAME)); - strcpy (index_name, X.RDB$INDEX_NAME); - BURP_verbose (122, X.RDB$INDEX_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - break; - - case att_segment_count: - X.RDB$SEGMENT_COUNT = segments = (USHORT) get_numeric(); - break; - - case att_index_unique_flag: - X.RDB$UNIQUE_FLAG = (USHORT) get_numeric(); - break; - - case att_index_inactive: - X.RDB$INDEX_INACTIVE = (USHORT) get_numeric(); - /* Defer foreign key index activation */ - /* Modified by Toni Martir, all index deferred when verbose */ - if (tdgbl->gbl_sw_verbose) - { - if (X.RDB$INDEX_INACTIVE == FALSE) - X.RDB$INDEX_INACTIVE = DEFERRED_ACTIVE; - } - else - { - if (X.RDB$INDEX_INACTIVE == FALSE && foreign_index) - X.RDB$INDEX_INACTIVE = DEFERRED_ACTIVE; - } - if (tdgbl->gbl_sw_deactivate_indexes) - X.RDB$INDEX_INACTIVE = TRUE; - break; - - case att_index_type: - X.RDB$INDEX_TYPE.NULL = FALSE; - X.RDB$INDEX_TYPE = (USHORT) get_numeric(); - break; - - case att_index_field_name: - STORE (REQUEST_HANDLE tdgbl->handles_get_index_req_handle2) - Y IN RDB$INDEX_SEGMENTS - get_text (Y.RDB$FIELD_NAME, sizeof (Y.RDB$FIELD_NAME)); - strcpy (Y.RDB$INDEX_NAME, X.RDB$INDEX_NAME); - Y.RDB$FIELD_POSITION = count++; - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - break; - - case att_index_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_misc_blob (&X.RDB$DESCRIPTION, 0, 0); - break; - - case att_index_description2: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - case att_index_expression_source: - X.RDB$EXPRESSION_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$EXPRESSION_SOURCE, 0); - break; - - case att_index_expression_blr: - X.RDB$EXPRESSION_BLR.NULL = FALSE; - get_blr_blob (&X.RDB$EXPRESSION_BLR, 0); - break; - - case att_index_foreign_key: - /* BUG 8183: For more information see description of */ - /* "bug_8183" function below. */ - /* Note: ATT_BACKUP_FORMAT for IB3.3 is equal 4 */ - if ( (tdgbl->RESTORE_format <= 4) && - (tdgbl->gbl_sw_bug8183 || bug_8183(tdgbl)) ) - { - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - } - else - { - foreign_index = TRUE; - /* Defer foreign key index activation */ - if (X.RDB$INDEX_INACTIVE == FALSE) - X.RDB$INDEX_INACTIVE = DEFERRED_ACTIVE; - if (tdgbl->gbl_sw_deactivate_indexes) - X.RDB$INDEX_INACTIVE = TRUE; - X.RDB$FOREIGN_KEY.NULL = FALSE; - get_text (X.RDB$FOREIGN_KEY, sizeof (X.RDB$FOREIGN_KEY)); - } - break; - - default: - bad_attribute (scan_next_attr, attribute, 93); - /* msg 93 index */ - break; - } - count = 0; - FOR (REQUEST_HANDLE tdgbl->handles_get_index_req_handle3) - RFR IN RDB$RELATION_FIELDS CROSS I_S IN RDB$INDEX_SEGMENTS - OVER RDB$FIELD_NAME WITH I_S.RDB$INDEX_NAME = index_name AND - RFR.RDB$RELATION_NAME = relation->rel_name - count++; - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - - if (count != segments) - { - FOR (REQUEST_HANDLE tdgbl->handles_get_index_req_handle4) - I_S IN RDB$INDEX_SEGMENTS WITH I_S.RDB$INDEX_NAME = index_name - ERASE I_S; - ON_ERROR - general_on_error (); - END_ERROR; - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - return FALSE; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static void get_misc_blob( - ISC_QUAD * blob_id, - USHORT sub_type, USHORT glb_trans) -{ -/************************************** - * - * g e t _ m i s c _ b l o b - * - ************************************** - * - * Functional description - * Read blob attributes and copy data from input file to nice, - * shiney, new blob. - * - **************************************/ - STATUS status_vector[ISC_STATUS_LENGTH]; - SLONG *blob; - USHORT length; - UCHAR *buffer, static_buffer[1024]; - USHORT bpb_length; - UCHAR *bpb; - isc_tr_handle local_trans; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - length = (USHORT) get_numeric(); - -/* Create new blob */ - - blob = NULL; - - bpb_length = 0; - bpb = NULL; - - if (glb_trans && tdgbl->global_trans) - local_trans = tdgbl->global_trans; - else - local_trans = gds__trans; - - if (isc_create_blob2(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(local_trans), - GDS_REF(blob), - GDS_VAL(blob_id), - bpb_length, - bpb)) BURP_error_redirect(status_vector, 37, 0, 0); - /* msg 37 gds__create_blob failed */ - -/* Allocate blob buffer is static buffer is too short */ - - if (!length || length <= sizeof(static_buffer)) - buffer = static_buffer; - else - buffer = BURP_ALLOC(length); - - if (length) { - (void) GET_BLOCK(buffer, length); - } - - if (isc_put_segment(status_vector, - GDS_REF(blob), - length, - GDS_VAL(buffer))) - BURP_error_redirect(status_vector, 38, 0, 0); - /* msg 38 gds__put_segment failed */ - - if (isc_close_blob(status_vector, GDS_REF(blob))) - BURP_error_redirect(status_vector, 23, 0, 0); - /* msg 23 gds__close_blob failed */ - - if (buffer != static_buffer) - BURP_FREE(buffer); -} - - -static SLONG get_numeric(void) -{ -/************************************** - * - * g e t _ n u m e r i c - * - ************************************** - * - * Functional description - * Get a numeric value from the input stream. - * - **************************************/ - SLONG value[2]; - SSHORT length; - - length = get_text((UCHAR *) value, sizeof(value)); - - return isc_vax_integer((UCHAR *) value, length); -} - - -static SINT64 get_int64(void) -{ -/************************************** - * - * g e t _ i n t 6 4 - * - ************************************** - * - * Functional description - * Get a possibly-64-bit numeric value from the input stream. - * - **************************************/ - SLONG value[4]; - SSHORT length; - - length = get_text((UCHAR *) value, sizeof(value)); - - return isc_portable_integer((UCHAR *) value, length); -} - - -static BOOLEAN get_procedure(void) -{ -/************************************** - * - * g e t _ p r o c e d u r e - * - ************************************** - * - * Functional description - * Reconstruct a stored procedure. - * Use the global_trans so we don't have to commit - * until after the indices are activated. This - * will allow us to use a PLAN in a SP. - * - **************************************/ - ATT_TYPE attribute; - GDS_NAME procedure_name; - TEXT temp[32]; - SSHORT l; - PRC procedure; - UCHAR scan_next_attr; - isc_tr_handle local_trans; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds__trans; - - procedure = (PRC) BURP_ALLOC_ZERO(sizeof(struct prc)); - procedure->prc_next = tdgbl->procedures; - tdgbl->procedures = procedure; - - STORE (TRANSACTION_HANDLE local_trans - REQUEST_HANDLE tdgbl->handles_get_procedure_req_handle1) - X IN RDB$PROCEDURES - X.RDB$PROCEDURE_SOURCE.NULL = TRUE; - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$SECURITY_CLASS.NULL = TRUE; - X.RDB$OWNER_NAME.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_procedure_name: - l = get_text (X.RDB$PROCEDURE_NAME, sizeof (X.RDB$PROCEDURE_NAME)); - procedure->prc_name_length = l; - strcpy (procedure->prc_name, X.RDB$PROCEDURE_NAME); - MISC_terminate (X.RDB$PROCEDURE_NAME, temp, l, sizeof (temp)); - BURP_verbose (195, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 195 restoring stored procedure %s */ - break; - - case att_procedure_description: - get_misc_blob (&X.RDB$DESCRIPTION, 0, 1); - X.RDB$DESCRIPTION.NULL = FALSE; - break; - - case att_procedure_description2: - get_source_blob (&X.RDB$DESCRIPTION, 1); - X.RDB$DESCRIPTION.NULL = FALSE; - break; - - case att_procedure_source: - get_misc_blob (&X.RDB$PROCEDURE_SOURCE, 0, 1); - X.RDB$PROCEDURE_SOURCE.NULL = FALSE; - break; - - case att_procedure_source2: - get_source_blob (&X.RDB$PROCEDURE_SOURCE, 1); - X.RDB$PROCEDURE_SOURCE.NULL = FALSE; - break; - - case att_procedure_blr: - get_blr_blob (&X.RDB$PROCEDURE_BLR, 1); - break; - - case att_procedure_security_class: - get_text (X.RDB$SECURITY_CLASS, sizeof (X.RDB$SECURITY_CLASS)); - X.RDB$SECURITY_CLASS.NULL = FALSE; - break; - - case att_procedure_owner_name: - get_text (procedure->prc_owner, sizeof (procedure->prc_owner)); - break; - - case att_procedure_inputs: - X.RDB$PROCEDURE_INPUTS = (USHORT) get_numeric(); - if (X.RDB$PROCEDURE_INPUTS == 0) - X.RDB$PROCEDURE_INPUTS.NULL = TRUE; - else - X.RDB$PROCEDURE_INPUTS.NULL = FALSE; - break; - - case att_procedure_outputs: - X.RDB$PROCEDURE_OUTPUTS = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 89); - /* msg 89 function */ - break; - } - strcpy (procedure_name, X.RDB$PROCEDURE_NAME); - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - -/* at the end of prms for a procedure is the rec_procedure_end marker */ - - while (GET() == rec_procedure_prm) - get_procedure_prm(procedure_name); - - return TRUE; -} - - -static BOOLEAN get_procedure_prm( GDS_NAME procptr) -{ -/************************************** - * - * g e t _ p r o c e d u r e _ p r m - * - ************************************** - * - * Functional description - * Reconstruct stored procedure parameter. - * Use the global_trans so we don't have to commit - * until after the indices are activated. This - * will allow us to use a PLAN in a SP. - * - **************************************/ - ATT_TYPE attribute; - SSHORT l; - TEXT temp[32]; - UCHAR scan_next_attr; - isc_tr_handle local_trans; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds__trans; - - STORE (TRANSACTION_HANDLE local_trans - REQUEST_HANDLE tdgbl->handles_get_procedure_prm_req_handle1) - X IN RDB$PROCEDURE_PARAMETERS - X.RDB$DESCRIPTION.NULL = TRUE; - strcpy (X.RDB$PROCEDURE_NAME, procptr); - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_procedureprm_name: - l = get_text (X.RDB$PARAMETER_NAME, sizeof (X.RDB$PARAMETER_NAME)); - MISC_terminate (X.RDB$PARAMETER_NAME, temp, l, sizeof (temp)); - BURP_verbose (196, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 196 restoring parameter %s for stored procedure */ - break; - - case att_procedureprm_type: - X.RDB$PARAMETER_TYPE= (USHORT) get_numeric(); - break; - - case att_procedureprm_number: - X.RDB$PARAMETER_NUMBER= (USHORT) get_numeric(); - break; - - case att_procedureprm_field_source: - get_text (X.RDB$FIELD_SOURCE, sizeof (X.RDB$FIELD_SOURCE)); - break; - - case att_procedureprm_description: - get_misc_blob (&X.RDB$DESCRIPTION, 0, 1); - X.RDB$DESCRIPTION.NULL = FALSE; - break; - - case att_procedureprm_description2: - get_source_blob (&X.RDB$DESCRIPTION, 1); - X.RDB$DESCRIPTION.NULL = FALSE; - break; - - default: - bad_attribute (scan_next_attr, attribute, 90); - /* msg 90 function argument */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_ref_constraint(void) -{ -/************************************** - * - * g e t _ r e f _ c o n s t r a i n t - * - ************************************** - * - * Functional description - * Restore data for referential constraints. - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_ref_constraint_req_handle1) - X IN RDB$REF_CONSTRAINTS - X.RDB$CONSTRAINT_NAME.NULL = TRUE; - X.RDB$CONST_NAME_UQ.NULL = TRUE; - X.RDB$MATCH_OPTION.NULL = TRUE; - X.RDB$UPDATE_RULE.NULL = TRUE; - X.RDB$DELETE_RULE.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_ref_constraint_name: - X.RDB$CONSTRAINT_NAME.NULL = FALSE; - get_text (X.RDB$CONSTRAINT_NAME, sizeof (X.RDB$CONSTRAINT_NAME)); - break; - - case att_ref_unique_const_name: - X.RDB$CONST_NAME_UQ.NULL = FALSE; - get_text (X.RDB$CONST_NAME_UQ, sizeof (X.RDB$CONST_NAME_UQ)); - break; - - case att_ref_match_option: - X.RDB$MATCH_OPTION.NULL = FALSE; - get_text (X.RDB$MATCH_OPTION, sizeof (X.RDB$MATCH_OPTION)); - break; - - case att_ref_update_rule: - X.RDB$UPDATE_RULE.NULL = FALSE; - get_text (X.RDB$UPDATE_RULE, sizeof (X.RDB$UPDATE_RULE)); - break; - - case att_ref_delete_rule: - X.RDB$DELETE_RULE.NULL = FALSE; - get_text (X.RDB$DELETE_RULE, sizeof (X.RDB$DELETE_RULE)); - break; - - default: - bad_attribute (scan_next_attr, attribute, 208); - /* msg 208 relation constraint */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_relation(void) -{ -/************************************** - * - * g e t _ r e l a t i o n - * - ************************************** - * - * Functional description - * Write relation meta-data and data. - * Use the default transaction for RELATIONS, - * and use the global_trans for VIEWS. This - * enables us to have views of SP and views - * with plans. Assume it is a view if it has - * RDB$VIEW_BLR, also assume RDB$VIEW_BLR is - * the first blob in the backup file. - * - * - **************************************/ - REL relation; - FLD field, *ptr; - TEXT temp[32]; - SSHORT l; - ATT_TYPE attribute; - REC_TYPE record; - UCHAR scan_next_attr; - TGBL tdgbl; - - SLONG rel_flags, sys_flag; - short rel_flags_null, sys_flag_null; - GDS_QUAD view_blr, view_src, rel_desc, ext_desc; - USHORT view_blr_null, view_src_null, rel_desc_null, ext_desc_null; - char sec_class[32]; - short sec_class_null; - TEXT ext_file_name[253]; - short ext_file_name_null; - - isc_tr_handle local_trans; - tdgbl = GET_THREAD_DATA; - -/* Pick up relation attributes */ - - relation = (REL) BURP_ALLOC_ZERO(sizeof(struct rel)); - relation->rel_next = tdgbl->relations; - tdgbl->relations = relation; - - rel_flags_null = TRUE; - sys_flag_null = TRUE; - view_blr_null = TRUE; - view_src_null = TRUE; - rel_desc_null = TRUE; - ext_desc_null = TRUE; - sec_class_null = TRUE; - ext_file_name_null = TRUE; - - sec_class[0] = '\0'; - ext_file_name[0] = '\0'; - - view_blr = isc_blob_null; - view_src = isc_blob_null; - ext_desc = isc_blob_null; - rel_desc = isc_blob_null; - -/* - *STORE (REQUEST_HANDLE tdgbl->handles_get_relation_req_handle1) - X IN RDB$RELATIONS - X.RDB$SYSTEM_FLAG.NULL = TRUE; - X.RDB$FLAGS.NULL = TRUE; - X.RDB$SECURITY_CLASS.NULL = TRUE; - X.RDB$VIEW_BLR.NULL = TRUE; - X.RDB$VIEW_SOURCE.NULL = TRUE; - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$RUNTIME.NULL = TRUE; - X.RDB$EXTERNAL_DESCRIPTION.NULL = TRUE; -*/ - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_end) - switch (attribute) { - case att_relation_name: - l = get_text(relation->rel_name, 31); - relation->rel_name_length = l; - MISC_terminate(relation->rel_name, temp, l, sizeof(temp)); - BURP_verbose(167, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 167 restoring relation %s */ - break; - - case att_relation_security_class: - sec_class_null = FALSE; - get_text(sec_class, sizeof(sec_class)); - break; - - case att_relation_view_blr: - view_blr_null = FALSE; - get_blr_blob(&view_blr, 1); - relation->rel_flags |= REL_view; - break; - - case att_relation_view_source: - view_src_null = FALSE; - get_misc_blob(&view_src, 1, (USHORT) ! view_blr_null); - break; - - case att_relation_view_source2: - view_src_null = FALSE; - get_source_blob(&view_src, (USHORT) ! view_blr_null); - break; - - case att_relation_description: - rel_desc_null = FALSE; - get_misc_blob(&rel_desc, 1, (USHORT) ! view_blr_null); - break; - - case att_relation_description2: - rel_desc_null = FALSE; - get_source_blob(&rel_desc, (USHORT) ! view_blr_null); - break; - - - case att_relation_flags: - rel_flags_null = FALSE; - rel_flags = get_numeric(); - break; - - case att_relation_system_flag: - sys_flag_null = FALSE; - sys_flag = get_numeric(); - break; - - case att_relation_ext_description: - ext_desc_null = FALSE; - get_misc_blob(&ext_desc, 1, (USHORT) ! view_blr_null); - break; - - case att_relation_ext_description2: - ext_desc_null = FALSE; - get_source_blob(&ext_desc, (USHORT) ! view_blr_null); - break; - - case att_relation_owner_name: - get_text(relation->rel_owner, sizeof(relation->rel_owner)); - break; - - case att_relation_ext_file_name: - ext_file_name_null = FALSE; - get_text(ext_file_name, sizeof(ext_file_name)); - break; - - default: - bad_attribute(scan_next_attr, attribute, 111); - /* msg 111 relation */ - break; - } - -/* If this is a view and there is a global transaction then use it */ - - if (view_blr_null || !tdgbl->global_trans) - local_trans = gds__trans; - else - local_trans = tdgbl->global_trans; - - STORE (TRANSACTION_HANDLE local_trans - REQUEST_HANDLE tdgbl->handles_get_relation_req_handle1) - X IN RDB$RELATIONS - - X.RDB$SYSTEM_FLAG.NULL = sys_flag_null; - X.RDB$FLAGS.NULL = rel_flags_null; - X.RDB$SECURITY_CLASS.NULL = sec_class_null; - X.RDB$VIEW_BLR.NULL = view_blr_null; - X.RDB$VIEW_SOURCE.NULL = view_src_null; - X.RDB$DESCRIPTION.NULL = rel_desc_null; - X.RDB$RUNTIME.NULL = TRUE; - X.RDB$EXTERNAL_DESCRIPTION.NULL = ext_desc_null; - X.RDB$EXTERNAL_FILE.NULL = ext_file_name_null; - - X.RDB$SYSTEM_FLAG = (USHORT) sys_flag; - X.RDB$FLAGS = (USHORT) rel_flags; - X.RDB$VIEW_BLR = view_blr; - X.RDB$VIEW_SOURCE = view_src; - X.RDB$DESCRIPTION = rel_desc; - X.RDB$EXTERNAL_DESCRIPTION = ext_desc; - - strcpy(X.RDB$SECURITY_CLASS, sec_class); - strcpy(X.RDB$RELATION_NAME, relation->rel_name); - strcpy(X.RDB$EXTERNAL_FILE, ext_file_name); - - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - -/* Eat up misc. records */ - ptr = &relation->rel_fields; - - while (GET_RECORD(record) != rec_data) - switch (record) { - case rec_relation_end: - if (tdgbl->gbl_sw_incremental) { - BURP_verbose(170, relation->rel_name, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); - /* msg 170: committing metadata for relation %s */ - COMMIT - /* existing ON_ERROR continues past error, beck */ - ON_ERROR - BURP_print (171, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 171: error committing metadata for relation %s */ - BURP_print_status (tdgbl->status_vector); - ROLLBACK; - ON_ERROR - general_on_error (); - END_ERROR; - END_ERROR; - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - } - return TRUE; - - case rec_field: - *ptr = field = get_field(relation); - if (!field) - return FALSE; - ptr = &field->fld_next; - break; - - case rec_view: - get_view(relation); - break; - - default: -#ifdef SUPERSERVER - BURP_svc_error(43, isc_arg_number, (void *) record, - 0, NULL, 0, NULL, 0, NULL, 0, NULL); -#else - BURP_error(43, (void *) record, 0, 0, 0, 0); - /* msg 43 don't recognize record type %ld */ -#endif - break; - } - -/* If we fall thru, there are data records to be gotten */ -/* we can get here only when restoring ancient gbak'ed files where rec_data - was once embedded into rec_relation ... otherwise, meta commit happens - when we see the first rec_relation_data */ - - BURP_verbose(68, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); -/* msg 68 committing meta data */ - - COMMIT; - ON_ERROR - general_on_error (); - END_ERROR; - - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - - get_data(relation); - - return TRUE; -} - - -static BOOLEAN get_rel_constraint(void) -{ -/************************************** - * - * g e t _ r e l _ c o n s t r a i n t - * - ************************************** - * - * Functional description - * Restore data for relation constraints. - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_rel_constraint_req_handle1) - X IN RDB$RELATION_CONSTRAINTS - X.RDB$CONSTRAINT_NAME.NULL = TRUE; - X.RDB$CONSTRAINT_TYPE.NULL = TRUE; - X.RDB$RELATION_NAME.NULL = TRUE; - X.RDB$DEFERRABLE.NULL = TRUE; - X.RDB$INITIALLY_DEFERRED.NULL = TRUE; - X.RDB$INDEX_NAME.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_rel_constraint_name: - X.RDB$CONSTRAINT_NAME.NULL = FALSE; - get_text (X.RDB$CONSTRAINT_NAME, sizeof (X.RDB$CONSTRAINT_NAME)); - break; - - case att_rel_constraint_type: - X.RDB$CONSTRAINT_TYPE.NULL = FALSE; - get_text (X.RDB$CONSTRAINT_TYPE, sizeof (X.RDB$CONSTRAINT_TYPE)); - break; - - case att_rel_constraint_rel_name: - X.RDB$RELATION_NAME.NULL = FALSE; - get_text (X.RDB$RELATION_NAME, sizeof (X.RDB$RELATION_NAME)); - break; - - case att_rel_constraint_defer: - X.RDB$DEFERRABLE.NULL = FALSE; - get_text (X.RDB$DEFERRABLE, sizeof (X.RDB$DEFERRABLE)); - break; - - case att_rel_constraint_init: - X.RDB$INITIALLY_DEFERRED.NULL = FALSE; - get_text (X.RDB$INITIALLY_DEFERRED, sizeof (X.RDB$INITIALLY_DEFERRED)); - break; - - case att_rel_constraint_index: - X.RDB$INDEX_NAME.NULL = FALSE; - get_text (X.RDB$INDEX_NAME, sizeof (X.RDB$INDEX_NAME)); - break; - - default: - bad_attribute (scan_next_attr, attribute, 208); - /* msg 208 relation constraint */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_relation_data(void) -{ -/************************************** - * - * g e t _ r e l a t i o n _ d a t a - * - ************************************** - * - * Functional description - * Restore data for a relation. This is called when the data is - * standing free from the relation definition. We first need to - * find the relation named. If we can't find it, give up. - * - **************************************/ - REL relation; - TEXT name[32]; - SLONG gen_id; - ATT_TYPE attribute; - REC_TYPE record; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - relation = NULL; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_end) - switch (attribute) { - case att_relation_name: - get_text(name, sizeof(name)); - relation = find_relation(name); - break; - - default: - bad_attribute(scan_next_attr, attribute, 111); - /* msg 111 relation */ - break; - } - - if (!relation) - BURP_error_redirect(NULL_PTR, 49, 0, 0); -/* msg 49 no relation name for data */ - -/* Eat up misc. records */ - - GET_RECORD(record); - - SKIP_INIT; - while (SKIP_SCAN, TRUE) - switch (record) { - case rec_relation_end: - return TRUE; - - case rec_data: - record = get_data(relation); - /* get_data does a GET_RECORD */ - break; - - case rec_gen_id: - gen_id = get_numeric(); - store_blr_gen_id(name, gen_id); - GET_RECORD(record); - break; - - case rec_index: - get_index(relation); - GET_RECORD(record); - break; - - case rec_trigger: /* old style trigger */ - get_trigger_old(relation); - GET_RECORD(record); - break; - - default: - bad_attribute(scan_next_attr, attribute, 111); - /* msg 111 relation */ - GET_RECORD(record); - break; - } -} - - -static BOOLEAN get_sql_roles(void) -{ -/************************************** - * - * g e t _ s q l _ r o l e s - * - ************************************** - * - * Functional description - * Restore data for SQL roles - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - TGBL tdgbl; - TEXT temp[32]; - SSHORT l; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_sql_roles_req_handle1) - X IN RDB$ROLES - - X.RDB$ROLE_NAME.NULL = TRUE; - X.RDB$OWNER_NAME.NULL = TRUE; - SKIP_INIT; - - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_role_name: - X.RDB$ROLE_NAME.NULL = FALSE; - l = get_text (X.RDB$ROLE_NAME, sizeof (X.RDB$ROLE_NAME)); - MISC_terminate (X.RDB$ROLE_NAME, temp, l, sizeof (temp)); - /************************************************ - ** - ** msg 251, restoring SQL role: %s - ** - *************************************************/ - BURP_verbose (251, temp, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); - break; - - case att_role_owner_name: - X.RDB$OWNER_NAME.NULL = FALSE; - get_text (X.RDB$OWNER_NAME, sizeof (X.RDB$OWNER_NAME)); - break; - - default: - /************************************************* - ** - ** msg 250, Bad attribute for restoring SQL role - ** - **************************************************/ - bad_attribute (scan_next_attr, attribute, 250); - break; - } - END_STORE - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN is_ascii_name(TEXT * name, SSHORT len) -{ -/************************************** - * - * i s _ a s c i i _ n a m e - * - ************************************** - * - * Functional description - * Check if the input text is valid ASCII name - * - **************************************/ - SSHORT i; - - for (i = 0; - i < len && - ((name[i] >= 'A' && name[i] <= 'Z') || - (name[i] >= '0' && name[i] <= '9') || - name[i] == '_' || name[i] == '$'); i++); - if (i != len) - return FALSE; - else - return TRUE; -} - -static BOOLEAN get_security_class(void) -{ -/************************************** - * - * g e t _ s e c u r i t y _ c l a s s - * - ************************************** - * - * Functional description - * Restore a security class record including access control list. - * - **************************************/ - ATT_TYPE attribute; - TEXT temp[32]; - SSHORT l = 0; - UCHAR scan_next_attr; - TGBL tdgbl; - BOOLEAN is_valid_sec_class = FALSE; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_security_class_req_handle1) - X IN RDB$SECURITY_CLASSES - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - { - X.RDB$DESCRIPTION.NULL = TRUE; - switch (attribute) - { - case att_class_security_class: - l = get_text (X.RDB$SECURITY_CLASS, - sizeof (X.RDB$SECURITY_CLASS)); - - /* Bug fix for bug_no 7299: There was a V3 bug that inserted - garbage security class entry when doing GBAK. In order to - restore the V3 gbak file with this bad security entry to - V4 database. We should check if the security class is a - valid ASCII name. If not, skip this entry by setting - 'is_valid_sec_class' to FALSE. - */ - is_valid_sec_class = is_ascii_name(X.RDB$SECURITY_CLASS, l); - if (!is_valid_sec_class) - { - MISC_terminate (X.RDB$SECURITY_CLASS, temp, l, sizeof (temp)); - BURP_print (234, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 234 Skipped bad security class entry: %s */ - break; - } - - MISC_terminate (X.RDB$SECURITY_CLASS, temp, l, sizeof (temp)); - BURP_verbose (125, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 125 restoring security class %s */ - break; - - case att_class_acl: - get_misc_blob (&X.RDB$ACL, 0, 0); - break; - - case att_class_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_misc_blob (&X.RDB$DESCRIPTION, 0, 0); - break; - - case att_class_description2: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - default: - bad_attribute (scan_next_attr, attribute, 131); - /* msg 131 security class */ - break; - } - } - /* If the security class is not valid ASCII name, don't store it to the */ - /* database. Simply return from here and the entry is discarded. */ - if (!is_valid_sec_class) - { - return TRUE; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static void get_source_blob( ISC_QUAD * blob_id, USHORT glb_trans) -{ -/************************************** - * - * g e t _ s o u r c e _ b l o b - * - ************************************** - * - * Functional description - * Read source blob and query header attributes and copy data from - * input file to nice, shiney, new blob. - * - **************************************/ - STATUS status_vector[ISC_STATUS_LENGTH]; - SLONG length, *blob; - USHORT seg_len; - UCHAR *buffer, static_buffer[1024], *p; - isc_tr_handle local_trans; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - length = get_numeric(); - -/* Create new blob */ - - blob = NULL; - - if (glb_trans && tdgbl->global_trans) - local_trans = tdgbl->global_trans; - else - local_trans = gds__trans; - - if (isc_create_blob(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(local_trans), - GDS_REF(blob), - GDS_VAL(blob_id))) - BURP_error_redirect(status_vector, 37, 0, 0); - /* msg 37 gds__create_blob failed */ - -/* Allocate blob buffer is static buffer is too short */ - - if (!length || length <= sizeof(static_buffer)) - buffer = static_buffer; - else - buffer = BURP_ALLOC(length); - - while (length) { - p = buffer; - while (*p++ = GET()) - length--; - --p; - --length; - seg_len = p - buffer; - - if (isc_put_segment(status_vector, - GDS_REF(blob), - seg_len, - GDS_VAL(buffer))) - BURP_error_redirect(status_vector, 38, 0, 0); - /* msg 38 gds__put_segment failed */ - } - - if (isc_close_blob(status_vector, GDS_REF(blob))) - BURP_error_redirect(status_vector, 23, 0, 0); - /* msg 23 gds__close_blob failed */ - - if (buffer != static_buffer) - BURP_FREE(buffer); -} - - -static USHORT get_text( TEXT * text, ULONG length) -{ -/************************************** - * - * g e t _ t e x t - * - ************************************** - * - * Functional description - * Move a text attribute to a string and fill. - * - **************************************/ - ULONG l, l2; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - l2 = l = GET(); - - if (length < l) - BURP_error_redirect(NULL_PTR, 46, 0, 0); - /* msg 46 string truncated */ - - if (l) - text = GET_BLOCK(text, l); - - *text = 0; - - return (USHORT) l2; -} - - -static BOOLEAN get_trigger_old( REL relation) -{ -/************************************** - * - * g e t _ t r i g g e r _ o l d - * - ************************************** - * - * Functional description - * Get a trigger definition for a relation. - * - **************************************/ - enum trig_t type; - ATT_TYPE attribute; - TEXT *q, *p, *end, name[32]; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_trigger_old_req_handle1) - X IN RDB$TRIGGERS - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$TRIGGER_BLR.NULL = TRUE; - X.RDB$TRIGGER_SOURCE.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - { - switch (attribute) - { - case att_trig_type: - type = (enum trig_t) get_numeric(); - break; - - case att_trig_blr: - X.RDB$TRIGGER_BLR.NULL = FALSE; - get_blr_blob (&X.RDB$TRIGGER_BLR, 0); - break; - - case att_trig_source: - X.RDB$TRIGGER_SOURCE.NULL = FALSE; - get_misc_blob (&X.RDB$TRIGGER_SOURCE, 1, 0); - break; - - case att_trig_source2: - X.RDB$TRIGGER_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$TRIGGER_SOURCE, 0); - break; - - default: - bad_attribute (scan_next_attr, attribute, 134); - /* msg 134 trigger */ - break; - } - } - - /* fill in rest of attributes unique to new trigger format */ - - p = X.RDB$TRIGGER_NAME; - end = p + 31; - q = relation->rel_name; - while (*q) - *p++ = *q++; - - if (type == trig_pre_store) - { - X.RDB$TRIGGER_TYPE = TRIG_TYPE_PRE_STORE; - q = "$STORE"; - } - else if (type == trig_pre_modify) - { - X.RDB$TRIGGER_TYPE = TRIG_TYPE_PRE_MODIFY; - q = "$MODIFY"; - } - else if (type == trig_post_erase) - { - X.RDB$TRIGGER_TYPE = TRIG_TYPE_POST_ERASE; - q = "$ERASE"; - } - else - { - bad_attribute (scan_next_attr, attribute, 136); - /* msg 136 trigger type */ - return 0; - } - - while (*q && p < end) - *p++ = *q++; - *p = 0; - BURP_verbose (126, X.RDB$TRIGGER_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 126 restoring trigger %s */ - strncpy (X.RDB$RELATION_NAME, relation->rel_name, GDS_NAME_LEN); - strcpy (name, X.RDB$TRIGGER_NAME); - X.RDB$TRIGGER_SEQUENCE = TRIGGER_SEQUENCE_DEFAULT; - X.RDB$SYSTEM_FLAG = 0; /* restore as vanilla user type */ - - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - if (tdgbl->gbl_sw_incremental) { - COMMIT - /* existing ON_ERROR continues past error, beck */ - ON_ERROR - BURP_print (94, name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 94 trigger %s is invalid */ - BURP_print_status (tdgbl->status_vector); - ROLLBACK; - ON_ERROR - general_on_error (); - END_ERROR; - END_ERROR; - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - } - - return TRUE; -} - - -static BOOLEAN get_trigger(void) -{ -/************************************** - * - * g e t _ t r i g g e r - * - ************************************** - * - * Functional description - * Get a trigger definition in rdb$triggers. - * - **************************************/ - ATT_TYPE attribute; - TEXT name[32]; - UCHAR scan_next_attr; - isc_tr_handle local_trans; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds__trans; - - STORE (TRANSACTION_HANDLE local_trans - REQUEST_HANDLE tdgbl->handles_get_trigger_req_handle1) - X IN RDB$TRIGGERS - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$TRIGGER_BLR.NULL = TRUE; - X.RDB$TRIGGER_SOURCE.NULL = TRUE; - X.RDB$SYSTEM_FLAG.NULL = TRUE; - X.RDB$FLAGS.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - { - switch (attribute) - { - case att_trig_type: - X.RDB$TRIGGER_TYPE = (USHORT) get_numeric(); - break; - - case att_trig_flags: - X.RDB$FLAGS = (USHORT) get_numeric(); - X.RDB$FLAGS.NULL = FALSE; - break; - - case att_trig_blr: - X.RDB$TRIGGER_BLR.NULL = FALSE; - get_blr_blob (&X.RDB$TRIGGER_BLR, 1); - break; - - case att_trig_source: - X.RDB$TRIGGER_SOURCE.NULL = FALSE; - get_misc_blob (&X.RDB$TRIGGER_SOURCE, 1, 1); - break; - - case att_trig_source2: - X.RDB$TRIGGER_SOURCE.NULL = FALSE; - get_source_blob (&X.RDB$TRIGGER_SOURCE, 1); - break; - - case att_trig_name: - get_text (X.RDB$TRIGGER_NAME, sizeof (X.RDB$TRIGGER_NAME)); - strcpy (name, X.RDB$TRIGGER_NAME); - BURP_verbose (126, X.RDB$TRIGGER_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 126 restoring trigger %s */ - break; - - case att_trig_relation_name: - get_text (X.RDB$RELATION_NAME, sizeof (X.RDB$RELATION_NAME)); - break; - - case att_trig_sequence: - X.RDB$TRIGGER_SEQUENCE = (USHORT) get_numeric(); - break; - - case att_trig_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_misc_blob (&X.RDB$DESCRIPTION, 1, 1); - break; - - case att_trig_description2: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 1); - break; - - case att_trig_system_flag: - X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); - X.RDB$SYSTEM_FLAG.NULL = FALSE; - break; - - case att_trig_inactive: - X.RDB$TRIGGER_INACTIVE = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 134); - /* msg 134 trigger */ - break; - } - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - if (tdgbl->gbl_sw_incremental) { - COMMIT - /* existing ON_ERROR continues past error, beck */ - ON_ERROR - BURP_print (94, name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 94 trigger %s is invalid */ - BURP_print_status (tdgbl->status_vector); - ROLLBACK; - ON_ERROR - general_on_error (); - END_ERROR; - END_ERROR; - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - } - - return TRUE; -} - - -static BOOLEAN get_trigger_message(void) -{ -/************************************** - * - * g e t _ t r i g g e r _ m e s s a g e - * - ************************************** - * - * Functional description - * Get a trigger message text. - * - **************************************/ - ATT_TYPE attribute; - SSHORT flag; - UCHAR scan_next_attr; - isc_tr_handle local_trans; - TGBL tdgbl; - - BASED_ON RDB$TRIGGER_MESSAGES.RDB$TRIGGER_NAME name; - BASED_ON RDB$TRIGGER_MESSAGES.RDB$MESSAGE_NUMBER number; - BASED_ON RDB$TRIGGER_MESSAGES.RDB$MESSAGE message; - - tdgbl = GET_THREAD_DATA; - - flag = FALSE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_end) { - switch (attribute) { - case att_trigmsg_name: - get_text(name, sizeof(name)); - flag = FALSE; - FOR (REQUEST_HANDLE tdgbl->handles_get_trigger_message_req_handle1) - FIRST 1 X IN RDB$TRIGGERS WITH - X.RDB$SYSTEM_FLAG EQ 1 AND X.RDB$TRIGGER_NAME EQ name - flag = TRUE; - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - BURP_verbose(127, name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 127 restoring trigger message for %s */ - break; - - case att_trigmsg_number: - number = (USHORT) get_numeric(); - break; - - case att_trigmsg_text: - get_text(message, sizeof(message)); - break; - - default: - bad_attribute(scan_next_attr, attribute, 135); - /* msg 135 trigger message */ - break; - } - } - - if (flag) - return TRUE; - - local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds__trans; - - STORE (TRANSACTION_HANDLE local_trans - REQUEST_HANDLE tdgbl->handles_get_trigger_message_req_handle2) - X IN RDB$TRIGGER_MESSAGES - strcpy (X.RDB$TRIGGER_NAME, name); - X.RDB$MESSAGE_NUMBER = number; - strcpy (X.RDB$MESSAGE, message); - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - if (tdgbl->gbl_sw_incremental) { - COMMIT - /* existing ON_ERROR continues past error, beck */ - ON_ERROR - BURP_print (94, name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 94 trigger %s is invalid */ - BURP_print_status (tdgbl->status_vector); - ROLLBACK; - ON_ERROR - general_on_error (); - END_ERROR; - END_ERROR; - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - } - - return TRUE; -} - - -static BOOLEAN get_type(void) -{ -/************************************** - * - * g e t _ t y p e - * - ************************************** - * - * Functional description - * Get a type definition in rdb$types. - * - **************************************/ - ATT_TYPE attribute; - ULONG l; - TEXT temp[32]; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_get_type_req_handle1) - X IN RDB$TYPES - X.RDB$DESCRIPTION.NULL = TRUE; - X.RDB$SYSTEM_FLAG.NULL = TRUE; - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - { - switch (attribute) - { - case att_type_name: - l = get_text (X.RDB$TYPE_NAME, sizeof (X.RDB$TYPE_NAME)); - break; - - case att_type_type: - X.RDB$TYPE = (USHORT) get_numeric(); - break; - - case att_type_field_name: - get_text (X.RDB$FIELD_NAME, sizeof (X.RDB$FIELD_NAME)); - break; - - case att_type_description: - X.RDB$DESCRIPTION.NULL = FALSE; - get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); - break; - - case att_type_description2: - X.RDB$DESCRIPTION.NULL = FALSE; - get_source_blob (&X.RDB$DESCRIPTION, 0); - break; - - case att_type_system_flag: - X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); - X.RDB$SYSTEM_FLAG.NULL = FALSE; - break; - - default: - bad_attribute (scan_next_attr, attribute, 136); - /* msg 136 trigger type */ - break; - } - } - - MISC_terminate (X.RDB$TYPE_NAME, temp, l, sizeof (temp)); - BURP_verbose (128, temp, X.RDB$FIELD_NAME, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 128 restoring type %s for field %s */ - - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static BOOLEAN get_user_privilege(void) -{ -/************************************** - * - * g e t _ u s e r _ p r i v i l e g e - * - ************************************** - * - * Functional description - * Get a user privilege. - * Get next interesting user privilege. - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - UCHAR exists = 0; - USHORT flags = 0; - TGBL tdgbl; - isc_tr_handle local_trans = NULL; - - BASED_ON RDB$USER_PRIVILEGES.RDB$USER user; - BASED_ON RDB$USER_PRIVILEGES.RDB$GRANTOR grantor; - BASED_ON RDB$USER_PRIVILEGES.RDB$PRIVILEGE privilege; - BASED_ON RDB$USER_PRIVILEGES.RDB$GRANT_OPTION grant_option; - BASED_ON RDB$USER_PRIVILEGES.RDB$RELATION_NAME relation_name; - BASED_ON RDB$USER_PRIVILEGES.RDB$FIELD_NAME field_name; - BASED_ON RDB$USER_PRIVILEGES.RDB$USER_TYPE user_type; - BASED_ON RDB$USER_PRIVILEGES.RDB$OBJECT_TYPE object_type; - - tdgbl = GET_THREAD_DATA; - user_type = obj_user; - object_type = obj_relation; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_end) { - switch (attribute) { - case att_priv_user: - /* default USER_TYPE to USER */ - flags |= USER_PRIV_USER; - get_text(user, sizeof(user)); - BURP_verbose(123, user, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 123 restoring privilege for user %s */ - break; - - case att_priv_grantor: - flags |= USER_PRIV_GRANTOR; - get_text(grantor, sizeof(grantor)); - break; - - case att_priv_privilege: - flags |= USER_PRIV_PRIVILEGE; - get_text(privilege, sizeof(privilege)); - break; - - case att_priv_grant_option: - flags |= USER_PRIV_GRANT_OPTION; - grant_option = (USHORT) get_numeric(); - break; - - case att_priv_object_name: - flags |= USER_PRIV_OBJECT_NAME; - /* default OBJECT_TYPE to RELATION */ - get_text(relation_name, sizeof(relation_name)); - break; - - case att_priv_field_name: - flags |= USER_PRIV_FIELD_NAME; - get_text(field_name, sizeof(field_name)); - break; - - case att_priv_user_type: - flags |= USER_PRIV_USER_TYPE; - user_type = (USHORT) get_numeric(); - break; - - case att_priv_obj_type: - flags |= USER_PRIV_OBJECT_TYPE; - object_type = (USHORT) get_numeric(); - break; - - default: - bad_attribute(scan_next_attr, attribute, 105); - /* msg 105 privilege */ - break; - } - } - -/* Check if object exists */ - - switch (object_type) { - case obj_procedure: - { - PRC proc; - - for (proc = tdgbl->procedures; proc; proc = proc->prc_next) - if (!strcmp(proc->prc_name, relation_name)) { - exists = 1; - local_trans = - tdgbl->global_trans ? tdgbl-> - global_trans : gds__trans; - break; - } - } - break; - - case obj_relation: - { - REL rel; - - for (rel = tdgbl->relations; rel; rel = rel->rel_next) - if (!strcmp(rel->rel_name, relation_name)) { - exists = 1; - if (rel->rel_flags & REL_view) - local_trans = - tdgbl->global_trans ? tdgbl-> - global_trans : gds__trans; - break; - } - } - break; - - default: - exists = 1; - break; - } - - if (exists) { - if (!local_trans) - local_trans = gds__trans; - - STORE (TRANSACTION_HANDLE local_trans - REQUEST_HANDLE tdgbl->handles_get_user_privilege_req_handle1) X - IN RDB$USER_PRIVILEGES - - X.RDB$FIELD_NAME.NULL = TRUE; - X.RDB$OBJECT_TYPE.NULL = TRUE; - - if (flags & USER_PRIV_USER) - strcpy (X.RDB$USER, user); - - if (flags & USER_PRIV_GRANTOR) - strcpy (X.RDB$GRANTOR, grantor); - - if (flags & USER_PRIV_PRIVILEGE) - strcpy (X.RDB$PRIVILEGE, privilege); - - if (flags & USER_PRIV_GRANT_OPTION) - { - X.RDB$GRANT_OPTION = grant_option; - if (grant_option == 0) - X.RDB$GRANT_OPTION.NULL = TRUE; - else - X.RDB$GRANT_OPTION.NULL = FALSE; - } - - if (flags & USER_PRIV_OBJECT_NAME) - strcpy (X.RDB$RELATION_NAME, relation_name); - - if (flags & USER_PRIV_FIELD_NAME) - { - X.RDB$FIELD_NAME.NULL = FALSE; - strcpy (X.RDB$FIELD_NAME, field_name); - } - - /* - * USER_TYPE & OBJECT_TYPE are fields that did not exist before - * V4.0. So, we have to reconstruct them and initialize them to - * reasonable values. If they existed before then user_type and - * object_type contain the proper values. If they didn't exist - * then user_type and object_type contain the reasonable default - * values. - */ - - X.RDB$USER_TYPE.NULL = FALSE; - X.RDB$USER_TYPE = user_type; - - X.RDB$OBJECT_TYPE.NULL = FALSE; - X.RDB$OBJECT_TYPE = object_type; - - - /* - * If OBJECT_TYPE didn't exist before and we have a field level - * user privileges, then use obj_field instead. - * - * NOTE: Scanning the V4.0 code base, obj_field has never been - * used at all. The following code should be uncommented - * in case we ever introduce obj_field to the picture. - */ - /*********************************************************** - if ( !(flags & USER_PRIV_OBJECT_TYPE) ) - { - if ( flags & USER_PRIV_FIELD_NAME ) - { - X.RDB$OBJECT_TYPE = obj_field; - } - } - ***********************************************************/ - - - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - } - - return TRUE; -} - - -static BOOLEAN get_view( REL relation) -{ -/************************************** - * - * g e t _ v i e w - * - ************************************** - * - * Functional description - * Store a record in RDB$VIEW_RELATIONS. - * - **************************************/ - ATT_TYPE attribute; - UCHAR scan_next_attr; - isc_tr_handle local_trans; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - -/* If there is a global transaction then use it */ - - local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds__trans; - - STORE (TRANSACTION_HANDLE local_trans - REQUEST_HANDLE tdgbl->handles_get_view_req_handle1) - X IN RDB$VIEW_RELATIONS - strcpy (X.RDB$VIEW_NAME, relation->rel_name); - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) - switch (attribute) - { - case att_view_relation_name: - get_text (X.RDB$RELATION_NAME, sizeof (X.RDB$RELATION_NAME)); - break; - - case att_view_context_name: - get_text (X.RDB$CONTEXT_NAME, sizeof (X.RDB$CONTEXT_NAME)); - break; - - case att_view_context_id: - X.RDB$VIEW_CONTEXT = (USHORT) get_numeric(); - break; - - default: - bad_attribute (scan_next_attr, attribute, 140); - /* msg 140 view */ - break; - } - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - return TRUE; -} - - -static void ignore_array( REL relation) -{ -/************************************** - * - * i g n o r e _ a r r a y - * - ************************************** - * - * Functional description - * Read array data from input file to nice, - * shiney, new array. - * - **************************************/ - FLD field; - ATT_TYPE attribute; - SLONG length, lcount, *range, *end_ranges; - USHORT field_number; - LSTRING xdr_buffer; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - -/* don't free something you don't allocate */ - xdr_buffer.lstr_allocated = 0; - -/* Pick up attributes */ - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_blob_data) - switch (attribute) { - case att_blob_field_number: - field_number = (USHORT) get_numeric(); - for (field = relation->rel_fields; field; field = field->fld_next) - if (field->fld_number == field_number) - break; - if (!field) - BURP_error_redirect(NULL_PTR, 36, 0, 0); -/* msg 36 Can't find field for blob */ - break; - - case att_array_dimensions: - field->fld_dimensions = (SSHORT) get_numeric(); - end_ranges = field->fld_ranges + 2 * field->fld_dimensions; - for (range = field->fld_ranges; range < end_ranges; range += 2) { - if (GET_ATTRIBUTE(attribute) != att_array_range_low) - bad_attribute(scan_next_attr, attribute, 58); - /* msg 58 array */ - else - range[0] = get_numeric(); - if (GET_ATTRIBUTE(attribute) != att_array_range_high) - bad_attribute(scan_next_attr, attribute, 58); - /* msg 58 array */ - else - range[1] = get_numeric(); - } - break; - - default: - bad_attribute(scan_next_attr, attribute, 58); - /* msg 58 array */ - break; - } - - length = GET(); - length |= GET() << 8; - length |= GET() << 16; - length |= GET() << 24; - - if (tdgbl->gbl_sw_transportable) { - if (GET_ATTRIBUTE(attribute) != att_xdr_array) - BURP_error_redirect(NULL_PTR, 55, 0, 0); -/* msg 55 Expected XDR record length */ - else { - xdr_buffer.lstr_allocated = GET(); - xdr_buffer.lstr_allocated |= GET() << 8; - xdr_buffer.lstr_allocated |= GET() << 16; - xdr_buffer.lstr_allocated |= GET() << 24; - lcount = xdr_buffer.lstr_length = xdr_buffer.lstr_allocated; - } - } - else { - lcount = length; - } - - if (lcount) - GET_SKIP(lcount); -} - - -static void ignore_blob(void) -{ -/************************************** - * - * i g n o r e _ b l o b - * - ************************************** - * - * Functional description - * Skip over blob data records. - * - **************************************/ - ATT_TYPE attribute; - SLONG segments; - USHORT length; - UCHAR scan_next_attr; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - -/* Pick up attributes */ - - segments = 0; - - SKIP_INIT; - while (SKIP_SCAN, GET_ATTRIBUTE(attribute) != att_blob_data) - switch (attribute) { - case att_blob_field_number: - (void) get_numeric(); - break; - - case att_blob_max_segment: - (void) get_numeric(); - break; - - case att_blob_number_segments: - segments = get_numeric(); - break; - - case att_blob_type: - (void) get_numeric(); - break; - - default: - bad_attribute(scan_next_attr, attribute, 64); - /* msg 64 blob */ - break; - } - -/* Eat up blob segments */ - - while (--segments >= 0) { - length = GET(); - length |= GET() << 8; - if (length) - GET_SKIP(length); - } -} - - -static REC_TYPE ignore_data( REL relation) -{ -/************************************** - * - * i g n o r e _ d a t a - * - ************************************** - * - * Functional description - * Ignore data records for a relation. - * - **************************************/ - UCHAR *buffer; - USHORT l, records; - REC_TYPE record; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - records = 0; - - while (TRUE) { - if (GET() != att_data_length) - BURP_error_redirect(NULL_PTR, 39, 0, 0); -/* msg 39 expected record length */ - l = (USHORT) get_numeric(); - if (tdgbl->gbl_sw_transportable) - if (GET() != att_xdr_length) - BURP_error_redirect(NULL_PTR, 55, 0, 0); -/* msg 55 Expected XDR record length */ - else - l = (USHORT) get_numeric(); - if (GET() != att_data_data) - BURP_error_redirect(NULL_PTR, 41, 0, 0); -/* msg 41 expected data attribute */ - if (l) - if (tdgbl->gbl_sw_compress) { - buffer = (UCHAR *) BURP_ALLOC(l); - decompress(buffer, l); - BURP_FREE(buffer); - } - else - GET_SKIP(l); - records++; - while (GET_RECORD(record)) { - if (record == rec_blob) - ignore_blob(); - else if (record == rec_array) - ignore_array(relation); - else - break; - } - if (record != rec_data) - break; - } - - BURP_verbose(106, (void *) records, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); -/* msg 106 %ld records ignored */ - - return record; -} - - -static void realign( UCHAR * buffer, REL relation) -{ -/************************************** - * - * r e a l i g n - * - ************************************** - * - * Functional description - * Miserable input record is misaligned. - * Shuffle fields around. N.B. this one - * only works if the old buffer is longer - * than the new. - * - **************************************/ - FLD field; - UCHAR *p, *q; - USHORT l; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - for (field = relation->rel_fields; field; field = field->fld_next) { - if (field->fld_flags & FLD_computed) - continue; - - p = buffer + field->fld_offset; - q = buffer + field->fld_old_offset; - l = field->fld_length; - - /* Beware of overlaps here - don't use memcpy */ - while (l--) - *p++ = *q++; - - if (field->fld_type == blr_varying) { - *p++ = *q++; - *p++ = *q++; - } - } - -/* If this is format version 2, build fields for null flags */ - - if (tdgbl->RESTORE_format >= 2) - for (field = relation->rel_fields; field; field = field->fld_next) { - if (field->fld_flags & FLD_computed) - continue; - p = buffer + FB_ALIGN(p - buffer, sizeof(SSHORT)); - q = buffer + FB_ALIGN(q - buffer, sizeof(SSHORT)); - *p++ = *q++; - *p++ = *q++; - } -} - - -static USHORT recompute_length( REL relation) -{ -/************************************** - * - * r e c o m p u t e _ l e n g t h - * - ************************************** - * - * Functional description - * Recompute length of a record using an old - * alignment if there is one. At the moment, - * only SPARC has one. - * - **************************************/ - -#ifdef sparc - FLD field; - ULONG offset, length, dtype, alignment; - SSHORT *alignments; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - alignments = old_sparcs; - - for (field = relation->rel_fields; field; field = field->fld_next) { - if (field->fld_flags & FLD_computed) - continue; - length = field->fld_length; - alignment = 4; - - /* arrays are of various fld_types but are really blobs */ - - dtype = field->fld_type; - - if (field->fld_flags & FLD_array) { - dtype = blr_blob; - length = 8; - } - - alignment = alignments[gds_cvt_blr_dtype[field->fld_type]]; - if (dtype == blr_varying) - length += sizeof(USHORT); - - if (alignment) - offset = FB_ALIGN(offset, alignment); - field->fld_old_offset = offset; - offset += length; - } - -/* If this is format version 2, build fields for null flags */ - - if (tdgbl->RESTORE_format >= 2) - for (field = relation->rel_fields; field; field = field->fld_next) { - if (field->fld_flags & FLD_computed) - continue; - offset = FB_ALIGN(offset, sizeof(SSHORT)); - offset += sizeof(SSHORT); - } - - return offset; -#else - return FALSE; -#endif -} - - -static BOOLEAN restore( TEXT * file_name, TEXT * database_name) -{ -/************************************** - * - * r e s t o r e - * - ************************************** - * - * Functional description - * Perform the body of restore. - * - **************************************/ - SSHORT l, flag; - REC_TYPE record; - ATT_TYPE attribute; - USHORT db_version; - isc_req_handle req_handle1 = NULL, req_handle2 = NULL, req_handle3 = NULL, - req_handle4 = NULL, req_handle5 = NULL; - long req_status[20]; - TGBL tdgbl; - SSHORT flag_norel = TRUE; /* To fix bug 10098 */ - - tdgbl = GET_THREAD_DATA; - -/* Read burp record first */ - - MVOL_init_read(tdgbl->gbl_database_file_name, file_name, - &tdgbl->RESTORE_format, &tdgbl->io_cnt, &tdgbl->io_ptr); - - if (tdgbl->gbl_sw_transportable) - BURP_verbose(133, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 133 transportable backup -- data in XDR format */ - if (tdgbl->gbl_sw_compress) - BURP_verbose(61, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); - /* msg 61 backup file is compressed */ - - flag = FALSE; - -/* restore only from those backup files created by current or previous GBAK */ - - if (tdgbl->RESTORE_format < 1 - || tdgbl->RESTORE_format > ATT_BACKUP_FORMAT) -#ifdef SUPERSERVER - BURP_svc_error(44, isc_arg_number, tdgbl->RESTORE_format, - 0, NULL, 0, NULL, 0, NULL, 0, NULL); -#else - BURP_error(44, (void *) tdgbl->RESTORE_format, 0, 0, 0, 0); -/* msg 44 Expected backup version 1, 2, or 3. Found %ld */ -#endif - - create_database(database_name); - - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - -/* For V4.0, start a read commited transaction. This will be used - * to create blobs for global fields and update the record in the - * RDB$FIELDS table. - */ - - EXEC SQL SET TRANSACTION NAME tdgbl-> - global_trans ISOLATION LEVEL READ COMMITTED; - - db_version = check_db_version(); - if (db_version < DB_VERSION_CURRENT) -#ifdef SUPERSERVER - BURP_svc_error(51, isc_arg_number, db_version, - 0, NULL, 0, NULL, 0, NULL, 0, NULL); -#else - BURP_error(51, (void *) db_version, 0, 0, 0, 0); -/* msg 51 database format %ld is too old to restore to */ -#endif - - BURP_verbose(129, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); -/* msg 129 started transaction */ - - while (GET_ATTRIBUTE(attribute) != att_end) - switch (attribute) { - case att_database_security_class: - /* Instead of updating the security class in RDB$DATABASE, - just store the value in tdgbl. It will be updated at - the very end to prevent security class validation - failures during change table ownership operation */ - get_text(tdgbl->database_security_class, - sizeof(tdgbl->database_security_class)); - break; - - case att_database_description: - case att_database_description2: - FOR (REQUEST_HANDLE req_handle2) - X IN RDB$DATABASE - MODIFY X USING - if (attribute == att_database_description2) - get_source_blob (&X.RDB$DESCRIPTION, 0); - else - get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); - END_MODIFY; - ON_ERROR - general_on_error (); - END_ERROR; - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - break; - - case att_database_dfl_charset: - FOR (REQUEST_HANDLE req_handle3) - X IN RDB$DATABASE - MODIFY X USING - get_text (X.RDB$CHARACTER_SET_NAME, sizeof (X.RDB$CHARACTER_SET_NAME)); - END_MODIFY; - ON_ERROR - general_on_error (); - END_ERROR; - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - break; - - default: - l = GET(); - if (l) - GET_SKIP(l); - break; - } - if (req_handle1) - isc_release_request(req_status, &req_handle1); - if (req_handle2) - isc_release_request(req_status, &req_handle2); - if (req_handle3) - isc_release_request(req_status, &req_handle3); - -/* If this should be a multi-file database, add the files */ - - if (tdgbl->gbl_sw_files && tdgbl->gbl_sw_files->fil_next) - add_files(database_name); - -/* Get global fields and relations */ - - while (GET_RECORD(record) != rec_end) - switch (record) { - case rec_charset: - if (!get_character_set()) - return FALSE; - flag = TRUE; - break; - - case rec_collation: - if (!get_collation()) - return FALSE; - flag = TRUE; - break; - - case rec_chk_constraint: - if (!get_chk_constraint()) - return FALSE; - flag = TRUE; - break; - - case rec_global_field: - if (!get_global_field()) - return FALSE; - flag = TRUE; - break; - - case rec_field_dimensions: - if (!get_field_dimensions()) - return FALSE; - flag = TRUE; - break; - - case rec_relation: - if (!get_relation()) - return FALSE; - flag = TRUE; - flag_norel = FALSE; - break; - - case rec_ref_constraint: - if (!get_ref_constraint()) - return FALSE; - flag = TRUE; - break; - - case rec_rel_constraint: - if (!get_rel_constraint()) - return FALSE; - flag = TRUE; - break; - - case rec_function: - if (!get_function()) - return FALSE; - flag = TRUE; - break; - - case rec_procedure: - if (!get_procedure()) - return FALSE; - flag = TRUE; - break; - - case rec_exception: - if (!get_exception()) - return FALSE; - flag = TRUE; - break; - - case rec_type: /* rdb$types */ - if (!get_type()) - return FALSE; - flag = TRUE; - break; - - case rec_filter: /* rdb$filters */ - if (!get_filter()) - return FALSE; - flag = TRUE; - break; - - case rec_generator: - if (!get_generator()) - return FALSE; - flag = TRUE; - break; - - case rec_relation_data: - if (flag) { - BURP_verbose(68, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); - /* msg 68 committing meta data */ - COMMIT; - ON_ERROR - general_on_error (); - END_ERROR; - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - flag = FALSE; - } - if (!get_relation_data()) - return FALSE; - break; - - case rec_trigger: /* new trigger type */ - if (!get_trigger()) - return FALSE; - flag = TRUE; - break; - - case rec_trigger_message: - if (!get_trigger_message()) - return FALSE; - flag = TRUE; - break; - - case rec_user_privilege: - if (!get_user_privilege()) - return FALSE; - flag = TRUE; - break; - - case rec_security_class: - if (!get_security_class()) - return FALSE; - flag = TRUE; - break; - - case rec_files: - if (!get_files()) - return FALSE; - flag = TRUE; - break; - - case rec_sql_roles: - if (!get_sql_roles()) - return FALSE; - flag = TRUE; - break; - - default: -#ifdef SUPERSERVER - BURP_svc_error(43, isc_arg_number, (void *) record, - 0, NULL, 0, NULL, 0, NULL, 0, NULL); -#else - BURP_error(43, (void *) record, 0, 0, 0, 0); - /* msg 43 don't recognize record type %ld */ -#endif - break; - } - -/* This piece of code is to fix bug 10098: restore of database with -only domains and no relations aborts with the message ERROR: deadlock -This is because insertion of domains into RDB$FIELDS is happening in -the default transaction, whereas updation of RDB$FIELDS to add -constraints to the domains is done in tdgbl->global_trans. In case of -no relations, no COMMIT of default transaction occurs till this point -because of which rows in RDB$FIELDS for domains are still locked by -default transaction. The below code COMMITs the default transaction -in that particular situation */ - - if (flag_norel) { - COMMIT; - ON_ERROR - general_on_error (); - END_ERROR; - EXEC SQL SET TRANSACTION NO_AUTO_UNDO; - if (gds__status[1]) - EXEC SQL SET TRANSACTION; - } - -/* put validation clauses for global fields */ - - update_global_field(); - -/* Purge shadow metadata if necessary */ - - if (tdgbl->gbl_sw_kill) - FOR (REQUEST_HANDLE req_handle5) - FIL IN RDB$FILES WITH FIL.RDB$SHADOW_NUMBER NOT MISSING - AND FIL.RDB$SHADOW_NUMBER NE 0 - ERASE FIL; - ON_ERROR - general_on_error (); - END_ERROR; - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - - if (req_handle5) - isc_release_request(req_status, &req_handle5); - - return TRUE; -} - - -static void restore_security_class( TEXT * owner_nm, TEXT * sec_class_nm) -{ -/************************************** - * - * r e s t o r e _ s e c u r i t y _ c l a s s - * - ************************************** - * - * Functional description - * restore the ownership of the relation in the ACL list - * - **************************************/ - isc_tr_handle local_trans; - isc_req_handle req_handle2 = NULL; - ISC_QUAD new_blob_id; - long req_status[20]; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - local_trans = gds__trans; - - FOR (REQUEST_HANDLE req_handle2) - X IN RDB$SECURITY_CLASSES WITH X.RDB$SECURITY_CLASS EQ sec_class_nm - - new_blob_id.gds_quad_high = 0; - new_blob_id.gds_quad_low = 0; - get_acl (owner_nm, &X.RDB$ACL, &new_blob_id); - - MODIFY X; - MOVE_FAST (&new_blob_id, &X.RDB$ACL, sizeof (ISC_QUAD)); - END_MODIFY; - ON_ERROR - if (req_handle2) - isc_release_request (req_status, &req_handle2); - general_on_error (); - END_ERROR; - - END_FOR; - - ON_ERROR - if (req_handle2) - isc_release_request (req_status, &req_handle2); - general_on_error (); - END_ERROR; - - if (req_handle2) - isc_release_request(req_status, &req_handle2); -} - - -static void store_blr_gen_id( GDS_NAME gen_name, SINT64 value) -{ -/************************************** - * - * s t o r e _ b l r _ g e n _ i d - * - ************************************** - * - * Functional description - * Store the blr_gen_id for the relation. - * - **************************************/ - UCHAR *blr; - UCHAR blr_buffer[100]; /* enough to fit blr */ - SSHORT blr_length; - SLONG *gen_id_reqh; - STATUS status_vector[ISC_STATUS_LENGTH]; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - STORE (REQUEST_HANDLE tdgbl->handles_store_blr_gen_id_req_handle1) - X IN RDB$GENERATORS - strcpy (X.RDB$GENERATOR_NAME, gen_name); - END_STORE; - ON_ERROR - general_on_error (); - END_ERROR; - - if (!value) { - BURP_verbose(185, gen_name, (void *) value, NULL_PTR, NULL_PTR, - NULL_PTR); - /* msg 185 restoring generator %s value: %ld */ - return; - } - - - gen_id_reqh = NULL; - blr = blr_buffer; - -/* build the blr with the right relation name */ - - if (tdgbl->RESTORE_format >= 6) { - STUFF(blr_version5); - } - else { - STUFF(blr_version4); - } - STUFF(blr_begin); - if (tdgbl->RESTORE_format >= 6) { - STUFF(blr_dcl_variable); - STUFF_WORD(0); - STUFF(blr_int64); - STUFF(0); - } - else { - STUFF(blr_dcl_variable); - STUFF_WORD(0); - STUFF(blr_long); - STUFF(0); - } - STUFF(blr_begin); - STUFF(blr_assignment); - STUFF(blr_gen_id); - stuff_string(&blr, gen_name); - if (tdgbl->RESTORE_format >= 6) { - STUFF(blr_literal); - STUFF(blr_int64); - STUFF(0); - STUFF_INT64(value); - } - else { - STUFF(blr_literal); - STUFF(blr_long); - STUFF(0); - STUFF_LONG((SLONG) value); - } - STUFF(blr_variable); - STUFF_WORD(0); - STUFF(blr_end); - STUFF(blr_end); - STUFF(blr_eoc); - - blr_length = blr - blr_buffer; - - if (isc_compile_request(status_vector, - GDS_REF(tdgbl->db_handle), - GDS_REF(gen_id_reqh), - blr_length, GDS_VAL(blr_buffer))) { - isc_print_blr(blr_buffer, NULL_PTR, NULL_PTR, 0); - BURP_error_redirect(status_vector, 42, 0, 0); -/* msg 42 Failed in store_blr_gen_id */ - } - - if (isc_start_request(status_vector, GDS_REF(gen_id_reqh), GDS_REF(gds__trans), /* use the same one generated by gpre */ - 0)) { - isc_print_blr(blr_buffer, NULL_PTR, NULL_PTR, 0); - BURP_error_redirect(status_vector, 42, 0, 0); -/* msg 42 Failed in store_blr_gen_id */ - } - - BURP_verbose(185, gen_name, (void *) value, NULL_PTR, NULL_PTR, NULL_PTR); -/* msg 185 restoring generator %s value: %ld */ - - isc_release_request(status_vector, GDS_REF(gen_id_reqh)); -} - - -static void stuff_string( SCHAR ** ptr, TEXT * string) -{ -/************************************** - * - * s t u f f _ s t r i n g - * - ************************************** - * - * Functional description - * Stuff a name input a BLR string -- byte count first. - * - **************************************/ - SCHAR *blr; - - blr = *ptr; - STUFF(strlen(string)); - - while (*string) - STUFF(*string++); - - *ptr = blr; -} - - -static void update_global_field(void) -{ -/************************************** - * - * u p d a t e _ g l o b a l _ f i e l d - * - ************************************** - * - * Functional description - * Update the global field definition to add constraints. - * The blobs have been created already. - * - **************************************/ - GFLD n_gfld, gfld; - USHORT length; - UCHAR *p, *q; - isc_req_handle req_handle1 = NULL; - long req_status[20]; - TGBL tdgbl; - - tdgbl = GET_THREAD_DATA; - - for (gfld = tdgbl->gbl_global_fields; gfld;) { - FOR (TRANSACTION_HANDLE tdgbl->global_trans REQUEST_HANDLE req_handle1) - X IN RDB$FIELDS WITH X.RDB$FIELD_NAME EQ gfld->gfld_name - MODIFY X - - if (gfld->gfld_flags & GFLD_validation_blr) - { - X.RDB$VALIDATION_BLR.NULL = FALSE; - - if (length = sizeof (ISC_QUAD)) - { - p = (UCHAR *)&X.RDB$VALIDATION_BLR; - q = (UCHAR *)&gfld->gfld_vb; - - do *p++ = *q++; while (--length); - } - } - - if (gfld->gfld_flags & GFLD_validation_source) - { - X.RDB$VALIDATION_SOURCE.NULL = FALSE; - - if (length = sizeof (ISC_QUAD)) - { - p = (UCHAR *)&X.RDB$VALIDATION_SOURCE; - q = (UCHAR *)&gfld->gfld_vs; - - do *p++ = *q++; while (--length); - } - } - - if (gfld->gfld_flags & GFLD_validation_source2) - { - X.RDB$VALIDATION_SOURCE.NULL = FALSE; - - if (length = sizeof (ISC_QUAD)) - { - p = (UCHAR *)&X.RDB$VALIDATION_SOURCE; - q = (UCHAR *)&gfld->gfld_vs2; - - do *p++ = *q++; while (--length); - } - } - - END_MODIFY; - ON_ERROR - general_on_error (); - END_ERROR; - - END_FOR; - ON_ERROR - general_on_error (); - END_ERROR; - n_gfld = gfld->gfld_next; - BURP_FREE(gfld); - gfld = n_gfld; - } - if (req_handle1) - isc_release_request(req_status, &req_handle1); - - tdgbl->gbl_global_fields = (GFLD) 0; -} - - -static BOOLEAN bug_8183( TGBL tdgbl) -{ -/************************************** - * - * b u g _ 8 1 8 3 - * - ************************************** - * - * Name: bug_8183 - * - * Function: Bug fix for bug_no 8183: It is a migration bug between IB3.3 - * and IB4.0. Gbak v4.0 can't restore database v3.3 if - * database has an index definition with comment field. - * It happens because of att_index_description2 attribute - * (which indicates that index contains a comment field - * and is equal 8 under IB3.3) accidently got new value 9 - * under IB4.0. - * At the same time, new attribute att_index_foreign_key - * has been added with value 8. Thus, when gbak v4.0 faces - * index attribute with value 8 during restore procedure of - * database v3.3, it will recognize this attribute as - * att_index_foreign_key instead of att_index_description2. - * - * This function is trying to recognize the next - * data in tdgbl->io_ptr buffer as either name of foreign - * key or comment field. Function returns TRUE in case of - * comment field, otherwise FALSE. - * - * Usage: result = bug_8183(tdgbl); - * - * Parameters: tdgbl - pointer to the structure of global switches - * and data - * - * Returns: result [TRUE/FALSE] - * - * Pre: gbak got an index attribute with value "8" from - * backup database. - * - * Post: none - * - * Remarks: For more information see bug_no 8183 - * - **************************************/ - - UCHAR tmp[sizeof(ULONG) + 1], *p; - USHORT io_cnt, i; - UCHAR *io_ptr; - ULONG len1, len2; - BOOLEAN result = FALSE; - - - io_cnt = tdgbl->io_cnt; - io_ptr = tdgbl->io_ptr; - - if (io_cnt > 0) { - len1 = len2 = *io_ptr++; - --io_cnt; - /* len1 can be either length of att_index_foreign_key OR quantity of byte - where seats length of att_index_description2. In case of - att_index_description2, len1 should be as even and no bigger - than sizeof(ULONG). Let's check it out */ - if ((len1 % 2) == 0 && (len1 <= sizeof(ULONG))) { - /* it still can be a foreign key; so - try to read it. Note: if internal buffer is over, then - we wan't read next block */ - - memset(tmp, '\0', sizeof(tmp)); - - p = tmp; - while (len1-- && io_cnt--) - *p++ = *io_ptr++; - - /* if read array is a foreign key then it should contain following chars - only : ['A'..'Z', '0'..'9', '_', '$'] */ - for (p = tmp, i = 0; - *p && *p != ' ' && ((*p >= 'A' && *p <= 'Z') || (*p == '_') - || (*p >= '0' && *p <= '9') - || (*p == '$')); p++) - i++; - if ((len2 - len1) != i) - result = TRUE; - } - } - - return result; -} \ No newline at end of file diff --git a/src/burp/restore.epp b/src/burp/restore.epp new file mode 100644 index 0000000000..04028dba82 --- /dev/null +++ b/src/burp/restore.epp @@ -0,0 +1,7240 @@ +/* + * PROGRAM: JRD Backup and Restore Program + * MODULE: restore.e + * DESCRIPTION: Restore routine + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * Toni Martir: Verbose records restored as RESTORE_VERBOSE_INTERVAL, + * also verbose restoring indexes as DEFERRED when verbose + */ +/* +$Id: restore.epp,v 1.1 2001-07-12 06:32:02 bellardo Exp $ +*/ + +#include "../jrd/ib_stdio.h" +#include +#include +#include "../burp/burp.h" +#include "../jrd/align.h" +#include "../jrd/common.h" +#include "../jrd/flags.h" +#include "../jrd/license.h" +#include "../jrd/obj.h" +#include "../jrd/ods.h" +#include "../burp/burp_proto.h" +#include "../burp/canon_proto.h" +#include "../burp/misc_proto.h" +#include "../burp/mvol_proto.h" +#include "../burp/resto_proto.h" +#include "../intl/charsets.h" +#include "../jrd/gdsassert.h" + +/* this typedef is required to avoid compilation warnings in + * protocol.h. + * + * REMOVED 6/26 JMB. Not needed anymore with C++ + * +typedef struct bid { + ULONG bid_relation_id; // Relation id (or null) + ULONG bid_number; // Record number +} *BID; +*/ + +#include "../remote/protocol.h" + +/* For netware the follow DB handle is #defined to be a value stored */ +/* in thread data. This is also done for other statics generated by */ +/* GPRE. This is to avoid multiple threading problems with module */ +/* level statics. */ +DATABASE + DB = STATIC FILENAME "yachts.lnk"; + +#define DB tdgbl->db_handle +#define gds_trans tdgbl->tr_handle +#define isc_status tdgbl->status + +/*** +#define DEBUG 1 +***/ + +#define STUFF(byte) {*blr++ = (UCHAR) (byte);} +#define STUFF_WORD(word) {STUFF (word); STUFF ((word) >> 8);} +#define STUFF_LONG(lword) {STUFF_WORD (lword); STUFF_WORD ((lword) >> 16);} +#define STUFF_INT64(i64) {STUFF_LONG (i64); STUFF_LONG ((i64) >> 32);} + +#define DB_VERSION_DDL4 4 /* ods4 db */ +#define DB_VERSION_DDL5 5 /* ods5 db */ +#define DB_VERSION_DDL8 8 /* ods8 db */ +#define DB_VERSION_CURRENT DB_VERSION_DDL8 /* v4.0 is ods8 */ +#define FOREIGN_KEY "FOREIGN KEY" + +#define DEFERRED_ACTIVE 3 /* RDB$INDEX_INACTIVE setting for Foreign Keys + * This setting is used temporarily while + * restoring a database. This was required + * in order to differentiate a partial + * "inactive" state of SOME indices from + * "inactive" state of ALL indices (gbak -i) + * -bsriram, 11-May-1999 BUG: 10016 + */ + +#define RESTORE_VERBOSE_INTERVAL 10000 +#define cvtbl_len 28 +static CONST struct s_t_cvtbl { + SSHORT sub_type; + SSHORT character_set_id; + SSHORT collation_id; +} sub_type_cvtbl [] = { + /* NOTE: The magic numbers for collation_id come from ordinal + * position of the COLLATION() entries in jrd/intlnames.h + */ + 101, CS_DOS_437, 1, /* PDOX_ASCII */ + 102, CS_DOS_437, 2, /* PDOX_INTL */ + 106, CS_DOS_437, 3, /* PDOX_SWEDFIN */ + 160, CS_DOS_850, 0, /* codepoint collation */ + 107, CS_DOS_865, 0, /* codepoint collation */ + 105, CS_DOS_865, 1, /* PDOX_NORDAN4 */ + 139, CS_LATIN1, 1, /* DA_DA */ + 140, CS_LATIN1, 2, /* DU_NL */ + 141, CS_LATIN1, 3, /* FI_FI */ + 142, CS_LATIN1, 4, /* FR_FR */ + 143, CS_LATIN1, 5, /* FR_CA */ + 144, CS_LATIN1, 6, /* DE_DE */ + 145, CS_LATIN1, 7, /* IS_IS */ + 146, CS_LATIN1, 8, /* IT_IT */ + 148, CS_LATIN1, 9, /* NO_NO */ + 149, CS_LATIN1, 10, /* ES_ES */ + 151, CS_LATIN1, 11, /* SV_SV */ + 152, CS_LATIN1, 12, /* EN_UK */ + 153, CS_LATIN1, 14, /* EN_US */ + 154, CS_LATIN1, 15, /* PT_PT */ + 180, CS_NEXT, 1, /* NXT_US */ + 181, CS_NEXT, 2, /* NXT_GERMANY */ + 182, CS_NEXT, 3, /* NXT_FRANCE */ + 183, CS_NEXT, 4, /* NXT_ITALY */ + 184, CS_NEXT, 5, /* NXT_SPAIN */ + 201, CS_UNICODE_FSS, 0, /* codepoint collation */ + 220, CS_SJIS, 0, /* codepoint collation */ + 230, CS_EUCJ, 0 /* codepoint collation */ + }; + +static void add_files (UCHAR *); +static void bad_attribute (UCHAR, ATT_TYPE, USHORT); +static USHORT check_db_version (void); +static void create_database (UCHAR *); +static void decompress (UCHAR *, USHORT); +static void eat_blob (void); +static REL find_relation (TEXT *); +static int get_acl (TEXT *, ISC_QUAD *, ISC_QUAD *); +static void get_array (REL, UCHAR *); +static void get_blob (FLD, UCHAR *); +static void get_blr_blob (ISC_QUAD *, USHORT); +static BOOLEAN get_character_set (void); +static BOOLEAN get_chk_constraint (void); +static BOOLEAN get_collation (void); +static REC_TYPE get_data (REL); +static BOOLEAN get_exception (void); +static FLD get_field (REL); +static BOOLEAN get_field_dimensions (void); +static BOOLEAN get_files (void); +static BOOLEAN get_filter (void); +static BOOLEAN get_function (void); +static void get_function_arg (GDS_NAME); +static BOOLEAN get_generator (void); +static BOOLEAN get_global_field (void); +static BOOLEAN get_index (REL); +static void get_misc_blob (ISC_QUAD *, USHORT, USHORT); +static SLONG get_numeric (void); +static SINT64 get_int64 (void); +static BOOLEAN get_procedure (void); +static BOOLEAN get_procedure_prm (GDS_NAME ); +static BOOLEAN get_ref_constraint (void); +static BOOLEAN get_rel_constraint (void); +static BOOLEAN get_relation (void); +static BOOLEAN get_relation_data (void); +static BOOLEAN get_sql_roles (void); +static BOOLEAN get_security_class (void); +static void get_source_blob (ISC_QUAD *, USHORT); +static USHORT get_text (TEXT *, ULONG); +static BOOLEAN get_trigger (void); +static BOOLEAN get_trigger_message (void); +static BOOLEAN get_trigger_old (REL); +static BOOLEAN get_type (void); +static BOOLEAN get_user_privilege (void); +static BOOLEAN get_view (REL); +static void ignore_array (REL); +static void ignore_blob (void); +static REC_TYPE ignore_data (REL); +static void realign (UCHAR *, REL); +static USHORT recompute_length (REL); +static BOOLEAN restore (TEXT *, TEXT *); +static void restore_security_class (TEXT *, TEXT *); +static void store_blr_gen_id (GDS_NAME, SINT64); +static void stuff_string (SCHAR **, TEXT *); +static void update_global_field (void); +static void general_on_error (void); +static BOOLEAN bug_8183 (TGBL); + +static UCHAR debug_on = 0; /* able to turn this on in the debugger */ + +static USHORT flag_on_line = TRUE; /* indicates whether we will bring + the database on-line : + TRUE - we will + FALSE - we will not */ +#ifdef sparc +static CONST SSHORT old_sparcs[] = + {0, 0, 0, 2, 0, 0, 0, 0, 2, 4, 4, 4, 8, 8, 0, 0, 8, 8, 8}; +#endif + +#define GET() (--(tdgbl->io_cnt) >= 0 ? *(tdgbl->io_ptr)++ : MVOL_read (&tdgbl->io_cnt, &tdgbl->io_ptr)) +#define GET_SKIP(n) MVOL_skip_block (tdgbl, n) +#define GET_BLOCK(p,n) MVOL_read_block (tdgbl, (p), (n)) +#define GET_ATTRIBUTE(att) ((att) = (ATT_TYPE) GET()) +#define GET_RECORD(att) ((att) = (REC_TYPE) GET()) + +/* When skipping started, scan_next_attr will be changed from NO_SKIP */ +/* to BEFORE_SKIP. When scanning for next valid attribute after skipping, */ +/* it will flip-flop between BEFORE_SKIP and AFTER_SKIP. When next valid */ +/* attribute is found, it will be changed back to NO_SKIP by 'SKIP_SCAN' */ + +#define NO_SKIP 0 /* Not in skipping and scanning mode */ +#define BEFORE_SKIP 1 /* After skipping, before scanning next byte for valid attribute */ +#define AFTER_SKIP 2 /* After skipping and after scanning next byte for valid attribute */ + +#define SKIP_INIT (scan_next_attr = NO_SKIP) +#define SKIP_SCAN (scan_next_attr == AFTER_SKIP ? \ + scan_next_attr = BEFORE_SKIP : \ + scan_next_attr == BEFORE_SKIP ? \ + scan_next_attr = NO_SKIP : 0) +/* User Privilege Flags */ + +#define USER_PRIV_USER 1 +#define USER_PRIV_GRANTOR 2 +#define USER_PRIV_PRIVILEGE 4 +#define USER_PRIV_GRANT_OPTION 8 +#define USER_PRIV_OBJECT_NAME 16 +#define USER_PRIV_FIELD_NAME 32 +#define USER_PRIV_USER_TYPE 64 +#define USER_PRIV_OBJECT_TYPE 128 + + +int RESTORE_restore ( + TEXT *file_name, + TEXT *database_name) +{ +/************************************** + * + * R E S T O R E _ r e s t o r e + * + ************************************** + * + * Functional description + * Recreate a database from a backup. + * + **************************************/ +int cumul_count_kb; +REL relation; +PRC procedure; +isc_req_handle req_handle1 = NULL, req_handle2 = NULL, req_handle4 = NULL; +long req_status [20]; +TGBL tdgbl; +long db_handle; +UCHAR dpb[128], *d, *q; +SSHORT l; +isc_req_handle req_handle3 = NULL; +TEXT index_name[32]; +long error_code; + +tdgbl = GET_THREAD_DATA; + +tdgbl->io_ptr = (UCHAR *) NULL; +tdgbl->io_cnt = 0; + +tdgbl->relations = (REL) NULL; +tdgbl->procedures = (PRC) 0; +tdgbl->RESTORE_format = 0; +tdgbl->global_trans = 0; + +tdgbl->gbl_sw_transportable = tdgbl->gbl_sw_compress = FALSE; + +if (!restore (file_name, database_name)) + return FINI_ERROR; + +BURP_verbose (76, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 76 creating indexes */ + +COMMIT; +ON_ERROR + /* Fix for bug_no 8055: + don't throw away the database just because an index + could not be made */ + while (error_code = tdgbl->status_vector[1]) + { + switch (error_code) + { + case gds_sort_mem_err: + case gds_no_dup: + strcpy(index_name, (TEXT *)tdgbl->status_vector[3]); + BURP_print_status(tdgbl->status_vector); + FOR (REQUEST_HANDLE req_handle3) + IDX IN RDB$INDICES WITH IDX.RDB$INDEX_NAME EQ index_name + { + BURP_verbose(243,index_name,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); + MODIFY IDX USING IDX.RDB$INDEX_INACTIVE = TRUE; + } + BURP_print(240, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 240 Index \"%s\" failed to activate because: */ + if ( error_code == gds_no_dup ) + { + BURP_print(241, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 241 The unique index has duplicate values or NULLs */ + BURP_print(242, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 242 Delete or Update duplicate values or NULLs, and activate index with */ + } + else + { + BURP_print(244, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 244 Not enough disk space to create the sort file for an index */ + BURP_print(245, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 245 Set the TMP environment variable to a directory on a filesystem that does have enough space, and activate index with */ + } + BURP_print(243, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 243 ALTER INDEX \"%s\" ACTIVE; */ + END_MODIFY; + END_FOR; + /* don't bring the database on-line */ + flag_on_line = FALSE; + break; + default: + general_on_error (); + break; + } + COMMIT + ON_ERROR + continue; + END_ERROR + } +END_ERROR; +/* Activate the indices for foreign keys and do another commit */ +if (!(tdgbl->gbl_sw_deactivate_indexes)) + { + + /* Block added to verbose index creation by Toni Martir */ + if (tdgbl->gbl_sw_verbose) + { + EXEC SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + + /* Activate first indexes that are not foreign keys */ + FOR (REQUEST_HANDLE req_handle1) IDS IN RDB$INDICES WITH + IDS.RDB$INDEX_INACTIVE EQ DEFERRED_ACTIVE AND + IDS.RDB$FOREIGN_KEY MISSING + MODIFY IDS USING IDS.RDB$INDEX_INACTIVE=FALSE; + END_MODIFY; + ON_ERROR + general_on_error(); + END_ERROR; + + SAVE + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + BURP_print (173, IDS.RDB$INDEX_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + BURP_print_status (tdgbl->status); + MODIFY IDS USING + IDS.RDB$INDEX_INACTIVE = TRUE; + END_MODIFY; + ON_ERROR + general_on_error (); + END_ERROR; + END_ERROR; + BURP_verbose(122,IDS.RDB$INDEX_NAME,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + if (req_handle1) + isc_release_request (req_status, &req_handle1); + COMMIT; + ON_ERROR + general_on_error (); + END_ERROR; + } + + + EXEC SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + + /* Only activate Foreign keys that have been marked for deferred + * activation. + * -bsriram, 11-May-1999 BUG: 10016 + */ + FOR (REQUEST_HANDLE req_handle1) + CNST IN RDB$RELATION_CONSTRAINTS + CROSS IDS IN RDB$INDICES WITH + CNST.RDB$CONSTRAINT_TYPE EQ FOREIGN_KEY AND + CNST.RDB$INDEX_NAME EQ IDS.RDB$INDEX_NAME AND + IDS.RDB$INDEX_INACTIVE EQ DEFERRED_ACTIVE + + + MODIFY IDS USING + IDS.RDB$INDEX_INACTIVE = FALSE; + END_MODIFY; + ON_ERROR + general_on_error (); + END_ERROR; + + SAVE + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + BURP_print (173, IDS.RDB$INDEX_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + BURP_print_status (tdgbl->status); + MODIFY IDS USING + IDS.RDB$INDEX_INACTIVE = TRUE; + END_MODIFY; + ON_ERROR + general_on_error (); + END_ERROR; + END_ERROR; + BURP_verbose(122,IDS.RDB$INDEX_NAME,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + if (req_handle1) + isc_release_request (req_status, &req_handle1); + COMMIT; + ON_ERROR + general_on_error (); + END_ERROR; + } + +if (tdgbl->global_trans) + { + EXEC SQL COMMIT TRANSACTION tdgbl->global_trans; + if (gds_status [1]) + general_on_error (); + /* Check to see if there is a warning */ + if (gds_status [0] == gds_arg_gds && gds_status [1] == 0 && gds_status [2] != gds_arg_end) + BURP_print_warning (gds_status); + } + +EXEC SQL SET TRANSACTION ISOLATION LEVEL READ COMMITTED NO_AUTO_UNDO; +if (gds_status [1]) + EXEC SQL SET TRANSACTION; +/* +** Change ownership of any procedures necessary +*/ + +for (procedure = tdgbl->procedures; procedure; + procedure = procedure->prc_next) + if (procedure->prc_owner [0]) + FOR (REQUEST_HANDLE req_handle4) + X IN RDB$PROCEDURES WITH X.RDB$PROCEDURE_NAME EQ procedure->prc_name + + MODIFY X + strcpy (X.RDB$OWNER_NAME, procedure->prc_owner); + END_MODIFY; + ON_ERROR + if (req_handle4) + isc_release_request (req_status, &req_handle4); + general_on_error (); + END_ERROR; + + restore_security_class (procedure->prc_owner, X.RDB$SECURITY_CLASS); + + END_FOR; + ON_ERROR + if (req_handle4) + isc_release_request (req_status, &req_handle4); + general_on_error (); + END_ERROR; + +if (req_handle4) + isc_release_request (req_status, &req_handle4); + +/* Change ownership of any relations necessary */ + +for (relation = tdgbl->relations; relation; relation = relation->rel_next) + if (relation->rel_owner [0]) + FOR (REQUEST_HANDLE req_handle2) + X IN RDB$RELATIONS WITH X.RDB$RELATION_NAME EQ relation->rel_name + MODIFY X + strcpy (X.RDB$OWNER_NAME, relation->rel_owner); + END_MODIFY; + ON_ERROR + if (req_handle2) + isc_release_request (req_status, &req_handle2); + general_on_error (); + END_ERROR; + + restore_security_class (relation->rel_owner, X.RDB$SECURITY_CLASS); + restore_security_class (relation->rel_owner, X.RDB$DEFAULT_CLASS); + + END_FOR; + ON_ERROR + if (req_handle2) + isc_release_request (req_status, &req_handle2); + general_on_error (); + END_ERROR; +if (req_handle2) + isc_release_request (req_status, &req_handle2); + +/* Now that changing ownership of tables is over, it is safe to + update the database security class in RDB$DATABASE */ + +if (tdgbl->database_security_class[0]) /* Do it only if it's not NULL */ + { + FOR (REQUEST_HANDLE req_handle1) + X IN RDB$DATABASE + MODIFY X USING + strncpy(X.RDB$SECURITY_CLASS, tdgbl->database_security_class, + sizeof(X.RDB$SECURITY_CLASS)); + END_MODIFY; + ON_ERROR + if (req_handle1) + isc_release_request (req_status, &req_handle1); + general_on_error (); + END_ERROR; + END_FOR; + ON_ERROR + if (req_handle1) + isc_release_request (req_status, &req_handle1); + general_on_error (); + END_ERROR; + + if (req_handle1) + isc_release_request (req_status, &req_handle1); + } + +COMMIT; +ON_ERROR + general_on_error (); +END_ERROR; + +/* Check to see if there is a warning */ +if (gds_status [0] == gds_arg_gds && gds_status [1] == 0 && gds_status [2] != gds_arg_end) + BURP_print_warning (gds_status); + +BURP_verbose (88, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 88 finishing, closing, and going home */ + +MVOL_fini_read (&cumul_count_kb); + +/* attach database again to put it online */ + +d = dpb; +*d++ = (UCHAR) gds_dpb_version1; + +if (flag_on_line) + { + *d++ = (UCHAR) gds_dpb_online; + *d++ = 0; + } + +if (tdgbl->gbl_sw_user) + { + *d++ = (UCHAR) gds_dpb_user_name; + *d++ = (UCHAR) strlen (tdgbl->gbl_sw_user); + for (q = (UCHAR*) tdgbl->gbl_sw_user; *q;) + *d++ = *q++; + } + +if (tdgbl->gbl_sw_password) + { + if (!tdgbl->gbl_sw_service_thd) + *d++ = (UCHAR) gds_dpb_password; + else + *d++ = (UCHAR) gds_dpb_password_enc; + *d++ = (UCHAR) strlen (tdgbl->gbl_sw_password); + for (q = (UCHAR*) tdgbl->gbl_sw_password; *q;) + *d++ = *q++; + } + +/* set sync writes to engine default */ +*d++ = (UCHAR) gds_dpb_force_write; +*d++ = 1; +*d++ = (UCHAR) tdgbl->hdr_forced_writes; /* set forced writes to the value which was in the header */ + +l = d - dpb; +db_handle = 0; +if (isc_attach_database (tdgbl->status_vector, 0, GDS_VAL(database_name), + (isc_db_handle*)GDS_REF( db_handle), l, (SCHAR*) dpb)) + general_on_error(); +if (isc_detach_database (tdgbl->status_vector, (isc_db_handle*)GDS_REF(db_handle))) + general_on_error(); + +FINISH +ON_ERROR + general_on_error (); +END_ERROR; + +if (!flag_on_line) + { + BURP_print(246, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 246 Database is not online due to failure to activate one or more indices. */ + BURP_print(247, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 247 Run gfix -online to bring database online without active indices. */ + return FINI_DB_NOT_ONLINE; + } + +/* If the database is to be restored ReadOnly, set it to read_only now! */ +if (tdgbl->gbl_sw_mode == TRUE && tdgbl->gbl_sw_mode_val == TRUE) + { + BURP_verbose (280, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 280: setting database to read-only access */ + + d = dpb; + *d++ = (UCHAR) gds_dpb_version1; + if (tdgbl->gbl_sw_user) + { + *d++ = (UCHAR) gds_dpb_user_name; + *d++ = (UCHAR) strlen (tdgbl->gbl_sw_user); + for (q = (UCHAR*) tdgbl->gbl_sw_user; *q;) + *d++ = *q++; + } + + if (tdgbl->gbl_sw_password) + { + if (!tdgbl->gbl_sw_service_thd) + *d++ = (UCHAR) gds_dpb_password; + else + *d++ = (UCHAR) gds_dpb_password_enc; + *d++ = (UCHAR) strlen (tdgbl->gbl_sw_password); + for (q = (UCHAR*) tdgbl->gbl_sw_password; *q;) + *d++ = *q++; + } + + *d++ = (UCHAR) isc_dpb_set_db_readonly; + *d++ = 1; + *d++ = TRUE; /* set database to readOnly mode */ + l = d - dpb; + db_handle = 0; + if (isc_attach_database (tdgbl->status_vector, 0, GDS_VAL(database_name), + (isc_db_handle*)GDS_REF( db_handle), l, (SCHAR*) dpb)) + general_on_error(); + if (isc_detach_database (tdgbl->status_vector, (isc_db_handle*)GDS_REF(db_handle))) + general_on_error(); + + } + +return FINI_OK; +} + +static void add_files ( + UCHAR *file_name) +{ +/************************************** + * + * a d d _ f i l e s + * + ************************************** + * + * Functional description + * This should be a multi-file database. + * Store files and starting + * addresses & commit this much. + * + **************************************/ +SLONG start, count; +FIL file; +isc_req_handle req_handle1 = NULL; +long req_status [20]; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +/* store the RDB$FILES records */ + +start = 201; +count = 0; + +for (file = tdgbl->gbl_sw_files; file; file = file->fil_next) + { + if (strcmp (file->fil_name, (char*) file_name)) + { + count++; + STORE (REQUEST_HANDLE req_handle1) + X IN RDB$FILES + strcpy (X.RDB$FILE_NAME, file->fil_name); + X.RDB$FILE_START = start; + END_STORE; + ON_ERROR + general_on_error (); + END_ERROR; + if (req_handle1) + isc_release_request (req_status, &req_handle1); + BURP_verbose (57, file->fil_name, (void*) start, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 57 adding file %s, starting at page %ld */ + } + else if (((signed long )file->fil_length) >= start - 1) + file->fil_length -= start - 1; + else + { + BURP_print (96, (void*) file->fil_length, (void*) (start - 1), NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 96 length given for initial file (%ld) is less than minimum (%ld) */ + file->fil_length = 0; + } + + start += file->fil_length; + } + +if (count) + { + BURP_verbose (70, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 70 committing secondary files */ + COMMIT + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + BURP_print (174, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 174 cannot commit files */ + BURP_print_status (tdgbl->status_vector); + ROLLBACK; + ON_ERROR + general_on_error (); + END_ERROR; + END_ERROR; + + EXEC SQL SET TRANSACTION NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + } +} + +static void bad_attribute ( + UCHAR scan_next_attr, + ATT_TYPE bad_attr, + USHORT type) +{ +/************************************** + * + * b a d _ a t t r i b u t e + * + ************************************** + * + * Functional description + * We ran into an unsupported attribute. + * but it isn't the end of the world. + * We will try to skip some bad data and + * look for next valid attribute to continue the process. + * + **************************************/ +SSHORT skip_l; +TEXT t_name [128]; +SLONG skip_count; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +skip_count = 0; + +if (!tdgbl->gbl_sw_skip_count) + { + gds__msg_format (NULL_PTR, 12, type, sizeof (t_name), t_name, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); + BURP_print (80, t_name, (void*) bad_attr, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 80 don't recognize %s attribute %ld -- continuing */ + skip_l = GET(); + if (skip_l) + GET_SKIP (skip_l); + } +else + { + if (scan_next_attr == NO_SKIP) + { + skip_count = tdgbl->gbl_sw_skip_count; + GET_SKIP (skip_count); + BURP_print (203, (void*) skip_count, (void*) bad_attr, NULL_PTR, NULL_PTR, NULL_PTR); + /*msg 203: skipped %d bytes after reading a bad attribute %d */ + } + else + { + skip_count ++; + BURP_print (205, (void*) skip_count, (void*) bad_attr, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 205: skipped %d bytes looking for next valid attribute, encountered attribute %d */ + } + scan_next_attr = AFTER_SKIP; + } +} + +static USHORT check_db_version (void) +{ +/************************************** + * + * c h e c k _ d b _ v e r s i o n + * + ************************************** + * + * Functional description + * Find the version number of the database. + * + **************************************/ +USHORT db_version; +isc_req_handle req_handle1 = NULL, req_handle2 = NULL; +long req_status [20]; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +db_version = DB_VERSION_DDL4; +FOR (REQUEST_HANDLE req_handle1) + FIRST 1 X IN RDB$RELATIONS + WITH X.RDB$RELATION_NAME = "RDB$TRIGGERS" + db_version = DB_VERSION_DDL5; +END_FOR; +ON_ERROR + general_on_error (); +END_ERROR; +if (req_handle1) + isc_release_request (req_status, &req_handle1); +FOR (REQUEST_HANDLE req_handle2) + FIRST 1 X IN RDB$RELATIONS + WITH X.RDB$RELATION_NAME = "RDB$PROCEDURES" + db_version = DB_VERSION_DDL8; +END_FOR; +ON_ERROR + general_on_error (); +END_ERROR; +if (req_handle2) + isc_release_request (req_status, &req_handle2); + +return db_version; +} + +static void create_database ( + UCHAR *file_name) +{ +/************************************** + * + * c r e a t e _ d a t a b a s e + * + ************************************** + * + * Functional description + * create the new database, looking + * to see if there are any interesting + * things to do. + * + **************************************/ +SSHORT l; +STATUS status_vector [ISC_STATUS_LENGTH]; +REC_TYPE record; +ATT_TYPE attribute; +UCHAR dpb [128], *d, *q; +ULONG page_size, sweep_interval, page_buffers; +USHORT no_reserve, forced_writes; +TGBL tdgbl; +USHORT SQL_dialect; +BOOLEAN db_read_only, SQL_dialect_flag = FALSE; + +tdgbl = GET_THREAD_DATA; + +/* Get (physical) database record */ + +page_size = DEFAULT_PAGE_SIZE; +// sweep_interval = -1; +sweep_interval = 0xFFFFFFFF; +no_reserve = FALSE; +db_read_only = FALSE; +forced_writes = 2; /* default for the current platform */ +page_buffers = 0; + +if (GET_RECORD (record) == rec_physical_db) + { + while (GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_SQL_dialect: + SQL_dialect_flag = TRUE; + SQL_dialect = (USHORT) get_numeric(); + break; + + case att_page_size: + page_size = get_numeric(); + break; + + case att_sweep_interval: + sweep_interval = get_numeric(); + break; + + case att_forced_writes: + forced_writes = (USHORT) get_numeric(); + break; + + case att_no_reserve: + no_reserve = (USHORT) get_numeric(); + break; + + case att_db_read_only: + db_read_only = (UCHAR) get_numeric(); + break; + + case att_page_buffers: + page_buffers = get_numeric(); + break; + + default: + l = GET(); + if (l) + GET_SKIP (l); + break; + } + GET_RECORD (record); + } + +if (record != rec_database) + BURP_error_redirect ((STATUS*) NULL_PTR, 32, 0, 0); +/* msg 32 Expected database description record */ + +if (tdgbl->gbl_sw_page_size && + (tdgbl->gbl_sw_page_size < page_size)) + { + BURP_print (110, (void*) page_size, (void*) tdgbl->gbl_sw_page_size, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 110 Reducing the database page size from %ld bytes to %ld bytes */ + } + +if (tdgbl->gbl_sw_page_size) + page_size = tdgbl->gbl_sw_page_size; + +tdgbl->hdr_forced_writes = forced_writes; + +if (tdgbl->gbl_sw_no_reserve) + no_reserve = tdgbl->gbl_sw_no_reserve; + +/* Override attribute setting with user requirement */ +if (tdgbl->gbl_sw_mode == TRUE) + db_read_only = tdgbl->gbl_sw_mode_val; +else + { + /* No access mode specified by user. Use attribute settings. Since the + * database is set to readOnly only after making it Online in + * RESTORE_restore(), pass on this information through Global structures */ + tdgbl->gbl_sw_mode = TRUE; + tdgbl->gbl_sw_mode_val = db_read_only; + } + +if (tdgbl->gbl_sw_page_buffers) + page_buffers = tdgbl->gbl_sw_page_buffers; + +d = dpb; +*d++ = (UCHAR) isc_dpb_version1; +*d++ = (UCHAR) isc_dpb_page_size; +*d++ = 2; +*d++ = 0; +*d++ = (UCHAR) (page_size >> 8); +*d++ = (UCHAR) isc_dpb_gbak_attach; +*d++ = (UCHAR) strlen(GDS_VERSION); + for (q = (UCHAR*) GDS_VERSION; *q;) + *d++ = *q++; + +if (sweep_interval != -1) + { + *d++ = (UCHAR) isc_dpb_sweep_interval; + *d++ = 4; + *d++ = (UCHAR) sweep_interval; + *d++ = (UCHAR) (sweep_interval >> 8); + *d++ = (UCHAR) (sweep_interval >> 16); + *d++ = (UCHAR) (sweep_interval >> 24); + } + +/* If the database is to be restored "read_only", fillup the data pages */ +if (no_reserve || db_read_only) + { + *d++ = (UCHAR) isc_dpb_no_reserve; + *d++ = 1; + *d++ = TRUE; + } +if (tdgbl->gbl_sw_user) + { + *d++ = (UCHAR) isc_dpb_user_name; + *d++ = (UCHAR) strlen (tdgbl->gbl_sw_user); + for (q = (UCHAR*) tdgbl->gbl_sw_user; *q;) + *d++ = *q++; + } +if (tdgbl->gbl_sw_password) + { + if (!tdgbl->gbl_sw_service_thd) + *d++ = (UCHAR) isc_dpb_password; + else + *d++ = (UCHAR) isc_dpb_password_enc; + *d++ = (UCHAR) strlen (tdgbl->gbl_sw_password); + for (q = (UCHAR*) tdgbl->gbl_sw_password; *q;) + *d++ = *q++; + } +if (page_buffers) + { + *d++ = (UCHAR) isc_dpb_set_page_buffers; + *d++ = 4; + *d++ = (UCHAR) page_buffers; + *d++ = (UCHAR) (page_buffers >> 8); + *d++ = (UCHAR) (page_buffers >> 16); + *d++ = (UCHAR) (page_buffers >> 24); + } + +/* Turn off sync writes during restore */ +*d++ = (UCHAR) isc_dpb_force_write; +*d++ = 1; +*d++ = 0; + +/* +** +** which SQL dialect that this database speaks +** When we restore backup files that came from prior +** to V6, we force the SQL database dialect to 1 +** +*/ + +*d++ = (UCHAR) isc_dpb_sql_dialect; +*d++ = 1; +if (SQL_dialect_flag == TRUE) + *d++ = (UCHAR) SQL_dialect; +else + *d++ = (UCHAR) SQL_DIALECT_V5; + +/* start database up shut down */ +*d++ = (UCHAR) isc_dpb_shutdown; +*d++ = 1; +*d++ = (UCHAR) isc_dpb_shut_attachment; +*d++ = (UCHAR) isc_dpb_shutdown_delay; +*d++ = 2; +*d++ = 0; +*d++ = 0; + +l = d - dpb; + +if (isc_create_database (status_vector, + 0, + (SCHAR*) GDS_VAL (file_name), + GDS_REF (tdgbl->db_handle), + l, (SCHAR*) dpb, 0)) + { + BURP_error_redirect (status_vector, 33, file_name, 0); +/* msg 33 failed to create database %s */ + } + +if (tdgbl->gbl_sw_version) + { + BURP_print (139, file_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 139 Version(s) for database "%s" */ + isc_version (&tdgbl->db_handle, (void (*)()) BURP_output_version, (void*) "\t%s\n"); + } + +BURP_verbose (74, file_name, (void*) page_size, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 74 created database %s, page_size %ld bytes */ +} + +static void decompress ( + UCHAR *buffer, + USHORT length) +{ +/************************************** + * + * d e c o m p r e s s + * + ************************************** + * + * Functional description + * Get a number of compressed bytes. + * + **************************************/ +UCHAR c, *p, *end; +SSHORT count; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +p = buffer; +end = p + length; + +while (p < end) + { + /* This change was made to restore National Semi-Conductor's corrupted */ + /* gbak file and it is in the code base now. -Andrew */ + + count = (SCHAR) GET(); + if (count > 0) + { + if (end - p < count) + { + BURP_print (202, (void*) count, (void*) (end - p), NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 202: adjusting a decompression length error: invalid length %d was adjusted to %d */ + count = end - p; + } + p = GET_BLOCK (p, count); + } + else if (count < 0) + { + if (end + count < p) + { + BURP_print(202, (void*) count, (void*) (p - end), NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 202: adjusting a decompression length error: invalid length %d was adjusted to %d */ + count = p - end; + } + c = GET(); + memset (p, c, -count); + p += -count; + } + } + +if (p > end) + BURP_error_redirect ((STATUS*) NULL_PTR, 34, 0, 0); + /* msg 34 RESTORE: decompression length error */ +} + +static void eat_blob (void) +{ +/************************************** + * + * e a t _ b l o b + * + ************************************** + * + * Functional description + * Discard a blob from backup file + * + **************************************/ +SLONG length; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +length = get_numeric(); + +GET_SKIP (length); +} + +static REL find_relation ( + TEXT *name) +{ +/************************************** + * + * f i n d _ r e l a t i o n + * + ************************************** + * + * Functional description + * Given a relation name, find the relation block. If there isn't + * one, produce a fatal error. + * + **************************************/ +TEXT *p, *q; +REL relation; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +for (relation = tdgbl->relations; relation; relation = relation->rel_next) + for (p = relation->rel_name, q = name; *p == *q; p++, q++) + if (!*p) + return relation; + +BURP_error_redirect ((STATUS *) NULL_PTR, 35, name, 0); +/* msg 35 can't find relation %s */ + +return NULL; +} + +static void general_on_error (void) +{ +/************************************** + * + * g e n e r a l _ o n _ e r r o r + * + ************************************** + * + * Functional description + * Handle any general ON_ERROR clause during restore. + * + **************************************/ +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +BURP_print_status (tdgbl->status); +BURP_abort (); +} + +static int get_acl ( + TEXT *owner_nm, + ISC_QUAD *blob_id, + ISC_QUAD *new_blob_id) +{ +/************************************** + * + * g e t _ a c l + * + ************************************** + * + * Functional description + * + * open the blob that contains the ACL list + * get the ACL list of a relation + * replace the owner of the relation in the ACL list with + * the creator of the relation + * create a new blob + * store the new ACL list in the new blob + * + **************************************/ + +static CONST SCHAR blr_items [] = {isc_info_blob_max_segment, + isc_info_blob_total_length, + isc_info_blob_num_segments}; +STATUS status_vector [ISC_STATUS_LENGTH]; +SLONG length, n; +SLONG *blob; +UCHAR *p, blob_info [32], item, *buffer, static_buffer [1024], + *new_buffer, *end_buffer; +USHORT l, max_segment, num_segments, new_len = 0; +TGBL tdgbl; +UCHAR *c_1, *from, *to, owner_nm_len; +SLONG id_person_len, cnt; +isc_blob_handle blob_handle = NULL; + +tdgbl = GET_THREAD_DATA; +new_buffer = (UCHAR*) NULL_PTR; + +/* If the blob is null, don't store it. It will be restored as null. */ + +if (!blob_id->gds_quad_high && !blob_id->gds_quad_low) + return FALSE; + +/* Open the blob and get it's vital statistics */ + +blob = NULL; + +if (isc_open_blob (status_vector, GDS_REF (tdgbl->db_handle), + GDS_REF (gds_trans), (void**) GDS_REF (blob), + GDS_VAL (blob_id))) + /* msg 24 gds__open_blob failed */ + BURP_error_redirect (status_vector, 24, NULL, NULL); + +if (isc_blob_info (status_vector, (void**) GDS_REF (blob), sizeof (blr_items), + (SCHAR *) blr_items, sizeof (blob_info), (SCHAR*) blob_info)) + /* msg 20 gds__blob_info failed */ + BURP_error_redirect (status_vector, 20, NULL, NULL); + +length = 0; +p = blob_info; + +while ((item = *p++) != gds_info_end) + { + l = (USHORT) gds__vax_integer (p, 2); + p += 2; + n = gds__vax_integer (p, l); + p += l; + switch (item) + { + case isc_info_blob_max_segment: + max_segment = (USHORT) n; + break; + + case isc_info_blob_total_length: + length = n; + break; + + case isc_info_blob_num_segments: + num_segments = (USHORT) n; + /* + ** we assume that the ACL list was written out as + ** in one big segment + ** + */ + if (num_segments > 1) + assert (num_segments > 1); + break; + + default: + /* msg 79 don't understand blob info item %ld */ + BURP_print (79, (void*) item, NULL, NULL, NULL, NULL); + return FALSE; + } + } + +if (!length) + { + if (isc_close_blob (status_vector, (void**) GDS_REF (blob))) + /* msg 23 gds__close_blob failed */ + BURP_error_redirect (status_vector, 23, NULL, NULL); + return FALSE; + } + +/* Rdb sometimes gets the length messed up */ + +if (length < max_segment) + length = max_segment; + +/* +** Allocate a buffer large enough for the largest segment and start +** grinding. +*/ + +if (!max_segment || max_segment <= sizeof (static_buffer)) + buffer = static_buffer; +else + buffer = BURP_ALLOC (max_segment); + +isc_get_segment (status_vector, + (void**) GDS_REF (blob), + GDS_REF (l), + max_segment, + (SCHAR*) GDS_VAL (buffer)); + +if (isc_close_blob (status_vector, (void**) GDS_REF (blob))) + { + if (buffer != static_buffer) + BURP_FREE (buffer); + /* msg 23 gds__close_blob failed */ + BURP_error_redirect (status_vector, 23, NULL, NULL); + } + +from = buffer + 3; /* skip ACL_version, ACL_id_list, and id_person */ +id_person_len = (int)*from; + +c_1 = (UCHAR*) owner_nm; +owner_nm_len = strlen (owner_nm); + +new_buffer = BURP_ALLOC (length - id_person_len + owner_nm_len); + +from = buffer; +to = new_buffer; +*to++ = *from++; /* copy ACL_verion */ +*to++ = *from++; /* copy ACL_id_list */ +*to++ = *from++; /* copy id_person */ +*to++ = owner_nm_len; +new_len = new_len + 4; +from = buffer + id_person_len + 4; +for (cnt = 0; cnt < owner_nm_len; cnt++) + { + *to++ = *c_1++; + new_len++; + } + +end_buffer = buffer + length; +for (from = buffer + id_person_len + 4; from < end_buffer; from++) + { + *to++ = *from; + new_len++; + } + +if (isc_create_blob2 (status_vector, + GDS_REF (tdgbl->db_handle), + GDS_REF (gds_trans), + GDS_REF (blob_handle), + GDS_VAL (new_blob_id), + 0, + NULL)) + { + if (buffer != static_buffer) + BURP_FREE (buffer); + if (new_buffer != NULL_PTR) + BURP_FREE (new_buffer); + /* msg 37 gds__create_blob failed */ + BURP_error_redirect (status_vector, 37, 0, 0); + } + +if (isc_put_segment (status_vector, + GDS_REF (blob_handle), + new_len, + (SCHAR*) GDS_VAL (new_buffer))) + { + if (buffer != static_buffer) + BURP_FREE (buffer); + if (new_buffer != NULL_PTR) + BURP_FREE (new_buffer); + /* msg 38 gds__put_segment failed */ + BURP_error_redirect (status_vector, 38, 0, 0); + } + +if (isc_close_blob (status_vector, GDS_REF (blob_handle))) + { + if (buffer != static_buffer) + BURP_FREE (buffer); + if (new_buffer != NULL_PTR) + BURP_FREE (new_buffer); + /* msg 23 gds__close_blob failed */ + BURP_error_redirect (status_vector, 23, 0, 0); + } + +if (buffer != static_buffer) + BURP_FREE (buffer); + +if (new_buffer != NULL_PTR) + BURP_FREE (new_buffer); + +return TRUE; +} + +static void get_array ( + REL relation, + UCHAR *record_buffer) +{ +/************************************** + * + * g e t _ a r r a y + * + ************************************** + * + * Functional description + * Read array data from input file to nice, + * shiney, new array. + * + **************************************/ +FLD field; +ATT_TYPE attribute; +STATUS status_vector [ISC_STATUS_LENGTH]; +SLONG last_element_dim[MAX_DIMENSION]; +SLONG fld_ranges[2*MAX_DIMENSION]; +SLONG *blob_id, return_length, slice_length, *range, *end_ranges, + lcount; +USHORT blr_length, count, field_number, field_length; +UCHAR *buffer, *p; +SCHAR *blr, blr_buffer [200]; /* enough for a sdl with 16 dimensions */ +LSTRING xdr_buffer, xdr_slice; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +/* don't free something you don't allocate */ + +xdr_buffer.lstr_allocated = 0; + +/* Pick up attributes */ + +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_blob_data) + switch (attribute) + { + case att_blob_field_number: + field_number = (USHORT)get_numeric(); + for (field = relation->rel_fields; field; field = field->fld_next) + if (field->fld_number == field_number) + break; + if (!field) + BURP_error_redirect ((STATUS *) NULL_PTR, 36, 0, 0); + /* msg 36 Can't find field for blob */ + + field_length = field->fld_length; + if (field->fld_type == blr_varying) + field_length += sizeof (USHORT); + slice_length = field_length; + /** + Copy the ranges onto a buffer and let the program + mess with the copy rather than the original + **/ + memcpy(fld_ranges,field->fld_ranges, sizeof(fld_ranges)); + break; + + case att_array_dimensions: + field->fld_dimensions = (SSHORT)get_numeric(); + end_ranges = fld_ranges + 2 * field->fld_dimensions; + for (range = fld_ranges; range < end_ranges; range += 2) + { + if (GET_ATTRIBUTE (attribute) != att_array_range_low) + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + else + range [0] = get_numeric(); + if (GET_ATTRIBUTE (attribute) != att_array_range_high) + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + else + range [1] = get_numeric(); + slice_length *= (range [1] - range [0] + 1); + } + break; + + default: + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + break; + } + +return_length = GET(); +return_length |= GET() << 8; +return_length |= GET() << 16; +return_length |= GET() << 24; + +blob_id = (SLONG*) ((UCHAR*) record_buffer + field->fld_offset); + +if (return_length != slice_length) + { + int current_dim,divisor, elements_remaining; + int data_at, elements_written, upper, lower,dont_write; + int i1, i2, i3; + /* Ugh! The full array wasn't returned and versions of gbak prior to + V3.2I don't explicitly signal this. We must recompute the top + element to restore. + + Double Ugh! gbak (Versions prior to 5.0) while backing up calculates + the top dimensions incorrectly So whatever was written as top dimensions + is useless. 5.0 gbak has written correct dimensions, but what the heck + we'll calculate it again + */ + + elements_remaining = return_length/field_length; + /** + Backup (versions prior to 5.0) has surely written wrong dimensions. + Ignore whatever is read in fld_ranges and calculate the dimensions + of the last element. field->fld_ranges has the max dimensions. + last_element_dim holds only the upper bounds of each dimension. + **/ + for (i1=0,i3=0; i1fld_dimensions; i1++) + { + divisor=1; + for (i2=(2*(i1+1)+1); i2<=field->fld_dimensions*2; i2+=2) + divisor *= (field->fld_ranges[i2]-field->fld_ranges[i2-1]+1); + last_element_dim[i1] = + (elements_remaining-1)/divisor +field->fld_ranges[i3]; + elements_remaining -= + (last_element_dim[i1]-field->fld_ranges[i3])*divisor; + i3+=2; + } +#ifdef DEBUG + ib_fprintf(ib_stderr, "\nLast element upper bounds read from backup file:\n"); + for(current_dim=1;current_dimfld_dimensions*2;current_dim+=2) ib_fprintf(ib_stderr,"%d ",fld_ranges[current_dim]); + ib_fprintf(ib_stderr, "\nCalculated Last element upper bounds :\n"); + for(current_dim=0;current_dimfld_dimensions;current_dim++) ib_fprintf(ib_stderr,"%d ",last_element_dim[current_dim]); + ib_fprintf(ib_stderr,"return_length = %d\n", return_length); + ib_fprintf(ib_stderr,"elements_returned = %d\n", return_length/field_length); + ib_fprintf(ib_stderr,"Max dims["); + for(current_dim=1;current_dimfld_dimensions*2;current_dim+=2) ib_fprintf(ib_stderr,"%d ",field->fld_ranges[current_dim]); + ib_fprintf(ib_stderr,"]"); +#endif + data_at = 0; + /** + We have an irregurlar shaped slice to write. The following for loop + chops the array into writable rectangular/square slice and sends it + to the engine. When the loop cycles through all dimensions, we would + have written the whole of the irregular slice. + **/ + for (current_dim=0; current_dimfld_dimensions; current_dim++) + { + blr = blr_buffer; + dont_write = 0; + + /* build the sdl */ + + STUFF (gds_sdl_version1); + + STUFF (gds_sdl_struct); + STUFF (1); + + if (field->fld_type == blr_text || + field->fld_type == blr_varying) + { + if (field->fld_type == blr_text) + STUFF (blr_text2) + else + STUFF (blr_varying2); + STUFF_WORD (field->fld_character_set_id); + STUFF_WORD (field->fld_length); + } + else if (field->fld_type == blr_short || + field->fld_type == blr_long || + field->fld_type == blr_quad) + { + STUFF (field->fld_type); + STUFF (field->fld_scale); + } + else + STUFF (field->fld_type); + + + STUFF (gds_sdl_relation); + stuff_string (&blr, relation->rel_name); + STUFF (gds_sdl_field); + stuff_string (&blr, field->fld_name); + + /* each element spec starts here */ + +#ifdef DEBUG + ib_fprintf(ib_stderr,"\nBounds written ["); +#endif + elements_written=1; + end_ranges = field->fld_ranges + 2 * field->fld_dimensions; + /** + Here is the important work. Calculate the the bounds to be written + so that the resulting slice is a rectangular/square slice. + For a 2 dimensional array of size 1..N, 1..M, which is partially + filled, we have already calculated the dims of last element. Say + if this was x,y (x is row, y is column) then we do + isc_put_slice(1..x-1, 1..M); + isc_put_slice(x..x, 1..y); + similarly for a 3D array [N,M,K] whose last element dims are (x,y,z) + isc_put_slice(1..x-1, 1..M, 1..K); + isc_put_slice(x..x, 1..y-1, 1..K); + isc_put_slice(x..x, y..y, 1..z); + This is applicable for any number of dimensions. + Special cases: + for example in case of a 2D array (10,10) and if the last element + dims were (1,2), we would just do a isc_put_slice(1..1, 1..2). + This is applied for any number of dimensions. + **/ + for (range = field->fld_ranges, count = 0; range < end_ranges; range += 2, count++) + { + STUFF (gds_sdl_do2); STUFF (count); + /** + Normally we loop through all dimensions chopping off slices + and writing them. This works fine but this also means that + we blindly put slices without actually figuring out if we + really need to do so. For eg: if we have a 2D array of + size [10,4] and the last element dims are [6,4] then all + we need to do is is to put one slice as + isc_put_slice(1..6,1..4) + rather than looping through the dimensions and putting + isc_put_slice(1..5,1..4) + isc_put_slice(6..6,1..4) + we could extend this logic to any no of dims. The following + if condition figures out such cases. This combined with + the Special case should optimize the no of isc_put_slice + we perform. + **/ + if( current_dim+1 == field->fld_dimensions-1 && + field->fld_dimensions-count == 2 && + last_element_dim[count+1] == range [3] ) + { + STUFF (gds_sdl_long_integer); STUFF_LONG (range [0]); + lower = range [0]; + STUFF (gds_sdl_long_integer); + STUFF_LONG (last_element_dim [count]); + upper=last_element_dim [count]; + elements_written *= (upper-lower+1); + range+=2; + count++; + STUFF (gds_sdl_do2); STUFF (count); + STUFF (gds_sdl_long_integer); STUFF_LONG (range [0]); + lower = range [0]; + STUFF (gds_sdl_long_integer); + STUFF_LONG (last_element_dim [count]); + upper=last_element_dim [count]; + elements_written *= (upper-lower+1); + ++current_dim; + break; + + } + if( current_dim==count) + { + STUFF (gds_sdl_long_integer); STUFF_LONG (range [0]); + lower = range [0]; + STUFF (gds_sdl_long_integer); + upper = (current_dim==field->fld_dimensions-1)? + last_element_dim [count] : (last_element_dim [count]-1); + if( upper < range[0] ) + { + /** + see Special Case above + **/ + dont_write = 1; + break; + } + STUFF_LONG (upper); + } + else if (current_dimcount) + { + STUFF (gds_sdl_long_integer); + STUFF_LONG (last_element_dim [count]); + STUFF (gds_sdl_long_integer); + STUFF_LONG (last_element_dim [count]); + upper=lower=last_element_dim [count]; + } + elements_written *= (upper-lower+1); +#ifdef DEBUG + ib_fprintf(ib_stderr,"%d..%d ",lower,upper); +#endif + } + if( dont_write ) continue; +#ifdef DEBUG + ib_fprintf(ib_stderr,"]"); + ib_fprintf(ib_stderr,"\n Elements Written=%d ",elements_written); +#endif + + STUFF (gds_sdl_element); STUFF (1); + STUFF (gds_sdl_scalar); STUFF (0); STUFF (field->fld_dimensions); + + for (count = 0; count < field->fld_dimensions; count++) + { + STUFF (gds_sdl_variable); + STUFF (count); + } + + STUFF (gds_sdl_eoc); + +#ifdef DEBUG + if (debug_on) + PRETTY_print_sdl (blr_buffer, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +#endif + + blr_length = blr - blr_buffer; + + if(data_at==0) + { + buffer = BURP_ALLOC (return_length); + + if (tdgbl->gbl_sw_transportable) + { + if (GET_ATTRIBUTE (attribute) != att_xdr_array) + /* msg 55 Expected XDR record length */ + BURP_error_redirect ((STATUS *) NULL_PTR, 55, 0, 0); + else + { + xdr_buffer.lstr_allocated = GET(); + xdr_buffer.lstr_allocated |= GET() << 8; + xdr_buffer.lstr_allocated |= GET() << 16; + xdr_buffer.lstr_allocated |= GET() << 24; + lcount = xdr_buffer.lstr_length = xdr_buffer.lstr_allocated; + xdr_buffer.lstr_address = BURP_ALLOC (xdr_buffer.lstr_allocated); + xdr_slice.lstr_allocated = xdr_slice.lstr_length = return_length; + xdr_slice.lstr_address = buffer; + p = xdr_buffer.lstr_address; + } + } + else + { + p = buffer; + lcount = return_length; + } + + if (lcount) + (void) GET_BLOCK (p, lcount); + + if (tdgbl->gbl_sw_transportable) + CAN_slice (&xdr_buffer, &xdr_slice, FALSE, blr_length, (UCHAR*) blr_buffer); + } + + if (isc_put_slice (status_vector, + GDS_REF (tdgbl->db_handle), + GDS_REF (gds_trans), + (ISC_QUAD*)GDS_VAL (blob_id), + blr_length, + blr_buffer, + 0, /* param length for subset of an array handling */ + (ISC_LONG*) 0, /* param for subset of an array handling */ + elements_written*field->fld_length, + GDS_VAL (buffer+data_at))) + { + BURP_print (81, field->fld_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 81 error accessing blob field %s -- continuing */ + BURP_print_status (status_vector); +#ifdef DEBUG + PRETTY_print_sdl (blr_buffer, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +#endif + return; + } + data_at += elements_written*field->fld_length; +#ifdef DEBUG + ib_fprintf(ib_stderr,"next data_at = %d\n", data_at); +#endif + } + } +else + { /** This is the regular case we've got the entire array **/ + blr = blr_buffer; + + /* build the sdl */ + + STUFF (gds_sdl_version1); + + STUFF (gds_sdl_struct); + STUFF (1); + + if (field->fld_type == blr_text || + field->fld_type == blr_varying) + { + if (field->fld_type == blr_text) + STUFF (blr_text2) + else + STUFF (blr_varying2); + STUFF_WORD (field->fld_character_set_id); + STUFF_WORD (field->fld_length); + } + else if (field->fld_type == blr_short || + field->fld_type == blr_long || + field->fld_type == blr_quad) + { + STUFF (field->fld_type); + STUFF (field->fld_scale); + } + else + STUFF (field->fld_type); + + + STUFF (gds_sdl_relation); + stuff_string (&blr, relation->rel_name); + STUFF (gds_sdl_field); + stuff_string (&blr, field->fld_name); + + /* each element spec starts here */ + + for (range = fld_ranges, count = 0; range < end_ranges; range += 2, count++) + { + STUFF (gds_sdl_do2); STUFF (count); + STUFF (gds_sdl_long_integer); STUFF_LONG (range [0]); + STUFF (gds_sdl_long_integer); STUFF_LONG (range [1]); + } + + STUFF (gds_sdl_element); STUFF (1); + STUFF (gds_sdl_scalar); STUFF (0); STUFF (field->fld_dimensions); + + for (count = 0; count < field->fld_dimensions; count++) + { + STUFF (gds_sdl_variable); + STUFF (count); + } + + STUFF (gds_sdl_eoc); + +#ifdef DEBUG + if (debug_on) + PRETTY_print_sdl (blr_buffer, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +#endif + + blr_length = blr - blr_buffer; + + buffer = BURP_ALLOC (return_length); + + if (tdgbl->gbl_sw_transportable) + { + if (GET_ATTRIBUTE (attribute) != att_xdr_array) + BURP_error_redirect ((STATUS *) NULL_PTR, 55, 0, 0); + /* msg 55 Expected XDR record length */ + else + { + xdr_buffer.lstr_allocated = GET(); + xdr_buffer.lstr_allocated |= GET() << 8; + xdr_buffer.lstr_allocated |= GET() << 16; + xdr_buffer.lstr_allocated |= GET() << 24; + lcount = xdr_buffer.lstr_length = xdr_buffer.lstr_allocated; + xdr_buffer.lstr_address = BURP_ALLOC (xdr_buffer.lstr_allocated); + xdr_slice.lstr_allocated = xdr_slice.lstr_length = return_length; + xdr_slice.lstr_address = buffer; + p = xdr_buffer.lstr_address; + } + } + else + { + p = buffer; + lcount = return_length; + } + + if (lcount) + (void) GET_BLOCK (p, lcount); + + if (tdgbl->gbl_sw_transportable) + CAN_slice (&xdr_buffer, &xdr_slice, FALSE, blr_length, (UCHAR*) blr_buffer); + + + if (isc_put_slice (status_vector, + GDS_REF (tdgbl->db_handle), + GDS_REF (gds_trans), + (ISC_QUAD*)GDS_VAL (blob_id), + blr_length, + blr_buffer, + 0, /* param length for subset of an array handling */ + (ISC_LONG*) 0, /* param for subset of an array handling */ + return_length, + GDS_VAL (buffer))) + { + BURP_print (81, field->fld_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 81 error accessing blob field %s -- continuing */ + BURP_print_status (status_vector); +#ifdef DEBUG + PRETTY_print_sdl (blr_buffer, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +#endif + return; + } + } + +BURP_FREE (buffer); +if (tdgbl->gbl_sw_transportable && xdr_buffer.lstr_allocated) + BURP_FREE (xdr_buffer.lstr_address); +} + +static void get_blob ( + FLD fields, + UCHAR *record_buffer) +{ +/************************************** + * + * g e t _ b l o b + * + ************************************** + * + * Functional description + * Read blob attributes and copy data from input file to nice, + * shiny, new blob. + * + **************************************/ +FLD field; +ATT_TYPE attribute; +STATUS status_vector [ISC_STATUS_LENGTH]; +ULONG segments; +ISC_QUAD *blob_id; +SLONG *blob; +USHORT field_number, max_segment, length; +UCHAR *buffer, static_buffer [1024]; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +/* Pick up attributes */ + +segments = 0; + +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_blob_data) + switch (attribute) + { + case att_blob_field_number: + field_number = (USHORT)get_numeric(); + break; + + case att_blob_max_segment: + max_segment = (USHORT)get_numeric(); + break; + + case att_blob_number_segments: + segments = get_numeric(); + break; + + case att_blob_type: + (void) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 64); + /* msg 64 blob */ + break; + } + +/* Find the field associated with the blob */ + +for (field = fields; field; field = field->fld_next) + if (field->fld_number == field_number) + break; + +if (!field) + BURP_error_redirect ((STATUS *) NULL_PTR, 36, 0, 0); + /* msg 36 Can't find field for blob */ + +/* Create new blob */ + +blob_id = (ISC_QUAD*) ((UCHAR*) record_buffer + field->fld_offset); +blob = NULL; + +if (isc_create_blob (status_vector, + GDS_REF (tdgbl->db_handle), + GDS_REF (gds_trans), + (void**) GDS_REF (blob), + (ISC_QUAD*)GDS_VAL (blob_id))) + BURP_error_redirect (status_vector, 37, 0, 0); + /* msg 37 gds__create_blob failed */ + +/* Allocate blob buffer is static buffer is too short */ + +if (!max_segment || max_segment <= sizeof (static_buffer)) + buffer = static_buffer; +else + buffer = BURP_ALLOC (max_segment); + +/* Eat up blob segments */ + +for (; segments > 0; --segments ) + { + length = GET(); + length |= GET() << 8; + if (length) + { + (void) GET_BLOCK (buffer, length); + } + if (isc_put_segment (status_vector, + (void**) GDS_REF (blob), + length, + (SCHAR*) GDS_VAL (buffer))) + BURP_error_redirect (status_vector, 38, 0, 0); + /* msg 38 gds__put_segment failed */ + } + +if (isc_close_blob (status_vector, (void**) GDS_REF (blob))) + BURP_error_redirect (status_vector, 23, 0, 0); + /* msg 23 gds__close_blob failed */ + +if (buffer != static_buffer) + BURP_FREE (buffer); +} + +static void get_blr_blob ( + ISC_QUAD *blob_id, + USHORT glb_trans) +{ +/************************************** + * + * g e t _ b l r _ b l o b + * + ************************************** + * + * Functional description + * Read blob attributes and copy data from input file to nice, + * shiney, new blob. + * + **************************************/ +STATUS status_vector [ISC_STATUS_LENGTH]; +SLONG *blob; +USHORT length, l; +UCHAR *buffer, static_buffer [1024], *p; +isc_tr_handle local_trans; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +length = (USHORT)get_numeric(); + +/* Create new blob */ + +blob = NULL; + +if (glb_trans && tdgbl->global_trans) + local_trans = tdgbl->global_trans; +else + local_trans = gds_trans; + +if (isc_create_blob (status_vector, + GDS_REF (tdgbl->db_handle), + GDS_REF (local_trans), + (void**) GDS_REF (blob), + GDS_VAL (blob_id))) + BURP_error_redirect (status_vector, 37, 0, 0); + /* msg 37 gds__create_blob failed */ + +/* Allocate blob buffer is static buffer is too short */ + +if (!length || length + 1 <= sizeof (static_buffer)) + buffer = static_buffer; +else + { + l = length + 1; + buffer = BURP_ALLOC (l); + } + +if (l = length) + { + p = buffer; + p = GET_BLOCK (p, l); + } + +/* Make sure it has an eoc */ +if ((*--p) != blr_eoc) + { + length++; + *++p = blr_eoc; + } + +if (isc_put_segment (status_vector, + (void**) GDS_REF (blob), + length, + (SCHAR*) GDS_VAL (buffer))) + BURP_error_redirect (status_vector, 38, 0, 0); + /* msg 38 gds__put_segment failed */ + +if (isc_close_blob (status_vector, (void**) GDS_REF (blob))) + BURP_error_redirect (status_vector, 23, 0, 0); + /* msg 23 gds__close_blob failed */ + +if (buffer != static_buffer) + BURP_FREE (buffer); +} + +static BOOLEAN get_character_set (void) +{ +/************************************** + * + * g e t _ c h a r a c t e r _ s e t s + * + ************************************** + * + * Functional description + * Restore data for user defined character sets + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_character_sets_req_handle1) + X IN RDB$CHARACTER_SETS + X.RDB$CHARACTER_SET_NAME.NULL = TRUE; + X.RDB$FORM_OF_USE.NULL = TRUE; + X.RDB$NUMBER_OF_CHARACTERS.NULL = TRUE; + X.RDB$DEFAULT_COLLATE_NAME.NULL = TRUE; + X.RDB$CHARACTER_SET_ID.NULL = TRUE; + X.RDB$SYSTEM_FLAG.NULL = TRUE; + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$FUNCTION_NAME.NULL = TRUE; + X.RDB$BYTES_PER_CHARACTER.NULL = TRUE; + + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + + case att_charset_name: + X.RDB$CHARACTER_SET_NAME.NULL = FALSE; + get_text (X.RDB$CHARACTER_SET_NAME, sizeof (X.RDB$CHARACTER_SET_NAME)); + BURP_verbose (msgVerbose_restore_charset, X.RDB$CHARACTER_SET_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + break; + + case att_charset_form: + X.RDB$FORM_OF_USE.NULL = FALSE; + get_text (X.RDB$FORM_OF_USE, sizeof (X.RDB$FORM_OF_USE)); + break; + + case att_charset_numchar: + X.RDB$NUMBER_OF_CHARACTERS.NULL = FALSE; + X.RDB$NUMBER_OF_CHARACTERS = (USHORT) get_numeric(); + break; + + case att_charset_coll: + X.RDB$DEFAULT_COLLATE_NAME.NULL = FALSE; + get_text (X.RDB$DEFAULT_COLLATE_NAME, sizeof (X.RDB$DEFAULT_COLLATE_NAME)); + break; + + case att_charset_id: + X.RDB$CHARACTER_SET_ID.NULL = FALSE; + X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); + break; + + case att_charset_sysflag: + X.RDB$SYSTEM_FLAG.NULL = FALSE; + X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); + break; + + case att_charset_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + case att_charset_funct: + X.RDB$FUNCTION_NAME.NULL = FALSE; + get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); + break; + + case att_charset_bytes_char: + X.RDB$BYTES_PER_CHARACTER.NULL = FALSE; + X.RDB$BYTES_PER_CHARACTER = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, msgErr_restore_charset); + /* RDB$CHARSETS */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_chk_constraint (void) +{ +/************************************** + * + * g e t _ c h k _ c o n s t r a i n t + * + ************************************** + * + * Functional description + * Restore data for check constraints. + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_chk_constraint_req_handle1) + X IN RDB$CHECK_CONSTRAINTS + X.RDB$CONSTRAINT_NAME.NULL = TRUE; + X.RDB$TRIGGER_NAME.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_chk_constraint_name: + X.RDB$CONSTRAINT_NAME.NULL = FALSE; + get_text (X.RDB$CONSTRAINT_NAME, sizeof (X.RDB$CONSTRAINT_NAME)); + break; + + case att_chk_trigger_name: + X.RDB$TRIGGER_NAME.NULL = FALSE; + get_text (X.RDB$TRIGGER_NAME, sizeof (X.RDB$TRIGGER_NAME)); + break; + + default: + bad_attribute (scan_next_attr, attribute, 208); + /* msg 208 relation constraint */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_collation (void) +{ +/************************************** + * + * g e t _ c o l l a t i o n + * + ************************************** + * + * Functional description + * Restore data for user defined collations + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_collation_req_handle1) + X IN RDB$COLLATIONS + X.RDB$COLLATION_NAME.NULL = TRUE; + X.RDB$COLLATION_ID.NULL = TRUE; + X.RDB$CHARACTER_SET_ID.NULL = TRUE; + X.RDB$COLLATION_ATTRIBUTES.NULL = TRUE; + X.RDB$SYSTEM_FLAG.NULL = TRUE; + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$FUNCTION_NAME.NULL = TRUE; + + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + + case att_coll_name: + X.RDB$COLLATION_NAME.NULL = FALSE; + get_text (X.RDB$COLLATION_NAME, sizeof (X.RDB$COLLATION_NAME)); + BURP_verbose (msgVerbose_restore_collation, X.RDB$COLLATION_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + break; + + case att_coll_id: + X.RDB$COLLATION_ID.NULL = FALSE; + X.RDB$COLLATION_ID = (USHORT) get_numeric(); + break; + + case att_coll_cs_id: + X.RDB$CHARACTER_SET_ID.NULL = FALSE; + X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); + break; + + case att_coll_attr: + X.RDB$COLLATION_ATTRIBUTES.NULL = FALSE; + X.RDB$COLLATION_ATTRIBUTES = (USHORT) get_numeric(); + break; + + case att_coll_subtype: /* No longer used: 93-11-15 DBS */ + /* still present to handle V4 R&D + gbak files */ + (void) get_numeric(); + break; + + case att_coll_sysflag: + X.RDB$SYSTEM_FLAG.NULL = FALSE; + X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); + break; + + case att_coll_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + case att_coll_funct: + X.RDB$FUNCTION_NAME.NULL = FALSE; + get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); + break; + + default: + bad_attribute (scan_next_attr, attribute, msgErr_restore_collation); + /* Bad RDB$COLLATION */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static REC_TYPE get_data ( + REL relation) +{ +/************************************** + * + * g e t _ d a t a + * + ************************************** + * + * Functional description + * Write data records for a relation. + * + **************************************/ +FLD field; +int *request, records; +TEXT *p; +SCHAR *blr, *blr_buffer; +RCRD_OFFSET offset; +USHORT l; +ULONG length, old_length; +SSHORT count, blr_length, alignment, dtype; +SSHORT *buffer; +LSTRING data; +STATUS status_vector [ISC_STATUS_LENGTH]; +SLONG *blob_id; +REC_TYPE record; +TGBL tdgbl; +isc_req_handle req_handle = NULL; +TEXT index_name[32]; +long error_code; + +tdgbl = GET_THREAD_DATA; + +/* If we're only doing meta-data, ignore data records */ + +if (tdgbl->gbl_sw_meta) + return ignore_data (relation); + +/* Start by counting the interesting fields */ + +offset = length = 0; +count = 0; + +for (field = relation->rel_fields; field; field = field->fld_next) + if (!(field->fld_flags & FLD_computed)) + { + count++; + length += field->fld_name_length; + } + +if (tdgbl->RESTORE_format >= 2) + count += count; + +/* Time to generate blr to store data. Whoppee. */ + +blr = blr_buffer = (SCHAR*) BURP_ALLOC (200 + length + count * 18); +STUFF (blr_version4); +STUFF (blr_begin); +STUFF (blr_message); +STUFF (0); /* Message number */ +STUFF_WORD (count); /* Number of fields, counting eof */ +count = 0; + +for (field = relation->rel_fields; field; field = field->fld_next) + { + if (field->fld_flags & FLD_computed) + continue; + + /* arrays are of various fld_types but are really blobs */ + + dtype = field->fld_type; + length = field->fld_length; + alignment = 4; + + if (field->fld_flags & FLD_array) + dtype = blr_blob; + + if (dtype <= DTYPE_BLR_MAX) + { + l = gds_cvt_blr_dtype [dtype]; + alignment = type_alignments [l]; + if (l = type_lengths [l]) + length = l; + } + + switch (dtype) + { + case blr_text: + case blr_varying: + if (dtype == blr_text) + STUFF (blr_text2) + else + STUFF (blr_varying2); + STUFF_WORD (field->fld_character_set_id); + STUFF_WORD (field->fld_length); + if (dtype == blr_varying) + length += sizeof (USHORT); + break; + + case blr_short: + case blr_long: + case blr_quad: + case blr_int64: + STUFF (field->fld_type); + STUFF (field->fld_scale); + break; + + case blr_float: + case blr_double: + case blr_timestamp: + case blr_sql_time: + case blr_sql_date: + STUFF (field->fld_type); + break; + + case blr_blob: + alignment = type_alignments [dtype_blob]; + length = type_lengths [dtype_blob]; + STUFF (blr_quad); + STUFF (0); + break; + + default: +#ifdef SUPERSERVER + BURP_svc_error (26, isc_arg_number, field->fld_type, + 0, NULL, 0, NULL, 0, NULL, 0, NULL); +#else + BURP_error (26, (void*) field->fld_type, 0, 0, 0, 0); + /* msg 26 datatype %ld not understood */ +#endif + break; + } + if (alignment) + offset = FB_ALIGN(offset, alignment); + field->fld_offset = offset; + field->fld_parameter = count++; + offset += length; + } + +/* If this is format version 2, build fields for null flags */ + +if (tdgbl->RESTORE_format >= 2) + for (field = relation->rel_fields; field; field = field->fld_next) + { + if (field->fld_flags & FLD_computed) + continue; + STUFF (blr_short); STUFF (0); + offset = FB_ALIGN(offset, sizeof (SSHORT)); + field->fld_missing_parameter = count++; + offset += sizeof (SSHORT); + } + +length = offset; + +/* Build STORE statement */ + +STUFF (blr_receive); STUFF (0); +STUFF (blr_store); +STUFF (blr_relation); +stuff_string (&blr, relation->rel_name); +STUFF (0); /* context variable */ +STUFF (blr_begin); + +for (field = relation->rel_fields; field; field = field->fld_next) + { + if (field->fld_flags & FLD_computed) + continue; + STUFF (blr_assignment); + if (tdgbl->RESTORE_format >= 2) + { + STUFF (blr_parameter2); STUFF (0); + STUFF_WORD (field->fld_parameter); + STUFF_WORD (field->fld_missing_parameter); + } + else + { + STUFF (blr_parameter); STUFF (0); + STUFF_WORD (field->fld_parameter); + } + STUFF (blr_field); STUFF (0); + stuff_string (&blr, field->fld_name); + } + +STUFF (blr_end); +STUFF (blr_end); +STUFF (blr_eoc); + +/* Compile request */ + +#ifdef DEBUG +isc_print_blr (blr_buffer, NULL_PTR, NULL_PTR, 0); +#endif + +request = NULL; +blr_length = blr - blr_buffer; +if (isc_compile_request (status_vector, + GDS_REF (tdgbl->db_handle), + (void**) GDS_REF (request), + blr_length, + GDS_VAL (blr_buffer))) + { + isc_print_blr (blr_buffer, (isc_callback)NULL_PTR, NULL_PTR, 0); + if (!tdgbl->gbl_sw_incremental) + BURP_error_redirect (status_vector, 27, 0, 0); +/* msg 27 gds__compile_request failed */ + else + { + BURP_print_status (status_vector); + BURP_FREE (blr_buffer); + return ignore_data (relation); + } + } + +BURP_FREE (blr_buffer); +buffer = NULL; + +data.lstr_allocated = records = 0; + +BURP_verbose (124, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 124 restoring data for relation %s */ + +data.lstr_address = NULL; +old_length = 0; + +while (TRUE) + { + if (GET() != att_data_length) + BURP_error_redirect ((STATUS *) NULL_PTR, 39, 0, 0); +/* msg 39 expected record length */ + l = (USHORT) get_numeric(); + if (!tdgbl->gbl_sw_transportable && l != length) + { + if (!old_length) + old_length = recompute_length (relation); + if (l != old_length) +#ifdef SUPERSERVER + BURP_svc_error (40, isc_arg_number, length, isc_arg_number, l, + 0, NULL, 0, NULL, 0, NULL); +#else + BURP_error (40, (void*) length, (void*) l, 0, 0, 0); +/* msg 40 wrong length record, expected %ld encountered %ld */ +#endif + } + if (!buffer) + buffer = (SSHORT *) BURP_ALLOC (MAX (length, l)); + + if (tdgbl->gbl_sw_transportable) + if (GET () != att_xdr_length) + BURP_error_redirect ((STATUS *) NULL_PTR, 55, 0, 0); +/* msg 55 Expected XDR record length */ + else + { + data.lstr_length = l = (USHORT) get_numeric(); + if (l > data.lstr_allocated) + { + data.lstr_allocated = l; + if (data.lstr_address) + BURP_FREE (data.lstr_address); + data.lstr_address = (UCHAR *) BURP_ALLOC (data.lstr_allocated); + } + p = (TEXT*) data.lstr_address; + } + else + p = (TEXT*) buffer; + if (GET () != att_data_data) + BURP_error_redirect ((STATUS *) NULL_PTR, 41, 0, 0); +/* msg 41 expected data attribute */ + + if (tdgbl->gbl_sw_compress) + decompress ((UCHAR*) p, l); + else + { + (void) GET_BLOCK ((UCHAR*) p, l); + } + + if (old_length) + realign ((UCHAR *)buffer, relation); + + if (tdgbl->gbl_sw_transportable) + CAN_encode_decode (relation, &data, (UCHAR *)buffer, FALSE); + + records++; + + if ((records % RESTORE_VERBOSE_INTERVAL)==0) + BURP_verbose(107,(void*) records,NULL_PTR,NULL_PTR,NULL_PTR,NULL_PTR); + + for (field = relation->rel_fields; field; field = field->fld_next) + if ((field->fld_type == blr_blob) || (field->fld_flags & FLD_array)) + { + blob_id = (SLONG*) ((SCHAR*) buffer + field->fld_offset); + blob_id [0] = blob_id [1] = 0; + } + + GET_RECORD (record); + while (record == rec_blob || record == rec_array) + { + if (record == rec_blob) + get_blob (relation->rel_fields, (UCHAR *) buffer); + + else if (record == rec_array) + get_array (relation, (UCHAR *) buffer); + + GET_RECORD (record); + } + + + if (isc_start_and_send (status_vector, + (void**) GDS_REF (request), + GDS_REF (gds_trans), + 0, + (USHORT) length, + GDS_VAL (buffer), + 0)) + if (status_vector [1] == gds_not_valid) + if (tdgbl->gbl_sw_incremental) + { + BURP_print (138, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 138 validation error on field in relation %s */ + BURP_print_status (status_vector); + } + else + BURP_error_redirect (status_vector, 47, 0, 0); +/* msg 47 warning -- record could not be restored */ + else + if (tdgbl->gbl_sw_incremental) + { + BURP_print (114, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 114 restore failed for record in relation %s */ + BURP_print_status (status_vector); + } + else + BURP_error_redirect (status_vector, 48, 0, 0); +/* msg 48 gds__send failed */ + if (record != rec_data) + break; + } + +BURP_FREE (buffer); +if (data.lstr_address) + BURP_FREE (data.lstr_address); + +isc_release_request (status_vector, + (void**) GDS_REF (request)); +if (tdgbl->gbl_sw_incremental) + { + BURP_verbose (72, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 72 committing data for relation %s */ + COMMIT + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + + /* Fix for bug_no 8055: + don't throw away the database just because an index + could not be made */ + while (error_code = tdgbl->status_vector[1]) + { + switch (error_code) + { + case gds_sort_mem_err: + case gds_no_dup: + strcpy(index_name, (TEXT *)tdgbl->status_vector[3]); + BURP_print_status(tdgbl->status_vector); + FOR (REQUEST_HANDLE req_handle) + IDX IN RDB$INDICES WITH IDX.RDB$INDEX_NAME EQ index_name + MODIFY IDX USING IDX.RDB$INDEX_INACTIVE = TRUE; + BURP_print(240, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 240 Index \"%s\" failed to activate because: */ + if ( error_code == gds_no_dup ) + { + BURP_print(241, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 241 The unique index has duplicate values or NULLs */ + BURP_print(242, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 242 Delete or Update duplicate values or NULLs, and activate index with */ + } + else + { + BURP_print(244, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 244 Not enough disk space to create the sort file for an index */ + BURP_print(245, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 245 Set the TMP environment variable to a directory on a filesystem that does have enough space, and activate index with */ + } + BURP_print(243, index_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 243 ALTER INDEX \"%s\" ACTIVE; */ + END_MODIFY; + END_FOR; + /* don't bring the database on-line */ + flag_on_line = FALSE; + /* commit one more time */ + COMMIT + ON_ERROR + continue; + END_ERROR + break; + default: + BURP_print (69, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 69 commit failed on relation %s */ + BURP_print_status (tdgbl->status_vector); + ROLLBACK; + ON_ERROR + general_on_error (); + END_ERROR; + break; + } /* end of switch */ + } /* end of while */ + END_ERROR; + + EXEC SQL SET TRANSACTION NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + } +BURP_verbose (107, (void*) records, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 107 %ld records restored */ + +return record; +} + +static BOOLEAN get_exception(void) +{ +/************************************** + * + * g e t _ e x c e p t i o n + * + ************************************** + * + * Functional description + * Reconstruct a exception. + * + **************************************/ +ATT_TYPE attribute; +TEXT temp [32]; +ULONG l; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_exception_req_handle1) + X IN RDB$EXCEPTIONS + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$MESSAGE.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_exception_name: + l = get_text (X.RDB$EXCEPTION_NAME, sizeof (X.RDB$EXCEPTION_NAME)); + MISC_terminate ((UCHAR*) X.RDB$EXCEPTION_NAME, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (199, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 199 restoring exception %s */ + break; + + case att_exception_description: + get_misc_blob (&X.RDB$DESCRIPTION, 0, 0); + X.RDB$DESCRIPTION.NULL = FALSE; + break; + + case att_exception_description2: + get_source_blob (&X.RDB$DESCRIPTION, 0); + X.RDB$DESCRIPTION.NULL = FALSE; + break; + + case att_exception_msg: + get_text (X.RDB$MESSAGE, sizeof (X.RDB$MESSAGE)); + X.RDB$MESSAGE.NULL = FALSE; + break; + + default: + bad_attribute (scan_next_attr, attribute, 89); + /* msg 89 function */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN cvt_v3_to_v4_intl ( + SSHORT dtype, + SSHORT *scale, + SSHORT *sub_type, + SSHORT *character_set_id, + SSHORT *collation_id) +{ +/************************************** + * + * c v t _ v 3 _ t o _ v 4 _ i n t l + * + ************************************** + * + * Functional description + * Convert a V3 scale / sub_type to V4 character_set / collate_sequence + * + * Version 3.2 & 3.3 of InterBase used different methodologies + * to tag international text character sets and country collation + * sequences. This routine will convert a V3 metadata definition + * into the corresponding V4 definition. + * + * In V3.x, sub-type 0 is normal text, subtype 1 is "text that can + * contain a NULL byte, and can therefore not be represented + * using a c-string datatype, always use fixed". + * + * Return TRUE if a conversion was performed, FALSE otherwise. + * + **************************************/ +SSHORT i; + +switch (dtype) + { + case blr_text2: + case blr_varying2: + case blr_cstring2: + + case blr_text: + case blr_varying: + case blr_cstring: + + /* Japanese V3.2 used SCALE 5 to indicate SJIS text */ + if (*scale == 5 && ((*sub_type == 0) || (*sub_type == 1))) + { + *character_set_id = CS_JIS_0208; + *collation_id = 0; + BURP_verbose (237, (void*) *scale, (void*) *character_set_id, + (void*) *collation_id, NULL_PTR, NULL_PTR); + /* msg 237: Converted V3 scale: %d to + character_set_id: %d and callate_id: %d. */ + *scale = 0; + return TRUE; + } + + /* Japanese V3.2 used SCALE 6 to indicate EUCJ text */ + if (*scale == 6 && (*sub_type == 0 || *sub_type == 1)) + { + *character_set_id = CS_EUCJ; + *collation_id = 0; + BURP_verbose (237, (void*) *scale, (void*) *character_set_id, + (void*) *collation_id, NULL_PTR, NULL_PTR); + /* msg 237: Converted V3 scale: %d to + character_set_id: %d and callate_id: %d. */ + *scale = 0; + return TRUE; + } + + /* V3.3 used SCALE 0 and Subtypes in range 100 - 255 for + European text types and collations */ + + if (*scale != 0) + return FALSE; + + if (*sub_type == 0 || *sub_type == 1) + /* Do not process sub_type 0,1 conversion */ + return FALSE; + + for (i = 0; i < cvtbl_len; i ++) + if (sub_type_cvtbl [i].sub_type == *sub_type) + { + *character_set_id = sub_type_cvtbl [i].character_set_id; + *collation_id = sub_type_cvtbl [i].collation_id; + + BURP_verbose (236, (void*) *sub_type, (void*) *character_set_id, + (void*) *collation_id, NULL_PTR, NULL_PTR); + /* msg 236: Converted V3 sub_type: %d to + character_set_id: %d and callate_id: %d. */ + + *sub_type = 0; + return TRUE; + } + return FALSE; + + default: + /* Do not process sub_type conversion on non-text field */ + return FALSE; + } + +} + +static FLD get_field ( + REL relation) +{ +/************************************** + * + * g e t _ f i e l d + * + ************************************** + * + * Functional description + * Reconstruct a local field. + * + **************************************/ +FLD field; +ATT_TYPE attribute; +USHORT n, + global_tr = FALSE; +SLONG *rp; +UCHAR scan_next_attr; +TGBL tdgbl; +FLD f; +isc_tr_handle local_trans; + +tdgbl = GET_THREAD_DATA; + +/* If it is a view and there is a global transaction then use it */ + +if ((relation->rel_flags & REL_view) && (tdgbl->global_trans)) + { + local_trans = tdgbl->global_trans; + global_tr = TRUE; + } +else + local_trans = gds_trans; + +field = (FLD) BURP_ALLOC_ZERO (sizeof (struct fld)); + +STORE (TRANSACTION_HANDLE local_trans + REQUEST_HANDLE tdgbl->handles_get_field_req_handle1) + X IN RDB$RELATION_FIELDS + strcpy (X.RDB$RELATION_NAME, relation->rel_name); + X.RDB$FIELD_POSITION = 0; + memset (X.RDB$QUERY_NAME, ' ', sizeof (X.RDB$QUERY_NAME)); + X.RDB$VIEW_CONTEXT.NULL = TRUE; + X.RDB$BASE_FIELD.NULL = TRUE; + X.RDB$SECURITY_CLASS.NULL = TRUE; + X.RDB$QUERY_NAME.NULL = TRUE; + X.RDB$QUERY_HEADER.NULL = TRUE; + X.RDB$EDIT_STRING.NULL = TRUE; + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$FIELD_POSITION.NULL = TRUE; + X.RDB$SYSTEM_FLAG.NULL = TRUE; + X.RDB$COMPLEX_NAME.NULL = TRUE; + X.RDB$UPDATE_FLAG.NULL = TRUE; + X.RDB$DEFAULT_SOURCE.NULL = TRUE; + X.RDB$DEFAULT_VALUE.NULL = TRUE; + X.RDB$NULL_FLAG.NULL = TRUE; + X.RDB$COLLATION_ID.NULL = TRUE; + SKIP_INIT; + while (GET_ATTRIBUTE (attribute) != att_end) + switch (SKIP_SCAN, attribute) + { + case att_field_name: + field->fld_name_length = + get_text (field->fld_name, sizeof (field->fld_name)); + BURP_verbose (115, field->fld_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 115 restoring field %s */ + strcpy (X.RDB$FIELD_NAME, field->fld_name); + break; + + case att_field_source: + get_text (X.RDB$FIELD_SOURCE, sizeof (X.RDB$FIELD_SOURCE)); + break; + + case att_field_security_class: + get_text (X.RDB$SECURITY_CLASS, sizeof (X.RDB$SECURITY_CLASS)); + X.RDB$SECURITY_CLASS.NULL = FALSE; + break; + + case att_field_query_name: + get_text (X.RDB$QUERY_NAME, sizeof (X.RDB$QUERY_NAME)); + X.RDB$QUERY_NAME.NULL = FALSE; + break; + + case att_field_query_header: + X.RDB$QUERY_HEADER.NULL = FALSE; + get_source_blob (&X.RDB$QUERY_HEADER, global_tr); + break; + + case att_field_edit_string: + get_text (X.RDB$EDIT_STRING, sizeof (X.RDB$EDIT_STRING)); + X.RDB$EDIT_STRING.NULL = FALSE; + break; + + case att_field_position: + X.RDB$FIELD_POSITION.NULL = FALSE; + X.RDB$FIELD_POSITION = (USHORT) get_numeric(); + break; + + case att_field_number: + field->fld_number = (USHORT) get_numeric(); + break; + + case att_field_type: + field->fld_type = (USHORT) get_numeric(); + break; + + case att_field_length: + field->fld_length = (USHORT) get_numeric(); + break; + + case att_field_scale: + field->fld_scale = (USHORT) get_numeric(); + break; + + case att_field_sub_type: + field->fld_sub_type = (USHORT) get_numeric(); + break; + + case att_field_system_flag: + X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); + X.RDB$SYSTEM_FLAG.NULL = FALSE; + break; + + case att_view_context: + X.RDB$VIEW_CONTEXT = (USHORT) get_numeric(); + X.RDB$VIEW_CONTEXT.NULL = FALSE; + break; + + case att_field_computed_flag: + if (get_numeric()) + field->fld_flags |= FLD_computed; + break; + + case att_base_field: + get_text (X.RDB$BASE_FIELD, sizeof (X.RDB$BASE_FIELD)); + X.RDB$BASE_FIELD.NULL = FALSE; + break; + + case att_field_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_misc_blob (&X.RDB$DESCRIPTION, 1, global_tr); + break; + + case att_field_description2: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, (UCHAR) global_tr); + break; + + case att_field_complex_name: + get_text (X.RDB$COMPLEX_NAME, sizeof (X.RDB$COMPLEX_NAME)); + X.RDB$COMPLEX_NAME.NULL = FALSE; + break; + + case att_field_dimensions: + field->fld_dimensions = (USHORT) get_numeric(); + field->fld_flags |= FLD_array; + for (rp = field->fld_ranges, n = field->fld_dimensions; n; rp+=2, n--) + { + if (GET_ATTRIBUTE (attribute) != att_field_range_low) + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + else + *rp = get_numeric(); + if (GET_ATTRIBUTE (attribute) != att_field_range_high) + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + else + *(rp+1) = get_numeric(); + } + break; + + case att_field_update_flag: + X.RDB$UPDATE_FLAG.NULL = FALSE; + X.RDB$UPDATE_FLAG = (USHORT) get_numeric(); + break; + + case att_field_character_length: + field->fld_character_length = (USHORT) get_numeric(); + break; + + case att_field_default_source: + X.RDB$DEFAULT_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$DEFAULT_SOURCE, global_tr); + break; + + case att_field_default_value: + X.RDB$DEFAULT_VALUE.NULL = FALSE; + get_blr_blob (&X.RDB$DEFAULT_VALUE, global_tr); + break; + + case att_field_null_flag: + X.RDB$NULL_FLAG.NULL = FALSE; + X.RDB$NULL_FLAG = (USHORT) get_numeric(); + break; + + case att_field_character_set: + field->fld_character_set_id = (USHORT) get_numeric(); + break; + + case att_field_collation_id: + field->fld_collation_id = (USHORT) get_numeric(); + X.RDB$COLLATION_ID.NULL = FALSE; + X.RDB$COLLATION_ID = field->fld_collation_id; + break; + + default: + bad_attribute (scan_next_attr, attribute, 84); + /* msg 84 field */ + break; + } + + /* For migration from V3.3 to V4.0 format of International text + * information - search the list of global fields which were + * remapped from V3.3 format into V4.0 format. If we find that + * this local field's source is one of those global fields, then + * remap the local field's information. This is used to compose + * the BLR which sends data to the newly restored database. + */ + for (f = tdgbl->v3_cvt_fld_list; f; f = f->fld_next) + { + if (!strcmp(X.RDB$FIELD_SOURCE, f->fld_name)) + { + field->fld_sub_type = f->fld_sub_type; + field->fld_scale = f->fld_scale; + field->fld_character_set_id = f->fld_character_set_id; + field->fld_collation_id = f->fld_collation_id; + break; + } + } + +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return field; +} + +static BOOLEAN get_field_dimensions (void) +{ +/************************************** + * + * g e t _ f i e l d _ d i m e n s i o n s + * + ************************************** + * + * Functional description + * Get array field dimensions in rdb$field_dimensions. + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_field_dimensions_req_handle1) + X IN RDB$FIELD_DIMENSIONS + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + { + switch (attribute) + { + case att_field_name: + get_text (X.RDB$FIELD_NAME, sizeof (X.RDB$FIELD_NAME)); + break; + + case att_field_dimensions: + X.RDB$DIMENSION = (USHORT) get_numeric(); + break; + + case att_field_range_low: + X.RDB$LOWER_BOUND = get_numeric(); + break; + + case att_field_range_high: + X.RDB$UPPER_BOUND = get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + break; + } + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_files (void) +{ +/************************************** + * + * g e t _ f i l e s + * + ************************************** + * + * Functional description + * Get any files that were stored; let + * somebody else worry about what to do with them. + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_files_req_handle1) + X IN RDB$FILES + X.RDB$FILE_FLAGS = 0; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_file_filename: + get_text (X.RDB$FILE_NAME, sizeof (X.RDB$FILE_NAME)); + BURP_verbose (116, + /* msg 116 restoring file %s */ + X.RDB$FILE_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + break; + + case att_file_sequence: + X.RDB$FILE_SEQUENCE = (USHORT) get_numeric(); + break; + + case att_file_start: + X.RDB$FILE_START = get_numeric(); + break; + + case att_file_length: + X.RDB$FILE_LENGTH = get_numeric(); + break; + + case att_file_flags: + X.RDB$FILE_FLAGS |= get_numeric(); + break; + + case att_shadow_number: + X.RDB$SHADOW_NUMBER = (USHORT) get_numeric(); + if (tdgbl->gbl_sw_kill && X.RDB$SHADOW_NUMBER) + X.RDB$FILE_FLAGS |= FILE_inactive; + break; + + default: + bad_attribute (scan_next_attr, attribute, 85); + /* msg 85 file */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_filter (void) +{ +/************************************** + * + * g e t _ f i l t e r + * + ************************************** + * + * Functional description + * Get a type definition in rdb$filters. + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_filter_req_handle1) + X IN RDB$FILTERS + X.RDB$DESCRIPTION.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + { + switch (attribute) + { + case att_filter_name: + get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); + BURP_verbose (117, X.RDB$FUNCTION_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 117 restoring filter %s */ + break; + + case att_filter_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); + break; + + case att_filter_description2: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + case att_filter_module_name: + get_text (X.RDB$MODULE_NAME, sizeof (X.RDB$MODULE_NAME)); + break; + + case att_filter_entrypoint: + get_text (X.RDB$ENTRYPOINT, sizeof (X.RDB$ENTRYPOINT)); + break; + + case att_filter_input_sub_type: + X.RDB$INPUT_SUB_TYPE = (USHORT) get_numeric(); + break; + + case att_filter_output_sub_type: + X.RDB$OUTPUT_SUB_TYPE = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 87); + /* msg 87 filter */ + break; + } + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_function (void) +{ +/************************************** + * + * g e t _ f u n c t i o n + * + ************************************** + * + * Functional description + * Reconstruct a function. + * + **************************************/ +ATT_TYPE attribute; +GDS_NAME function_name; +TEXT temp [32]; +SSHORT l; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_function_req_handle1) + X IN RDB$FUNCTIONS + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_function_name: + l = get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); + MISC_terminate ((UCHAR*) X.RDB$FUNCTION_NAME, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (118, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 118 restoring function %s */ + break; + + case att_function_description: + get_misc_blob (&X.RDB$DESCRIPTION, 0, 0); + break; + + case att_function_description2: + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + case att_function_module_name: + get_text (X.RDB$MODULE_NAME, sizeof (X.RDB$MODULE_NAME)); + break; + + case att_function_entrypoint: + get_text (X.RDB$ENTRYPOINT, sizeof (X.RDB$ENTRYPOINT)); + break; + + case att_function_return_arg: + X.RDB$RETURN_ARGUMENT = (USHORT) get_numeric(); + break; + + case att_function_query_name: + get_text (X.RDB$QUERY_NAME, sizeof (X.RDB$QUERY_NAME)); + break; + + case att_function_type: + X.RDB$FUNCTION_TYPE = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 89); + /* msg 89 function */ + break; + } + strcpy (function_name, X.RDB$FUNCTION_NAME); +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +/* at the end of args for a function is the rec_function_end marker */ +while (GET () == rec_function_arg) + get_function_arg (function_name); + +return TRUE; +} + +static void get_function_arg ( + GDS_NAME funcptr) +{ +/************************************** + * + * g e t _ f u n c t i o n _ a r g + * + ************************************** + * + * Functional description + * Reconstruct function argument. + * + **************************************/ +ATT_TYPE attribute; +SSHORT l; +TEXT temp [32]; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +if (tdgbl->RESTORE_format >= 6) + { + /* with RDB$FIELD_PRECISION */ + STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1) + X IN RDB$FUNCTION_ARGUMENTS + X.RDB$FIELD_SUB_TYPE.NULL = TRUE; + X.RDB$CHARACTER_SET_ID.NULL = TRUE; + X.RDB$FIELD_PRECISION.NULL = TRUE; + + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_functionarg_name: + l = get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); + MISC_terminate ((UCHAR*) X.RDB$FUNCTION_NAME, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (119, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 119 restoring argument for function %s */ + break; + + case att_functionarg_position: + X.RDB$ARGUMENT_POSITION = (USHORT) get_numeric(); + break; + + case att_functionarg_mechanism: + X.RDB$MECHANISM = (USHORT) get_numeric(); + break; + + case att_functionarg_field_type: + X.RDB$FIELD_TYPE = (USHORT) get_numeric(); + break; + + case att_functionarg_field_scale: + X.RDB$FIELD_SCALE = (USHORT) get_numeric(); + break; + + case att_functionarg_field_length: + X.RDB$FIELD_LENGTH = (USHORT) get_numeric(); + break; + + case att_functionarg_field_sub_type: + X.RDB$FIELD_SUB_TYPE.NULL = FALSE; + X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(); + break; + + case att_functionarg_character_set: + X.RDB$CHARACTER_SET_ID.NULL = FALSE; + X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); + break; + + case att_functionarg_field_precision: + X.RDB$FIELD_PRECISION.NULL = FALSE; + X.RDB$FIELD_PRECISION = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 90); + /* msg 90 function argument */ + break; + } + END_STORE; + ON_ERROR + general_on_error (); + END_ERROR; + } +else + { + /* without RDB$FIELD_PRECISION */ + STORE (REQUEST_HANDLE tdgbl->handles_get_function_arg_req_handle1) + X IN RDB$FUNCTION_ARGUMENTS + X.RDB$FIELD_SUB_TYPE.NULL = TRUE; + X.RDB$CHARACTER_SET_ID.NULL = TRUE; + + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_functionarg_name: + l = get_text (X.RDB$FUNCTION_NAME, sizeof (X.RDB$FUNCTION_NAME)); + MISC_terminate ((UCHAR*) X.RDB$FUNCTION_NAME, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (119, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 119 restoring argument for function %s */ + break; + + case att_functionarg_position: + X.RDB$ARGUMENT_POSITION = (USHORT) get_numeric(); + break; + + case att_functionarg_mechanism: + X.RDB$MECHANISM = (USHORT) get_numeric(); + break; + + case att_functionarg_field_type: + X.RDB$FIELD_TYPE = (USHORT) get_numeric(); + break; + + case att_functionarg_field_scale: + X.RDB$FIELD_SCALE = (USHORT) get_numeric(); + break; + + case att_functionarg_field_length: + X.RDB$FIELD_LENGTH = (USHORT) get_numeric(); + break; + + case att_functionarg_field_sub_type: + X.RDB$FIELD_SUB_TYPE.NULL = FALSE; + X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(); + break; + + case att_functionarg_character_set: + X.RDB$CHARACTER_SET_ID.NULL = FALSE; + X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 90); + /* msg 90 function argument */ + break; + } + END_STORE; + ON_ERROR + general_on_error (); + END_ERROR; + } +} + +static BOOLEAN get_generator (void) +{ +/************************************** + * + * g e t _ g e n e r a t o r + * + ************************************** + * + * Functional description + * Pick up a gen-id. Like most things, there is ughly history. + * In the modern world, gen_id are free floating records. In the + * bad old days they were attributes of relations. Handle both + * nicely. + * + **************************************/ +SINT64 value; +TEXT name [32]; +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_gen_generator: + get_text (name, sizeof (name)); + break; + + case att_gen_value: + /* IB v5 or earlier, gen_id value is an SLONG */ + value = (SINT64) get_numeric(); + break; + + case att_gen_value_int64: + /* IB v6 or later, gen_id value is an SINT64 */ + value = get_int64(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 93); + /* msg 93 index */ + break; + } + +store_blr_gen_id (name, value); + +return TRUE; +} + +static BOOLEAN get_global_field (void) +{ +/************************************** + * + * g e t _ g l o b a l _ f i e l d + * + ************************************** + * + * Functional description + * Reconstruct a global field. + * + **************************************/ +ATT_TYPE attribute; +TEXT temp [32]; +SSHORT l; +GFLD gfld; +UCHAR scan_next_attr; +TGBL tdgbl; +SSHORT save_subtype; + +tdgbl = GET_THREAD_DATA; + +gfld = (GFLD) NULL_PTR; + +if (tdgbl->RESTORE_format >= 6) + { + /* with rdb$field_precision */ + STORE (REQUEST_HANDLE tdgbl->handles_get_global_field_req_handle1) + X IN RDB$FIELDS + + X.RDB$FIELD_SCALE = X.RDB$SEGMENT_LENGTH = 0; + X.RDB$CHARACTER_SET_ID = X.RDB$COLLATION_ID = 0; + X.RDB$FIELD_SUB_TYPE = 0; + X.RDB$COMPUTED_BLR.NULL = TRUE; + X.RDB$COMPUTED_SOURCE.NULL = TRUE; + X.RDB$QUERY_NAME.NULL = TRUE; + X.RDB$EDIT_STRING.NULL = TRUE; + X.RDB$QUERY_HEADER.NULL = TRUE; + X.RDB$MISSING_VALUE.NULL = TRUE; + X.RDB$DEFAULT_VALUE.NULL = TRUE; + X.RDB$VALIDATION_BLR.NULL = TRUE; + X.RDB$VALIDATION_SOURCE.NULL = TRUE; + X.RDB$SYSTEM_FLAG.NULL = TRUE; + X.RDB$NULL_FLAG.NULL = TRUE; + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$DIMENSIONS.NULL = TRUE; + X.RDB$EXTERNAL_LENGTH.NULL = TRUE; + X.RDB$EXTERNAL_TYPE.NULL = TRUE; + X.RDB$EXTERNAL_SCALE.NULL = TRUE; + X.RDB$SEGMENT_LENGTH.NULL = TRUE; + X.RDB$CHARACTER_LENGTH.NULL = TRUE; + X.RDB$MISSING_SOURCE.NULL = TRUE; + X.RDB$DEFAULT_SOURCE.NULL = TRUE; + X.RDB$FIELD_SUB_TYPE.NULL = TRUE; + X.RDB$CHARACTER_SET_ID.NULL = TRUE; + X.RDB$COLLATION_ID.NULL = TRUE; + X.RDB$FIELD_PRECISION.NULL = TRUE; + + memset (X.RDB$QUERY_NAME, ' ', sizeof (X.RDB$QUERY_NAME)); + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_field_name: + l = get_text (X.RDB$FIELD_NAME, sizeof (X.RDB$FIELD_NAME)); + MISC_terminate ((UCHAR*) X.RDB$FIELD_NAME, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (121, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 121 restoring global field %s */ + break; + + case att_field_query_name: + get_text (X.RDB$QUERY_NAME, sizeof (X.RDB$QUERY_NAME)); + X.RDB$QUERY_NAME.NULL = FALSE; + break; + + case att_field_edit_string: + get_text (X.RDB$EDIT_STRING, sizeof (X.RDB$EDIT_STRING)); + X.RDB$EDIT_STRING.NULL = FALSE; + break; + + case att_field_query_header: + X.RDB$QUERY_HEADER.NULL = FALSE; + get_source_blob (&X.RDB$QUERY_HEADER, 0); + break; + + case att_field_type: + X.RDB$FIELD_TYPE = (USHORT) get_numeric(); + break; + + case att_field_length: + X.RDB$FIELD_LENGTH = (USHORT) get_numeric(); + break; + + case att_field_scale: + X.RDB$FIELD_SCALE = (USHORT) get_numeric(); + X.RDB$FIELD_SCALE.NULL = FALSE; + break; + + case att_field_sub_type: + X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(); + X.RDB$FIELD_SUB_TYPE.NULL = FALSE; + break; + + case att_field_segment_length: + X.RDB$SEGMENT_LENGTH = (USHORT) get_numeric(); + if (X.RDB$SEGMENT_LENGTH) + X.RDB$SEGMENT_LENGTH.NULL = FALSE; + break; + + case att_field_computed_blr: + X.RDB$COMPUTED_BLR.NULL = FALSE; + get_blr_blob (&X.RDB$COMPUTED_BLR, 0); + break; + + case att_field_computed_source: + X.RDB$COMPUTED_SOURCE.NULL = FALSE; + get_misc_blob (&X.RDB$COMPUTED_SOURCE, 1, 0); + break; + + case att_field_computed_source2: + X.RDB$COMPUTED_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$COMPUTED_SOURCE, 0); + break; + + case att_field_validation_blr: + if (tdgbl->gbl_sw_novalidity) + eat_blob(); + else + { + /* if we are going against a V4.0 database, + * restore the global fields in 2 phases. + */ + + if (tdgbl->global_trans) + { + if (!gfld) + gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); + + get_blr_blob (&gfld->gfld_vb, 1); + gfld->gfld_flags |= GFLD_validation_blr; + } + else + { + X.RDB$VALIDATION_BLR.NULL = FALSE; + get_blr_blob (&X.RDB$VALIDATION_BLR, 0); + } + } + break; + + case att_field_validation_source: + if (tdgbl->gbl_sw_novalidity) + eat_blob(); + else + { + /* if we are going against a V4.0 database, + * restore the global fields in 2 phases. + */ + + if (tdgbl->global_trans) + { + if (!gfld) + gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); + + get_misc_blob (&gfld->gfld_vs, 0, 1); + gfld->gfld_flags |= GFLD_validation_source; + } + else + { + X.RDB$VALIDATION_SOURCE.NULL = FALSE; + get_misc_blob (&X.RDB$VALIDATION_SOURCE, 0, 0); + } + } + break; + + case att_field_validation_source2: + if (tdgbl->gbl_sw_novalidity) + eat_blob(); + else + { + /* if we are going against a V4.0 database, + * restore the global fields in 2 phases. + */ + + if (tdgbl->global_trans) + { + if (!gfld) + gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); + + get_source_blob (&gfld->gfld_vs2, 1); + gfld->gfld_flags |= GFLD_validation_source2; + } + else + { + X.RDB$VALIDATION_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$VALIDATION_SOURCE, 0); + } + } + break; + + case att_field_missing_value: + X.RDB$MISSING_VALUE.NULL = FALSE; + get_blr_blob (&X.RDB$MISSING_VALUE, 0); + break; + + case att_field_default_value: + X.RDB$DEFAULT_VALUE.NULL = FALSE; + get_blr_blob (&X.RDB$DEFAULT_VALUE, 0); + break; + + case att_field_system_flag: + X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); + X.RDB$SYSTEM_FLAG.NULL = FALSE; + break; + + case att_field_null_flag: + X.RDB$NULL_FLAG = (USHORT) get_numeric(); + X.RDB$NULL_FLAG.NULL = FALSE; + break; + + case att_field_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); + break; + + case att_field_description2: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + case att_field_external_length: + X.RDB$EXTERNAL_LENGTH.NULL = FALSE; + X.RDB$EXTERNAL_LENGTH = (USHORT) get_numeric(); + break; + + case att_field_external_scale: + X.RDB$EXTERNAL_SCALE.NULL = FALSE; + X.RDB$EXTERNAL_SCALE = (USHORT) get_numeric(); + break; + + case att_field_external_type: + X.RDB$EXTERNAL_TYPE.NULL = FALSE; + X.RDB$EXTERNAL_TYPE = (USHORT) get_numeric(); + break; + + case att_field_dimensions: + X.RDB$DIMENSIONS.NULL = FALSE; + X.RDB$DIMENSIONS = (USHORT) get_numeric(); + break; + + case att_field_character_length: + X.RDB$CHARACTER_LENGTH.NULL = FALSE; + X.RDB$CHARACTER_LENGTH = (USHORT) get_numeric(); + break; + + case att_field_default_source: + X.RDB$DEFAULT_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$DEFAULT_SOURCE, 0); + break; + + case att_field_missing_source: + X.RDB$MISSING_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$MISSING_SOURCE, 0); + break; + + case att_field_character_set: + X.RDB$CHARACTER_SET_ID.NULL = FALSE; + X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); + break; + + case att_field_collation_id: + X.RDB$COLLATION_ID.NULL = FALSE; + X.RDB$COLLATION_ID = (USHORT) get_numeric(); + break; + + case att_field_precision: + X.RDB$FIELD_PRECISION.NULL = FALSE; + X.RDB$FIELD_PRECISION = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 92); /* msg 92 global field */ + break; + } + if (X.RDB$FIELD_TYPE <= DTYPE_BLR_MAX) + { + l = gds_cvt_blr_dtype [X.RDB$FIELD_TYPE]; + if (l = type_lengths [l]) + X.RDB$FIELD_LENGTH = l; + } + + if (gfld) + strcpy (gfld->gfld_name, X.RDB$FIELD_NAME); + + /* V3.3 used a different method from V4.0 for encoding International + * text character set & collation information. Here we are + * looking at the metadata information, deciding if it is + * the V3.3 method, and converting it to the V4.0 method so + * V3.3 customers can migrate their database to V4.0. + */ + save_subtype = X.RDB$FIELD_SUB_TYPE; + if (X.RDB$CHARACTER_SET_ID.NULL && + X.RDB$COLLATION_ID.NULL && + cvt_v3_to_v4_intl (X.RDB$FIELD_TYPE, &X.RDB$FIELD_SCALE, + &X.RDB$FIELD_SUB_TYPE, &X.RDB$CHARACTER_SET_ID, + &X.RDB$COLLATION_ID)) + { + FLD f; + + /* If some value was reset, set the NULL flag */ + if (save_subtype && !X.RDB$FIELD_SUB_TYPE) + X.RDB$FIELD_SUB_TYPE.NULL = TRUE; + X.RDB$CHARACTER_SET_ID.NULL = FALSE; + X.RDB$COLLATION_ID.NULL = FALSE; + + /* Add an entry to the converted-field link list + * so we can also convert local fields based on this + * global field + */ + + f = (FLD) BURP_ALLOC_ZERO (sizeof(struct fld)); + strcpy (f->fld_name, X.RDB$FIELD_NAME); + f->fld_sub_type = X.RDB$FIELD_SUB_TYPE; + f->fld_scale = X.RDB$FIELD_SCALE; + f->fld_character_set_id = X.RDB$CHARACTER_SET_ID; + f->fld_collation_id = X.RDB$COLLATION_ID; + f->fld_next = tdgbl->v3_cvt_fld_list; + tdgbl->v3_cvt_fld_list = f; + } + + END_STORE; + ON_ERROR + general_on_error (); + END_ERROR; + + } +else /* RESTORE_format < 6 */ + { + /* without rdb$field_precision */ + + STORE (REQUEST_HANDLE tdgbl->handles_get_global_field_req_handle1) + X IN RDB$FIELDS + + X.RDB$FIELD_SCALE = X.RDB$SEGMENT_LENGTH = 0; + X.RDB$CHARACTER_SET_ID = X.RDB$COLLATION_ID = 0; + X.RDB$FIELD_SUB_TYPE = 0; + X.RDB$COMPUTED_BLR.NULL = TRUE; + X.RDB$COMPUTED_SOURCE.NULL = TRUE; + X.RDB$QUERY_NAME.NULL = TRUE; + X.RDB$EDIT_STRING.NULL = TRUE; + X.RDB$QUERY_HEADER.NULL = TRUE; + X.RDB$MISSING_VALUE.NULL = TRUE; + X.RDB$DEFAULT_VALUE.NULL = TRUE; + X.RDB$VALIDATION_BLR.NULL = TRUE; + X.RDB$VALIDATION_SOURCE.NULL = TRUE; + X.RDB$SYSTEM_FLAG.NULL = TRUE; + X.RDB$NULL_FLAG.NULL = TRUE; + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$DIMENSIONS.NULL = TRUE; + X.RDB$EXTERNAL_LENGTH.NULL = TRUE; + X.RDB$EXTERNAL_TYPE.NULL = TRUE; + X.RDB$EXTERNAL_SCALE.NULL = TRUE; + X.RDB$SEGMENT_LENGTH.NULL = TRUE; + X.RDB$CHARACTER_LENGTH.NULL = TRUE; + X.RDB$MISSING_SOURCE.NULL = TRUE; + X.RDB$DEFAULT_SOURCE.NULL = TRUE; + X.RDB$FIELD_SUB_TYPE.NULL = TRUE; + X.RDB$CHARACTER_SET_ID.NULL = TRUE; + X.RDB$COLLATION_ID.NULL = TRUE; + + memset (X.RDB$QUERY_NAME, ' ', sizeof (X.RDB$QUERY_NAME)); + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_field_name: + l = get_text (X.RDB$FIELD_NAME, sizeof (X.RDB$FIELD_NAME)); + MISC_terminate ((UCHAR*) X.RDB$FIELD_NAME, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (121, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 121 restoring global field %s */ + break; + + case att_field_query_name: + get_text (X.RDB$QUERY_NAME, sizeof (X.RDB$QUERY_NAME)); + X.RDB$QUERY_NAME.NULL = FALSE; + break; + + case att_field_edit_string: + get_text (X.RDB$EDIT_STRING, sizeof (X.RDB$EDIT_STRING)); + X.RDB$EDIT_STRING.NULL = FALSE; + break; + + case att_field_query_header: + X.RDB$QUERY_HEADER.NULL = FALSE; + get_source_blob (&X.RDB$QUERY_HEADER, 0); + break; + + case att_field_type: + X.RDB$FIELD_TYPE = (USHORT) get_numeric(); + break; + + case att_field_length: + X.RDB$FIELD_LENGTH = (USHORT) get_numeric(); + break; + + case att_field_scale: + X.RDB$FIELD_SCALE = (USHORT) get_numeric(); + X.RDB$FIELD_SCALE.NULL = FALSE; + break; + + case att_field_sub_type: + X.RDB$FIELD_SUB_TYPE = (USHORT) get_numeric(); + X.RDB$FIELD_SUB_TYPE.NULL = FALSE; + break; + + case att_field_segment_length: + X.RDB$SEGMENT_LENGTH = (USHORT) get_numeric(); + if (X.RDB$SEGMENT_LENGTH) + X.RDB$SEGMENT_LENGTH.NULL = FALSE; + break; + + case att_field_computed_blr: + X.RDB$COMPUTED_BLR.NULL = FALSE; + get_blr_blob (&X.RDB$COMPUTED_BLR, 0); + break; + + case att_field_computed_source: + X.RDB$COMPUTED_SOURCE.NULL = FALSE; + get_misc_blob (&X.RDB$COMPUTED_SOURCE, 1, 0); + break; + + case att_field_computed_source2: + X.RDB$COMPUTED_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$COMPUTED_SOURCE, 0); + break; + + case att_field_validation_blr: + if (tdgbl->gbl_sw_novalidity) + eat_blob(); + else + { + /* if we are going against a V4.0 database, + * restore the global fields in 2 phases. + */ + + if (tdgbl->global_trans) + { + if (!gfld) + gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); + + get_blr_blob (&gfld->gfld_vb, 1); + gfld->gfld_flags |= GFLD_validation_blr; + } + else + { + X.RDB$VALIDATION_BLR.NULL = FALSE; + get_blr_blob (&X.RDB$VALIDATION_BLR, 0); + } + } + break; + + case att_field_validation_source: + if (tdgbl->gbl_sw_novalidity) + eat_blob(); + else + { + /* if we are going against a V4.0 database, + * restore the global fields in 2 phases. + */ + + if (tdgbl->global_trans) + { + if (!gfld) + gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); + + get_misc_blob (&gfld->gfld_vs, 0, 1); + gfld->gfld_flags |= GFLD_validation_source; + } + else + { + X.RDB$VALIDATION_SOURCE.NULL = FALSE; + get_misc_blob (&X.RDB$VALIDATION_SOURCE, 0, 0); + } + } + break; + + case att_field_validation_source2: + if (tdgbl->gbl_sw_novalidity) + eat_blob(); + else + { + /* if we are going against a V4.0 database, + * restore the global fields in 2 phases. + */ + + if (tdgbl->global_trans) + { + if (!gfld) + gfld = (GFLD) BURP_ALLOC_ZERO (sizeof (struct gfld)); + + get_source_blob (&gfld->gfld_vs2, 1); + gfld->gfld_flags |= GFLD_validation_source2; + } + else + { + X.RDB$VALIDATION_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$VALIDATION_SOURCE, 0); + } + } + break; + + case att_field_missing_value: + X.RDB$MISSING_VALUE.NULL = FALSE; + get_blr_blob (&X.RDB$MISSING_VALUE, 0); + break; + + case att_field_default_value: + X.RDB$DEFAULT_VALUE.NULL = FALSE; + get_blr_blob (&X.RDB$DEFAULT_VALUE, 0); + break; + + case att_field_system_flag: + X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); + X.RDB$SYSTEM_FLAG.NULL = FALSE; + break; + + case att_field_null_flag: + X.RDB$NULL_FLAG = (USHORT) get_numeric(); + X.RDB$NULL_FLAG.NULL = FALSE; + break; + + case att_field_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); + break; + + case att_field_description2: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + case att_field_external_length: + X.RDB$EXTERNAL_LENGTH.NULL = FALSE; + X.RDB$EXTERNAL_LENGTH = (USHORT) get_numeric(); + break; + + case att_field_external_scale: + X.RDB$EXTERNAL_SCALE.NULL = FALSE; + X.RDB$EXTERNAL_SCALE = (USHORT) get_numeric(); + break; + + case att_field_external_type: + X.RDB$EXTERNAL_TYPE.NULL = FALSE; + X.RDB$EXTERNAL_TYPE = (USHORT) get_numeric(); + break; + + case att_field_dimensions: + X.RDB$DIMENSIONS.NULL = FALSE; + X.RDB$DIMENSIONS = (USHORT) get_numeric(); + break; + + case att_field_character_length: + X.RDB$CHARACTER_LENGTH.NULL = FALSE; + X.RDB$CHARACTER_LENGTH = (USHORT) get_numeric(); + break; + + case att_field_default_source: + X.RDB$DEFAULT_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$DEFAULT_SOURCE, 0); + break; + + case att_field_missing_source: + X.RDB$MISSING_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$MISSING_SOURCE, 0); + break; + + case att_field_character_set: + X.RDB$CHARACTER_SET_ID.NULL = FALSE; + X.RDB$CHARACTER_SET_ID = (USHORT) get_numeric(); + break; + + case att_field_collation_id: + X.RDB$COLLATION_ID.NULL = FALSE; + X.RDB$COLLATION_ID = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 92); /* msg 92 global field */ + break; + } + if (X.RDB$FIELD_TYPE <= DTYPE_BLR_MAX) + { + l = gds_cvt_blr_dtype [X.RDB$FIELD_TYPE]; + if (l = type_lengths [l]) + X.RDB$FIELD_LENGTH = l; + } + + if (gfld) + strcpy (gfld->gfld_name, X.RDB$FIELD_NAME); + + /* V3.3 used a different method from V4.0 for encoding International + * text character set & collation information. Here we are + * looking at the metadata information, deciding if it is + * the V3.3 method, and converting it to the V4.0 method so + * V3.3 customers can migrate their database to V4.0. + */ + save_subtype = X.RDB$FIELD_SUB_TYPE; + if (X.RDB$CHARACTER_SET_ID.NULL && + X.RDB$COLLATION_ID.NULL && + cvt_v3_to_v4_intl (X.RDB$FIELD_TYPE, &X.RDB$FIELD_SCALE, + &X.RDB$FIELD_SUB_TYPE, &X.RDB$CHARACTER_SET_ID, + &X.RDB$COLLATION_ID)) + { + FLD f; + + /* If some value was reset, set the NULL flag */ + if (save_subtype && !X.RDB$FIELD_SUB_TYPE) + X.RDB$FIELD_SUB_TYPE.NULL = TRUE; + X.RDB$CHARACTER_SET_ID.NULL = FALSE; + X.RDB$COLLATION_ID.NULL = FALSE; + + /* Add an entry to the converted-field link list + * so we can also convert local fields based on this + * global field + */ + + f = (FLD) BURP_ALLOC_ZERO (sizeof(struct fld)); + strcpy (f->fld_name, X.RDB$FIELD_NAME); + f->fld_sub_type = X.RDB$FIELD_SUB_TYPE; + f->fld_scale = X.RDB$FIELD_SCALE; + f->fld_character_set_id = X.RDB$CHARACTER_SET_ID; + f->fld_collation_id = X.RDB$COLLATION_ID; + f->fld_next = tdgbl->v3_cvt_fld_list; + tdgbl->v3_cvt_fld_list = f; + } + + END_STORE; + ON_ERROR + general_on_error (); + END_ERROR; + + } +if (gfld) + { + gfld->gfld_next = tdgbl->gbl_global_fields; + tdgbl->gbl_global_fields = gfld; + } + +return TRUE; +} + +static BOOLEAN get_index ( + REL relation) +{ +/************************************** + * + * g e t _ i n d e x + * + ************************************** + * + * Functional description + * Build an index. At the end stop + * and check that all fields are defined. + * If any fields are missing, delete the + * index. + * + **************************************/ +SSHORT count, segments; +TEXT index_name [32]; +ATT_TYPE attribute; +BOOLEAN foreign_index = FALSE; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +count = segments = 0; + +STORE (REQUEST_HANDLE tdgbl->handles_get_index_req_handle1) + X IN RDB$INDICES + strcpy (X.RDB$RELATION_NAME, relation->rel_name); + X.RDB$UNIQUE_FLAG = 0; + if (!tdgbl->gbl_sw_deactivate_indexes) + X.RDB$INDEX_INACTIVE = FALSE; + else + X.RDB$INDEX_INACTIVE = TRUE; + X.RDB$INDEX_TYPE.NULL = TRUE; + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$FOREIGN_KEY.NULL = TRUE; + X.RDB$EXPRESSION_SOURCE.NULL = TRUE; + X.RDB$EXPRESSION_BLR.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_index_name: + (void) get_text (X.RDB$INDEX_NAME, sizeof (X.RDB$INDEX_NAME)); + strcpy (index_name, X.RDB$INDEX_NAME); + BURP_verbose (122, X.RDB$INDEX_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + break; + + case att_segment_count: + X.RDB$SEGMENT_COUNT = segments = (USHORT) get_numeric(); + break; + + case att_index_unique_flag: + X.RDB$UNIQUE_FLAG = (USHORT) get_numeric(); + break; + + case att_index_inactive: + X.RDB$INDEX_INACTIVE = (USHORT) get_numeric(); + /* Defer foreign key index activation */ + /* Modified by Toni Martir, all index deferred when verbose */ + if (tdgbl->gbl_sw_verbose) + { + if (X.RDB$INDEX_INACTIVE == FALSE) + X.RDB$INDEX_INACTIVE = DEFERRED_ACTIVE; + } + else + { + if (X.RDB$INDEX_INACTIVE == FALSE && foreign_index) + X.RDB$INDEX_INACTIVE = DEFERRED_ACTIVE; + } + if (tdgbl->gbl_sw_deactivate_indexes) + X.RDB$INDEX_INACTIVE = TRUE; + break; + + case att_index_type: + X.RDB$INDEX_TYPE.NULL = FALSE; + X.RDB$INDEX_TYPE = (USHORT) get_numeric(); + break; + + case att_index_field_name: + STORE (REQUEST_HANDLE tdgbl->handles_get_index_req_handle2) + Y IN RDB$INDEX_SEGMENTS + get_text (Y.RDB$FIELD_NAME, sizeof (Y.RDB$FIELD_NAME)); + strcpy (Y.RDB$INDEX_NAME, X.RDB$INDEX_NAME); + Y.RDB$FIELD_POSITION = count++; + END_STORE; + ON_ERROR + general_on_error (); + END_ERROR; + break; + + case att_index_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_misc_blob (&X.RDB$DESCRIPTION, 0, 0); + break; + + case att_index_description2: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + case att_index_expression_source: + X.RDB$EXPRESSION_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$EXPRESSION_SOURCE, 0); + break; + + case att_index_expression_blr: + X.RDB$EXPRESSION_BLR.NULL = FALSE; + get_blr_blob (&X.RDB$EXPRESSION_BLR, 0); + break; + + case att_index_foreign_key: + /* BUG 8183: For more information see description of */ + /* "bug_8183" function below. */ + /* Note: ATT_BACKUP_FORMAT for IB3.3 is equal 4 */ + if ( (tdgbl->RESTORE_format <= 4) && + (tdgbl->gbl_sw_bug8183 || bug_8183(tdgbl)) ) + { + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + } + else + { + foreign_index = TRUE; + /* Defer foreign key index activation */ + if (X.RDB$INDEX_INACTIVE == FALSE) + X.RDB$INDEX_INACTIVE = DEFERRED_ACTIVE; + if (tdgbl->gbl_sw_deactivate_indexes) + X.RDB$INDEX_INACTIVE = TRUE; + X.RDB$FOREIGN_KEY.NULL = FALSE; + get_text (X.RDB$FOREIGN_KEY, sizeof (X.RDB$FOREIGN_KEY)); + } + break; + + default: + bad_attribute (scan_next_attr, attribute, 93); + /* msg 93 index */ + break; + } + count = 0; + FOR (REQUEST_HANDLE tdgbl->handles_get_index_req_handle3) + RFR IN RDB$RELATION_FIELDS CROSS I_S IN RDB$INDEX_SEGMENTS + OVER RDB$FIELD_NAME WITH I_S.RDB$INDEX_NAME = index_name AND + RFR.RDB$RELATION_NAME = relation->rel_name + count++; + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + + if (count != segments) + { + FOR (REQUEST_HANDLE tdgbl->handles_get_index_req_handle4) + I_S IN RDB$INDEX_SEGMENTS WITH I_S.RDB$INDEX_NAME = index_name + ERASE I_S; + ON_ERROR + general_on_error (); + END_ERROR; + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + return FALSE; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static void get_misc_blob ( + ISC_QUAD *blob_id, + USHORT sub_type, + USHORT glb_trans) +{ +/************************************** + * + * g e t _ m i s c _ b l o b + * + ************************************** + * + * Functional description + * Read blob attributes and copy data from input file to nice, + * shiney, new blob. + * + **************************************/ +STATUS status_vector [ISC_STATUS_LENGTH]; +SLONG *blob; +USHORT length; +UCHAR *buffer, static_buffer [1024]; +USHORT bpb_length; +UCHAR *bpb; +isc_tr_handle local_trans; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +length = (USHORT)get_numeric(); + +/* Create new blob */ + +blob = NULL; + +bpb_length = 0; +bpb = NULL; + +if (glb_trans && tdgbl->global_trans) + local_trans = tdgbl->global_trans; +else + local_trans = gds_trans; + +if (isc_create_blob2 (status_vector, + GDS_REF (tdgbl->db_handle), + GDS_REF (local_trans), + (void**) GDS_REF (blob), + GDS_VAL (blob_id), + bpb_length, + (SCHAR*) bpb)) + BURP_error_redirect (status_vector, 37, 0, 0); + /* msg 37 gds__create_blob failed */ + +/* Allocate blob buffer is static buffer is too short */ + +if (!length || length <= sizeof (static_buffer)) + buffer = static_buffer; +else + buffer = BURP_ALLOC (length); + +if (length) + { + (void) GET_BLOCK (buffer, length); + } + +if (isc_put_segment (status_vector, + (void**) GDS_REF (blob), + length, + (SCHAR*) GDS_VAL (buffer))) + BURP_error_redirect (status_vector, 38, 0, 0); + /* msg 38 gds__put_segment failed */ + +if (isc_close_blob (status_vector, (void**) GDS_REF (blob))) + BURP_error_redirect (status_vector, 23, 0, 0); + /* msg 23 gds__close_blob failed */ + +if (buffer != static_buffer) + BURP_FREE (buffer); +} + +static SLONG get_numeric (void) +{ +/************************************** + * + * g e t _ n u m e r i c + * + ************************************** + * + * Functional description + * Get a numeric value from the input stream. + * + **************************************/ +SLONG value [2]; +SSHORT length; + +length = get_text ((TEXT *) value, sizeof (value)); + +return isc_vax_integer ((SCHAR *) value, length); +} + +static SINT64 get_int64 (void) +{ +/************************************** + * + * g e t _ i n t 6 4 + * + ************************************** + * + * Functional description + * Get a possibly-64-bit numeric value from the input stream. + * + **************************************/ +SLONG value [4]; +SSHORT length; + +length = get_text ((TEXT *) value, sizeof (value)); + +return isc_portable_integer ((UCHAR *) value, length); +} + +static BOOLEAN get_procedure (void) +{ +/************************************** + * + * g e t _ p r o c e d u r e + * + ************************************** + * + * Functional description + * Reconstruct a stored procedure. + * Use the global_trans so we don't have to commit + * until after the indices are activated. This + * will allow us to use a PLAN in a SP. + * + **************************************/ +ATT_TYPE attribute; +GDS_NAME procedure_name; +TEXT temp [32]; +SSHORT l; +PRC procedure; +UCHAR scan_next_attr; +isc_tr_handle local_trans; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans; + +procedure = (PRC) BURP_ALLOC_ZERO (sizeof (struct prc)); +procedure->prc_next = tdgbl->procedures; +tdgbl->procedures = procedure; + +STORE (TRANSACTION_HANDLE local_trans + REQUEST_HANDLE tdgbl->handles_get_procedure_req_handle1) + X IN RDB$PROCEDURES + X.RDB$PROCEDURE_SOURCE.NULL = TRUE; + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$SECURITY_CLASS.NULL = TRUE; + X.RDB$OWNER_NAME.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_procedure_name: + l = get_text (X.RDB$PROCEDURE_NAME, sizeof (X.RDB$PROCEDURE_NAME)); + procedure->prc_name_length = l; + strcpy (procedure->prc_name, X.RDB$PROCEDURE_NAME); + MISC_terminate ((UCHAR*) X.RDB$PROCEDURE_NAME, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (195, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 195 restoring stored procedure %s */ + break; + + case att_procedure_description: + get_misc_blob (&X.RDB$DESCRIPTION, 0, 1); + X.RDB$DESCRIPTION.NULL = FALSE; + break; + + case att_procedure_description2: + get_source_blob (&X.RDB$DESCRIPTION, 1); + X.RDB$DESCRIPTION.NULL = FALSE; + break; + + case att_procedure_source: + get_misc_blob (&X.RDB$PROCEDURE_SOURCE, 0, 1); + X.RDB$PROCEDURE_SOURCE.NULL = FALSE; + break; + + case att_procedure_source2: + get_source_blob (&X.RDB$PROCEDURE_SOURCE, 1); + X.RDB$PROCEDURE_SOURCE.NULL = FALSE; + break; + + case att_procedure_blr: + get_blr_blob (&X.RDB$PROCEDURE_BLR, 1); + break; + + case att_procedure_security_class: + get_text (X.RDB$SECURITY_CLASS, sizeof (X.RDB$SECURITY_CLASS)); + X.RDB$SECURITY_CLASS.NULL = FALSE; + break; + + case att_procedure_owner_name: + get_text (procedure->prc_owner, sizeof (procedure->prc_owner)); + break; + + case att_procedure_inputs: + X.RDB$PROCEDURE_INPUTS = (USHORT) get_numeric(); + if (X.RDB$PROCEDURE_INPUTS == 0) + X.RDB$PROCEDURE_INPUTS.NULL = TRUE; + else + X.RDB$PROCEDURE_INPUTS.NULL = FALSE; + break; + + case att_procedure_outputs: + X.RDB$PROCEDURE_OUTPUTS = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 89); + /* msg 89 function */ + break; + } + strcpy (procedure_name, X.RDB$PROCEDURE_NAME); +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +/* at the end of prms for a procedure is the rec_procedure_end marker */ + +while (GET () == rec_procedure_prm) + get_procedure_prm (procedure_name); + +return TRUE; +} + +static BOOLEAN get_procedure_prm ( + GDS_NAME procptr) +{ +/************************************** + * + * g e t _ p r o c e d u r e _ p r m + * + ************************************** + * + * Functional description + * Reconstruct stored procedure parameter. + * Use the global_trans so we don't have to commit + * until after the indices are activated. This + * will allow us to use a PLAN in a SP. + * + **************************************/ +ATT_TYPE attribute; +SSHORT l; +TEXT temp [32]; +UCHAR scan_next_attr; +isc_tr_handle local_trans; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans; + +STORE (TRANSACTION_HANDLE local_trans + REQUEST_HANDLE tdgbl->handles_get_procedure_prm_req_handle1) + X IN RDB$PROCEDURE_PARAMETERS + X.RDB$DESCRIPTION.NULL = TRUE; + strcpy (X.RDB$PROCEDURE_NAME, procptr); + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_procedureprm_name: + l = get_text (X.RDB$PARAMETER_NAME, sizeof (X.RDB$PARAMETER_NAME)); + MISC_terminate ((UCHAR*) X.RDB$PARAMETER_NAME, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (196, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 196 restoring parameter %s for stored procedure */ + break; + + case att_procedureprm_type: + X.RDB$PARAMETER_TYPE= (USHORT) get_numeric(); + break; + + case att_procedureprm_number: + X.RDB$PARAMETER_NUMBER= (USHORT) get_numeric(); + break; + + case att_procedureprm_field_source: + get_text (X.RDB$FIELD_SOURCE, sizeof (X.RDB$FIELD_SOURCE)); + break; + + case att_procedureprm_description: + get_misc_blob (&X.RDB$DESCRIPTION, 0, 1); + X.RDB$DESCRIPTION.NULL = FALSE; + break; + + case att_procedureprm_description2: + get_source_blob (&X.RDB$DESCRIPTION, 1); + X.RDB$DESCRIPTION.NULL = FALSE; + break; + + default: + bad_attribute (scan_next_attr, attribute, 90); + /* msg 90 function argument */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_ref_constraint (void) +{ +/************************************** + * + * g e t _ r e f _ c o n s t r a i n t + * + ************************************** + * + * Functional description + * Restore data for referential constraints. + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_ref_constraint_req_handle1) + X IN RDB$REF_CONSTRAINTS + X.RDB$CONSTRAINT_NAME.NULL = TRUE; + X.RDB$CONST_NAME_UQ.NULL = TRUE; + X.RDB$MATCH_OPTION.NULL = TRUE; + X.RDB$UPDATE_RULE.NULL = TRUE; + X.RDB$DELETE_RULE.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_ref_constraint_name: + X.RDB$CONSTRAINT_NAME.NULL = FALSE; + get_text (X.RDB$CONSTRAINT_NAME, sizeof (X.RDB$CONSTRAINT_NAME)); + break; + + case att_ref_unique_const_name: + X.RDB$CONST_NAME_UQ.NULL = FALSE; + get_text (X.RDB$CONST_NAME_UQ, sizeof (X.RDB$CONST_NAME_UQ)); + break; + + case att_ref_match_option: + X.RDB$MATCH_OPTION.NULL = FALSE; + get_text (X.RDB$MATCH_OPTION, sizeof (X.RDB$MATCH_OPTION)); + break; + + case att_ref_update_rule: + X.RDB$UPDATE_RULE.NULL = FALSE; + get_text (X.RDB$UPDATE_RULE, sizeof (X.RDB$UPDATE_RULE)); + break; + + case att_ref_delete_rule: + X.RDB$DELETE_RULE.NULL = FALSE; + get_text (X.RDB$DELETE_RULE, sizeof (X.RDB$DELETE_RULE)); + break; + + default: + bad_attribute (scan_next_attr, attribute, 208); + /* msg 208 relation constraint */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_relation (void) +{ +/************************************** + * + * g e t _ r e l a t i o n + * + ************************************** + * + * Functional description + * Write relation meta-data and data. + * Use the default transaction for RELATIONS, + * and use the global_trans for VIEWS. This + * enables us to have views of SP and views + * with plans. Assume it is a view if it has + * RDB$VIEW_BLR, also assume RDB$VIEW_BLR is + * the first blob in the backup file. + * + * + **************************************/ +REL relation; +FLD field, *ptr; +TEXT temp [32]; +SSHORT l; +ATT_TYPE attribute; +REC_TYPE record; +UCHAR scan_next_attr; +TGBL tdgbl; + +SLONG rel_flags, sys_flag; +short rel_flags_null, sys_flag_null; +GDS_QUAD view_blr, view_src, rel_desc, ext_desc; +USHORT view_blr_null, view_src_null, rel_desc_null, ext_desc_null; +char sec_class[32]; +short sec_class_null; +TEXT ext_file_name [253]; +short ext_file_name_null; + +isc_tr_handle local_trans; +tdgbl = GET_THREAD_DATA; + +/* Pick up relation attributes */ + +relation = (REL) BURP_ALLOC_ZERO (sizeof (struct rel)); +relation->rel_next = tdgbl->relations; +tdgbl->relations = relation; + +rel_flags_null = TRUE; +sys_flag_null = TRUE; +view_blr_null = TRUE; +view_src_null = TRUE; +rel_desc_null = TRUE; +ext_desc_null = TRUE; +sec_class_null = TRUE; +ext_file_name_null = TRUE; + +sec_class[0] = '\0'; +ext_file_name[0] = '\0'; + +view_blr = isc_blob_null; +view_src = isc_blob_null; +ext_desc = isc_blob_null; +rel_desc = isc_blob_null; + +/* +STORE (REQUEST_HANDLE tdgbl->handles_get_relation_req_handle1) + X IN RDB$RELATIONS + X.RDB$SYSTEM_FLAG.NULL = TRUE; + X.RDB$FLAGS.NULL = TRUE; + X.RDB$SECURITY_CLASS.NULL = TRUE; + X.RDB$VIEW_BLR.NULL = TRUE; + X.RDB$VIEW_SOURCE.NULL = TRUE; + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$RUNTIME.NULL = TRUE; + X.RDB$EXTERNAL_DESCRIPTION.NULL = TRUE; +*/ + +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_relation_name: + l = get_text (relation->rel_name, 31); + relation->rel_name_length = l; + MISC_terminate ((UCHAR*) relation->rel_name, (UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (167, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 167 restoring relation %s */ + break; + + case att_relation_security_class: + sec_class_null = FALSE; + get_text (sec_class, sizeof (sec_class)); + break; + + case att_relation_view_blr: + view_blr_null = FALSE; + get_blr_blob(&view_blr, 1); + relation->rel_flags |= REL_view; + break; + + case att_relation_view_source: + view_src_null = FALSE; + get_misc_blob (&view_src, 1, (USHORT) !view_blr_null); + break; + + case att_relation_view_source2: + view_src_null = FALSE; + get_source_blob(&view_src, (USHORT) !view_blr_null); + break; + + case att_relation_description: + rel_desc_null = FALSE; + get_misc_blob(&rel_desc, 1, (USHORT) !view_blr_null); + break; + + case att_relation_description2: + rel_desc_null = FALSE; + get_source_blob(&rel_desc, (USHORT) !view_blr_null); + break; + + + case att_relation_flags: + rel_flags_null = FALSE; + rel_flags = get_numeric(); + break; + + case att_relation_system_flag: + sys_flag_null = FALSE; + sys_flag = get_numeric(); + break; + + case att_relation_ext_description: + ext_desc_null = FALSE; + get_misc_blob(&ext_desc, 1, (USHORT) !view_blr_null); + break; + + case att_relation_ext_description2: + ext_desc_null = FALSE; + get_source_blob(&ext_desc, (USHORT) !view_blr_null); + break; + + case att_relation_owner_name: + get_text (relation->rel_owner, sizeof (relation->rel_owner)); + break; + + case att_relation_ext_file_name: + ext_file_name_null = FALSE; + get_text (ext_file_name, sizeof (ext_file_name)); + break; + + default: + bad_attribute (scan_next_attr, attribute, 111); + /* msg 111 relation */ + break; + } + +/* If this is a view and there is a global transaction then use it */ + +if (view_blr_null || !tdgbl->global_trans) + local_trans = gds_trans; +else + local_trans = tdgbl->global_trans; + +STORE (TRANSACTION_HANDLE local_trans + REQUEST_HANDLE tdgbl->handles_get_relation_req_handle1) + X IN RDB$RELATIONS + + X.RDB$SYSTEM_FLAG.NULL = sys_flag_null; + X.RDB$FLAGS.NULL = rel_flags_null; + X.RDB$SECURITY_CLASS.NULL = sec_class_null; + X.RDB$VIEW_BLR.NULL = view_blr_null; + X.RDB$VIEW_SOURCE.NULL = view_src_null; + X.RDB$DESCRIPTION.NULL = rel_desc_null; + X.RDB$RUNTIME.NULL = TRUE; + X.RDB$EXTERNAL_DESCRIPTION.NULL = ext_desc_null; + X.RDB$EXTERNAL_FILE.NULL = ext_file_name_null; + + X.RDB$SYSTEM_FLAG = (USHORT) sys_flag; + X.RDB$FLAGS = (USHORT) rel_flags; + X.RDB$VIEW_BLR = view_blr; + X.RDB$VIEW_SOURCE = view_src; + X.RDB$DESCRIPTION = rel_desc; + X.RDB$EXTERNAL_DESCRIPTION = ext_desc; + + strcpy(X.RDB$SECURITY_CLASS, sec_class); + strcpy(X.RDB$RELATION_NAME, relation->rel_name); + strcpy(X.RDB$EXTERNAL_FILE, ext_file_name); + +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +/* Eat up misc. records */ +ptr = &relation->rel_fields; + +while (GET_RECORD (record) != rec_data) + switch (record) + { + case rec_relation_end: + if (tdgbl->gbl_sw_incremental) + { + BURP_verbose (170, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 170: committing metadata for relation %s */ + COMMIT + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + BURP_print (171, relation->rel_name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 171: error committing metadata for relation %s */ + BURP_print_status (tdgbl->status_vector); + ROLLBACK; + ON_ERROR + general_on_error (); + END_ERROR; + END_ERROR; + EXEC SQL SET TRANSACTION NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + } + return TRUE; + + case rec_field: + *ptr = field = get_field (relation); + if (!field) + return FALSE; + ptr = &field->fld_next; + break; + + case rec_view: + get_view (relation); + break; + + default: +#ifdef SUPERSERVER + BURP_svc_error (43, isc_arg_number, (void *) record, + 0, NULL, 0, NULL, 0, NULL, 0, NULL); +#else + BURP_error (43, (void*) record, 0, 0, 0, 0); + /* msg 43 don't recognize record type %ld */ +#endif + break; + } + +/* If we fall thru, there are data records to be gotten */ +/* we can get here only when restoring ancient gbak'ed files where rec_data + was once embedded into rec_relation ... otherwise, meta commit happens + when we see the first rec_relation_data */ + +BURP_verbose (68, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 68 committing meta data */ + +COMMIT; +ON_ERROR + general_on_error (); +END_ERROR; + +EXEC SQL SET TRANSACTION NO_AUTO_UNDO; +if (gds_status [1]) + EXEC SQL SET TRANSACTION; + +get_data (relation); + +return TRUE; +} + +static BOOLEAN get_rel_constraint (void) +{ +/************************************** + * + * g e t _ r e l _ c o n s t r a i n t + * + ************************************** + * + * Functional description + * Restore data for relation constraints. + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_rel_constraint_req_handle1) + X IN RDB$RELATION_CONSTRAINTS + X.RDB$CONSTRAINT_NAME.NULL = TRUE; + X.RDB$CONSTRAINT_TYPE.NULL = TRUE; + X.RDB$RELATION_NAME.NULL = TRUE; + X.RDB$DEFERRABLE.NULL = TRUE; + X.RDB$INITIALLY_DEFERRED.NULL = TRUE; + X.RDB$INDEX_NAME.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_rel_constraint_name: + X.RDB$CONSTRAINT_NAME.NULL = FALSE; + get_text (X.RDB$CONSTRAINT_NAME, sizeof (X.RDB$CONSTRAINT_NAME)); + break; + + case att_rel_constraint_type: + X.RDB$CONSTRAINT_TYPE.NULL = FALSE; + get_text (X.RDB$CONSTRAINT_TYPE, sizeof (X.RDB$CONSTRAINT_TYPE)); + break; + + case att_rel_constraint_rel_name: + X.RDB$RELATION_NAME.NULL = FALSE; + get_text (X.RDB$RELATION_NAME, sizeof (X.RDB$RELATION_NAME)); + break; + + case att_rel_constraint_defer: + X.RDB$DEFERRABLE.NULL = FALSE; + get_text (X.RDB$DEFERRABLE, sizeof (X.RDB$DEFERRABLE)); + break; + + case att_rel_constraint_init: + X.RDB$INITIALLY_DEFERRED.NULL = FALSE; + get_text (X.RDB$INITIALLY_DEFERRED, sizeof (X.RDB$INITIALLY_DEFERRED)); + break; + + case att_rel_constraint_index: + X.RDB$INDEX_NAME.NULL = FALSE; + get_text (X.RDB$INDEX_NAME, sizeof (X.RDB$INDEX_NAME)); + break; + + default: + bad_attribute (scan_next_attr, attribute, 208); + /* msg 208 relation constraint */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_relation_data (void) +{ +/************************************** + * + * g e t _ r e l a t i o n _ d a t a + * + ************************************** + * + * Functional description + * Restore data for a relation. This is called when the data is + * standing free from the relation definition. We first need to + * find the relation named. If we can't find it, give up. + * + **************************************/ +REL relation; +TEXT name [32]; +SLONG gen_id; +ATT_TYPE attribute; +REC_TYPE record; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +relation = NULL; + +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_relation_name: + get_text (name, sizeof (name)); + relation = find_relation (name); + break; + + default: + bad_attribute (scan_next_attr, attribute, 111); + /* msg 111 relation */ + break; + } + +if (!relation) + BURP_error_redirect ((STATUS *) NULL_PTR, 49, 0, 0); +/* msg 49 no relation name for data */ + +/* Eat up misc. records */ + +GET_RECORD (record); + +SKIP_INIT; +while (SKIP_SCAN, TRUE) + switch (record) + { + case rec_relation_end: + return TRUE; + + case rec_data: + record = get_data (relation); + /* get_data does a GET_RECORD */ + break; + + case rec_gen_id: + gen_id = get_numeric(); + store_blr_gen_id (name, gen_id); + GET_RECORD (record); + break; + + case rec_index: + get_index (relation); + GET_RECORD (record); + break; + + case rec_trigger: /* old style trigger */ + get_trigger_old (relation); + GET_RECORD (record); + break; + + default: + bad_attribute (scan_next_attr, attribute, 111); + /* msg 111 relation */ + GET_RECORD (record); + break; + } +} + +static BOOLEAN get_sql_roles (void) +{ +/************************************** + * + * g e t _ s q l _ r o l e s + * + ************************************** + * + * Functional description + * Restore data for SQL roles + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +TGBL tdgbl; +TEXT temp [32]; +SSHORT l; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_sql_roles_req_handle1) + X IN RDB$ROLES + + X.RDB$ROLE_NAME.NULL = TRUE; + X.RDB$OWNER_NAME.NULL = TRUE; + SKIP_INIT; + + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_role_name: + X.RDB$ROLE_NAME.NULL = FALSE; + l = get_text (X.RDB$ROLE_NAME, sizeof (X.RDB$ROLE_NAME)); + MISC_terminate ((UCHAR*) X.RDB$ROLE_NAME, (UCHAR*) temp, l, sizeof (temp)); + /************************************************ + ** + ** msg 251, restoring SQL role: %s + ** + *************************************************/ + BURP_verbose (251, temp, NULL_PTR, NULL_PTR, + NULL_PTR, NULL_PTR); + break; + + case att_role_owner_name: + X.RDB$OWNER_NAME.NULL = FALSE; + get_text (X.RDB$OWNER_NAME, sizeof (X.RDB$OWNER_NAME)); + break; + + default: + /************************************************* + ** + ** msg 250, Bad attribute for restoring SQL role + ** + **************************************************/ + bad_attribute (scan_next_attr, attribute, 250); + break; + } +END_STORE +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN is_ascii_name (TEXT *name, SSHORT len) +{ +/************************************** + * + * i s _ a s c i i _ n a m e + * + ************************************** + * + * Functional description + * Check if the input text is valid ASCII name + * + **************************************/ +SSHORT i; + +for (i = 0; + i < len && + ( (name[i] >= 'A' && name[i] <= 'Z') || + (name[i] >= '0' && name[i] <= '9') || + name[i] == '_' || name[i] == '$' ); + i ++); +if (i != len) + return FALSE; +else + return TRUE; +} + +static BOOLEAN get_security_class (void) +{ +/************************************** + * + * g e t _ s e c u r i t y _ c l a s s + * + ************************************** + * + * Functional description + * Restore a security class record including access control list. + * + **************************************/ +ATT_TYPE attribute; +TEXT temp [32]; +SSHORT l = 0; +UCHAR scan_next_attr; +TGBL tdgbl; +BOOLEAN is_valid_sec_class = FALSE; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_security_class_req_handle1) + X IN RDB$SECURITY_CLASSES + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + { + X.RDB$DESCRIPTION.NULL = TRUE; + switch (attribute) + { + case att_class_security_class: + l = get_text (X.RDB$SECURITY_CLASS, + sizeof (X.RDB$SECURITY_CLASS)); + + /* Bug fix for bug_no 7299: There was a V3 bug that inserted + garbage security class entry when doing GBAK. In order to + restore the V3 gbak file with this bad security entry to + V4 database. We should check if the security class is a + valid ASCII name. If not, skip this entry by setting + 'is_valid_sec_class' to FALSE. + */ + is_valid_sec_class = is_ascii_name(X.RDB$SECURITY_CLASS, l); + if (!is_valid_sec_class) + { + MISC_terminate ((UCHAR*) X.RDB$SECURITY_CLASS, (UCHAR*) temp, l, sizeof (temp)); + BURP_print (234, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 234 Skipped bad security class entry: %s */ + break; + } + + MISC_terminate ((UCHAR*) X.RDB$SECURITY_CLASS,(UCHAR*) temp, l, sizeof (temp)); + BURP_verbose (125, temp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 125 restoring security class %s */ + break; + + case att_class_acl: + get_misc_blob (&X.RDB$ACL, 0, 0); + break; + + case att_class_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_misc_blob (&X.RDB$DESCRIPTION, 0, 0); + break; + + case att_class_description2: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + default: + bad_attribute (scan_next_attr, attribute, 131); + /* msg 131 security class */ + break; + } + } +/* If the security class is not valid ASCII name, don't store it to the */ +/* database. Simply return from here and the entry is discarded. */ +if (!is_valid_sec_class) + { + return TRUE; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static void get_source_blob ( + ISC_QUAD *blob_id, + USHORT glb_trans) +{ +/************************************** + * + * g e t _ s o u r c e _ b l o b + * + ************************************** + * + * Functional description + * Read source blob and query header attributes and copy data from + * input file to nice, shiney, new blob. + * + **************************************/ +STATUS status_vector [ISC_STATUS_LENGTH]; +SLONG length, *blob; +USHORT seg_len; +UCHAR *buffer, static_buffer [1024], *p; +isc_tr_handle local_trans; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +length = get_numeric(); + +/* Create new blob */ + +blob = NULL; + +if (glb_trans && tdgbl->global_trans) + local_trans = tdgbl->global_trans; +else + local_trans = gds_trans; + +if (isc_create_blob (status_vector, + GDS_REF (tdgbl->db_handle), + GDS_REF (local_trans), + (void**) GDS_REF (blob), + GDS_VAL (blob_id))) + BURP_error_redirect (status_vector, 37, 0, 0); + /* msg 37 gds__create_blob failed */ + +/* Allocate blob buffer is static buffer is too short */ + +if (!length || length <= sizeof (static_buffer)) + buffer = static_buffer; +else + buffer = BURP_ALLOC (length); + +while (length) + { + p = buffer; + while (*p++ = GET()) + length--; + --p; + --length; + seg_len = p - buffer; + + if (isc_put_segment (status_vector, + (void**) GDS_REF (blob), + seg_len, + (SCHAR*) GDS_VAL (buffer))) + BURP_error_redirect (status_vector, 38, 0, 0); + /* msg 38 gds__put_segment failed */ + } + +if (isc_close_blob (status_vector, (void**) GDS_REF (blob))) + BURP_error_redirect (status_vector, 23, 0, 0); + /* msg 23 gds__close_blob failed */ + +if (buffer != static_buffer) + BURP_FREE (buffer); +} + +static USHORT get_text ( + TEXT *text, + ULONG length) +{ +/************************************** + * + * g e t _ t e x t + * + ************************************** + * + * Functional description + * Move a text attribute to a string and fill. + * + **************************************/ +ULONG l, l2; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +l2 = l = GET(); + +if (length < l) + BURP_error_redirect ((STATUS *) NULL_PTR, 46, 0, 0); + /* msg 46 string truncated */ + +if (l) + text = (TEXT*) GET_BLOCK ((UCHAR*) text, l); + +*text = 0; + +return (USHORT) l2; +} + +static BOOLEAN get_trigger_old ( + REL relation) +{ +/************************************** + * + * g e t _ t r i g g e r _ o l d + * + ************************************** + * + * Functional description + * Get a trigger definition for a relation. + * + **************************************/ +enum trig_t type; +ATT_TYPE attribute; +TEXT *q, *p, *end, name [32]; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_trigger_old_req_handle1) + X IN RDB$TRIGGERS + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$TRIGGER_BLR.NULL = TRUE; + X.RDB$TRIGGER_SOURCE.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + { + switch (attribute) + { + case att_trig_type: + type = (enum trig_t) get_numeric(); + break; + + case att_trig_blr: + X.RDB$TRIGGER_BLR.NULL = FALSE; + get_blr_blob (&X.RDB$TRIGGER_BLR, 0); + break; + + case att_trig_source: + X.RDB$TRIGGER_SOURCE.NULL = FALSE; + get_misc_blob (&X.RDB$TRIGGER_SOURCE, 1, 0); + break; + + case att_trig_source2: + X.RDB$TRIGGER_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$TRIGGER_SOURCE, 0); + break; + + default: + bad_attribute (scan_next_attr, attribute, 134); + /* msg 134 trigger */ + break; + } + } + + /* fill in rest of attributes unique to new trigger format */ + + p = X.RDB$TRIGGER_NAME; + end = p + 31; + q = relation->rel_name; + while (*q) + *p++ = *q++; + + if (type == trig_pre_store) + { + X.RDB$TRIGGER_TYPE = TRIG_TYPE_PRE_STORE; + q = "$STORE"; + } + else if (type == trig_pre_modify) + { + X.RDB$TRIGGER_TYPE = TRIG_TYPE_PRE_MODIFY; + q = "$MODIFY"; + } + else if (type == trig_post_erase) + { + X.RDB$TRIGGER_TYPE = TRIG_TYPE_POST_ERASE; + q = "$ERASE"; + } + else + { + bad_attribute (scan_next_attr, attribute, 136); + /* msg 136 trigger type */ + return 0; + } + + while (*q && p < end) + *p++ = *q++; + *p = 0; + BURP_verbose (126, X.RDB$TRIGGER_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 126 restoring trigger %s */ + strncpy (X.RDB$RELATION_NAME, relation->rel_name, GDS_NAME_LEN); + strcpy (name, X.RDB$TRIGGER_NAME); + X.RDB$TRIGGER_SEQUENCE = TRIGGER_SEQUENCE_DEFAULT; + X.RDB$SYSTEM_FLAG = 0; /* restore as vanilla user type */ + +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +if (tdgbl->gbl_sw_incremental) + { + COMMIT + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + BURP_print (94, name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 94 trigger %s is invalid */ + BURP_print_status (tdgbl->status_vector); + ROLLBACK; + ON_ERROR + general_on_error (); + END_ERROR; + END_ERROR; + EXEC SQL SET TRANSACTION NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + } + +return TRUE; +} + +static BOOLEAN get_trigger (void) +{ +/************************************** + * + * g e t _ t r i g g e r + * + ************************************** + * + * Functional description + * Get a trigger definition in rdb$triggers. + * + **************************************/ +ATT_TYPE attribute; +TEXT name [32]; +UCHAR scan_next_attr; +isc_tr_handle local_trans; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans; + +STORE (TRANSACTION_HANDLE local_trans + REQUEST_HANDLE tdgbl->handles_get_trigger_req_handle1) + X IN RDB$TRIGGERS + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$TRIGGER_BLR.NULL = TRUE; + X.RDB$TRIGGER_SOURCE.NULL = TRUE; + X.RDB$SYSTEM_FLAG.NULL = TRUE; + X.RDB$FLAGS.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + { + switch (attribute) + { + case att_trig_type: + X.RDB$TRIGGER_TYPE = (USHORT) get_numeric(); + break; + + case att_trig_flags: + X.RDB$FLAGS = (USHORT) get_numeric(); + X.RDB$FLAGS.NULL = FALSE; + break; + + case att_trig_blr: + X.RDB$TRIGGER_BLR.NULL = FALSE; + get_blr_blob (&X.RDB$TRIGGER_BLR, 1); + break; + + case att_trig_source: + X.RDB$TRIGGER_SOURCE.NULL = FALSE; + get_misc_blob (&X.RDB$TRIGGER_SOURCE, 1, 1); + break; + + case att_trig_source2: + X.RDB$TRIGGER_SOURCE.NULL = FALSE; + get_source_blob (&X.RDB$TRIGGER_SOURCE, 1); + break; + + case att_trig_name: + get_text (X.RDB$TRIGGER_NAME, sizeof (X.RDB$TRIGGER_NAME)); + strcpy (name, X.RDB$TRIGGER_NAME); + BURP_verbose (126, X.RDB$TRIGGER_NAME, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 126 restoring trigger %s */ + break; + + case att_trig_relation_name: + get_text (X.RDB$RELATION_NAME, sizeof (X.RDB$RELATION_NAME)); + break; + + case att_trig_sequence: + X.RDB$TRIGGER_SEQUENCE = (USHORT) get_numeric(); + break; + + case att_trig_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_misc_blob (&X.RDB$DESCRIPTION, 1, 1); + break; + + case att_trig_description2: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 1); + break; + + case att_trig_system_flag: + X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); + X.RDB$SYSTEM_FLAG.NULL = FALSE; + break; + + case att_trig_inactive: + X.RDB$TRIGGER_INACTIVE = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 134); + /* msg 134 trigger */ + break; + } + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +if (tdgbl->gbl_sw_incremental) + { + COMMIT + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + BURP_print (94, name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 94 trigger %s is invalid */ + BURP_print_status (tdgbl->status_vector); + ROLLBACK; + ON_ERROR + general_on_error (); + END_ERROR; + END_ERROR; + EXEC SQL SET TRANSACTION NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + } + +return TRUE; +} + +static BOOLEAN get_trigger_message (void) +{ +/************************************** + * + * g e t _ t r i g g e r _ m e s s a g e + * + ************************************** + * + * Functional description + * Get a trigger message text. + * + **************************************/ +ATT_TYPE attribute; +SSHORT flag; +UCHAR scan_next_attr; +isc_tr_handle local_trans; +TGBL tdgbl; + +BASED_ON RDB$TRIGGER_MESSAGES.RDB$TRIGGER_NAME name; +BASED_ON RDB$TRIGGER_MESSAGES.RDB$MESSAGE_NUMBER number; +BASED_ON RDB$TRIGGER_MESSAGES.RDB$MESSAGE message; + +tdgbl = GET_THREAD_DATA; + +flag = FALSE; +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + { + switch (attribute) + { + case att_trigmsg_name: + get_text (name, sizeof (name)); + flag = FALSE; + FOR (REQUEST_HANDLE tdgbl->handles_get_trigger_message_req_handle1) + FIRST 1 X IN RDB$TRIGGERS WITH + X.RDB$SYSTEM_FLAG EQ 1 AND X.RDB$TRIGGER_NAME EQ name + flag = TRUE; + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + BURP_verbose (127, name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 127 restoring trigger message for %s */ + break; + + case att_trigmsg_number: + number = (USHORT) get_numeric(); + break; + + case att_trigmsg_text: + get_text (message, sizeof (message)); + break; + + default: + bad_attribute (scan_next_attr, attribute, 135); + /* msg 135 trigger message */ + break; + } + } + +if (flag) + return TRUE; + +local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans; + +STORE (TRANSACTION_HANDLE local_trans + REQUEST_HANDLE tdgbl->handles_get_trigger_message_req_handle2) + X IN RDB$TRIGGER_MESSAGES + strcpy (X.RDB$TRIGGER_NAME, name); + X.RDB$MESSAGE_NUMBER = number; + strcpy (X.RDB$MESSAGE, message); +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +if (tdgbl->gbl_sw_incremental) + { + COMMIT + /* existing ON_ERROR continues past error, beck */ + ON_ERROR + BURP_print (94, name, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 94 trigger %s is invalid */ + BURP_print_status (tdgbl->status_vector); + ROLLBACK; + ON_ERROR + general_on_error (); + END_ERROR; + END_ERROR; + EXEC SQL SET TRANSACTION NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + } + +return TRUE; +} + +static BOOLEAN get_type (void) +{ +/************************************** + * + * g e t _ t y p e + * + ************************************** + * + * Functional description + * Get a type definition in rdb$types. + * + **************************************/ +ATT_TYPE attribute; +ULONG l; +TEXT temp [32]; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_get_type_req_handle1) + X IN RDB$TYPES + X.RDB$DESCRIPTION.NULL = TRUE; + X.RDB$SYSTEM_FLAG.NULL = TRUE; + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + { + switch (attribute) + { + case att_type_name: + l = get_text (X.RDB$TYPE_NAME, sizeof (X.RDB$TYPE_NAME)); + break; + + case att_type_type: + X.RDB$TYPE = (USHORT) get_numeric(); + break; + + case att_type_field_name: + get_text (X.RDB$FIELD_NAME, sizeof (X.RDB$FIELD_NAME)); + break; + + case att_type_description: + X.RDB$DESCRIPTION.NULL = FALSE; + get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); + break; + + case att_type_description2: + X.RDB$DESCRIPTION.NULL = FALSE; + get_source_blob (&X.RDB$DESCRIPTION, 0); + break; + + case att_type_system_flag: + X.RDB$SYSTEM_FLAG = (USHORT) get_numeric(); + X.RDB$SYSTEM_FLAG.NULL = FALSE; + break; + + default: + bad_attribute (scan_next_attr, attribute, 136); + /* msg 136 trigger type */ + break; + } + } + +MISC_terminate ( (UCHAR*) X.RDB$TYPE_NAME, (UCHAR*) temp, l, sizeof (temp)); +BURP_verbose (128, temp, X.RDB$FIELD_NAME, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 128 restoring type %s for field %s */ + +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static BOOLEAN get_user_privilege (void) +{ +/************************************** + * + * g e t _ u s e r _ p r i v i l e g e + * + ************************************** + * + * Functional description + * Get a user privilege. + * Get next interesting user privilege. + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +UCHAR exists = 0; +USHORT flags = 0; +TGBL tdgbl; +isc_tr_handle local_trans = NULL; + +BASED_ON RDB$USER_PRIVILEGES.RDB$USER user; +BASED_ON RDB$USER_PRIVILEGES.RDB$GRANTOR grantor; +BASED_ON RDB$USER_PRIVILEGES.RDB$PRIVILEGE privilege; +BASED_ON RDB$USER_PRIVILEGES.RDB$GRANT_OPTION grant_option; +BASED_ON RDB$USER_PRIVILEGES.RDB$RELATION_NAME relation_name; +BASED_ON RDB$USER_PRIVILEGES.RDB$FIELD_NAME field_name; +BASED_ON RDB$USER_PRIVILEGES.RDB$USER_TYPE user_type; +BASED_ON RDB$USER_PRIVILEGES.RDB$OBJECT_TYPE object_type; + +tdgbl = GET_THREAD_DATA; +user_type = obj_user; +object_type = obj_relation; + +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + { + switch (attribute) + { + case att_priv_user: + /* default USER_TYPE to USER */ + flags |= USER_PRIV_USER; + get_text (user, sizeof (user)); + BURP_verbose (123, user, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 123 restoring privilege for user %s */ + break; + + case att_priv_grantor: + flags |= USER_PRIV_GRANTOR; + get_text (grantor, sizeof (grantor)); + break; + + case att_priv_privilege: + flags |= USER_PRIV_PRIVILEGE; + get_text (privilege, sizeof (privilege)); + break; + + case att_priv_grant_option: + flags |= USER_PRIV_GRANT_OPTION; + grant_option = (USHORT) get_numeric(); + break; + + case att_priv_object_name: + flags |= USER_PRIV_OBJECT_NAME; + /* default OBJECT_TYPE to RELATION */ + get_text (relation_name, sizeof (relation_name)); + break; + + case att_priv_field_name: + flags |= USER_PRIV_FIELD_NAME; + get_text (field_name, sizeof (field_name)); + break; + + case att_priv_user_type: + flags |= USER_PRIV_USER_TYPE; + user_type = (USHORT) get_numeric(); + break; + + case att_priv_obj_type: + flags |= USER_PRIV_OBJECT_TYPE; + object_type = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 105); + /* msg 105 privilege */ + break; + } + } + +/* Check if object exists */ + +switch (object_type) + { + case obj_procedure: + { + PRC proc; + + for (proc = tdgbl->procedures; proc; proc = proc->prc_next) + if (!strcmp(proc->prc_name, relation_name)) + { + exists = 1; + local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans; + break; + } + } + break; + + case obj_relation: + { + REL rel; + + for (rel = tdgbl->relations; rel; rel = rel->rel_next) + if (!strcmp(rel->rel_name, relation_name)) + { + exists = 1; + if (rel->rel_flags & REL_view) + local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans; + break; + } + } + break; + + default: + exists = 1; + break; + } + +if (exists) + { + if (!local_trans) + local_trans = gds_trans; + + STORE (TRANSACTION_HANDLE local_trans + REQUEST_HANDLE tdgbl->handles_get_user_privilege_req_handle1) X + IN RDB$USER_PRIVILEGES + + X.RDB$FIELD_NAME.NULL = TRUE; + X.RDB$OBJECT_TYPE.NULL = TRUE; + + if (flags & USER_PRIV_USER) + strcpy (X.RDB$USER, user); + + if (flags & USER_PRIV_GRANTOR) + strcpy (X.RDB$GRANTOR, grantor); + + if (flags & USER_PRIV_PRIVILEGE) + strcpy (X.RDB$PRIVILEGE, privilege); + + if (flags & USER_PRIV_GRANT_OPTION) + { + X.RDB$GRANT_OPTION = grant_option; + if (grant_option == 0) + X.RDB$GRANT_OPTION.NULL = TRUE; + else + X.RDB$GRANT_OPTION.NULL = FALSE; + } + + if (flags & USER_PRIV_OBJECT_NAME) + strcpy (X.RDB$RELATION_NAME, relation_name); + + if (flags & USER_PRIV_FIELD_NAME) + { + X.RDB$FIELD_NAME.NULL = FALSE; + strcpy (X.RDB$FIELD_NAME, field_name); + } + + /* + * USER_TYPE & OBJECT_TYPE are fields that did not exist before + * V4.0. So, we have to reconstruct them and initialize them to + * reasonable values. If they existed before then user_type and + * object_type contain the proper values. If they didn't exist + * then user_type and object_type contain the reasonable default + * values. + */ + + X.RDB$USER_TYPE.NULL = FALSE; + X.RDB$USER_TYPE = user_type; + + X.RDB$OBJECT_TYPE.NULL = FALSE; + X.RDB$OBJECT_TYPE = object_type; + + + /* + * If OBJECT_TYPE didn't exist before and we have a field level + * user privileges, then use obj_field instead. + * + * NOTE: Scanning the V4.0 code base, obj_field has never been + * used at all. The following code should be uncommented + * in case we ever introduce obj_field to the picture. + */ + /*********************************************************** + if ( !(flags & USER_PRIV_OBJECT_TYPE) ) + { + if ( flags & USER_PRIV_FIELD_NAME ) + { + X.RDB$OBJECT_TYPE = obj_field; + } + } + ***********************************************************/ + + + END_STORE; + ON_ERROR + general_on_error (); + END_ERROR; + } + +return TRUE; +} + +static BOOLEAN get_view ( + REL relation) +{ +/************************************** + * + * g e t _ v i e w + * + ************************************** + * + * Functional description + * Store a record in RDB$VIEW_RELATIONS. + * + **************************************/ +ATT_TYPE attribute; +UCHAR scan_next_attr; +isc_tr_handle local_trans; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +/* If there is a global transaction then use it */ + +local_trans = tdgbl->global_trans ? tdgbl->global_trans : gds_trans; + +STORE (TRANSACTION_HANDLE local_trans + REQUEST_HANDLE tdgbl->handles_get_view_req_handle1) + X IN RDB$VIEW_RELATIONS + strcpy (X.RDB$VIEW_NAME, relation->rel_name); + SKIP_INIT; + while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_view_relation_name: + get_text (X.RDB$RELATION_NAME, sizeof (X.RDB$RELATION_NAME)); + break; + + case att_view_context_name: + get_text (X.RDB$CONTEXT_NAME, sizeof (X.RDB$CONTEXT_NAME)); + break; + + case att_view_context_id: + X.RDB$VIEW_CONTEXT = (USHORT) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 140); + /* msg 140 view */ + break; + } +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +return TRUE; +} + +static void ignore_array ( + REL relation) +{ +/************************************** + * + * i g n o r e _ a r r a y + * + ************************************** + * + * Functional description + * Read array data from input file to nice, + * shiney, new array. + * + **************************************/ +FLD field; +ATT_TYPE attribute; +SLONG length, lcount, *range, *end_ranges; +USHORT field_number; +LSTRING xdr_buffer; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +/* don't free something you don't allocate */ +xdr_buffer.lstr_allocated = 0; + +/* Pick up attributes */ + +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_blob_data) + switch (attribute) + { + case att_blob_field_number: + field_number = (USHORT) get_numeric(); + for (field = relation->rel_fields; field; field = field->fld_next) + if (field->fld_number == field_number) + break; + if (!field) + BURP_error_redirect ((STATUS *) NULL_PTR, 36, 0, 0); +/* msg 36 Can't find field for blob */ + break; + + case att_array_dimensions: + field->fld_dimensions = (SSHORT)get_numeric(); + end_ranges = field->fld_ranges + 2 * field->fld_dimensions; + for (range = field->fld_ranges; range < end_ranges; range += 2) + { + if (GET_ATTRIBUTE (attribute) != att_array_range_low) + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + else + range [0] = get_numeric(); + if (GET_ATTRIBUTE (attribute) != att_array_range_high) + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + else + range [1] = get_numeric(); + } + break; + + default: + bad_attribute (scan_next_attr, attribute, 58); + /* msg 58 array */ + break; + } + +length = GET(); +length |= GET() << 8; +length |= GET() << 16; +length |= GET() << 24; + +if (tdgbl->gbl_sw_transportable) + { + if (GET_ATTRIBUTE (attribute) != att_xdr_array) + BURP_error_redirect ((STATUS *) NULL_PTR, 55, 0, 0); +/* msg 55 Expected XDR record length */ + else + { + xdr_buffer.lstr_allocated = GET(); + xdr_buffer.lstr_allocated |= GET() << 8; + xdr_buffer.lstr_allocated |= GET() << 16; + xdr_buffer.lstr_allocated |= GET() << 24; + lcount = xdr_buffer.lstr_length = xdr_buffer.lstr_allocated; + } + } +else + { + lcount = length; + } + +if (lcount) + GET_SKIP (lcount); +} + +static void ignore_blob (void) +{ +/************************************** + * + * i g n o r e _ b l o b + * + ************************************** + * + * Functional description + * Skip over blob data records. + * + **************************************/ +ATT_TYPE attribute; +SLONG segments; +USHORT length; +UCHAR scan_next_attr; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +/* Pick up attributes */ + +segments = 0; + +SKIP_INIT; +while (SKIP_SCAN, GET_ATTRIBUTE (attribute) != att_blob_data) + switch (attribute) + { + case att_blob_field_number: + (void) get_numeric(); + break; + + case att_blob_max_segment: + (void) get_numeric(); + break; + + case att_blob_number_segments: + segments = get_numeric(); + break; + + case att_blob_type: + (void) get_numeric(); + break; + + default: + bad_attribute (scan_next_attr, attribute, 64); + /* msg 64 blob */ + break; + } + +/* Eat up blob segments */ + +while (--segments >= 0) + { + length = GET(); + length |= GET() << 8; + if (length) + GET_SKIP (length); + } +} + +static REC_TYPE ignore_data ( + REL relation) +{ +/************************************** + * + * i g n o r e _ d a t a + * + ************************************** + * + * Functional description + * Ignore data records for a relation. + * + **************************************/ +UCHAR *buffer; +USHORT l, records; +REC_TYPE record; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +records = 0; + +while (TRUE) + { + if (GET () != att_data_length) + BURP_error_redirect ((STATUS *) NULL_PTR, 39, 0, 0); +/* msg 39 expected record length */ + l = (USHORT) get_numeric(); + if (tdgbl->gbl_sw_transportable) + if (GET () != att_xdr_length) + BURP_error_redirect ((STATUS *) NULL_PTR, 55, 0, 0); +/* msg 55 Expected XDR record length */ + else + l = (USHORT) get_numeric(); + if (GET () != att_data_data) + BURP_error_redirect ((STATUS *) NULL_PTR, 41, 0, 0); +/* msg 41 expected data attribute */ + if (l) + if (tdgbl->gbl_sw_compress) + { + buffer = (UCHAR*) BURP_ALLOC (l); + decompress (buffer, l); + BURP_FREE (buffer); + } + else + GET_SKIP (l); + records++; + while (GET_RECORD (record)) + { + if (record == rec_blob) + ignore_blob(); + else if (record == rec_array) + ignore_array (relation); + else + break; + } + if (record != rec_data) + break; + } + +BURP_verbose (106, (void*) records, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 106 %ld records ignored */ + +return record; +} + +static void realign ( + UCHAR *buffer, + REL relation) +{ +/************************************** + * + * r e a l i g n + * + ************************************** + * + * Functional description + * Miserable input record is misaligned. + * Shuffle fields around. N.B. this one + * only works if the old buffer is longer + * than the new. + * + **************************************/ +FLD field; +UCHAR *p, *q; +USHORT l; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +for (field = relation->rel_fields; field; field = field->fld_next) + { + if (field->fld_flags & FLD_computed) + continue; + + p = buffer + field->fld_offset; + q = buffer + field->fld_old_offset; + l = field->fld_length; + + /* Beware of overlaps here - don't use memcpy */ + while (l--) + *p++ = *q++; + + if (field->fld_type == blr_varying) + { + *p++ = *q++; + *p++ = *q++; + } + } + +/* If this is format version 2, build fields for null flags */ + +if (tdgbl->RESTORE_format >= 2) + for (field = relation->rel_fields; field; field = field->fld_next) + { + if (field->fld_flags & FLD_computed) + continue; + p = buffer + FB_ALIGN(p - buffer, sizeof (SSHORT)); + q = buffer + FB_ALIGN(q - buffer, sizeof (SSHORT)); + *p++ = *q++; + *p++ = *q++; + } +} + +static USHORT recompute_length ( + REL relation) +{ +/************************************** + * + * r e c o m p u t e _ l e n g t h + * + ************************************** + * + * Functional description + * Recompute length of a record using an old + * alignment if there is one. At the moment, + * only SPARC has one. + * + **************************************/ + +#ifdef sparc +FLD field; +ULONG offset, length, dtype, alignment; +SSHORT *alignments; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +alignments = old_sparcs; + +for (field = relation->rel_fields; field; field = field->fld_next) + { + if (field->fld_flags & FLD_computed) + continue; + length = field->fld_length; + alignment = 4; + + /* arrays are of various fld_types but are really blobs */ + + dtype = field->fld_type; + + if (field->fld_flags & FLD_array) + { + dtype = blr_blob; + length = 8; + } + + alignment = alignments [gds_cvt_blr_dtype [field->fld_type]]; + if (dtype == blr_varying) + length += sizeof (USHORT); + + if (alignment) + offset = FB_ALIGN(offset, alignment); + field->fld_old_offset = offset; + offset += length; + } + +/* If this is format version 2, build fields for null flags */ + +if (tdgbl->RESTORE_format >= 2) + for (field = relation->rel_fields; field; field = field->fld_next) + { + if (field->fld_flags & FLD_computed) + continue; + offset = FB_ALIGN(offset, sizeof (SSHORT)); + offset += sizeof (SSHORT); + } + +return offset; +#else +return FALSE; +#endif +} + +static BOOLEAN restore ( + TEXT *file_name, + TEXT *database_name) +{ +/************************************** + * + * r e s t o r e + * + ************************************** + * + * Functional description + * Perform the body of restore. + * + **************************************/ +SSHORT l, flag; +REC_TYPE record; +ATT_TYPE attribute; +USHORT db_version; +isc_req_handle req_handle1 = NULL, req_handle2 = NULL, req_handle3 = NULL, + req_handle4 = NULL, req_handle5 = NULL; +long req_status [20]; +TGBL tdgbl; +SSHORT flag_norel=TRUE; /* To fix bug 10098 */ + +tdgbl = GET_THREAD_DATA; + +/* Read burp record first */ + +MVOL_init_read ((UCHAR*) tdgbl->gbl_database_file_name, (UCHAR*) file_name, + &tdgbl->RESTORE_format, &tdgbl->io_cnt, &tdgbl->io_ptr); + +if (tdgbl->gbl_sw_transportable) + BURP_verbose (133, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 133 transportable backup -- data in XDR format */ +if (tdgbl->gbl_sw_compress) + BURP_verbose (61, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 61 backup file is compressed */ + +flag = FALSE; + +/* restore only from those backup files created by current or previous GBAK */ + +if (tdgbl->RESTORE_format < 1 || tdgbl->RESTORE_format > ATT_BACKUP_FORMAT) +#ifdef SUPERSERVER + BURP_svc_error (44, isc_arg_number, tdgbl->RESTORE_format, + 0, NULL, 0, NULL, 0, NULL, 0, NULL); +#else + BURP_error (44, (void*) tdgbl->RESTORE_format, 0, 0, 0, 0); +/* msg 44 Expected backup version 1, 2, or 3. Found %ld */ +#endif + +create_database ((UCHAR*) database_name); + +EXEC SQL SET TRANSACTION NO_AUTO_UNDO; +if (gds_status [1]) + EXEC SQL SET TRANSACTION; + +/* For V4.0, start a read commited transaction. This will be used + * to create blobs for global fields and update the record in the + * RDB$FIELDS table. + */ + +EXEC SQL SET TRANSACTION NAME tdgbl->global_trans ISOLATION LEVEL READ COMMITTED; + +db_version = check_db_version(); +if (db_version < DB_VERSION_CURRENT) +#ifdef SUPERSERVER + BURP_svc_error (51, isc_arg_number, db_version, + 0, NULL, 0, NULL, 0, NULL, 0, NULL); +#else + BURP_error (51, (void*) db_version, 0, 0, 0, 0); +/* msg 51 database format %ld is too old to restore to */ +#endif + +BURP_verbose (129, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 129 started transaction */ + +while (GET_ATTRIBUTE (attribute) != att_end) + switch (attribute) + { + case att_database_security_class: + /* Instead of updating the security class in RDB$DATABASE, + just store the value in tdgbl. It will be updated at + the very end to prevent security class validation + failures during change table ownership operation */ + get_text(tdgbl->database_security_class, sizeof(tdgbl->database_security_class)); + break; + + case att_database_description: + case att_database_description2: + FOR (REQUEST_HANDLE req_handle2) + X IN RDB$DATABASE + MODIFY X USING + if (attribute == att_database_description2) + get_source_blob (&X.RDB$DESCRIPTION, 0); + else + get_misc_blob (&X.RDB$DESCRIPTION, 1, 0); + END_MODIFY; + ON_ERROR + general_on_error (); + END_ERROR; + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + break; + + case att_database_dfl_charset: + FOR (REQUEST_HANDLE req_handle3) + X IN RDB$DATABASE + MODIFY X USING + get_text (X.RDB$CHARACTER_SET_NAME, sizeof (X.RDB$CHARACTER_SET_NAME)); + END_MODIFY; + ON_ERROR + general_on_error (); + END_ERROR; + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + break; + + default: + l = GET(); + if (l) + GET_SKIP (l); + break; + } +if (req_handle1) + isc_release_request (req_status, &req_handle1); +if (req_handle2) + isc_release_request (req_status, &req_handle2); +if (req_handle3) + isc_release_request (req_status, &req_handle3); + +/* If this should be a multi-file database, add the files */ + +if (tdgbl->gbl_sw_files && tdgbl->gbl_sw_files->fil_next) + add_files ((UCHAR*) database_name); + +/* Get global fields and relations */ + +while (GET_RECORD (record) != rec_end) + switch (record) + { + case rec_charset: + if (!get_character_set()) + return FALSE; + flag = TRUE; + break; + + case rec_collation: + if (!get_collation()) + return FALSE; + flag = TRUE; + break; + + case rec_chk_constraint: + if (!get_chk_constraint()) + return FALSE; + flag = TRUE; + break; + + case rec_global_field: + if (!get_global_field()) + return FALSE; + flag = TRUE; + break; + + case rec_field_dimensions: + if (!get_field_dimensions()) + return FALSE; + flag = TRUE; + break; + + case rec_relation: + if (!get_relation()) + return FALSE; + flag = TRUE; + flag_norel = FALSE; + break; + + case rec_ref_constraint: + if (!get_ref_constraint()) + return FALSE; + flag = TRUE; + break; + + case rec_rel_constraint: + if (!get_rel_constraint()) + return FALSE; + flag = TRUE; + break; + + case rec_function: + if (!get_function()) + return FALSE; + flag = TRUE; + break; + + case rec_procedure: + if (!get_procedure()) + return FALSE; + flag = TRUE; + break; + + case rec_exception: + if (!get_exception()) + return FALSE; + flag = TRUE; + break; + + case rec_type: /* rdb$types */ + if (!get_type()) + return FALSE; + flag = TRUE; + break; + + case rec_filter: /* rdb$filters */ + if (!get_filter()) + return FALSE; + flag = TRUE; + break; + + case rec_generator: + if (!get_generator()) + return FALSE; + flag = TRUE; + break; + + case rec_relation_data: + if (flag) + { + BURP_verbose (68, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 68 committing meta data */ + COMMIT; + ON_ERROR + general_on_error (); + END_ERROR; + EXEC SQL SET TRANSACTION NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; + flag = FALSE; + } + if (!get_relation_data()) + return FALSE; + break; + + case rec_trigger: /* new trigger type */ + if (!get_trigger()) + return FALSE; + flag = TRUE; + break; + + case rec_trigger_message: + if (!get_trigger_message()) + return FALSE; + flag = TRUE; + break; + + case rec_user_privilege: + if (!get_user_privilege()) + return FALSE; + flag = TRUE; + break; + + case rec_security_class: + if (!get_security_class()) + return FALSE; + flag = TRUE; + break; + + case rec_files: + if (!get_files()) + return FALSE; + flag = TRUE; + break; + + case rec_sql_roles: + if (!get_sql_roles()) + return FALSE; + flag = TRUE; + break; + + default: +#ifdef SUPERSERVER + BURP_svc_error (43, isc_arg_number, (void *) record, + 0, NULL, 0, NULL, 0, NULL, 0, NULL); +#else + BURP_error (43, (void*) record, 0, 0, 0, 0); + /* msg 43 don't recognize record type %ld */ +#endif + break; + } + +/* This piece of code is to fix bug 10098: restore of database with +only domains and no relations aborts with the message ERROR: deadlock +This is because insertion of domains into RDB$FIELDS is happening in +the default transaction, whereas updation of RDB$FIELDS to add +constraints to the domains is done in tdgbl->global_trans. In case of +no relations, no COMMIT of default transaction occurs till this point +because of which rows in RDB$FIELDS for domains are still locked by +default transaction. The below code COMMITs the default transaction +in that particular situation */ + +if (flag_norel) +{ + COMMIT; + ON_ERROR + general_on_error (); + END_ERROR; + EXEC SQL SET TRANSACTION NO_AUTO_UNDO; + if (gds_status [1]) + EXEC SQL SET TRANSACTION; +} + +/* put validation clauses for global fields */ + +update_global_field (); + +/* Purge shadow metadata if necessary */ + +if (tdgbl->gbl_sw_kill) + FOR (REQUEST_HANDLE req_handle5) + FIL IN RDB$FILES WITH FIL.RDB$SHADOW_NUMBER NOT MISSING + AND FIL.RDB$SHADOW_NUMBER NE 0 + ERASE FIL; + ON_ERROR + general_on_error (); + END_ERROR; + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + +if (req_handle5) + isc_release_request (req_status, &req_handle5); + +return TRUE; +} + +static void restore_security_class ( + TEXT *owner_nm, + TEXT *sec_class_nm) +{ +/************************************** + * + * r e s t o r e _ s e c u r i t y _ c l a s s + * + ************************************** + * + * Functional description + * restore the ownership of the relation in the ACL list + * + **************************************/ +isc_tr_handle local_trans; +isc_req_handle req_handle2 = NULL; +ISC_QUAD new_blob_id; +long req_status [20]; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; +local_trans = gds_trans; + +FOR (REQUEST_HANDLE req_handle2) + X IN RDB$SECURITY_CLASSES WITH X.RDB$SECURITY_CLASS EQ sec_class_nm + + new_blob_id.gds_quad_high = 0; + new_blob_id.gds_quad_low = 0; + get_acl (owner_nm, &X.RDB$ACL, &new_blob_id); + + MODIFY X; + MOVE_FAST (&new_blob_id, &X.RDB$ACL, sizeof (ISC_QUAD)); + END_MODIFY; + ON_ERROR + if (req_handle2) + isc_release_request (req_status, &req_handle2); + general_on_error (); + END_ERROR; + + END_FOR; + +ON_ERROR + if (req_handle2) + isc_release_request (req_status, &req_handle2); + general_on_error (); +END_ERROR; + +if (req_handle2) + isc_release_request (req_status, &req_handle2); +} + +static void store_blr_gen_id ( + GDS_NAME gen_name, + SINT64 value) +{ +/************************************** + * + * s t o r e _ b l r _ g e n _ i d + * + ************************************** + * + * Functional description + * Store the blr_gen_id for the relation. + * + **************************************/ +UCHAR *blr; +UCHAR blr_buffer [100]; /* enough to fit blr */ +SSHORT blr_length; +SLONG *gen_id_reqh; +STATUS status_vector [ISC_STATUS_LENGTH]; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +STORE (REQUEST_HANDLE tdgbl->handles_store_blr_gen_id_req_handle1) + X IN RDB$GENERATORS + strcpy (X.RDB$GENERATOR_NAME, gen_name); +END_STORE; +ON_ERROR + general_on_error (); +END_ERROR; + +if (!value) + { + BURP_verbose (185, gen_name, (void*) value, NULL_PTR, NULL_PTR, NULL_PTR); + /* msg 185 restoring generator %s value: %ld */ + return; + } + + +gen_id_reqh = NULL; +blr = blr_buffer; + +/* build the blr with the right relation name */ + +if (tdgbl->RESTORE_format >= 6) + { + STUFF (blr_version5); + } +else + { + STUFF (blr_version4); + } +STUFF (blr_begin); + if (tdgbl->RESTORE_format >= 6) + { + STUFF (blr_dcl_variable); STUFF_WORD (0); STUFF (blr_int64); STUFF (0); + } + else + { + STUFF (blr_dcl_variable); STUFF_WORD (0); STUFF (blr_long); STUFF (0); + } + STUFF (blr_begin); + STUFF (blr_assignment); + STUFF (blr_gen_id); + stuff_string ((SCHAR**) &blr, gen_name); + if (tdgbl->RESTORE_format >= 6) + { + STUFF (blr_literal); STUFF (blr_int64); STUFF (0); STUFF_INT64 (value); + } + else + { + STUFF (blr_literal); STUFF (blr_long); STUFF (0); STUFF_LONG ((SLONG)value); + } + STUFF (blr_variable); STUFF_WORD (0); + STUFF (blr_end); +STUFF (blr_end); +STUFF (blr_eoc); + +blr_length = blr - blr_buffer; + +if (isc_compile_request ( + status_vector, + (void**) GDS_REF (tdgbl->db_handle), + (void**) GDS_REF (gen_id_reqh), + blr_length, + (SCHAR*) GDS_VAL (blr_buffer))) + { + isc_print_blr ((SCHAR*) blr_buffer, (void (*)()) NULL_PTR, NULL_PTR, 0); + BURP_error_redirect (status_vector, 42, 0, 0); +/* msg 42 Failed in store_blr_gen_id */ + } + +if (isc_start_request ( + status_vector, + (void**) GDS_REF (gen_id_reqh), + GDS_REF (gds_trans), /* use the same one generated by gpre */ + 0)) + { + isc_print_blr ((SCHAR*) blr_buffer, (void (*)()) NULL_PTR, NULL_PTR, 0); + BURP_error_redirect (status_vector, 42, 0, 0); +/* msg 42 Failed in store_blr_gen_id */ + } + +BURP_verbose (185, gen_name, (void*) value, NULL_PTR, NULL_PTR, NULL_PTR); +/* msg 185 restoring generator %s value: %ld */ + +isc_release_request (status_vector, + (void**) GDS_REF (gen_id_reqh)); +} + +static void stuff_string ( + SCHAR **ptr, + TEXT *string) +{ +/************************************** + * + * s t u f f _ s t r i n g + * + ************************************** + * + * Functional description + * Stuff a name input a BLR string -- byte count first. + * + **************************************/ +SCHAR *blr; + +blr = *ptr; +STUFF (strlen (string)); + +while (*string) + STUFF (*string++); + +*ptr = blr; +} + +static void update_global_field (void) +{ +/************************************** + * + * u p d a t e _ g l o b a l _ f i e l d + * + ************************************** + * + * Functional description + * Update the global field definition to add constraints. + * The blobs have been created already. + * + **************************************/ +GFLD n_gfld, gfld; +USHORT length; +UCHAR *p, *q; +isc_req_handle req_handle1 = NULL; +long req_status [20]; +TGBL tdgbl; + +tdgbl = GET_THREAD_DATA; + +for (gfld = tdgbl->gbl_global_fields; gfld; ) + { + FOR (TRANSACTION_HANDLE tdgbl->global_trans REQUEST_HANDLE req_handle1) + X IN RDB$FIELDS WITH X.RDB$FIELD_NAME EQ gfld->gfld_name + MODIFY X + + if (gfld->gfld_flags & GFLD_validation_blr) + { + X.RDB$VALIDATION_BLR.NULL = FALSE; + + if (length = sizeof (ISC_QUAD)) + { + p = (UCHAR *)&X.RDB$VALIDATION_BLR; + q = (UCHAR *)&gfld->gfld_vb; + + do *p++ = *q++; while (--length); + } + } + + if (gfld->gfld_flags & GFLD_validation_source) + { + X.RDB$VALIDATION_SOURCE.NULL = FALSE; + + if (length = sizeof (ISC_QUAD)) + { + p = (UCHAR *)&X.RDB$VALIDATION_SOURCE; + q = (UCHAR *)&gfld->gfld_vs; + + do *p++ = *q++; while (--length); + } + } + + if (gfld->gfld_flags & GFLD_validation_source2) + { + X.RDB$VALIDATION_SOURCE.NULL = FALSE; + + if (length = sizeof (ISC_QUAD)) + { + p = (UCHAR *)&X.RDB$VALIDATION_SOURCE; + q = (UCHAR *)&gfld->gfld_vs2; + + do *p++ = *q++; while (--length); + } + } + + END_MODIFY; + ON_ERROR + general_on_error (); + END_ERROR; + + END_FOR; + ON_ERROR + general_on_error (); + END_ERROR; + n_gfld = gfld->gfld_next; + BURP_FREE (gfld); + gfld = n_gfld; + } +if (req_handle1) + isc_release_request (req_status, &req_handle1); + +tdgbl->gbl_global_fields = (GFLD)0; +} + +static BOOLEAN bug_8183 ( + TGBL tdgbl) +{ +/************************************** + * + * b u g _ 8 1 8 3 + * + ************************************** + * + * Name: bug_8183 + * + * Function: Bug fix for bug_no 8183: It is a migration bug between IB3.3 + * and IB4.0. Gbak v4.0 can't restore database v3.3 if + * database has an index definition with comment field. + * It happens because of att_index_description2 attribute + * (which indicates that index contains a comment field + * and is equal 8 under IB3.3) accidently got new value 9 + * under IB4.0. + * At the same time, new attribute att_index_foreign_key + * has been added with value 8. Thus, when gbak v4.0 faces + * index attribute with value 8 during restore procedure of + * database v3.3, it will recognize this attribute as + * att_index_foreign_key instead of att_index_description2. + * + * This function is trying to recognize the next + * data in tdgbl->io_ptr buffer as either name of foreign + * key or comment field. Function returns TRUE in case of + * comment field, otherwise FALSE. + * + * Usage: result = bug_8183(tdgbl); + * + * Parameters: tdgbl - pointer to the structure of global switches + * and data + * + * Returns: result [TRUE/FALSE] + * + * Pre: gbak got an index attribute with value "8" from + * backup database. + * + * Post: none + * + * Remarks: For more information see bug_no 8183 + * + **************************************/ + +UCHAR tmp[sizeof(ULONG) + 1], *p; +USHORT io_cnt, i; +UCHAR *io_ptr; +ULONG len1, len2; +BOOLEAN result = FALSE; + + + io_cnt = tdgbl->io_cnt; + io_ptr = tdgbl->io_ptr; + + if ( io_cnt > 0 ) + { + len1 = len2 = *io_ptr++; + --io_cnt; + /* len1 can be either length of att_index_foreign_key OR quantity of byte + where seats length of att_index_description2. In case of + att_index_description2, len1 should be as even and no bigger + than sizeof(ULONG). Let's check it out */ + if ( (len1 % 2) == 0 && (len1 <= sizeof(ULONG)) ) + { + /* it still can be a foreign key; so + try to read it. Note: if internal buffer is over, then + we wan't read next block */ + + memset(tmp, '\0', sizeof(tmp)); + + p = tmp; + while (len1-- && io_cnt-- ) + *p++ = *io_ptr++; + + /* if read array is a foreign key then it should contain following chars + only : ['A'..'Z', '0'..'9', '_', '$'] */ + for ( p = tmp, i = 0; + *p && *p != ' ' && ((*p >= 'A' && *p <= 'Z') || (*p == '_') || + (*p >= '0' && *p <= '9') || (*p == '$')) ; + p++ ) + i++; + if ( (len2 - len1) != i ) + result = TRUE; + } + } + + return result; +} diff --git a/src/dsql/array.e b/src/dsql/array.epp similarity index 92% rename from src/dsql/array.e rename to src/dsql/array.epp index 00a69da5d2..8e661ab52c 100644 --- a/src/dsql/array.e +++ b/src/dsql/array.epp @@ -110,7 +110,7 @@ STATUS API_ROUTINE isc_array_get_slice(STATUS * status, return status[1]; isc_get_slice(status, db_handle, trans_handle, array_id, - sdl_length, sdl, 0, NULL_PTR, + sdl_length, sdl, 0, (ISC_LONG*) NULL_PTR, *slice_length, array, slice_length); if (sdl != sdl_buffer) @@ -176,7 +176,7 @@ STATUS API_ROUTINE isc_array_lookup_desc(STATUS * status, **************************************/ return lookup_desc(status, db_handle, trans_handle, - field_name, relation_name, desc, NULL_PTR); + field_name, relation_name, desc, (SCHAR*) NULL_PTR); } @@ -206,7 +206,7 @@ STATUS API_ROUTINE isc_array_put_slice(STATUS * status, return status[1]; isc_put_slice(status, db_handle, trans_handle, array_id, - sdl_length, sdl, 0, NULL_PTR, *slice_length, array); + sdl_length, sdl, 0, (ISC_LONG*) NULL_PTR, *slice_length, array); if (sdl != sdl_buffer) gds__free((SLONG *) sdl); @@ -268,9 +268,9 @@ STATUS API_ROUTINE isc_array_set_desc(STATUS * status, else if (dtype == SQL_QUAD) desc->array_desc_dtype = blr_quad; else - return error(status, 7, (STATUS) gds__sqlerr, + return error(status, 7, (STATUS) gds_sqlerr, (STATUS) gds_arg_number, (STATUS) - 804, - (STATUS) gds_arg_gds, (STATUS) gds__random, + (STATUS) gds_arg_gds, (STATUS) gds_random, (STATUS) gds_arg_string, (STATUS) "data type not understood"); @@ -367,7 +367,7 @@ static STATUS gen_sdl(STATUS * status, dimensions = desc->array_desc_dimensions; if (dimensions > 16) - return error(status, 5, (STATUS) gds__invalid_dimension, + return error(status, 5, (STATUS) gds_invalid_dimension, (STATUS) gds_arg_number, (STATUS) dimensions, (STATUS) gds_arg_number, (STATUS) 16); @@ -379,7 +379,7 @@ static STATUS gen_sdl(STATUS * status, gen->gen_internal = internal_flag ? 0 : -1; if (stuff - (gen, 4, gds__sdl_version1, gds__sdl_struct, 1, + (gen, 4, gds_sdl_version1, gds_sdl_struct, 1, desc->array_desc_dtype)) return status[1]; switch (desc->array_desc_dtype) { @@ -399,10 +399,10 @@ static STATUS gen_sdl(STATUS * status, break; } - if (stuff_string(gen, gds__sdl_relation, desc->array_desc_relation_name)) + if (stuff_string(gen, gds_sdl_relation, desc->array_desc_relation_name)) return status[1]; - if (stuff_string(gen, gds__sdl_field, desc->array_desc_field_name)) + if (stuff_string(gen, gds_sdl_field, desc->array_desc_field_name)) return status[1]; if (desc->array_desc_flags & ARRAY_DESC_COLUMN_MAJOR) { @@ -419,11 +419,11 @@ static STATUS gen_sdl(STATUS * status, for (n = from; n != to; n += increment) { tail = desc->array_desc_bounds + n; if (tail->array_bound_lower == 1) { - if (stuff(gen, 2, gds__sdl_do1, n)) + if (stuff(gen, 2, gds_sdl_do1, n)) return status[1]; } else { - if (stuff(gen, 2, gds__sdl_do2, n)) + if (stuff(gen, 2, gds_sdl_do2, n)) return status[1]; if (stuff_literal(gen, (SLONG) tail->array_bound_lower)) return status[1]; @@ -432,14 +432,14 @@ static STATUS gen_sdl(STATUS * status, return status[1]; } - if (stuff(gen, 5, gds__sdl_element, 1, gds__sdl_scalar, 0, dimensions)) + if (stuff(gen, 5, gds_sdl_element, 1, gds_sdl_scalar, 0, dimensions)) return status[1]; for (n = 0; n < dimensions; n++) - if (stuff(gen, 2, gds__sdl_variable, n)) + if (stuff(gen, 2, gds_sdl_variable, n)) return status[1]; - STUFF_SDL(gds__sdl_eoc); + STUFF_SDL(gds_sdl_eoc); *sdl_length = gen->gen_sdl - *gen->gen_sdl_ptr; return error(status, 1, (STATUS) SUCCESS); @@ -514,7 +514,7 @@ SCHAR * relation_name, ISC_ARRAY_DESC * desc, SCHAR * global) END_ERROR; if (!flag) - return error(status, 5, (STATUS) gds__fldnotdef, + return error(status, 5, (STATUS) gds_fldnotdef, (STATUS) gds_arg_string, (STATUS) desc->array_desc_field_name, (STATUS) gds_arg_string, @@ -542,7 +542,7 @@ static STATUS stuff( GEN gen, SSHORT count, ...) if (gen->gen_sdl + count >= gen->gen_end) { if (gen->gen_internal < 0) - return error(gen->gen_status, 3, (STATUS) gds__misc_interpreted, + return error(gen->gen_status, 3, (STATUS) gds_misc_interpreted, (STATUS) gds_arg_string, (STATUS) "SDL buffer overflow"); @@ -551,10 +551,10 @@ static STATUS stuff( GEN gen, SSHORT count, ...) new_len = gen->gen_end - *gen->gen_sdl_ptr + 512 + count; new_sdl = (SCHAR *) gds__alloc((SLONG) new_len); if (!new_sdl) - return error(gen->gen_status, 5, (STATUS) gds__misc_interpreted, + return error(gen->gen_status, 5, (STATUS) gds_misc_interpreted, (STATUS) gds_arg_string, (STATUS) "SDL buffer overflow", (STATUS) gds_arg_gds, - (STATUS) gds__virmemexh); + (STATUS) gds_virmemexh); current_len = gen->gen_sdl - *gen->gen_sdl_ptr; memcpy(new_sdl, *gen->gen_sdl_ptr, current_len); @@ -593,12 +593,12 @@ static STATUS stuff_literal( GEN gen, SLONG literal) status = gen->gen_status; if (literal >= -128 && literal <= 127) - return stuff(gen, 2, gds__sdl_tiny_integer, literal); + return stuff(gen, 2, gds_sdl_tiny_integer, literal); if (literal >= -32768 && literal <= 32767) - return stuff(gen, 3, gds__sdl_short_integer, literal, literal >> 8); + return stuff(gen, 3, gds_sdl_short_integer, literal, literal >> 8); - STUFF_SDL(gds__sdl_long_integer); + STUFF_SDL(gds_sdl_long_integer); STUFF_SDL_LONG(literal); return SUCCESS; diff --git a/src/dsql/blob.e b/src/dsql/blob.epp similarity index 98% rename from src/dsql/blob.e rename to src/dsql/blob.epp index f16124825e..9f34b40952 100644 --- a/src/dsql/blob.e +++ b/src/dsql/blob.epp @@ -84,7 +84,7 @@ USHORT bpb_buffer_length, UCHAR * bpb_buffer, USHORT * bpb_length) UCHAR *p; if (bpb_buffer_length < 17) - return error(status, 3, (STATUS) gds__random, + return error(status, 3, (STATUS) gds_random, (STATUS) gds_arg_string, (STATUS) "BPB buffer too small"); @@ -162,7 +162,7 @@ STATUS API_ROUTINE isc_blob_lookup_desc(STATUS * status, END_ERROR; if (!flag) - return error(status, 5, (STATUS) gds__fldnotdef, + return error(status, 5, (STATUS) gds_fldnotdef, (STATUS) gds_arg_string, (STATUS) desc->blob_desc_field_name, (STATUS) gds_arg_string, diff --git a/src/dsql/metd.e b/src/dsql/metd.epp similarity index 94% rename from src/dsql/metd.e rename to src/dsql/metd.epp index c06974a817..258272177d 100644 --- a/src/dsql/metd.e +++ b/src/dsql/metd.epp @@ -129,7 +129,7 @@ void METD_drop_procedure( REQ request, STR name) /* If the symbol wasn't defined, we've got nothing to do */ - symbol = HSHD_lookup(request->req_dbb, name->str_data, + symbol = HSHD_lookup(request->req_dbb, (TEXT*)name->str_data, name->str_length, SYM_procedure, 0); for (; symbol; symbol = symbol->sym_homonym) if ((symbol->sym_type == SYM_procedure) && @@ -144,7 +144,7 @@ void METD_drop_procedure( REQ request, STR name) /* mark other potential candidates as maybe dropped */ - HSHD_set_flag(request->req_dbb, name->str_data, name->str_length, + HSHD_set_flag(request->req_dbb, (TEXT*)name->str_data, name->str_length, SYM_procedure, PRC_dropped); METD_REC_UNLOCK; @@ -177,7 +177,7 @@ void METD_drop_relation( REQ request, STR name) /* If the symbol wasn't defined, we've got nothing to do */ - symbol = HSHD_lookup(request->req_dbb, name->str_data, + symbol = HSHD_lookup(request->req_dbb, (TEXT*)name->str_data, name->str_length, SYM_relation, 0); for (; symbol; symbol = symbol->sym_homonym) if ((symbol->sym_type == SYM_relation) && @@ -192,7 +192,7 @@ void METD_drop_relation( REQ request, STR name) /* mark other potential candidates as maybe dropped */ - HSHD_set_flag(request->req_dbb, name->str_data, name->str_length, + HSHD_set_flag(request->req_dbb, (TEXT*)name->str_data, name->str_length, SYM_relation, REL_dropped); METD_REC_UNLOCK; @@ -219,7 +219,7 @@ INTLSYM METD_get_collation(REQ request, STR name) /* Start by seeing if symbol is already defined */ - symbol = HSHD_lookup(request->req_dbb, name->str_data, + symbol = HSHD_lookup(request->req_dbb, (TEXT*)name->str_data, name->str_length, SYM_intlsym, 0); for (; symbol; symbol = symbol->sym_homonym) if ((symbol->sym_type == SYM_intlsym) && @@ -231,7 +231,7 @@ INTLSYM METD_get_collation(REQ request, STR name) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; iname = NULL; THREAD_EXIT; @@ -317,7 +317,7 @@ TEXT * buffer, USHORT buff_length) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; /* V4.x multi threading requirements */ THREAD_EXIT; @@ -345,8 +345,8 @@ TEXT * buffer, USHORT buff_length) if (*has_default) { /* open the blob */ THREAD_EXIT; - stat = isc_open_blob2(status_vect, &DB, &gds__trans, - &blob_handle, blob_id, sizeof(blr_bpb), + stat = isc_open_blob2(status_vect, (void**) &DB, (void**) &gds__trans, + (void**) &blob_handle, blob_id, sizeof(blr_bpb), (UCHAR*)blr_bpb); THREAD_ENTER; if (stat) @@ -364,7 +364,7 @@ TEXT * buffer, USHORT buff_length) if (!stat) continue; - else if (stat == gds__segstr_eof) { + else if (stat == gds_segstr_eof) { /* null terminate the buffer */ *ptr_in_buffer = 0; break; @@ -419,7 +419,7 @@ INTLSYM METD_get_charset(REQ request, USHORT length, UCHAR * name) /* Start by seeing if symbol is already defined */ - symbol = HSHD_lookup(request->req_dbb, name, length, SYM_intlsym, 0); + symbol = HSHD_lookup(request->req_dbb, (TEXT*) name, length, SYM_intlsym, 0); for (; symbol; symbol = symbol->sym_homonym) if ((symbol->sym_type == SYM_intlsym) && (((INTLSYM) (symbol->sym_object))->intlsym_type == @@ -430,7 +430,7 @@ INTLSYM METD_get_charset(REQ request, USHORT length, UCHAR * name) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; iname = NULL; THREAD_EXIT; @@ -447,7 +447,7 @@ INTLSYM METD_get_charset(REQ request, USHORT length, UCHAR * name) THREAD_ENTER; iname = (INTLSYM) ALLOCV(type_intlsym, dbb->dbb_pool, length); - strcpy(iname->intlsym_name, name); + strcpy(iname->intlsym_name, (char*) name); iname->intlsym_type = INTLSYM_charset; iname->intlsym_flags = 0; iname->intlsym_charset_id = X.RDB$CHARACTER_SET_ID; @@ -513,7 +513,7 @@ STR METD_get_default_charset(REQ request) /* Now see if it is in the database */ DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; handle = NULL_PTR; @@ -531,7 +531,7 @@ STR METD_get_default_charset(REQ request) dbb->dbb_dfl_charset = (STR) ALLOCV(type_str, dbb->dbb_pool, length); dbb->dbb_dfl_charset->str_length = length; dbb->dbb_dfl_charset->str_charset = NULL; - str = DBB.RDB$CHARACTER_SET_NAME; + str = (UCHAR*) DBB.RDB$CHARACTER_SET_NAME; for (p = dbb->dbb_dfl_charset->str_data; length; --length) *p++ = *str++; @@ -578,7 +578,7 @@ USHORT METD_get_domain(REQ request, FLD field, UCHAR * name) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; THREAD_EXIT; @@ -653,7 +653,7 @@ void METD_get_domain_default(REQ request, dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; /* V4.x multi threading requirements */ THREAD_EXIT; @@ -671,8 +671,8 @@ void METD_get_domain_default(REQ request, if (*has_default) { /* open the blob */ THREAD_EXIT; - stat = isc_open_blob2(status_vect, &DB, &gds__trans, - &blob_handle, blob_id, sizeof(blr_bpb), + stat = isc_open_blob2(status_vect, (void**) &DB, (void**) &gds__trans, + (void**) &blob_handle, blob_id, sizeof(blr_bpb), (UCHAR*)blr_bpb); THREAD_ENTER; if (stat) @@ -691,7 +691,7 @@ void METD_get_domain_default(REQ request, if (!stat) continue; - else if (stat == gds__segstr_eof) { + else if (stat == gds_segstr_eof) { /* null terminate the buffer */ *ptr_in_buffer = 0; break; @@ -751,7 +751,7 @@ UDF METD_get_function(REQ request, STR name) /* Start by seeing if symbol is already defined */ - symbol = HSHD_lookup(request->req_dbb, name->str_data, + symbol = HSHD_lookup(request->req_dbb, (TEXT*) name->str_data, name->str_length, SYM_udf, 0); if (symbol) return (UDF) symbol->sym_object; @@ -760,7 +760,7 @@ UDF METD_get_function(REQ request, STR name) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; udf = NULL; THREAD_EXIT; @@ -774,7 +774,7 @@ UDF METD_get_function(REQ request, STR name) udf = (UDF) ALLOCV(type_udf, dbb->dbb_pool, name->str_length); udf->udf_next = dbb->dbb_functions; dbb->dbb_functions = udf; - strcpy(udf->udf_name, (TEXT *) name->str_data); + strcpy((char*) udf->udf_name, (char*) name->str_data); return_arg = X.RDB$RETURN_ARGUMENT; THREAD_EXIT; @@ -891,7 +891,7 @@ NOD METD_get_primary_key(REQ request, STR relation_name) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; list = NULL; count = 0; @@ -954,7 +954,7 @@ PRC METD_get_procedure(REQ request, STR name) /* Start by seeing if symbol is already defined */ - symbol = HSHD_lookup(request->req_dbb, name->str_data, + symbol = HSHD_lookup(request->req_dbb, (TEXT*) name->str_data, name->str_length, SYM_procedure, 0); for (; symbol; symbol = symbol->sym_homonym) if ((symbol->sym_type == SYM_procedure) && @@ -967,7 +967,7 @@ PRC METD_get_procedure(REQ request, STR name) /* see if the procedure is the one currently being defined in this request */ if (((temp = request->req_procedure) != NULL) && - !strcmp(temp->prc_name, name->str_data)) { + !strcmp((char*) temp->prc_name, (char*) name->str_data)) { METD_REC_UNLOCK; return temp; } @@ -976,7 +976,7 @@ PRC METD_get_procedure(REQ request, STR name) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; procedure = NULL; THREAD_EXIT; @@ -1043,7 +1043,7 @@ PRC METD_get_procedure(REQ request, STR name) /* get parameter information */ - strcpy(parameter->fld_name, PR.RDB$PARAMETER_NAME); + strcpy(parameter->fld_name, (char*) PR.RDB$PARAMETER_NAME); parameter->fld_id = PR.RDB$PARAMETER_NUMBER; parameter->fld_length = RFR.RDB$FIELD_LENGTH; parameter->fld_scale = RFR.RDB$FIELD_SCALE; @@ -1084,7 +1084,7 @@ PRC METD_get_procedure(REQ request, STR name) * calls, another thread may have added the same procedure in the mean time */ - symbol = HSHD_lookup(request->req_dbb, name->str_data, + symbol = HSHD_lookup(request->req_dbb, (TEXT*) name->str_data, name->str_length, SYM_procedure, 0); for (; symbol; symbol = symbol->sym_homonym) if ((symbol->sym_type == SYM_procedure) && @@ -1147,7 +1147,7 @@ DSQL_REL METD_get_relation(REQ request, STR name) /* Start by seeing if symbol is already defined */ - symbol = HSHD_lookup(request->req_dbb, name->str_data, + symbol = HSHD_lookup(request->req_dbb, (TEXT*) name->str_data, name->str_length, SYM_relation, 0); for (; symbol; symbol = symbol->sym_homonym) if ((symbol->sym_type == SYM_relation) && @@ -1160,7 +1160,7 @@ DSQL_REL METD_get_relation(REQ request, STR name) /* see if the relation is the one currently being defined in this request */ if (((temp = request->req_relation) != NULL) && - !strcmp(temp->rel_name, name->str_data)) { + !strcmp((char*) temp->rel_name, (char*) name->str_data)) { METD_REC_UNLOCK; return temp; } @@ -1169,7 +1169,7 @@ DSQL_REL METD_get_relation(REQ request, STR name) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; relation = NULL; THREAD_EXIT; @@ -1253,7 +1253,7 @@ DSQL_REL METD_get_relation(REQ request, STR name) /* get field information */ - strcpy(field->fld_name, RFR.RDB$FIELD_NAME); + strcpy(field->fld_name, (char*) RFR.RDB$FIELD_NAME); field->fld_id = RFR.RDB$FIELD_ID; field->fld_length = FLX.RDB$FIELD_LENGTH; field->fld_scale = FLX.RDB$FIELD_SCALE; @@ -1305,7 +1305,7 @@ DSQL_REL METD_get_relation(REQ request, STR name) /* get field information */ - strcpy(field->fld_name, RFR.RDB$FIELD_NAME); + strcpy(field->fld_name, (char*) RFR.RDB$FIELD_NAME); field->fld_id = RFR.RDB$FIELD_ID; field->fld_length = FLX.RDB$FIELD_LENGTH; field->fld_scale = FLX.RDB$FIELD_SCALE; @@ -1352,7 +1352,7 @@ DSQL_REL METD_get_relation(REQ request, STR name) * another thread may have added the same table in the mean time */ - symbol = HSHD_lookup(request->req_dbb, name->str_data, + symbol = HSHD_lookup(request->req_dbb, (TEXT*) name->str_data, name->str_length, SYM_relation, 0); for (; symbol; symbol = symbol->sym_homonym) if ((symbol->sym_type == SYM_relation) && @@ -1404,7 +1404,7 @@ STR METD_get_trigger_relation(REQ request, STR name, USHORT * trig_type) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; relation = NULL; @@ -1416,7 +1416,7 @@ STR METD_get_trigger_relation(REQ request, STR name, USHORT * trig_type) metd_exact_name(X.RDB$RELATION_NAME); - relation = MAKE_string(X.RDB$RELATION_NAME, strlen(X.RDB$RELATION_NAME)); + relation = MAKE_string((UCHAR*) X.RDB$RELATION_NAME, strlen(X.RDB$RELATION_NAME)); *trig_type = X.RDB$TRIGGER_TYPE; THREAD_EXIT; @@ -1449,7 +1449,7 @@ USHORT METD_get_type(REQ request, STR name, UCHAR * field, SSHORT * value) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; found = FALSE; @@ -1499,7 +1499,7 @@ DSQL_REL METD_get_view_relation(REQ request, dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; relation = NULL; @@ -1513,9 +1513,9 @@ DSQL_REL METD_get_view_relation(REQ request, metd_exact_name(X.RDB$CONTEXT_NAME); metd_exact_name(X.RDB$RELATION_NAME); - if (!strcmp(X.RDB$RELATION_NAME, relation_or_alias) || - !strcmp(X.RDB$CONTEXT_NAME, relation_or_alias)) { - relation_name = MAKE_string(X.RDB$RELATION_NAME, + if (!strcmp((char*) X.RDB$RELATION_NAME, (char*) relation_or_alias) || + !strcmp((char*) X.RDB$CONTEXT_NAME, (char*) relation_or_alias)) { + relation_name = MAKE_string((UCHAR*) X.RDB$RELATION_NAME, strlen(X.RDB$RELATION_NAME)); relation = METD_get_relation(request, relation_name); ALLD_release((FRB)relation_name); @@ -1523,7 +1523,7 @@ DSQL_REL METD_get_view_relation(REQ request, } if (relation = - METD_get_view_relation(request, X.RDB$RELATION_NAME, + METD_get_view_relation(request, (UCHAR*) X.RDB$RELATION_NAME, relation_or_alias, (USHORT)level + 1)) return relation; @@ -1558,7 +1558,7 @@ static void check_array( REQ request, TEXT * field_name, FLD field) dbb = request->req_dbb; DB = dbb->dbb_database_handle; - gds__trans = request->req_trans; + gds__trans = (SLONG*) request->req_trans; THREAD_EXIT; diff --git a/src/dudley/exe.e b/src/dudley/exe.epp similarity index 88% rename from src/dudley/exe.e rename to src/dudley/exe.epp index 46137cdb56..2b60301f7f 100644 --- a/src/dudley/exe.e +++ b/src/dudley/exe.epp @@ -38,6 +38,10 @@ #include "../jrd/isc_f_proto.h" #include "../wal/walf_proto.h" +#ifdef HAVE_UNISTD_H +#include +#endif + #ifdef WIN_NT #include #endif @@ -119,16 +123,16 @@ static void wal_info(UCHAR *, SLONG *, SCHAR *, SLONG *); static GDS__QUAD null_blob; static LLS files_to_delete = (LLS) NULL; -static TEXT alloc_info[] = { gds__info_allocation, gds__info_end }; +static TEXT alloc_info[] = { gds_info_allocation, gds_info_end }; #define CMP_SYMBOL(sym1, sym2) strcmp (sym1->sym_string, sym2->sym_string) #define MOVE_SYMBOL(symbol, field) move_symbol (symbol, field, sizeof (field) - 1) static SCHAR db_info[] = { - gds__info_logfile, - gds__info_cur_logfile_name, - gds__info_cur_log_part_offset + gds_info_logfile, + gds_info_cur_logfile_name, + gds_info_cur_log_part_offset }; /* #define DEBUG 1 @@ -188,17 +192,17 @@ void EXE_create_database( DBB dbb) dpb_length = 0; d = dpb; - *d++ = gds__dpb_version1; + *d++ = gds_dpb_version1; if (p = DDL_default_user) { - *d++ = gds__dpb_user_name; + *d++ = gds_dpb_user_name; *d++ = strlen(p); while (*p) *d++ = *p++; } if (p = DDL_default_password) { - *d++ = gds__dpb_password; + *d++ = gds_dpb_password; *d++ = strlen(p); while (*p) *d++ = *p++; @@ -210,11 +214,11 @@ void EXE_create_database( DBB dbb) file_name = dbb->dbb_name->sym_string; - result = gds__attach_database(gds__status, 0, GDS_VAL(file_name), + result = gds__attach_database(gds_status, 0, GDS_VAL(file_name), GDS_REF(DB), dpb_length, dpb); if (!DDL_replace) { if (!result) { - gds__detach_database(gds__status, GDS_REF(DB)); + gds__detach_database(gds_status, GDS_REF(DB)); DDL_msg_put(18, file_name, NULL, NULL, NULL, NULL); /* msg 18: Database \"%s\" already exists */ if (DDL_interactive) { DDL_msg_partial(19, NULL, NULL, NULL, NULL, NULL); /* msg 19: Do you want to replace it? */ @@ -224,15 +228,15 @@ void EXE_create_database( DBB dbb) else DDL_exit(FINI_ERROR); } - else if (gds__status[1] != gds__io_error) - DDL_error_abort(gds__status, 20, file_name, NULL, NULL, NULL, NULL); /* msg 20: Database \"%s\" exists but can't be opened */ + else if (gds_status[1] != gds_io_error) + DDL_error_abort(gds_status, 20, file_name, NULL, NULL, NULL, NULL); /* msg 20: Database \"%s\" exists but can't be opened */ } else { /* replacing the database so try to drop it first. */ if (!result) { - isc_drop_database(gds__status, &DB); + isc_drop_database(gds_status, &DB); if (DB) - isc_detach_database(gds__status, &DB); + isc_detach_database(gds_status, &DB); } } @@ -241,7 +245,7 @@ void EXE_create_database( DBB dbb) if (dbb->dbb_page_size) { page_size = MAX(dbb->dbb_page_size, 1024); - *d++ = gds__dpb_page_size; + *d++ = gds_dpb_page_size; *d++ = 2; *d++ = page_size; *d++ = page_size >> 8; @@ -249,28 +253,28 @@ void EXE_create_database( DBB dbb) } if (llen = dbb->dbb_chkptlen) { - *d++ = gds__dpb_wal_chkptlen; + *d++ = gds_dpb_wal_chkptlen; *d++ = 4; for (len = 0; len < 4; len++, llen = llen >> 8) *d++ = llen; } if (len = dbb->dbb_numbufs) { - *d++ = gds__dpb_wal_numbufs; + *d++ = gds_dpb_wal_numbufs; *d++ = 2; *d++ = len; *d++ = len >> 8; } if (len = dbb->dbb_bufsize) { - *d++ = gds__dpb_wal_bufsize; + *d++ = gds_dpb_wal_bufsize; *d++ = 2; *d++ = len; *d++ = len >> 8; } if ((llen = dbb->dbb_grp_cmt_wait) >= 0) { - *d++ = gds__dpb_wal_grp_cmt_wait; + *d++ = gds_dpb_wal_grp_cmt_wait; *d++ = 4; for (len = 0; len < 4; len++, llen = llen >> 8) *d++ = llen; @@ -280,14 +284,14 @@ void EXE_create_database( DBB dbb) if (dpb_length == 1) dpb_length = 0; - if (gds__create_database(gds__status, + if (gds__create_database(gds_status, 0, GDS_VAL(file_name), GDS_REF(DB), dpb_length, dpb, 0)) - DDL_error_abort(gds__status, 21, file_name, NULL, NULL, NULL, NULL); /* msg 21: Couldn't create database \"%s\" */ + DDL_error_abort(gds_status, 21, file_name, NULL, NULL, NULL, NULL); /* msg 21: Couldn't create database \"%s\" */ if (DDL_version) { DDL_msg_put(23, file_name, NULL, NULL, NULL, NULL); /* msg 23: Version(s) for database \"%s\" */ @@ -299,11 +303,11 @@ void EXE_create_database( DBB dbb) ods_version = EXE_check_db_version(dbb); if (ods_version < DB_VERSION_DDL6) - DDL_error_abort(NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); /* msg 32: database version is too old to modify: + DDL_error_abort((STATUS*) NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); /* msg 32: database version is too old to modify: use GBAK first */ - dbb->dbb_handle = DB; - dbb->dbb_transaction = gds__trans; + dbb->dbb_handle = (SLONG*) DB; + dbb->dbb_transaction = (SLONG*) gds_trans; /* Don't allow cache and WAL configurations for pre-ODS8 databases */ @@ -311,7 +315,7 @@ void EXE_create_database( DBB dbb) if ((dbb->dbb_flags & DBB_log_default) || (dbb->dbb_logfiles) || (dbb->dbb_cache_file)) -DDL_error_abort(NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); +DDL_error_abort((STATUS*) NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); /* msg 32: database version is too old to modify: use GBAK first */ } @@ -329,7 +333,7 @@ DDL_error_abort(NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); FOR D IN RDB$DATABASE MODIFY D USING if (dbb->dbb_description) { - store_text(dbb->dbb_description, &D.RDB$DESCRIPTION); + store_text(dbb->dbb_description,(SLONG*) &D.RDB$DESCRIPTION); D.RDB$DESCRIPTION.NULL = FALSE; } if (dbb->dbb_security_class) { @@ -347,17 +351,17 @@ DDL_error_abort(NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); if ((dbb->dbb_flags & DBB_log_default) || (dbb->dbb_logfiles)) { /* setup enough information to drop log files created */ - if (gds__database_info(gds__status, + if (gds__database_info(gds_status, GDS_REF(DB), sizeof(db_info), db_info, sizeof(db_info_buffer), db_info_buffer)) - DDL_error_abort(gds__status, 327, NULL, NULL, NULL, NULL, NULL); /* msg 327: error in getting write ahead log information */ + DDL_error_abort(gds_status, 327, NULL, NULL, NULL, NULL, NULL); /* msg 327: error in getting write ahead log information */ log = 0; - wal_info(db_info_buffer, &log, cur_log, &part_offset); + wal_info((UCHAR*) db_info_buffer, &log, cur_log, &part_offset); if (log) get_log_names_serial(&dbb->dbb_files); @@ -393,17 +397,17 @@ void EXE_drop_database( DBB dbb) dpb_length = 0; d = dpb; - *d++ = gds__dpb_version1; + *d++ = gds_dpb_version1; if (p = DDL_default_user) { - *d++ = gds__dpb_user_name; + *d++ = gds_dpb_user_name; *d++ = strlen(p); while (*p) *d++ = *p++; } if (p = DDL_default_password) { - *d++ = gds__dpb_password; + *d++ = gds_dpb_password; *d++ = strlen(p); while (*p) *d++ = *p++; @@ -413,39 +417,39 @@ void EXE_drop_database( DBB dbb) if (dpb_length == 1) dpb_length = 0; - if (gds__attach_database(gds__status, + if (gds__attach_database(gds_status, 0, GDS_VAL(dbb->dbb_name->sym_string), GDS_REF(DB), dpb_length, dpb)) - DDL_error_abort(gds__status, 25, NULL, NULL, NULL, NULL, NULL); /* msg 25: Couldn't locate database */ + DDL_error_abort(gds_status, 25, NULL, NULL, NULL, NULL, NULL); /* msg 25: Couldn't locate database */ START_TRANSACTION; FOR F IN RDB$FILES SORTED BY F.RDB$FILE_START - alloc_file_name(&dbb->dbb_files, F.RDB$FILE_NAME); + alloc_file_name(&dbb->dbb_files, (UCHAR*) F.RDB$FILE_NAME); END_FOR; - COMMIT ON_ERROR DDL_db_error(gds__status, 26, NULL, NULL, NULL, NULL, NULL); /* msg 26: error commiting metadata changes */ + COMMIT ON_ERROR DDL_db_error(gds_status, 26, NULL, NULL, NULL, NULL, NULL); /* msg 26: error commiting metadata changes */ ROLLBACK; END_ERROR; - if (gds__database_info(gds__status, + if (gds__database_info(gds_status, GDS_REF(DB), sizeof(db_info), db_info, sizeof(db_info_buffer), db_info_buffer)) - DDL_error_abort(gds__status, 327, NULL, NULL, NULL, NULL, NULL); /* msg 327: error in getting write ahead log information */ + DDL_error_abort(gds_status, 327, NULL, NULL, NULL, NULL, NULL); /* msg 327: error in getting write ahead log information */ - wal_info(db_info_buffer, &log, cur_log, &part_offset); + wal_info((UCHAR*) db_info_buffer, &log, cur_log, &part_offset); if (log) get_log_names_serial(&dbb->dbb_files); - if (gds__detach_database(gds__status, GDS_REF(DB))) - DDL_error_abort(gds__status, 27, NULL, NULL, NULL, NULL, NULL); /* msg 27: Couldn't release database */ + if (gds__detach_database(gds_status, GDS_REF(DB))) + DDL_error_abort(gds_status, 27, NULL, NULL, NULL, NULL, NULL); /* msg 27: Couldn't release database */ if (log) { get_log_names(dbb->dbb_name->sym_string, &dbb->dbb_files, cur_log, @@ -454,11 +458,11 @@ void EXE_drop_database( DBB dbb) for (file = dbb->dbb_files; file; file = file->fil_next) if (unlink(file->fil_name->sym_name)) - DDL_error_abort(NULL_PTR, 28, file->fil_name->sym_name, NULL, + DDL_error_abort((STATUS*) NULL_PTR, 28, file->fil_name->sym_name, NULL, NULL, NULL, NULL); /* msg 28: Could not delete file %s */ if (unlink(dbb->dbb_name->sym_string)) - DDL_error_abort(NULL_PTR, 28, dbb->dbb_name->sym_string, NULL, NULL, + DDL_error_abort((STATUS*) NULL_PTR, 28, dbb->dbb_name->sym_string, NULL, NULL, NULL, NULL); /* msg 28: Could not delete file %s */ } @@ -485,7 +489,7 @@ void EXE_execute(void) return; if (!DB) - DDL_error_abort(NULL_PTR, 33, NULL, NULL, NULL, NULL, NULL); /* msg 33: no database specified */ + DDL_error_abort((STATUS*) NULL_PTR, 33, NULL, NULL, NULL, NULL, NULL); /* msg 33: no database specified */ for (action = DDL_actions; action; action = action->act_next) if (!(action->act_flags & ACT_ignore)) { @@ -496,127 +500,127 @@ void EXE_execute(void) break; case act_a_field: - add_field(action->act_object); + add_field((FLD) action->act_object); break; case act_m_field: - modify_field(action->act_object); + modify_field((FLD) action->act_object); break; case act_d_field: - drop_field(action->act_object); + drop_field((FLD) action->act_object); break; case act_a_filter: - add_filter(action->act_object); + add_filter((FILTER) action->act_object); break; case act_d_filter: - drop_filter(action->act_object); + drop_filter((FILTER) action->act_object); break; case act_a_function: - add_function(action->act_object); + add_function((FUNC) action->act_object); break; case act_a_function_arg: - add_function_arg(action->act_object); + add_function_arg((FUNCARG) action->act_object); break; case act_d_function: - drop_function(action->act_object); + drop_function((FUNC) action->act_object); break; case act_a_gfield: - add_global_field(action->act_object); + add_global_field((FLD) action->act_object); break; case act_m_gfield: - modify_global_field(action->act_object); + modify_global_field((FLD) action->act_object); break; case act_d_gfield: - drop_global_field(action->act_object); + drop_global_field((FLD) action->act_object); break; case act_a_index: - add_index(action->act_object); + add_index((DUDLEY_IDX) action->act_object); break; case act_m_index: - modify_index(action->act_object); + modify_index((DUDLEY_IDX) action->act_object); break; case act_d_index: - drop_index(action->act_object); + drop_index((DUDLEY_IDX) action->act_object); break; case act_a_relation: - add_relation(action->act_object); + add_relation((REL) action->act_object); break; case act_m_relation: - modify_relation(action->act_object); + modify_relation((REL) action->act_object); break; case act_d_relation: - drop_relation(action->act_object); + drop_relation((REL) action->act_object); break; case act_a_security: - add_security_class(action->act_object); + add_security_class((SCL) action->act_object); break; case act_d_security: - drop_security_class(action->act_object); + drop_security_class((SCL) action->act_object); break; case act_a_trigger: - add_trigger(action->act_object); + add_trigger((TRG) action->act_object); break; case act_m_trigger: - modify_trigger(action->act_object); + modify_trigger((TRG) action->act_object); break; case act_d_trigger: - drop_trigger(action->act_object); + drop_trigger((TRG) action->act_object); break; case act_a_trigger_msg: - add_trigger_msg(action->act_object); + add_trigger_msg((TRGMSG) action->act_object); break; case act_m_trigger_msg: - modify_trigger_msg(action->act_object); + modify_trigger_msg((TRGMSG) action->act_object); break; case act_d_trigger_msg: - drop_trigger_msg(action->act_object); + drop_trigger_msg((TRGMSG) action->act_object); break; case act_a_type: - add_type(action->act_object); + add_type((TYP) action->act_object); break; case act_m_type: - modify_type(action->act_object); + modify_type((TYP) action->act_object); break; case act_d_type: - drop_type(action->act_object); + drop_type((TYP) action->act_object); break; case act_grant: - add_user_privilege(action->act_object); + add_user_privilege((USERPRIV) action->act_object); break; case act_revoke: - drop_user_privilege(action->act_object); + drop_user_privilege((USERPRIV) action->act_object); break; case act_a_shadow: - add_files(NULL_PTR, action->act_object); + add_files((DBB) NULL_PTR, (FIL) action->act_object); break; case act_d_shadow: @@ -624,11 +628,11 @@ void EXE_execute(void) break; case act_a_generator: - add_generator(action->act_object); + add_generator((SYM) action->act_object); break; case act_s_generator: - set_generator(action->act_object); + set_generator((NOD) action->act_object); break; default: @@ -657,16 +661,16 @@ void EXE_fini( DBB dbb) if (DDL_errors) { if (dbb && (dbb->dbb_flags & DBB_create_database)) { FOR F IN RDB$FILES WITH F.RDB$SHADOW_NUMBER NE 0 - alloc_file_name(&dbb->dbb_files, F.RDB$FILE_NAME); + alloc_file_name(&dbb->dbb_files, (UCHAR*)F.RDB$FILE_NAME); END_FOR; } ROLLBACK - ON_ERROR DDL_db_error(gds__status, 35, NULL, NULL, NULL, NULL, NULL); /* msg 35: error rolling back metadata changes */ + ON_ERROR DDL_db_error(gds_status, 35, NULL, NULL, NULL, NULL, NULL); /* msg 35: error rolling back metadata changes */ END_ERROR} else { COMMIT - ON_ERROR DDL_db_error(gds__status, 36, NULL, NULL, NULL, NULL, NULL); /* msg 36: error commiting metadata changes */ + ON_ERROR DDL_db_error(gds_status, 36, NULL, NULL, NULL, NULL, NULL); /* msg 36: error commiting metadata changes */ ROLLBACK; END_ERROR} FINISH; @@ -705,51 +709,51 @@ void EXE_modify_database( DBB dbb) dpb_length = 0; d = dpb; - *d++ = gds__dpb_version1; + *d++ = gds_dpb_version1; if (p = DDL_default_user) { - *d++ = gds__dpb_user_name; + *d++ = gds_dpb_user_name; *d++ = strlen(p); while (*p) *d++ = *p++; } if (p = DDL_default_password) { - *d++ = gds__dpb_password; + *d++ = gds_dpb_password; *d++ = strlen(p); while (*p) *d++ = *p++; } if (dbb->dbb_flags & DBB_drop_log) { - *d++ = gds__dpb_drop_walfile; + *d++ = gds_dpb_drop_walfile; *d++ = 1; *d++ = 1; } if (llen = dbb->dbb_chkptlen) { - *d++ = gds__dpb_wal_chkptlen; + *d++ = gds_dpb_wal_chkptlen; *d++ = 4; for (len = 0; len < 4; len++, llen = llen >> 8) *d++ = llen; } if (len = dbb->dbb_numbufs) { - *d++ = gds__dpb_wal_numbufs; + *d++ = gds_dpb_wal_numbufs; *d++ = 2; *d++ = len; *d++ = len >> 8; } if (len = dbb->dbb_bufsize) { - *d++ = gds__dpb_wal_bufsize; + *d++ = gds_dpb_wal_bufsize; *d++ = 2; *d++ = len; *d++ = len >> 8; } if ((llen = dbb->dbb_grp_cmt_wait) >= 0) { - *d++ = gds__dpb_wal_grp_cmt_wait; + *d++ = gds_dpb_wal_grp_cmt_wait; *d++ = 4; for (len = 0; len < 4; len++, llen = llen >> 8) *d++ = llen; @@ -759,12 +763,12 @@ void EXE_modify_database( DBB dbb) if (dpb_length == 1) dpb_length = 0; - if (gds__attach_database(gds__status, 0, + if (gds__attach_database(gds_status, 0, GDS_VAL(dbb->dbb_name->sym_string), GDS_REF(DB), dpb_length, dpb)) - DDL_error_abort(gds__status, 29, dbb->dbb_name->sym_string, NULL, + DDL_error_abort(gds_status, 29, dbb->dbb_name->sym_string, NULL, NULL, NULL, NULL); /* msg 29: Couldn't attach database */ if (DDL_version) { @@ -777,7 +781,7 @@ void EXE_modify_database( DBB dbb) ods_version = EXE_check_db_version(dbb); if (ods_version < DB_VERSION_DDL6) - DDL_error_abort(NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); /* msg 32: database version is too old to modify: + DDL_error_abort((STATUS*)NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); /* msg 32: database version is too old to modify: use GBAK first */ /* Don't allow cache and WAL configurations for pre-ODS8 databases */ @@ -787,35 +791,35 @@ void EXE_modify_database( DBB dbb) (dbb->dbb_logfiles) || (dbb->dbb_flags && DBB_drop_log) || (dbb->dbb_cache_file) || (dbb->dbb_flags & DBB_drop_cache)) - DDL_error_abort(NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); + DDL_error_abort((STATUS*)NULL_PTR, 32, NULL, NULL, NULL, NULL, NULL); /* msg 32: database version is too old to modify: use GBAK first */ } - dbb->dbb_handle = DB; - dbb->dbb_transaction = gds__trans; + dbb->dbb_handle = (SLONG*) DB; + dbb->dbb_transaction = (SLONG*) gds_trans; /* erase log files and commit transaction */ if (dbb->dbb_flags & DBB_drop_log) { - if (gds__database_info(gds__status, + if (gds__database_info(gds_status, GDS_REF(DB), sizeof(db_info), db_info, sizeof(db_info_buffer), db_info_buffer)) - DDL_error_abort(gds__status, 327, NULL, NULL, NULL, NULL, NULL); /* msg 327: error in getting write ahead log information */ + DDL_error_abort(gds_status, 327, NULL, NULL, NULL, NULL, NULL); /* msg 327: error in getting write ahead log information */ log_files = (FIL) NULL; log = 0; - wal_info(db_info_buffer, &log, cur_log, &part_offset); + wal_info((UCHAR*) db_info_buffer, &log, cur_log, &part_offset); if (log) get_log_names_serial(&log_files); FOR X IN RDB$LOG_FILES ERASE X; END_FOR; - COMMIT ON_ERROR DDL_db_error(gds__status, 321, NULL, NULL, NULL, NULL, NULL); /* msg 321: error commiting new write ahead log declarations */ + COMMIT ON_ERROR DDL_db_error(gds_status, 321, NULL, NULL, NULL, NULL, NULL); /* msg 321: error commiting new write ahead log declarations */ ROLLBACK; END_ERROR; START_TRANSACTION; @@ -827,7 +831,7 @@ void EXE_modify_database( DBB dbb) for (file = log_files; file; file = file->fil_next) if (unlink(file->fil_name->sym_name)) - DDL_error_abort(NULL_PTR, 28, file->fil_name->sym_name, NULL, + DDL_error_abort((STATUS*) NULL_PTR, 28, file->fil_name->sym_name, NULL, NULL, NULL, NULL); /* msg 28: Could not delete file %s */ } @@ -846,7 +850,7 @@ void EXE_modify_database( DBB dbb) /* check if log files exist */ FOR X IN RDB$LOG_FILES - DDL_error_abort(NULL_PTR, 333, NULL, NULL, NULL, NULL, NULL); /* msg 333: Cannot modify log file specification. Drop and redefine log files */ + DDL_error_abort((STATUS*) NULL_PTR, 333, NULL, NULL, NULL, NULL, NULL); /* msg 333: Cannot modify log file specification. Drop and redefine log files */ END_FOR; /* add the new log files. */ @@ -855,7 +859,7 @@ void EXE_modify_database( DBB dbb) /* commit log file changes */ - COMMIT ON_ERROR DDL_db_error(gds__status, 321, NULL, NULL, NULL, NULL, NULL); /* msg 321: error commiting new write ahead log declarations */ + COMMIT ON_ERROR DDL_db_error(gds_status, 321, NULL, NULL, NULL, NULL, NULL); /* msg 321: error commiting new write ahead log declarations */ ROLLBACK; END_ERROR; START_TRANSACTION; @@ -870,7 +874,7 @@ void EXE_modify_database( DBB dbb) if (dbb->dbb_flags & DBB_null_description) D.RDB$DESCRIPTION.NULL = TRUE; if (dbb->dbb_description) { - store_text(dbb->dbb_description, &D.RDB$DESCRIPTION); + store_text(dbb->dbb_description, (SLONG*) &D.RDB$DESCRIPTION); D.RDB$DESCRIPTION.NULL = FALSE; } if (dbb->dbb_security_class) { @@ -957,7 +961,7 @@ static void add_cache( DBB dbb) /* Unless there are errors, commit the new shared cache immediately! */ if (!DDL_errors) { - COMMIT ON_ERROR DDL_db_error(gds__status, 324, NULL, NULL, NULL, NULL, NULL); /* msg 324: error commiting new shared cache declaration */ + COMMIT ON_ERROR DDL_db_error(gds_status, 324, NULL, NULL, NULL, NULL, NULL); /* msg 324: error commiting new shared cache declaration */ ROLLBACK; END_ERROR; START_TRANSACTION; @@ -1017,7 +1021,7 @@ static void add_field( FLD field) X.RDB$QUERY_NAME.NULL = FALSE; } if (field->fld_description) { - store_text(field->fld_description, &X.RDB$DESCRIPTION); + store_text(field->fld_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } if (field->fld_edit_string) { @@ -1026,7 +1030,7 @@ static void add_field( FLD field) } if (field->fld_query_header) { X.RDB$QUERY_HEADER.NULL = FALSE; - store_query_header(field->fld_query_header, &X.RDB$QUERY_HEADER); + store_query_header(field->fld_query_header, (SLONG*) &X.RDB$QUERY_HEADER); } if (field->fld_system) X.RDB$SYSTEM_FLAG = field->fld_system; @@ -1067,16 +1071,16 @@ static void add_files( DBB dbb, FIL files) against the user given maximum length (if given). */ if (dbb) { - if (gds__database_info(gds__status, + if (gds__database_info(gds_status, GDS_REF(DB), sizeof(alloc_info), alloc_info, sizeof(s), s) || - s[0] != gds__info_allocation) DDL_err(38, NULL, NULL, NULL, NULL, NULL); /* msg 38: gds__database_info failed */ + s[0] != gds_info_allocation) DDL_err(38, NULL, NULL, NULL, NULL, NULL); /* msg 38: gds__database_info failed */ - length = gds__vax_integer(s + 1, 2); - start = gds__vax_integer(s + 3, length); + length = gds__vax_integer((UCHAR*) s + 1, 2); + start = gds__vax_integer((UCHAR*) s + 3, length); length = (dbb->dbb_length) ? dbb->dbb_length + 1 : 0; start = MAX(start, length); @@ -1110,7 +1114,7 @@ static void add_files( DBB dbb, FIL files) /* Unless there are errors floating around, commit the new file immediately! */ if (!DDL_errors) { - COMMIT ON_ERROR DDL_db_error(gds__status, 40, NULL, NULL, NULL, NULL, NULL); /* msg 40: error commiting new file declarations */ + COMMIT ON_ERROR DDL_db_error(gds_status, 40, NULL, NULL, NULL, NULL, NULL); /* msg 40: error commiting new file declarations */ ROLLBACK; END_ERROR; START_TRANSACTION; @@ -1143,7 +1147,7 @@ static void add_filter( FILTER filter) } MOVE_SYMBOL(filter->filter_entry_point, X.RDB$ENTRYPOINT); if (filter->filter_description) { - store_text(filter->filter_description, &X.RDB$DESCRIPTION); + store_text(filter->filter_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } END_STORE; @@ -1183,7 +1187,7 @@ static void add_function( FUNC function) } MOVE_SYMBOL(function->func_entry_point, X.RDB$ENTRYPOINT); if (function->func_description) { - store_text(function->func_description, &X.RDB$DESCRIPTION); + store_text(function->func_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } X.RDB$RETURN_ARGUMENT = function->func_return_arg; @@ -1274,8 +1278,8 @@ static void add_global_field( FLD field) X.RDB$DEFAULT_VALUE.NULL = TRUE; if (field->fld_computed) { - store_blr(field->fld_computed, &X.RDB$COMPUTED_BLR, NULL); - store_text(field->fld_compute_src, &X.RDB$COMPUTED_SOURCE); + store_blr(field->fld_computed, (SLONG*) &X.RDB$COMPUTED_BLR, NULL); + store_text(field->fld_compute_src, (SLONG*) &X.RDB$COMPUTED_SOURCE); X.RDB$COMPUTED_BLR.NULL = FALSE; X.RDB$COMPUTED_SOURCE.NULL = FALSE; if (!field->fld_dtype) { @@ -1295,7 +1299,7 @@ static void add_global_field( FLD field) } if (field->fld_default) { - store_blr(field->fld_default, &X.RDB$DEFAULT_VALUE, NULL); + store_blr(field->fld_default, (SLONG*) &X.RDB$DEFAULT_VALUE, NULL); X.RDB$DEFAULT_VALUE.NULL = FALSE; } @@ -1311,17 +1315,17 @@ static void add_global_field( FLD field) X.RDB$SEGMENT_LENGTH.NULL = FALSE; } if (field->fld_missing) { - store_blr(field->fld_missing, &X.RDB$MISSING_VALUE, NULL); + store_blr(field->fld_missing, (SLONG*) &X.RDB$MISSING_VALUE, NULL); X.RDB$MISSING_VALUE.NULL = FALSE; } if (field->fld_validation) { - store_blr(field->fld_validation, &X.RDB$VALIDATION_BLR, NULL); - store_text(field->fld_valid_src, &X.RDB$VALIDATION_SOURCE); + store_blr(field->fld_validation, (SLONG*) &X.RDB$VALIDATION_BLR, NULL); + store_text(field->fld_valid_src, (SLONG*) &X.RDB$VALIDATION_SOURCE); X.RDB$VALIDATION_BLR.NULL = FALSE; X.RDB$VALIDATION_SOURCE.NULL = FALSE; } if (field->fld_description) { - store_text(field->fld_description, &X.RDB$DESCRIPTION); + store_text(field->fld_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } if (field->fld_query_name) { @@ -1334,7 +1338,7 @@ static void add_global_field( FLD field) } if (field->fld_query_header) { X.RDB$QUERY_HEADER.NULL = FALSE; - store_query_header(field->fld_query_header, &X.RDB$QUERY_HEADER); + store_query_header(field->fld_query_header, (SLONG*) &X.RDB$QUERY_HEADER); } if (field->fld_dimension) { @@ -1431,18 +1435,18 @@ static void add_index( DUDLEY_IDX index) else X.RDB$INDEX_TYPE.NULL = TRUE; if (index->idx_description) { - store_text(index->idx_description, &X.RDB$DESCRIPTION); + store_text(index->idx_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } else X.RDB$DESCRIPTION.NULL = TRUE; - END_STORE ON_ERROR if (gds__status[1] == gds__no_dup) { + END_STORE ON_ERROR if (gds_status[1] == gds_no_dup) { DDL_err(47, index->idx_name->sym_string, NULL, NULL, NULL, NULL); /* msg 47: index %s already exists */ return; } { - DDL_db_error(gds__status, 48, index->idx_name->sym_string, NULL, NULL, + DDL_db_error(gds_status, 48, index->idx_name->sym_string, NULL, NULL, NULL, NULL); /* msg 48: error creating index %s */ return; @@ -1528,7 +1532,7 @@ static void add_log_files( DBB dbb) /* Unless there were errors , commit immediately! */ if (!DDL_errors) { - COMMIT ON_ERROR DDL_db_error(gds__status, 321, NULL, NULL, NULL, NULL, NULL); /* msg 321: error commiting new write ahead log declarations */ + COMMIT ON_ERROR DDL_db_error(gds_status, 321, NULL, NULL, NULL, NULL, NULL); /* msg 321: error commiting new write ahead log declarations */ ROLLBACK; END_ERROR; START_TRANSACTION; @@ -1575,7 +1579,7 @@ static void add_relation( REL relation) MOVE_SYMBOL(relation->rel_name, X.RDB$RELATION_NAME); if (relation->rel_description) { - store_text(relation->rel_description, &X.RDB$DESCRIPTION); + store_text(relation->rel_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } @@ -1585,7 +1589,7 @@ static void add_relation( REL relation) } -static void add_security_class( SCL class) +static void add_security_class( SCL sec_class) { /************************************** * @@ -1600,7 +1604,7 @@ static void add_security_class( SCL class) SYM name; USHORT if_any; - name = class->scl_name; + name = sec_class->scl_name; if_any = FALSE; FOR X IN RDB$SECURITY_CLASSES WITH X.RDB$SECURITY_CLASS EQ name->sym_string @@ -1613,13 +1617,13 @@ static void add_security_class( SCL class) STORE X IN RDB$SECURITY_CLASSES MOVE_SYMBOL(name, X.RDB$SECURITY_CLASS); - if (class->scl_description) { - store_text(class->scl_description, &X.RDB$DESCRIPTION); + if (sec_class->scl_description) { + store_text(sec_class->scl_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } else X.RDB$DESCRIPTION.NULL = TRUE; - store_acl(class, &X.RDB$ACL); + store_acl(sec_class, (SLONG*) &X.RDB$ACL); END_STORE; } @@ -1661,17 +1665,17 @@ static void add_trigger( TRG trigger) if (trigger->trg_source) { X.RDB$TRIGGER_SOURCE.NULL = FALSE; - store_text(trigger->trg_source, &X.RDB$TRIGGER_SOURCE); + store_text(trigger->trg_source, (SLONG*) &X.RDB$TRIGGER_SOURCE); } if (trigger->trg_statement) { X.RDB$TRIGGER_BLR.NULL = FALSE; - store_blr(trigger->trg_statement, &X.RDB$TRIGGER_BLR, NULL); + store_blr(trigger->trg_statement, (SLONG*) &X.RDB$TRIGGER_BLR, NULL); } if (trigger->trg_description) { X.RDB$DESCRIPTION.NULL = FALSE; - store_text(trigger->trg_description, &X.RDB$DESCRIPTION); + store_text(trigger->trg_description, (SLONG*) &X.RDB$DESCRIPTION); } END_STORE; @@ -1721,7 +1725,7 @@ static void add_type( TYP fldtype) X.RDB$TYPE = fldtype->typ_type; if (fldtype->typ_description) { X.RDB$DESCRIPTION.NULL = FALSE; - store_text(fldtype->typ_description, &X.RDB$DESCRIPTION); + store_text(fldtype->typ_description, (SLONG*) &X.RDB$DESCRIPTION); } END_STORE; } @@ -1837,8 +1841,8 @@ static void add_view( REL relation) STORE X IN RDB$RELATIONS MOVE_SYMBOL(relation->rel_name, X.RDB$RELATION_NAME); - store_blr(rse, &X.RDB$VIEW_BLR, relation); - store_text(relation->rel_view_source, &X.RDB$VIEW_SOURCE); + store_blr(rse, (SLONG*) &X.RDB$VIEW_BLR, relation); + store_text(relation->rel_view_source, (SLONG*) &X.RDB$VIEW_SOURCE); if (relation->rel_security_class) { X.RDB$SECURITY_CLASS.NULL = FALSE; MOVE_SYMBOL(relation->rel_security_class, X.RDB$SECURITY_CLASS); @@ -1847,7 +1851,7 @@ static void add_view( REL relation) X.RDB$SECURITY_CLASS.NULL = TRUE; if (relation->rel_description) { - store_text(relation->rel_description, &X.RDB$DESCRIPTION); + store_text(relation->rel_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } else @@ -1927,7 +1931,7 @@ static void add_view( REL relation) X.RDB$QUERY_NAME.NULL = FALSE; } if (field->fld_description) { - store_text(field->fld_description, &X.RDB$DESCRIPTION); + store_text(field->fld_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } if (field->fld_edit_string) { @@ -1936,7 +1940,7 @@ static void add_view( REL relation) } if (field->fld_query_header) { X.RDB$QUERY_HEADER.NULL = FALSE; - store_query_header(field->fld_query_header, &X.RDB$QUERY_HEADER); + store_query_header(field->fld_query_header,(SLONG*) &X.RDB$QUERY_HEADER); } if (field->fld_system) X.RDB$SYSTEM_FLAG = field->fld_system; @@ -1964,14 +1968,14 @@ static void alloc_file_name( FIL * start_file, UCHAR * file_name) FIL temp; for (temp = *start_file; temp; temp = temp->fil_next) - if (!strcmp(temp->fil_name->sym_name, file_name)) + if (!strcmp(temp->fil_name->sym_name, (char*) file_name)) return; file = (FIL) DDL_alloc(FIL_LEN); file->fil_next = *start_file; *start_file = file; - string = (SYM) DDL_alloc(SYM_LEN + strlen(file_name)); - strcpy(string->sym_name, file_name); + string = (SYM) DDL_alloc(SYM_LEN + strlen((char*) file_name)); + strcpy(string->sym_name, (char*) file_name); file->fil_name = string; } @@ -2150,8 +2154,8 @@ static void *create_blob( SLONG * blob_id, USHORT bpb_length, UCHAR * bpb) if (gds__create_blob2(status_vector, GDS_REF(DB), - GDS_REF(gds__trans), - GDS_REF(blob), GDS_VAL(blob_id), bpb_length, bpb)) { + GDS_REF(gds_trans), + GDS_REF(blob), (GDS__QUAD*) GDS_VAL(blob_id), bpb_length, (SCHAR*) bpb)) { DDL_db_error(status_vector, 59, NULL, NULL, NULL, NULL, NULL); /* msg 59: gds__create_blob failed */ return NULL; } @@ -2187,7 +2191,7 @@ static void drop_cache( DBB dbb) if (!DDL_errors) { COMMIT ON_ERROR - DDL_db_error(gds__status, 326, NULL, NULL, NULL, NULL, NULL); /* msg 326: error commiting deletion of shared cache file */ + DDL_db_error(gds_status, 326, NULL, NULL, NULL, NULL, NULL); /* msg 326: error commiting deletion of shared cache file */ ROLLBACK; END_ERROR; START_TRANSACTION; @@ -2491,7 +2495,7 @@ static void drop_relation( REL relation) } -static void drop_security_class( SCL class) +static void drop_security_class( SCL scl_class) { /************************************** * @@ -2506,7 +2510,7 @@ static void drop_security_class( SCL class) SYM name; USHORT if_any; - name = class->scl_name; + name = scl_class->scl_name; if_any = FALSE; FOR X IN RDB$SECURITY_CLASSES WITH X.RDB$SECURITY_CLASS EQ name->sym_string @@ -2542,7 +2546,7 @@ static void drop_shadow( SLONG shadow_number) ERASE FIL; string = (SYM) DDL_alloc(SYM_LEN + strlen(FIL.RDB$FILE_NAME)); strcpy(string->sym_name, FIL.RDB$FILE_NAME); - DDL_push(string, &files); + DDL_push((NOD) string, &files); if (!first_file) first_file = files; END_FOR; @@ -2553,7 +2557,7 @@ static void drop_shadow( SLONG shadow_number) if (!DDL_errors) { COMMIT ON_ERROR - DDL_db_error(gds__status, 72, NULL, NULL, NULL, NULL, NULL); /* msg 72: error commiting deletion of shadow */ + DDL_db_error(gds_status, 72, NULL, NULL, NULL, NULL, NULL); /* msg 72: error commiting deletion of shadow */ ROLLBACK; END_ERROR; START_TRANSACTION; @@ -2873,7 +2877,7 @@ static void get_global_fields(void) FOR X IN RDB$FIELDS field = (FLD) DDL_alloc(FLD_LEN); field->fld_name = symbol = - get_symbol(SYM_global, X.RDB$FIELD_NAME, field); + get_symbol(SYM_global, X.RDB$FIELD_NAME, (CTX) field); HSH_insert(symbol); field->fld_dtype = X.RDB$FIELD_TYPE; field->fld_length = X.RDB$FIELD_LENGTH; @@ -2915,11 +2919,11 @@ static void get_log_names(SCHAR * db_name, while (TRUE) { loop++; - if (WALF_get_linked_logs_info(gds__status, expanded_name, cur_log, + if (WALF_get_linked_logs_info(gds_status, expanded_name, cur_log, part_offset, &log_count, next_log, &next_offset, &last_log_flag, ¬_archived) != SUCCESS) - DDL_error_abort(gds__status, 328, NULL, NULL, NULL, NULL, NULL); + DDL_error_abort(gds_status, 328, NULL, NULL, NULL, NULL, NULL); /* msg 328: error in reading list of log files */ if ((!not_archived) || force) @@ -2931,20 +2935,20 @@ static void get_log_names(SCHAR * db_name, } if (loop >= 10) - DDL_error_abort(NULL_PTR, 329, NULL, NULL, NULL, NULL, NULL); /* msg 329: use CASCADE option to remove log files before archive is done */ + DDL_error_abort((STATUS*) NULL_PTR, 329, NULL, NULL, NULL, NULL, NULL); /* msg 329: use CASCADE option to remove log files before archive is done */ } if (log_count) - alloc_file_name(start_file, next_log); + alloc_file_name(start_file, (UCHAR*) next_log); else - alloc_file_name(start_file, cur_log); + alloc_file_name(start_file, (UCHAR*) cur_log); cl = next_log; nl = cur_log; part_offset = next_offset; while (log_count) { - ret_val = WALF_get_next_log_info(gds__status, + ret_val = WALF_get_next_log_info(gds_status, expanded_name, cl, part_offset, nl, &next_offset, @@ -2952,11 +2956,11 @@ static void get_log_names(SCHAR * db_name, &last_log_flag, 1); if (ret_val == FAILURE) - DDL_error_abort(gds__status, 328, NULL, NULL, NULL, NULL, NULL); /* msg 328: error in reading list of log files */ + DDL_error_abort(gds_status, 328, NULL, NULL, NULL, NULL, NULL); /* msg 328: error in reading list of log files */ if (ret_val < 0) break; - alloc_file_name(start_file, nl); + alloc_file_name(start_file, (UCHAR*) nl); /* switch files */ @@ -2997,7 +3001,7 @@ static void get_log_names_serial( FIL * start_file) FOR(TRANSACTION_HANDLE tr1) L IN RDB$LOG_FILES if (L.RDB$FILE_FLAGS & LOG_serial) continue; - alloc_file_name(start_file, L.RDB$FILE_NAME); + alloc_file_name(start_file, (UCHAR*) L.RDB$FILE_NAME); END_FOR; COMMIT tr1 @@ -3028,7 +3032,7 @@ static void get_relations( DBB database) FOR R IN RDB$RELATIONS relation = (REL) DDL_alloc(REL_LEN); relation->rel_name = symbol = - get_symbol(SYM_relation, R.RDB$RELATION_NAME, relation); + get_symbol(SYM_relation, R.RDB$RELATION_NAME, (CTX) relation); HSH_insert(symbol); relation->rel_database = database; relation->rel_next = database->dbb_relations; @@ -3038,7 +3042,7 @@ static void get_relations( DBB database) RFR.RDB$RELATION_NAME = R.RDB$RELATION_NAME field = (FLD) DDL_alloc(FLD_LEN); - field->fld_name = get_symbol(SYM_field, RFR.RDB$FIELD_NAME, field); + field->fld_name = get_symbol(SYM_field, RFR.RDB$FIELD_NAME, (CTX) field); HSH_insert(field->fld_name); field->fld_relation = relation; field->fld_next = relation->rel_fields; @@ -3105,11 +3109,11 @@ static USHORT get_prot_mask( TEXT * relation, TEXT * field) strcpy(msg.field_name, ""); if (!req_handle) - isc_compile_request2((SLONG *) 0, &DB, &req_handle, sizeof(blr), blr); - isc_start_request((SLONG *) 0, &req_handle, &gds__trans, 0); - isc_start_and_send((SLONG *) 0, &req_handle, &gds__trans, 0, sizeof(msg), + isc_compile_request2((SLONG *) 0, &DB, (void**) &req_handle, sizeof(blr), blr); + isc_start_request((SLONG *) 0, (void**) &req_handle, &gds_trans, 0); + isc_start_and_send((SLONG *) 0, (void**) &req_handle, &gds_trans, 0, sizeof(msg), &msg, 0); - isc_receive((SLONG *) 0, &req_handle, 1, sizeof(output), &output, 0); + isc_receive((SLONG *) 0, (void**) &req_handle, 1, sizeof(output), &output, 0); return output.prot_mask; } @@ -3171,7 +3175,7 @@ static void get_triggers( DBB database) trigger = (TRG) DDL_alloc(TRG_LEN); trigger->trg_name = symbol = - get_symbol(SYM_trigger, T.RDB$TRIGGER_NAME, trigger); + get_symbol(SYM_trigger, T.RDB$TRIGGER_NAME, (CTX) trigger); HSH_insert(symbol); rel_name = HSH_typed_lookup(T.RDB$RELATION_NAME, (USHORT) 0, SYM_relation); @@ -3209,7 +3213,7 @@ static void get_udfs( DBB dbb) function = (FUNC) DDL_alloc(FUNC_LEN); function->func_database = dbb; function->func_name = symbol = - get_symbol(SYM_function, FUN.RDB$FUNCTION_NAME, function); + get_symbol(SYM_function, FUN.RDB$FUNCTION_NAME, (CTX) function); HSH_insert(symbol); function->func_return = arg = (FUNCARG) DDL_alloc(FUNCARG_LEN); arg->funcarg_dtype = ARG.RDB$FIELD_TYPE; @@ -3576,7 +3580,7 @@ static void modify_field( FLD field) X.RDB$FIELD_POSITION.NULL = FALSE; } if (field->fld_description) { - store_text(field->fld_description, &X.RDB$DESCRIPTION); + store_text(field->fld_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } if (field->fld_query_name) { @@ -3588,7 +3592,7 @@ static void modify_field( FLD field) X.RDB$EDIT_STRING.NULL = FALSE; } if (field->fld_query_header) { - store_query_header(field->fld_query_header, &X.RDB$QUERY_HEADER); + store_query_header(field->fld_query_header, (SLONG*) &X.RDB$QUERY_HEADER); X.RDB$QUERY_HEADER.NULL = FALSE; } @@ -3667,17 +3671,17 @@ static void modify_global_field( FLD field) } if (field->fld_missing) { - store_blr(field->fld_missing, &X.RDB$MISSING_VALUE, NULL); + store_blr(field->fld_missing, (SLONG*) &X.RDB$MISSING_VALUE, NULL); X.RDB$MISSING_VALUE.NULL = FALSE; } if (field->fld_validation) { - store_blr(field->fld_validation, &X.RDB$VALIDATION_BLR, NULL); - store_text(field->fld_valid_src, &X.RDB$VALIDATION_SOURCE); + store_blr(field->fld_validation, (SLONG*) &X.RDB$VALIDATION_BLR, NULL); + store_text(field->fld_valid_src, (SLONG*) &X.RDB$VALIDATION_SOURCE); X.RDB$VALIDATION_BLR.NULL = FALSE; X.RDB$VALIDATION_SOURCE.NULL = FALSE; } if (field->fld_description) { - store_text(field->fld_description, &X.RDB$DESCRIPTION); + store_text(field->fld_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } if (field->fld_query_name) { @@ -3689,7 +3693,7 @@ static void modify_global_field( FLD field) X.RDB$EDIT_STRING.NULL = FALSE; } if (field->fld_query_header) { - store_query_header(field->fld_query_header, &X.RDB$QUERY_HEADER); + store_query_header(field->fld_query_header, (SLONG*) &X.RDB$QUERY_HEADER); X.RDB$QUERY_HEADER.NULL = FALSE; } END_MODIFY @@ -3731,7 +3735,7 @@ static void modify_index( DUDLEY_IDX index) if (index->idx_flags & IDX_null_description) X.RDB$DESCRIPTION.NULL = TRUE; if (index->idx_description) { - store_text(index->idx_description, &X.RDB$DESCRIPTION); + store_text(index->idx_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } if (index->idx_flags & IDX_statistics_flag) @@ -3780,7 +3784,7 @@ static void modify_relation( REL relation) if (relation->rel_flags & rel_null_description) X.RDB$DESCRIPTION.NULL = TRUE; if (relation->rel_description) { - store_text(relation->rel_description, &X.RDB$DESCRIPTION); + store_text(relation->rel_description, (SLONG*) &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; } if (relation->rel_flags & rel_explicit_system) @@ -3838,17 +3842,17 @@ static void modify_trigger( TRG trigger) if (trigger->trg_source) { X.RDB$TRIGGER_SOURCE.NULL = FALSE; - store_text(trigger->trg_source, &X.RDB$TRIGGER_SOURCE); + store_text(trigger->trg_source, (SLONG*) &X.RDB$TRIGGER_SOURCE); } if (trigger->trg_statement) { X.RDB$TRIGGER_BLR.NULL = FALSE; - store_blr(trigger->trg_statement, &X.RDB$TRIGGER_BLR, NULL); + store_blr(trigger->trg_statement, (SLONG*) &X.RDB$TRIGGER_BLR, NULL); } if (trigger->trg_description) { X.RDB$DESCRIPTION.NULL = FALSE; - store_text(trigger->trg_description, &X.RDB$DESCRIPTION); + store_text(trigger->trg_description, (SLONG*) &X.RDB$DESCRIPTION); } END_MODIFY; if_any = TRUE; @@ -3912,7 +3916,7 @@ static void modify_type( TYP fldtype) X.RDB$TYPE = fldtype->typ_type; if (fldtype->typ_description) { X.RDB$DESCRIPTION.NULL = FALSE; - store_text(fldtype->typ_description, &X.RDB$DESCRIPTION); + store_text(fldtype->typ_description, (SLONG*) &X.RDB$DESCRIPTION); } END_MODIFY; if_any = TRUE; @@ -3977,7 +3981,7 @@ static void set_generator( NOD node) int *req_handle1, *req_handle2; USHORT prot_mask, i; SLONG *number; - SLONG new; + SLONG new_val; SSHORT l; struct str current_blr, new_blr; SCHAR *blr; @@ -3994,7 +3998,7 @@ static void set_generator( NOD node) constant = (CON) node->nod_arg[0]->nod_arg[0]; number = (SLONG *) constant->con_data; - new = *number; + new_val = *number; *number = 0; current_blr.str_current = current_blr.str_start = @@ -4011,16 +4015,16 @@ static void set_generator( NOD node) req_handle1 = (int *) NULL_PTR; blr = (SCHAR *) current_blr.str_start; - isc_compile_request2((SLONG *) 0, &DB, &req_handle1, l, blr); - isc_start_request((SLONG *) 0, &req_handle1, &gds__trans, 0); - isc_receive((SLONG *) 0, &req_handle1, 0, sizeof(gen_value), &gen_value, + isc_compile_request2((SLONG *) 0, &DB, (void**) &req_handle1, l, blr); + isc_start_request((SLONG *) 0, (void**) &req_handle1, &gds_trans, 0); + isc_receive((SLONG *) 0, (void**) &req_handle1, 0, sizeof(gen_value), &gen_value, 0); - isc_release_request((SLONG *) 0, &req_handle1); + isc_release_request((SLONG *) 0, (void**) &req_handle1); /* the difference between output.current and new is the amount we want to change the generator by */ - *number = new - gen_value; + *number = new_val - gen_value; new_blr.str_current = new_blr.str_start = (SCHAR *) gds__alloc((SLONG) 1028); new_blr.str_length = 1028; @@ -4035,14 +4039,14 @@ static void set_generator( NOD node) req_handle2 = (int *) NULL_PTR; blr = (SCHAR *) new_blr.str_start; - isc_compile_request2((SLONG *) 0, &DB, &req_handle2, l, blr); - isc_start_request((SLONG *) 0, &req_handle2, &gds__trans, 0); - isc_receive((SLONG *) 0, &req_handle2, 0, sizeof(gen_value), &gen_value, + isc_compile_request2((SLONG *) 0, &DB, (void**) &req_handle2, l, blr); + isc_start_request((SLONG *) 0, (void**) &req_handle2, &gds_trans, 0); + isc_receive((SLONG *) 0, (void**) &req_handle2, 0, sizeof(gen_value), &gen_value, 0); - isc_release_request((SLONG *) 0, &req_handle2); + isc_release_request((SLONG *) 0, (void**) &req_handle2); - for (i = 5; (gen_value != new) && --i;) { - *number = new - gen_value; + for (i = 5; (gen_value != new_val) && --i;) { + *number = new_val - gen_value; new_blr.str_current = new_blr.str_start; new_blr.str_length = 1028; GENERATE_blr(&new_blr, node); @@ -4050,11 +4054,11 @@ static void set_generator( NOD node) req_handle2 = (int *) NULL_PTR; blr = (SCHAR *) new_blr.str_start; - isc_compile_request2((SLONG *) 0, &DB, &req_handle2, l, blr); - isc_start_request((SLONG *) 0, &req_handle2, &gds__trans, 0); - isc_receive((SLONG *) 0, &req_handle2, 0, sizeof(gen_value), + isc_compile_request2((SLONG *) 0, &DB, (void**) &req_handle2, l, blr); + isc_start_request((SLONG *) 0, (void**) &req_handle2, &gds_trans, 0); + isc_receive((SLONG *) 0, (void**) &req_handle2, 0, sizeof(gen_value), &gen_value, 0); - isc_release_request((SLONG *) 0, &req_handle2); + isc_release_request((SLONG *) 0, (void**) &req_handle2); } gds__free(current_blr.str_start); @@ -4062,7 +4066,7 @@ static void set_generator( NOD node) } -static void store_acl( SCL class, SLONG * blob_id) +static void store_acl( SCL scl_class, SLONG * blob_id) { /************************************** * @@ -4081,9 +4085,9 @@ static void store_acl( SCL class, SLONG * blob_id) /* Generate access control list */ - length = GENERATE_acl(class, buffer); + length = GENERATE_acl(scl_class, (UCHAR*) buffer); - blob = create_blob(blob_id, 0, NULL_PTR); + blob = create_blob(blob_id, 0, (UCHAR*) NULL_PTR); if (gds__put_segment(status_vector, GDS_REF(blob), length, buffer)) { DDL_db_error(status_vector, 92, NULL, NULL, NULL, NULL, NULL); /* msg 92: gds__put_segment failed */ @@ -4124,7 +4128,7 @@ static void store_blr( NOD node, SLONG * blob_id, REL relation) #ifdef DEBUG gds__print_blr(blr.str_start, 0, 0, 0); #endif - handle = create_blob(blob_id, 0, NULL_PTR); + handle = create_blob(blob_id, 0,(UCHAR*) NULL_PTR); length = blr.str_current - blr.str_start; if (gds__put_segment(status_vector, @@ -4352,16 +4356,16 @@ static void wal_info(UCHAR * db_info_buffer, p = db_info_buffer; - while ((item = *p++) != gds__info_end) { + while ((item = *p++) != gds_info_end) { length = gds__vax_integer(p, 2); p += 2; switch (item) { - case gds__info_logfile: + case gds_info_logfile: *log = gds__vax_integer(p, length); p += length; break; - case gds__info_cur_logfile_name: + case gds_info_cur_logfile_name: d = p; p += length; length = *d++; @@ -4369,7 +4373,7 @@ static void wal_info(UCHAR * db_info_buffer, cur_log[length] = 0; break; - case gds__info_cur_log_part_offset: + case gds_info_cur_log_part_offset: *part_offset = gds__vax_integer(p, length); p += length; break; diff --git a/src/dudley/extract.e b/src/dudley/extract.epp similarity index 94% rename from src/dudley/extract.e rename to src/dudley/extract.epp index a6ed6ad376..91245ae44b 100644 --- a/src/dudley/extract.e +++ b/src/dudley/extract.epp @@ -78,10 +78,10 @@ static void view_fields(TEXT *); static void wal_info(UCHAR *, SSHORT *, SLONG *, SLONG *, SLONG *); static IB_FILE *output_file; -static SCHAR db_items[] = { gds__info_page_size }; +static SCHAR db_items[] = { gds_info_page_size }; static SCHAR db_info[] = - { gds__info_num_wal_buffers, gds__info_wal_buffer_size, - gds__info_wal_ckpt_length, gds__info_wal_grpc_wait_usecs + { gds_info_num_wal_buffers, gds_info_wal_buffer_size, + gds_info_wal_ckpt_length, gds_info_wal_grpc_wait_usecs }; static TEXT acl_privs[] = "?CGDRWP???"; static TEXT *acl_ids[] = { @@ -283,7 +283,7 @@ static void decompile_blr_literal(SCHAR * string) switch (*p++) { case (blr_text): - size = gds__vax_integer(p, 2); + size = gds__vax_integer((UCHAR*) p, 2); p += 2; *b++ = '"'; while (size--) @@ -299,9 +299,9 @@ static void decompile_blr_literal(SCHAR * string) /* Convert strings to local encoding */ - scale = gds__vax_integer(p, 2); + scale = gds__vax_integer((UCHAR*) p, 2); p += 2; - size = gds__vax_integer(p, 2); + size = gds__vax_integer((UCHAR*) p, 2); p += 2; *b++ = '"'; @@ -347,13 +347,13 @@ static void decompile_blr_literal(SCHAR * string) case (blr_long): scale = *p++; - value = gds__vax_integer(p, 4); + value = gds__vax_integer((UCHAR*) p, 4); binary_to_ascii(value, scale, buffer); break; case (blr_short): scale = *p++; - value = gds__vax_integer(p, 2); + value = gds__vax_integer((UCHAR*) p, 2); binary_to_ascii(value, scale, buffer); break; @@ -437,11 +437,11 @@ static void extract_acls(void) S.RDB$SECURITY_CLASS); if (!BLOB_NULL(S.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&S.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &S.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } if (!BLOB_NULL(S.RDB$ACL)) - print_blob(&S.RDB$ACL, 'a'); + print_blob((SLONG*) &S.RDB$ACL, 'a'); ib_fprintf(output_file, ";\n"); } END_FOR; @@ -506,12 +506,12 @@ static void extract_computed(TEXT * relation_name, BOOLEAN first) } ib_fprintf(output_file, " computed by ("); - print_blob(&F.RDB$COMPUTED_SOURCE, 'u'); + print_blob((SLONG*) &F.RDB$COMPUTED_SOURCE, 'u'); ib_fprintf(output_file, ")"); if (!RFR.RDB$FIELD_POSITION.NULL) ib_fprintf(output_file, "\tposition %d", RFR.RDB$FIELD_POSITION); - field_attributes(&RFR.RDB$DESCRIPTION, RFR.RDB$QUERY_NAME, - &RFR.RDB$QUERY_HEADER, RFR.RDB$EDIT_STRING, + field_attributes((SLONG*) &RFR.RDB$DESCRIPTION, RFR.RDB$QUERY_NAME, + (SLONG*) &RFR.RDB$QUERY_HEADER, RFR.RDB$EDIT_STRING, RFR.RDB$SYSTEM_FLAG); END_FOR; @@ -549,7 +549,7 @@ static void extract_database(TEXT * DB_file_name) FOR D IN RDB$DATABASE if (!BLOB_NULL(D.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&D.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &D.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } if (!D.RDB$SECURITY_CLASS.NULL) { @@ -563,7 +563,7 @@ static void extract_database(TEXT * DB_file_name) FOR D IN RDB$DATABASE if (!BLOB_NULL(D.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&D.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &D.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } END_FOR; @@ -577,10 +577,10 @@ static void extract_database(TEXT * DB_file_name) } d = buffer; - if (*d++ == gds__info_page_size) { - length = gds__vax_integer(d, 2); + if (*d++ == gds_info_page_size) { + length = gds__vax_integer((UCHAR*) d, 2); d += 2; - page_size = gds__vax_integer(d, length); + page_size = gds__vax_integer((UCHAR*) d, length); if (page_size) ib_fprintf(output_file, "\n\tpage_size %d", page_size); } @@ -655,7 +655,7 @@ static void extract_database(TEXT * DB_file_name) F.RDB$FILE_PARTITIONS); END_FOR; - if (gds__database_info(gds__status, + if (gds__database_info(gds_status, GDS_REF(DB), sizeof(db_info), db_info, @@ -667,7 +667,7 @@ static void extract_database(TEXT * DB_file_name) buf_size = chkpt_len = grp_commit = 0; num_buf = 0; - wal_info(db_info_buffer, &num_buf, &buf_size, &chkpt_len, + wal_info((UCHAR*) db_info_buffer, &num_buf, &buf_size, &chkpt_len, &grp_commit); if (num_buf) @@ -768,13 +768,13 @@ static void extract_fields(void) if (!BLOB_NULL(F.RDB$VALIDATION_SOURCE)) { ib_fprintf(output_file, "\n\tvalid if ("); - print_blob(&F.RDB$VALIDATION_SOURCE, 'u'); + print_blob((SLONG*) &F.RDB$VALIDATION_SOURCE, 'u'); ib_fprintf(output_file, ")"); } if (!BLOB_NULL(F.RDB$MISSING_VALUE)) { ib_fprintf(output_file, "\n\tmissing_value is "); - print_blob(&F.RDB$MISSING_VALUE, 'm'); + print_blob((SLONG*) &F.RDB$MISSING_VALUE, 'm'); } /* @@ -782,8 +782,8 @@ static void extract_fields(void) default_value (&F.RDB$DEFAULT_VALUE); */ - field_attributes(&F.RDB$DESCRIPTION, F.RDB$QUERY_NAME, - &F.RDB$QUERY_HEADER, F.RDB$EDIT_STRING, + field_attributes((SLONG*) &F.RDB$DESCRIPTION, F.RDB$QUERY_NAME, + (SLONG*) &F.RDB$QUERY_HEADER, F.RDB$EDIT_STRING, F.RDB$SYSTEM_FLAG); ib_fprintf(output_file, ";\n"); @@ -824,7 +824,7 @@ static void extract_filters(void) ib_fprintf(output_file, "\n\tentry_point '%s'", s); if (!BLOB_NULL(F.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&F.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &F.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } ib_fprintf(output_file, ";\n"); @@ -865,7 +865,7 @@ static void extract_functions(void) ib_fprintf(output_file, "\n\tentry_point '%s'", s); if (!BLOB_NULL(FUNC.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&FUNC.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &FUNC.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } @@ -1113,7 +1113,7 @@ static void extract_indexes(void) if (!BLOB_NULL(I.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&I.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &I.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } @@ -1182,7 +1182,7 @@ static void extract_relations(void) ib_fprintf(output_file, "\n\tsystem_flag %d", R.RDB$SYSTEM_FLAG); if (!BLOB_NULL(R.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&R.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &R.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } extract_rfr(R.RDB$RELATION_NAME); @@ -1204,7 +1204,7 @@ static void extract_relations(void) ib_fprintf(output_file, "\n\tsystem_flag %d", R.RDB$SYSTEM_FLAG); if (!BLOB_NULL(R.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&R.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &R.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } extract_rfr(R.RDB$RELATION_NAME); @@ -1256,8 +1256,8 @@ static void extract_rfr(TEXT * relation_name) if (!RFR.RDB$FIELD_POSITION.NULL) ib_fprintf(output_file, "\tposition %d", RFR.RDB$FIELD_POSITION); - field_attributes(&RFR.RDB$DESCRIPTION, RFR.RDB$QUERY_NAME, - &RFR.RDB$QUERY_HEADER, RFR.RDB$EDIT_STRING, + field_attributes((SLONG*) &RFR.RDB$DESCRIPTION, RFR.RDB$QUERY_NAME, + (SLONG*) &RFR.RDB$QUERY_HEADER, RFR.RDB$EDIT_STRING, RFR.RDB$SYSTEM_FLAG); END_FOR; @@ -1289,7 +1289,7 @@ static void extract_security(void) first_field = TRUE; modify = FALSE; name_trunc(R.RDB$RELATION_NAME, r); - p = (R.RDB$VIEW_BLR.NULL) ? "relation" : "view"; + p = (R.RDB$VIEW_BLR.NULL) ? (TEXT*) "relation" : (TEXT*) "view"; if (!R.RDB$SECURITY_CLASS.NULL && name_trunc(R.RDB$SECURITY_CLASS, s)) { /* skip modify relation/view add security class if we have just a stub - i.e. security_class is 'SQL$..' and has no rdb$user_privilege entry and @@ -1425,12 +1425,12 @@ static void extract_triggers(void) /* msg 262: **** trigger source for trigger %s must be recreated **** */ } else { - print_blob(&T.RDB$TRIGGER_SOURCE, 'u'); + print_blob((SLONG*) &T.RDB$TRIGGER_SOURCE, 'u'); } ib_fprintf(output_file, "\n\tend_trigger"); if (!BLOB_NULL(T.RDB$DESCRIPTION)) { ib_fprintf(output_file, "\n\t{"); - print_blob(&T.RDB$DESCRIPTION, 'u'); + print_blob((SLONG*) &T.RDB$DESCRIPTION, 'u'); ib_fprintf(output_file, "}"); } extract_trig_msgs(T.RDB$TRIGGER_NAME); @@ -1558,8 +1558,8 @@ static void extract_views(void) SORTED BY V.RDB$RELATION_NAME source_null = V.RDB$VIEW_SOURCE.NULL ? TRUE : FALSE; desc_null = BLOB_NULL(V.RDB$DESCRIPTION) ? TRUE : FALSE; - extract_view(V.RDB$RELATION_NAME, &V.RDB$VIEW_SOURCE, - &V.RDB$DESCRIPTION, source_null, desc_null, + extract_view(V.RDB$RELATION_NAME, (SLONG*) &V.RDB$VIEW_SOURCE, + (SLONG*) &V.RDB$DESCRIPTION, source_null, desc_null, V.RDB$SYSTEM_FLAG, &first); END_FOR; @@ -1617,8 +1617,8 @@ static void extract_views(void) V.RDB$RELATION_NAME EQ view_name source_null = V.RDB$VIEW_SOURCE.NULL ? TRUE : FALSE; desc_null = BLOB_NULL(V.RDB$DESCRIPTION) ? TRUE : FALSE; - extract_view(V.RDB$RELATION_NAME, &V.RDB$VIEW_SOURCE, - &V.RDB$DESCRIPTION, source_null, desc_null, + extract_view(V.RDB$RELATION_NAME, (SLONG*) &V.RDB$VIEW_SOURCE, + (SLONG*) &V.RDB$DESCRIPTION, source_null, desc_null, V.RDB$SYSTEM_FLAG, &first); END_FOR; @@ -1637,8 +1637,8 @@ static void extract_views(void) V.RDB$RELATION_NAME EQ view->view_name source_null = V.RDB$VIEW_SOURCE.NULL ? TRUE : FALSE; desc_null = BLOB_NULL(V.RDB$DESCRIPTION) ? TRUE : FALSE; - extract_view(V.RDB$RELATION_NAME, &V.RDB$VIEW_SOURCE, - &V.RDB$DESCRIPTION, source_null, desc_null, + extract_view(V.RDB$RELATION_NAME, (SLONG*) &V.RDB$VIEW_SOURCE, + (SLONG*) &V.RDB$DESCRIPTION, source_null, desc_null, V.RDB$SYSTEM_FLAG, &first); END_FOR; @@ -1871,9 +1871,9 @@ static void print_blob(SLONG * blob_id, TEXT type) if (gds__open_blob2(status_vector, GDS_REF(DB), - GDS_REF(gds__trans), - GDS_REF(blob), - GDS_VAL(blob_id), (USHORT) (r - bpb), bpb)) { + GDS_REF(gds_trans), + (void**) GDS_REF(blob), + (GDS__QUAD*) GDS_VAL(blob_id), (USHORT) (r - bpb), (SCHAR*) bpb)) { gds__print_status(status_vector); DDL_err(269, NULL, NULL, NULL, NULL, NULL); /* msg 269: gds__open_blob failed */ return; @@ -1886,10 +1886,10 @@ static void print_blob(SLONG * blob_id, TEXT type) } while (!(status = gds__get_segment(status_vector, - GDS_REF(blob), - GDS_REF(length), + (void**) GDS_REF(blob), + (USHORT*) GDS_REF(length), (USHORT) (sizeof(buffer) - 1), - buffer)) || status == gds__segment) { + buffer)) || status == gds_segment) { buffer[length] = 0; switch (type) { case 'h': @@ -1927,13 +1927,13 @@ static void print_blob(SLONG * blob_id, TEXT type) } } - if (status_vector[1] != gds__segstr_eof) { + if (status_vector[1] != gds_segstr_eof) { gds__print_status(status_vector); DDL_err(271, NULL, NULL, NULL, NULL, NULL); /* msg 271: gds__get_segment failed */ return; } - if (gds__close_blob(status_vector, GDS_REF(blob))) { + if (gds__close_blob(status_vector, (void**) GDS_REF(blob))) { gds__print_status(status_vector); DDL_err(272, NULL, NULL, NULL, NULL, NULL); /* msg 272: gds__close_blob failed */ return; @@ -2024,7 +2024,7 @@ static void set_capabilities(void) END_FOR; } - gds__release_request(gds__status, GDS_REF(req)); + gds__release_request(gds_status, (void**) GDS_REF(req)); } @@ -2177,8 +2177,8 @@ static void view_fields(TEXT * view_name) if (!RFR.RDB$FIELD_POSITION.NULL) ib_fprintf(output_file, "\tposition %d", RFR.RDB$FIELD_POSITION); - field_attributes(&RFR.RDB$DESCRIPTION, RFR.RDB$QUERY_NAME, - &RFR.RDB$QUERY_HEADER, RFR.RDB$EDIT_STRING, + field_attributes((SLONG*) &RFR.RDB$DESCRIPTION, RFR.RDB$QUERY_NAME, + (SLONG*) &RFR.RDB$QUERY_HEADER, RFR.RDB$EDIT_STRING, RFR.RDB$SYSTEM_FLAG); } END_FOR; @@ -2206,23 +2206,23 @@ static void wal_info(UCHAR * db_info_buffer, p = db_info_buffer; - while ((item = *p++) != gds__info_end) { + while ((item = *p++) != gds_info_end) { length = gds__vax_integer(p, 2); p += 2; switch (item) { - case gds__info_num_wal_buffers: + case gds_info_num_wal_buffers: *num_buf = gds__vax_integer(p, length); break; - case gds__info_wal_buffer_size: + case gds_info_wal_buffer_size: *buf_size = gds__vax_integer(p, length); break; - case gds__info_wal_ckpt_length: + case gds_info_wal_ckpt_length: *chkpt_len = gds__vax_integer(p, length); break; - case gds__info_wal_grpc_wait_usecs: + case gds_info_wal_grpc_wait_usecs: *grp_commit = gds__vax_integer(p, length); break; diff --git a/src/gpre/gpre_meta.e b/src/gpre/gpre_meta.epp similarity index 93% rename from src/gpre/gpre_meta.e rename to src/gpre/gpre_meta.epp index a1337c8b18..57431a6723 100644 --- a/src/gpre/gpre_meta.e +++ b/src/gpre/gpre_meta.epp @@ -26,7 +26,7 @@ * *____________________________________________________________ * - * $Id: gpre_meta.e,v 1.1.1.1 2001-05-23 13:25:33 tamlin Exp $ + * $Id: gpre_meta.epp,v 1.1 2001-07-12 06:32:02 bellardo Exp $ */ #include @@ -162,15 +162,15 @@ BOOLEAN MET_database(DBB dbb, BOOLEAN print_version) d = dpb; if (dbb->dbb_c_user || dbb->dbb_c_password) { - *d++ = gds__dpb_version1; + *d++ = gds_dpb_version1; if (p = dbb->dbb_c_user) { - *d++ = gds__dpb_user_name; + *d++ = gds_dpb_user_name; *d++ = strlen(p); while (*p) *d++ = *p++; } if (p = dbb->dbb_c_password) { - *d++ = gds__dpb_password; + *d++ = gds_dpb_password; *d++ = strlen(p); while (*p) *d++ = *p++; @@ -180,11 +180,21 @@ BOOLEAN MET_database(DBB dbb, BOOLEAN print_version) if (gds__attach_database (gds__status, 0, GDS_VAL(dbb->dbb_filename), GDS_REF(DB), d - &dpb[0], dpb)) { - gds__print_status(gds__status); - return FALSE; + /* We failed to attach, try in read only mode just in case + if (d == dpb) + *d++ = gds_dpb_version1; + *d++ = isc_dpb_set_db_readonly; + *d++ = 1; + *d++ = TRUE; + if (gds__attach_database + (gds__status, 0, GDS_VAL(dbb->dbb_filename), GDS_REF(DB), d - &dpb[0], + dpb)) {*/ + gds__print_status(gds__status); + return FALSE; + //} } - dbb->dbb_handle = DB; + dbb->dbb_handle = (SLONG*) DB; if (sw_version && print_version) { ib_printf(" Version(s) for database \"%s\"\n", dbb->dbb_filename); @@ -194,7 +204,7 @@ BOOLEAN MET_database(DBB dbb, BOOLEAN print_version) sw_ods_version = 0; sw_server_version = 0; if (isc_database_info(isc_status, &DB, sizeof(sql_version_info), - sql_version_info, sizeof(sql_buffer), sql_buffer)) { + (char*) sql_version_info, sizeof(sql_buffer), (char*) sql_buffer)) { gds__print_status(isc_status); return FALSE; } @@ -205,7 +215,7 @@ BOOLEAN MET_database(DBB dbb, BOOLEAN print_version) USHORT length; item = (UCHAR) * ptr++; - length = isc_vax_integer(ptr, sizeof(USHORT)); + length = isc_vax_integer((char*)ptr, sizeof(USHORT)); ptr += sizeof(USHORT); switch (item) { case isc_info_base_level: @@ -213,11 +223,11 @@ BOOLEAN MET_database(DBB dbb, BOOLEAN print_version) break; case isc_info_ods_version: - sw_ods_version = isc_vax_integer(ptr, length); + sw_ods_version = isc_vax_integer((char*)ptr, length); break; case isc_info_db_sql_dialect: - compiletime_db_dialect = isc_vax_integer(ptr, length); + compiletime_db_dialect = isc_vax_integer((char*)ptr, length); break; case isc_info_error: /* Error indicates that one of the option @@ -479,7 +489,7 @@ BOOLEAN MET_get_domain_default(DBB dbb, blob_id = &FLD.RDB$DEFAULT_VALUE; /* open the blob */ - stat = isc_open_blob2(status_vect, &DB, &gds__trans, &blob_handle, + stat = isc_open_blob2(status_vect, (void**) &DB, (void**) &gds__trans, (void**) &blob_handle, blob_id, sizeof(blr_bpb), blr_bpb); if (stat) { gds__print_status(status_vect); @@ -488,14 +498,14 @@ BOOLEAN MET_get_domain_default(DBB dbb, /* fetch segments. Assume buffer is big enough. */ ptr_in_buffer = buffer; while (TRUE) { - stat = isc_get_segment(status_vect, &blob_handle, &length, + stat = isc_get_segment(status_vect, (void**) &blob_handle, (USHORT*) &length, buff_length, ptr_in_buffer); ptr_in_buffer = ptr_in_buffer + length; buff_length = buff_length - length; if (!stat) continue; - else if (stat == gds__segstr_eof) { + else if (stat == gds_segstr_eof) { /* null terminate the buffer */ *ptr_in_buffer = 0; break; @@ -587,8 +597,8 @@ BOOLEAN MET_get_column_default(REL relation, if (has_default) { /* open the blob */ - stat = isc_open_blob2(status_vect, &DB, &gds__trans, - &blob_handle, blob_id, sizeof(blr_bpb), + stat = isc_open_blob2(status_vect, (void**) &DB, (void**) &gds__trans, + (void**) &blob_handle, blob_id, sizeof(blr_bpb), blr_bpb); if (stat) { gds__print_status(status_vect); @@ -599,12 +609,12 @@ BOOLEAN MET_get_column_default(REL relation, ptr_in_buffer = buffer; while (TRUE) { stat = isc_get_segment(status_vect, &blob_handle, - &length, buff_length, ptr_in_buffer); + (USHORT*)&length, buff_length, ptr_in_buffer); ptr_in_buffer = ptr_in_buffer + length; buff_length = buff_length - length; if (!stat) continue; - else if (stat == gds__segstr_eof) { + else if (stat == gds_segstr_eof) { /* null terminate the buffer */ *ptr_in_buffer = 0; break; @@ -676,15 +686,15 @@ LLS MET_get_primary_key(DBB dbb, TEXT * relation_name) WITH X.RDB$RELATION_NAME EQ name AND X.RDB$INDEX_NAME STARTING "RDB$PRIMARY" SORTED BY Y.RDB$FIELD_POSITION - field_name = MAKE_STRING(Y.RDB$FIELD_NAME); + field_name = (str*) MAKE_STRING(Y.RDB$FIELD_NAME); /* Strip off any trailing spaces from field name */ - tmp = field_name; + tmp = (TEXT*) field_name; while (*tmp && *tmp != ' ') *tmp++; *tmp = '\0'; - PUSH(field_name, ptr_fields); + PUSH((NOD) field_name, ptr_fields); ptr_fields = &(*ptr_fields)->lls_next; END_FOR COMMIT; @@ -783,11 +793,11 @@ FLD MET_field(REL relation, char *string) INTL_CS_COLL_TO_TTYPE(field->fld_charset_id, field->fld_collate_id); field->fld_symbol = symbol = - MSC_symbol(SYM_field, name, length, field); + MSC_symbol(SYM_field, name, length, (CTX) field); HSH_insert(symbol); field->fld_global = symbol = MSC_symbol(SYM_field, RFR.RDB$FIELD_SOURCE, - symbol_length(RFR.RDB$FIELD_SOURCE), field); + symbol_length(RFR.RDB$FIELD_SOURCE), (CTX) field); END_FOR; } else { @@ -827,11 +837,11 @@ FLD MET_field(REL relation, char *string) INTL_CS_COLL_TO_TTYPE(field->fld_charset_id, field->fld_collate_id); field->fld_symbol = symbol = - MSC_symbol(SYM_field, name, length, field); + MSC_symbol(SYM_field, name, length, (CTX) field); HSH_insert(symbol); field->fld_global = symbol = MSC_symbol(SYM_field, RFR.RDB$FIELD_SOURCE, - symbol_length(RFR.RDB$FIELD_SOURCE), field); + symbol_length(RFR.RDB$FIELD_SOURCE), (CTX) field); END_FOR; } @@ -863,7 +873,7 @@ NOD MET_fields(CTX context) reference = (REF) ALLOC(REF_LEN); reference->ref_field = field; reference->ref_context = context; - field_node = MSC_unary(nod_field, reference); + field_node = MSC_unary(nod_field, (NOD) reference); node->nod_arg[field->fld_position] = field_node; count++; } @@ -880,7 +890,7 @@ NOD MET_fields(CTX context) reference = (REF) ALLOC(REF_LEN); reference->ref_field = field; reference->ref_context = context; - field_node = MSC_unary(nod_field, reference); + field_node = MSC_unary(nod_field, (NOD) reference); node->nod_arg[field->fld_position] = field_node; count++; } @@ -903,7 +913,7 @@ NOD MET_fields(CTX context) SORTED BY RFR.RDB$FIELD_POSITION for (p = RFR.RDB$FIELD_NAME; *p && *p != ' '; p++); *p = 0; - PUSH(MET_field(relation, RFR.RDB$FIELD_NAME), &stack); + PUSH((NOD) MET_field(relation, RFR.RDB$FIELD_NAME), &stack); count++; END_FOR; @@ -914,7 +924,7 @@ NOD MET_fields(CTX context) reference = (REF) ALLOC(REF_LEN); reference->ref_field = field; reference->ref_context = context; - field_node = MSC_unary(nod_field, reference); + field_node = MSC_unary(nod_field, (NOD) reference); node->nod_arg[--count] = field_node; } @@ -1159,7 +1169,7 @@ PRC MET_get_procedure(DBB dbb, TEXT * string, TEXT * owner_name) field->fld_symbol = MSC_symbol(SYM_field, Y.RDB$PARAMETER_NAME, symbol_length(Y.RDB$PARAMETER_NAME), - field); + (CTX) field); /* If output parameter, insert in symbol table as a field. */ if (type) @@ -1418,7 +1428,7 @@ IND MET_index(DBB dbb, TEXT * string) FOR(REQUEST_HANDLE dbb->dbb_index_request) X IN RDB$INDICES WITH X.RDB$INDEX_NAME EQ name index = (IND) ALLOC(IND_LEN); - index->ind_symbol = symbol = MSC_symbol(SYM_index, name, length, index); + index->ind_symbol = symbol = MSC_symbol(SYM_index, name, length, (CTX) index); index->ind_relation = MET_get_relation(dbb, X.RDB$RELATION_NAME, ""); HSH_insert(symbol); @@ -1468,7 +1478,7 @@ void MET_load_hash_table( DBB dbb) START_TRANSACTION; - dbb->dbb_transaction = gds__trans; + dbb->dbb_transaction = (SLONG*) gds__trans; handle = handle2 = NULL; /* Determine if the database is V3. */ @@ -1481,7 +1491,7 @@ void MET_load_hash_table( DBB dbb) X.RDB$SYSTEM_FLAG = 1 post_v3_flag = TRUE; END_FOR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds__status, (void**) GDS_REF(handle)); if (!post_v3_flag) dbb->dbb_flags |= DBB_v3; @@ -1497,7 +1507,7 @@ void MET_load_hash_table( DBB dbb) relation->rel_id = X.RDB$RELATION_ID; relation->rel_symbol = symbol = MSC_symbol(SYM_relation, X.RDB$RELATION_NAME, - symbol_length(X.RDB$RELATION_NAME), relation); + symbol_length(X.RDB$RELATION_NAME), (CTX) relation); HSH_insert(symbol); relation->rel_dbkey = dbkey = MET_make_field("rdb$db_key", dtype_text, (X.RDB$DBKEY_LENGTH) ? X. @@ -1517,7 +1527,7 @@ void MET_load_hash_table( DBB dbb) relation->rel_id = X.RDB$RELATION_ID; relation->rel_symbol = symbol = MSC_symbol(SYM_relation, X.RDB$RELATION_NAME, - symbol_length(X.RDB$RELATION_NAME), relation); + symbol_length(X.RDB$RELATION_NAME), (CTX) relation); HSH_insert(symbol); relation->rel_dbkey = dbkey = MET_make_field("rdb$db_key", dtype_text, (X.RDB$DBKEY_LENGTH) ? X. @@ -1529,12 +1539,12 @@ void MET_load_hash_table( DBB dbb) if (!X.RDB$OWNER_NAME.NULL && (length = symbol_length(X.RDB$OWNER_NAME))) relation->rel_owner = - MSC_symbol(SYM_username, X.RDB$OWNER_NAME, length, NULL_PTR); + MSC_symbol(SYM_username, X.RDB$OWNER_NAME, length, (CTX) NULL_PTR); END_FOR; } - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds__status, (void**) GDS_REF(handle)); /* Pick up all procedures (necessary to parse parts of the GDML grammar) */ @@ -1546,17 +1556,17 @@ void MET_load_hash_table( DBB dbb) procedure->prc_id = X.RDB$PROCEDURE_ID; procedure->prc_symbol = symbol = MSC_symbol(SYM_procedure, X.RDB$PROCEDURE_NAME, - symbol_length(X.RDB$PROCEDURE_NAME), procedure); + symbol_length(X.RDB$PROCEDURE_NAME), (CTX) procedure); HSH_insert(symbol); if (!X.RDB$OWNER_NAME.NULL && (length = symbol_length(X.RDB$OWNER_NAME))) procedure->prc_owner = - MSC_symbol(SYM_username, X.RDB$OWNER_NAME, length, NULL_PTR); + MSC_symbol(SYM_username, X.RDB$OWNER_NAME, length, (CTX) NULL_PTR); END_FOR ON_ERROR /* assume pre V4 database, no procedures */ END_ERROR; if (handle) - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds__status, (void**) GDS_REF(handle)); /* Pickup any user defined functions. If the database does not support UDF's, * this may fail @@ -1579,7 +1589,7 @@ void MET_load_hash_table( DBB dbb) p = FUN.RDB$QUERY_NAME; p[length] = 0; } - udf->udf_symbol = symbol = MSC_symbol(SYM_udf, p, strlen(p), udf); + udf->udf_symbol = symbol = MSC_symbol(SYM_udf, p, strlen(p), (CTX) udf); HSH_insert(symbol); udf->udf_length = ARG.RDB$FIELD_LENGTH; @@ -1609,9 +1619,9 @@ void MET_load_hash_table( DBB dbb) } END_FOR ON_ERROR END_ERROR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds__status, (void**) GDS_REF(handle)); if (handle2) - gds__release_request(gds__status, GDS_REF(handle2)); + gds__release_request(gds__status, (void**) GDS_REF(handle2)); /* Pick up all Collation names, might have several collations * for a given character set. @@ -1629,7 +1639,7 @@ void MET_load_hash_table( DBB dbb) strcpy(iname->intlsym_name, p); iname->intlsym_database = dbb; iname->intlsym_symbol = symbol = - MSC_symbol(SYM_collate, p, strlen(p), iname); + MSC_symbol(SYM_collate, p, strlen(p), (CTX) iname); HSH_insert(symbol); iname->intlsym_type = INTLSYM_collation; iname->intlsym_flags = 0; @@ -1653,7 +1663,7 @@ void MET_load_hash_table( DBB dbb) p = TYPE.RDB$TYPE_NAME; length = symbol_length(p); p[length] = 0; - symbol = MSC_symbol(SYM_collate, p, length, iname); + symbol = MSC_symbol(SYM_collate, p, length, (CTX) iname); HSH_insert(symbol); END_FOR ON_ERROR END_ERROR; @@ -1661,9 +1671,9 @@ void MET_load_hash_table( DBB dbb) /* assume pre V4 database, no collations */ END_ERROR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds__status, (void**) GDS_REF(handle)); if (handle2) - gds__release_request(gds__status, GDS_REF(handle2)); + gds__release_request(gds__status, (void**) GDS_REF(handle2)); /* Now pick up all character set names - with the subtype set to * the type of the default collation for the character set. @@ -1679,7 +1689,7 @@ void MET_load_hash_table( DBB dbb) strcpy(iname->intlsym_name, p); iname->intlsym_database = dbb; iname->intlsym_symbol = symbol = - MSC_symbol(SYM_charset, p, strlen(p), iname); + MSC_symbol(SYM_charset, p, strlen(p), (CTX) iname); HSH_insert(symbol); iname->intlsym_type = INTLSYM_collation; iname->intlsym_flags = 0; @@ -1701,7 +1711,7 @@ void MET_load_hash_table( DBB dbb) p = TYPE.RDB$TYPE_NAME; length = symbol_length(p); p[length] = 0; - symbol = MSC_symbol(SYM_charset, p, length, iname); + symbol = MSC_symbol(SYM_charset, p, length, (CTX) iname); HSH_insert(symbol); END_FOR ON_ERROR END_ERROR; @@ -1709,9 +1719,9 @@ void MET_load_hash_table( DBB dbb) /* assume pre V4 database, no character sets */ END_ERROR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds__status, (void**) GDS_REF(handle)); if (handle2) - gds__release_request(gds__status, GDS_REF(handle2)); + gds__release_request(gds__status, (void**) GDS_REF(handle2)); /* Pick up name of database default character set for SQL */ @@ -1729,19 +1739,19 @@ void MET_load_hash_table( DBB dbb) /* Assume V3 Db, no default charset */ END_ERROR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds__status, (void**) GDS_REF(handle)); /* Pick up all generators for the database */ FOR(REQUEST_HANDLE handle) X IN RDB$GENERATORS symbol = MSC_symbol(SYM_generator, X.RDB$GENERATOR_NAME, - symbol_length(X.RDB$GENERATOR_NAME), dbb); + symbol_length(X.RDB$GENERATOR_NAME), (CTX) dbb); HSH_insert(symbol); END_FOR ON_ERROR END_ERROR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds__status, (void**) GDS_REF(handle)); /* now that we have attached to the database, resolve the character set * request (if any) (and if we can) @@ -1749,7 +1759,7 @@ void MET_load_hash_table( DBB dbb) if (dbb->dbb_c_lc_ctype) { if (get_intl_char_subtype - (&dbb->dbb_char_subtype, dbb->dbb_c_lc_ctype, + (&dbb->dbb_char_subtype, (UCHAR*) dbb->dbb_c_lc_ctype, strlen(dbb->dbb_c_lc_ctype), dbb)) dbb->dbb_know_subtype = 1; else { @@ -1780,7 +1790,7 @@ FLD MET_make_field(SCHAR * name, field->fld_length = length; field->fld_dtype = dtype; field->fld_symbol = symbol = - MSC_symbol(SYM_field, name, strlen(name), field); + MSC_symbol(SYM_field, name, strlen(name), (CTX) field); if (insert_flag) HSH_insert(symbol); @@ -1798,7 +1808,7 @@ IND MET_make_index(SCHAR * name) IND index; index = (IND) ALLOC(IND_LEN); - index->ind_symbol = MSC_symbol(SYM_index, name, strlen(name), index); + index->ind_symbol = MSC_symbol(SYM_index, name, strlen(name), (CTX) index); return index; } @@ -1815,7 +1825,7 @@ REL MET_make_relation(SCHAR * name) relation = (REL) ALLOC(REL_LEN); relation->rel_symbol = - MSC_symbol(SYM_relation, name, strlen(name), relation); + MSC_symbol(SYM_relation, name, strlen(name), (CTX) relation); return relation; } @@ -1860,7 +1870,7 @@ BOOLEAN MET_type(FLD field, TEXT * string, SSHORT * ptr) type->typ_field = field; *ptr = type->typ_value = X.RDB$TYPE; type->typ_symbol = symbol = - MSC_symbol(SYM_type, string, strlen(string), type); + MSC_symbol(SYM_type, string, strlen(string), (CTX) type); HSH_insert(symbol); return TRUE; } END_FOR ON_ERROR END_ERROR; @@ -2097,7 +2107,7 @@ static int resolve_charset_and_collation( /* Assume V3 DB, without default character set */ END_ERROR; - gds__release_request(gds__status, GDS_REF(request)); + gds__release_request(gds__status, (void**) GDS_REF(request)); if (charset == NULL) charset = (UCHAR *) DEFAULT_CHARACTER_SET_NAME; @@ -2118,7 +2128,7 @@ static int resolve_charset_and_collation( END_FOR ON_ERROR END_ERROR; - gds__release_request(gds__status, GDS_REF(request)); + gds__release_request(gds__status, (void**) GDS_REF(request)); return (found); } @@ -2133,7 +2143,7 @@ static int resolve_charset_and_collation( *id = MAP_CHARSET_TO_TTYPE(CS.RDB$CHARACTER_SET_ID); END_FOR ON_ERROR END_ERROR; - gds__release_request(gds__status, GDS_REF(request)); + gds__release_request(gds__status, (void**) GDS_REF(request)); return (found); } @@ -2151,7 +2161,7 @@ static int resolve_charset_and_collation( *id = MAP_CHARSET_TO_TTYPE(CS.RDB$CHARACTER_SET_ID); END_FOR ON_ERROR END_ERROR; - gds__release_request(gds__status, GDS_REF(request)); + gds__release_request(gds__status, (void**) GDS_REF(request)); return (found); } @@ -2162,7 +2172,7 @@ static int resolve_charset_and_collation( * Compute significant length of symbol. */ -static symbol_length( TEXT * string) +static int symbol_length( TEXT * string) { TEXT *p; int len; @@ -2185,7 +2195,7 @@ static symbol_length( TEXT * string) * length of string. */ -static upcase( TEXT * from, TEXT * to) +static int upcase( TEXT * from, TEXT * to) { TEXT *p, *end, c; diff --git a/src/gpre/gpre_meta_boot.cpp b/src/gpre/gpre_meta_boot.cpp new file mode 100644 index 0000000000..ab0896433a --- /dev/null +++ b/src/gpre/gpre_meta_boot.cpp @@ -0,0 +1,978 @@ +/* + * tab=4 + *____________________________________________________________ + * + * PROGRAM: C preprocessor + * MODULE: gpre_meta.e + * DESCRIPTION: Meta data interface to system + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + * + * + *____________________________________________________________ + * + * $Id: gpre_meta_boot.cpp,v 1.1 2001-07-12 06:32:02 bellardo Exp $ + */ + +#include +#include "../include/jrd/gds.h" +#include "../gpre/gpre.h" +#include "../jrd/license.h" +#include "../gpre/parse.h" +#include "../jrd/intl.h" +#include "../gpre/gpre_proto.h" +#include "../gpre/hsh_proto.h" +#include "../gpre/jrdme_proto.h" +#include "../gpre/gpre_meta.h" +#include "../gpre/msc_proto.h" +#include "../gpre/par_proto.h" +#include "../jrd/constants.h" +#include "../jrd/gds_proto.h" + +#define MAX_USER_LENGTH 33 +#define MAX_PASSWORD_LENGTH 33 + +extern enum lang_t sw_language; +extern USHORT sw_cstring; +extern DBB isc_databases; + +static CONST UCHAR blr_bpb[] = { isc_bpb_version1, + isc_bpb_source_type, 1, BLOB_blr, + isc_bpb_target_type, 1, BLOB_blr +}; + +#ifdef SCROLLABLE_CURSORS +static SCHAR db_version_info[] = { gds__info_base_level }; +#endif + +static SLONG array_size(FLD); +static void get_array(DBB, TEXT *, FLD); +static int get_intl_char_subtype(SSHORT *, UCHAR *, USHORT, DBB); +static int resolve_charset_and_collation(SSHORT *, UCHAR *, UCHAR *); +static int symbol_length(TEXT *); +static int upcase(TEXT *, TEXT *); + + +/*____________________________________________________________ + * + * Lookup a field by name in a context. + * If found, return field block. If not, return NULL. + */ + +FLD MET_context_field( CTX context, char *string) +{ + SYM symbol; + PRC procedure; + FLD field; + SCHAR name[NAME_SIZE]; + SSHORT length; + + if (context->ctx_relation) { + return (MET_field(context->ctx_relation, string)); + } + + if (!context->ctx_procedure) { + return NULL; + } + + strcpy(name, string); + procedure = context->ctx_procedure; + +/* At this point the procedure should have been scanned, so all + * its fields are in the symbol table. + */ + + field = NULL; + for (symbol = HSH_lookup(name); symbol; symbol = symbol->sym_homonym) { + if (symbol->sym_type == SYM_field && + (field = (FLD) symbol->sym_object) && + field->fld_procedure == procedure) + { + return field; + } + } + + return field; +} + + +/*____________________________________________________________ + * + * Initialize meta data access to database. If the + * database can't be opened, return FALSE. + */ + +BOOLEAN MET_database(DBB dbb, BOOLEAN print_version) +{ + SCHAR dpb[MAX_PASSWORD_LENGTH + MAX_USER_LENGTH + 5], *d, *p; + SCHAR buffer[16], *data; + SSHORT l; + static CONST UCHAR sql_version_info[] = { isc_info_base_level, + isc_info_ods_version, + isc_info_db_sql_dialect, + isc_info_end + }; + /* + ** Each info item requested will return + ** + ** 1 byte for the info item tag + ** 2 bytes for the length of the information that follows + ** 1 to 4 bytes of integer information + ** + ** isc_info_end will not have a 2-byte length - which gives us + ** some padding in the buffer. + */ + UCHAR sql_buffer[sizeof(sql_version_info) * (1 + 2 + 4)]; + UCHAR *ptr; + + +#ifndef REQUESTER + if (sw_language == lang_internal) { + JRDMET_init(dbb); + return TRUE; + } +#endif + assert(0); + return FALSE; +} + + +/*____________________________________________________________ + * + * Lookup a domain by name. + * Initialize the size of the field. + */ + +USHORT MET_domain_lookup(REQ request, FLD field, char *string) +{ + SYM symbol; + DBB dbb; + SCHAR name[NAME_SIZE]; + FLD d_field; + SSHORT length; + SSHORT found = FALSE; + + strcpy(name, string); + +/* Lookup domain. If we find it in the hash table, and it is not the + * field we a currently looking at, use it. Else look it up from the + * database. + */ + + for (symbol = HSH_lookup(name); symbol; symbol = symbol->sym_homonym) + if ((symbol->sym_type == SYM_field) && + ((d_field = (FLD) symbol->sym_object) && (d_field != field))) { + field->fld_length = d_field->fld_length; + field->fld_scale = d_field->fld_scale; + field->fld_sub_type = d_field->fld_sub_type; + field->fld_dtype = d_field->fld_dtype; + field->fld_ttype = d_field->fld_ttype; + field->fld_charset_id = d_field->fld_charset_id; + field->fld_collate_id = d_field->fld_collate_id; + field->fld_char_length = d_field->fld_char_length; + return TRUE; + } + + if (!request) + return FALSE; + + assert(0); + return FALSE; +} + + +/*____________________________________________________________ + * + * Gets the default value for a domain of an existing table + */ + +BOOLEAN MET_get_domain_default(DBB dbb, + TEXT * domain_name, + TEXT * buffer, USHORT buff_length) +{ + SLONG *DB, *gds__trans; + SCHAR name[NAME_SIZE]; + SSHORT length; + BOOLEAN has_default; + ISC_STATUS status_vect[20]; + isc_blob_handle blob_handle = NULL; + ISC_QUAD *blob_id; + TEXT *ptr_in_buffer; + STATUS stat; + + + strcpy(name, domain_name); + has_default = FALSE; + + assert(0); + return FALSE; +} + + +/*____________________________________________________________ + * + * Gets the default value for a column of an existing table. + * Will check the default for the column of the table, if that is + * not present, will check for the default of the relevant domain + * + * The default blr is returned in buffer. The blr is of the form + * blr_version4 blr_literal ..... blr_eoc + * + * Reads the system tables RDB$FIELDS and RDB$RELATION_FIELDS. + */ + +BOOLEAN MET_get_column_default(REL relation, + TEXT * column_name, + TEXT * buffer, USHORT buff_length) +{ + DBB dbb; + SLONG *DB, *gds__trans; + SCHAR name[NAME_SIZE]; + SSHORT length; + BOOLEAN has_default; + ISC_STATUS status_vect[20]; + isc_blob_handle blob_handle = NULL; + ISC_QUAD *blob_id; + TEXT *ptr_in_buffer; + STATUS stat; + + strcpy(name, column_name); + has_default = FALSE; + assert(0); + return FALSE; +} + + +/*____________________________________________________________ + * + * Lookup the fields for the primary key + * index on a relation, returning a list + * of the fields. + */ + +LLS MET_get_primary_key(DBB dbb, TEXT * relation_name) +{ + LLS fields = NULL, *ptr_fields; + SLONG *DB, *gds__trans; + SCHAR name[NAME_SIZE]; + STR field_name; + TEXT *tmp; + + strcpy(name, relation_name); + + if (dbb == NULL) + return NULL; + + if ((dbb->dbb_handle == NULL) && !MET_database(dbb, FALSE)) + CPR_exit(FINI_ERROR); + + assert(dbb->dbb_transaction == NULL); + gds__trans = NULL; + assert(0); + return FALSE; +} + + +/*____________________________________________________________ + * + * Lookup a field by name in a relation. + * If found, return field block. If not, return NULL. + */ + +FLD MET_field(REL relation, char *string) +{ + SYM symbol; + FLD field; + DBB dbb; + SCHAR name[NAME_SIZE]; + SSHORT length; + + strcpy(name, string); + length = strlen(name); + +/* Lookup field. If we find it, nifty. If not, look it up in the + * database. + */ + + for (symbol = HSH_lookup(name); symbol; symbol = symbol->sym_homonym) + if (symbol->sym_type == SYM_keyword && + symbol->sym_keyword == (int) KW_DBKEY) return relation->rel_dbkey; + else if (symbol->sym_type == SYM_field && + (field = (FLD) symbol->sym_object) && + field->fld_relation == relation) return field; + + if (sw_language == lang_internal) + return NULL; + assert(0); + return NULL; +} + + +/*____________________________________________________________ + * + * Return a list of the fields in a relation + */ + +NOD MET_fields(CTX context) +{ + DBB dbb; + FLD field; + LLS stack; + NOD node, field_node; + REF reference; + PRC procedure; + REL relation; + TEXT *p; + int count; + + if (procedure = context->ctx_procedure) { + node = MAKE_NODE(nod_list, procedure->prc_out_count); + count = 0; + for (field = procedure->prc_outputs; field; field = field->fld_next) { + reference = (REF) ALLOC(REF_LEN); + reference->ref_field = field; + reference->ref_context = context; + field_node = MSC_unary(nod_field, (NOD)reference); + node->nod_arg[field->fld_position] = field_node; + count++; + } + return node; + } + + relation = context->ctx_relation; + if (relation->rel_meta) { + for (count = 0, field = relation->rel_fields; field; + field = field->fld_next) count++; + node = MAKE_NODE(nod_list, count); + count = 0; + for (field = relation->rel_fields; field; field = field->fld_next) { + reference = (REF) ALLOC(REF_LEN); + reference->ref_field = field; + reference->ref_context = context; + field_node = MSC_unary(nod_field, (NOD)reference); + node->nod_arg[field->fld_position] = field_node; + count++; + } + return node; + } + + if (sw_language == lang_internal) + return NULL; + assert(0); + return NULL; +} + + +/*____________________________________________________________ + * + * Shutdown all attached databases. + */ + +void MET_fini( DBB end) +{ + DBB dbb; + + return; +} + + +/*____________________________________________________________ + * + * Lookup a generator by name. + * If found, return string. If not, return NULL. + */ + +SCHAR *MET_generator(TEXT * string, DBB dbb) +{ + SYM symbol; + SCHAR *gen_name = NULL; + SCHAR name[NAME_SIZE]; + SSHORT length; + + strcpy(name, string); + + for (symbol = HSH_lookup(name); symbol; symbol = symbol->sym_homonym) + if ((symbol->sym_type == SYM_generator) && + (dbb == (DBB) (symbol->sym_object))) return symbol->sym_string; + + return NULL; +} + + +/*____________________________________________________________ + * + * Compute internal datatype and length based on system relation field values. + */ + +USHORT MET_get_dtype(USHORT blr_dtype, USHORT sub_type, USHORT * length) +{ + USHORT l, dtype; + + l = *length; + + switch (blr_dtype) { + case blr_varying: + case blr_text: + dtype = dtype_text; + if (sw_cstring && !SUBTYPE_ALLOWS_NULLS(sub_type)) { + ++l; + dtype = dtype_cstring; + } + break; + + case blr_cstring: + dtype = dtype_cstring; + ++l; + break; + + case blr_short: + dtype = dtype_short; + l = sizeof(SSHORT); + break; + + case blr_long: + dtype = dtype_long; + l = sizeof(SLONG); + break; + + case blr_quad: + dtype = dtype_quad; + l = sizeof(GDS__QUAD); + break; + + case blr_float: + dtype = dtype_real; + l = sizeof(float); + break; + + case blr_double: + dtype = dtype_double; + l = sizeof(double); + break; + + case blr_blob: + dtype = dtype_blob; + l = sizeof(GDS__QUAD); + break; + +/** Begin sql date/time/timestamp **/ + case blr_sql_date: + dtype = dtype_sql_date; + l = sizeof(ISC_DATE); + break; + + case blr_sql_time: + dtype = dtype_sql_time; + l = sizeof(ISC_TIME); + break; + + case blr_timestamp: + dtype = dtype_timestamp; + l = sizeof(ISC_TIMESTAMP); + break; +/** Begin sql date/time/timestamp **/ + + case blr_int64: + dtype = dtype_int64; + l = sizeof(ISC_INT64); + break; + + default: + CPR_error("datatype not supported"); + } + + *length = l; + + return dtype; +} + + +/*____________________________________________________________ + * + * Lookup a procedure (represented by a token) in a database. + * Return a procedure block (if name is found) or NULL. + * + * This function has been cloned into MET_get_udf + */ + +PRC MET_get_procedure(DBB dbb, TEXT * string, TEXT * owner_name) +{ + SYM symbol; + FLD *fld_list, field; + PRC procedure; + USHORT length, type, count; + SCHAR name[NAME_SIZE], owner[NAME_SIZE]; + + strcpy(name, string); + strcpy(owner, owner_name); + procedure = NULL; + + for (symbol = HSH_lookup(name); symbol; symbol = symbol->sym_homonym) + if (symbol->sym_type == SYM_procedure && + (procedure = (PRC) symbol->sym_object) && + procedure->prc_database == dbb && + (!owner[0] || + (procedure->prc_owner + && !strcmp(owner, procedure->prc_owner->sym_string)))) break; + + if (!procedure) + return NULL; + + if (procedure->prc_flags & PRC_scanned) + return procedure; + + assert(0); + return NULL; +} + + +/*____________________________________________________________ + * + * Lookup a relation (represented by a token) in a database. + * Return a relation block (if name is found) or NULL. + */ + +REL MET_get_relation(DBB dbb, TEXT * string, TEXT * owner_name) +{ + SYM symbol; + REL relation; + SCHAR name[NAME_SIZE], owner[NAME_SIZE]; + + strcpy(name, string); + strcpy(owner, owner_name); + + for (symbol = HSH_lookup(name); symbol; symbol = symbol->sym_homonym) + if (symbol->sym_type == SYM_relation && + (relation = (REL) symbol->sym_object) && + relation->rel_database == dbb && + (!owner[0] || + (relation->rel_owner + && !strcmp(owner, + relation->rel_owner->sym_string)))) return relation; + + return NULL; +} + + +/*____________________________________________________________ + * + */ + +INTLSYM MET_get_text_subtype(SSHORT ttype) +{ + INTLSYM p; + + for (p = text_subtypes; p; p = p->intlsym_next) + if (p->intlsym_ttype == ttype) + return p; + + return NULL; +} + + +/*____________________________________________________________ + * + * Lookup a udf (represented by a token) in a database. + * Return a udf block (if name is found) or NULL. + * + * This function was cloned from MET_get_procedure + */ + +UDF MET_get_udf(DBB dbb, TEXT * string) +{ + SYM symbol; + FLD field; + UDF udf; + USHORT length, count; + SCHAR name[NAME_SIZE]; + + strcpy(name, string); + udf = NULL; + for (symbol = HSH_lookup(name); symbol; symbol = symbol->sym_homonym) + if (symbol->sym_type == SYM_udf && + (udf = (UDF) symbol->sym_object) && udf->udf_database == dbb) + break; + if (!udf) + return NULL; + + assert(0); + return NULL; +} + + +/*____________________________________________________________ + * + * Return TRUE if the passed view_name represents a + * view with the passed relation as a base table + * (the relation could be an alias). + */ + +REL MET_get_view_relation(REQ request, + char *view_name, + char *relation_or_alias, USHORT level) +{ + DBB dbb; + TEXT *p; + REL relation; + + assert(0); + return NULL; +} + + +/*____________________________________________________________ + * + * Lookup an index for a database. + * Return an index block (if name is found) or NULL. + */ + +IND MET_index(DBB dbb, TEXT * string) +{ + SYM symbol; + IND index; + SCHAR name[NAME_SIZE]; + SSHORT length; + + strcpy(name, string); + length = strlen(name); + + for (symbol = HSH_lookup(name); symbol; symbol = symbol->sym_homonym) + if (symbol->sym_type == SYM_index && + (index = (IND) symbol->sym_object) && + index->ind_relation->rel_database == dbb) + return index; + + if (sw_language == lang_internal) + return NULL; + assert(0); + return NULL; +} + + +/*____________________________________________________________ + * + * Load all of the relation names + * and user defined function names + * into the symbol (hash) table. + */ + +void MET_load_hash_table( DBB dbb) +{ + REL relation; + PRC procedure; + SYM symbol; + FLD dbkey; + UDF udf; + TEXT *p; + int *handle, *handle2; + USHORT post_v3_flag; + SLONG length; + INTLSYM iname; + +/* If this is an internal ISC access method invocation, don't do any of this + * stuff + */ + + if (sw_language == lang_internal) + return; + assert(0); + return; +} + + +/*____________________________________________________________ + * + * Make a field symbol. + */ + +FLD MET_make_field(SCHAR * name, + SSHORT dtype, SSHORT length, BOOLEAN insert_flag) +{ + FLD field; + SYM symbol; + + field = (FLD) ALLOC(FLD_LEN); + field->fld_length = length; + field->fld_dtype = dtype; + field->fld_symbol = symbol = + MSC_symbol(SYM_field, name, strlen(name), (CTX)field); + if (insert_flag) + HSH_insert(symbol); + + return field; +} + + +/*____________________________________________________________ + * + * Make an index symbol. + */ + +IND MET_make_index(SCHAR * name) +{ + IND index; + + index = (IND) ALLOC(IND_LEN); + index->ind_symbol = MSC_symbol(SYM_index, name, strlen(name), (CTX)index); + + return index; +} + + +/*____________________________________________________________ + * + * Make an relation symbol. + */ + +REL MET_make_relation(SCHAR * name) +{ + REL relation; + + relation = (REL) ALLOC(REL_LEN); + relation->rel_symbol = + MSC_symbol(SYM_relation, name, strlen(name), (CTX)relation); + + return relation; +} + + +/*____________________________________________________________ + * + * Lookup a type name for a field. + */ + +BOOLEAN MET_type(FLD field, TEXT * string, SSHORT * ptr) +{ + REL relation; + DBB dbb; + SYM symbol; + TYP type; + UCHAR buffer[32]; /* BASED ON RDB$TYPES.RDB$TYPE_NAME */ + UCHAR *p; + + for (symbol = HSH_lookup(string); symbol; symbol = symbol->sym_homonym) + if (symbol->sym_type == SYM_type && + (type = (TYP) symbol->sym_object) && + (!type->typ_field || type->typ_field == field)) { + *ptr = type->typ_value; + return TRUE; + } + + assert(0); + return FALSE; +} + + +/*____________________________________________________________ + * + * Lookup an index for a database. + * + * Return: TRUE if the trigger exists + * FALSE otherwise + */ + +BOOLEAN MET_trigger_exists(DBB dbb, TEXT * trigger_name) +{ + SCHAR name[NAME_SIZE]; + SSHORT length; + + strcpy(name, trigger_name); + + assert(0); + return FALSE; +} + + +/*____________________________________________________________ + * + * Compute and return the size of the array. + */ + +static SLONG array_size( FLD field) +{ + ARY array_block; + DIM dimension; + SLONG count; + + array_block = field->fld_array_info; + count = field->fld_array->fld_length; + for (dimension = array_block->ary_dimension; dimension; + dimension = dimension->dim_next) count = + count * (dimension->dim_upper - dimension->dim_lower + 1); + + return count; +} + + +/*____________________________________________________________ + * + * See if field is array. + */ + +static void get_array( DBB dbb, TEXT * field_name, FLD field) +{ + FLD sub_field; + ARY array_block; + DIM dimension_block, last_dimension_block; + + assert(0); + return; +} + + +/*____________________________________________________________ + * + * Character types can be specified as either: + * b) A POSIX style locale name "." + * or + * c) A simple name (using default collation) + * d) A simple name (use charset for collation) + * + * Given an ASCII7 string which could be any of the above, try to + * resolve the name in the order b, c, d. + * b) is only tried iff the name contains a period. + * (in which case c) and d) are not tried). + * + * Return: + * 1 if no errors (and *id is set). + * 0 if the name could not be resolved. + */ + +static int get_intl_char_subtype( + SSHORT * id, + UCHAR * name, USHORT length, DBB dbb) +{ + UCHAR buffer[32]; /* BASED ON RDB$COLLATION_NAME */ + UCHAR *p; + UCHAR *period = NULL; + UCHAR *end_name; + int found_it = 0; + + assert(id != NULL); + assert(name != NULL); + assert(dbb != NULL); + + assert(0); + return (0); +} + + +/*____________________________________________________________ + * + * Given ASCII7 name of charset & collation + * resolve the specification to a ttype (id) that implements + * it. + * + * Inputs: + * (charset) + * ASCII7z name of characterset. + * NULL (implying unspecified) means use the character set + * for defined for (collation). + * + * (collation) + * ASCII7z name of collation. + * NULL means use the default collation for (charset). + * + * Outputs: + * (*id) + * Set to subtype specified by this name. + * + * Return: + * 1 if no errors (and *id is set). + * 0 if either name not found. + * or if names found, but the collation isn't for the specified + * character set. + */ + +static int resolve_charset_and_collation( + SSHORT * id, + UCHAR * charset, UCHAR * collation) +{ + int found = 0; + int *request = NULL; + + assert(id != NULL); + + assert(0); + return (0); +} + + +/*____________________________________________________________ + * + * Compute significant length of symbol. + */ + +static int symbol_length( TEXT * string) +{ + TEXT *p; + int len; + + len = strlen(string); + + p = string + (len - 1); + + for (; p >= string && *p == ' '; p--); + if (p < string) + return 0; + ++p; + return p - string; +} + + +/*____________________________________________________________ + * + * Upcase a string into another string. Return + * length of string. + */ + +static int upcase( TEXT * from, TEXT * to) +{ + TEXT *p, *end, c; + + p = to; + end = to + NAME_SIZE; + + while (p < end && (c = *from++)) { + *p++ = UPPER(c); +#ifdef JPN_SJIS + /* Do not upcase second byte of a sjis kanji character */ + + if (SJIS1(c) && p < end && (c = *from++)) + *p++ = c; +#endif + } + + *p = 0; + + return p - to; +} + +STATUS API_ROUTINE isc_print_blr(SCHAR * blr, + void (*callback) (), void *callback_argument, SSHORT language) +{ + return gds__print_blr((UCHAR *) blr, callback, + (SCHAR *) callback_argument, language); +} + +void DLL_EXPORT CVT_move (struct dsc * a, struct dsc * b, FPTR_VOID c) +{ + assert(0); + /* Not available in boot_gpre */ +} + diff --git a/src/gpre/int_cxx.cpp b/src/gpre/int_cxx.cpp new file mode 100644 index 0000000000..546754ff54 --- /dev/null +++ b/src/gpre/int_cxx.cpp @@ -0,0 +1,787 @@ +//____________________________________________________________ +// +// PROGRAM: C preprocess +// MODULE: int.cpp +// DESCRIPTION: Code generate for internal JRD modules +// +// The contents of this file are subject to the Interbase Public +// License Version 1.0 (the "License"); you may not use this file +// except in compliance with the License. You may obtain a copy +// of the License at http://www.Inprise.com/IPL.html +// +// Software distributed under the License is distributed on an +// "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +// or implied. See the License for the specific language governing +// rights and limitations under the License. +// +// The Original Code was created by Inprise Corporation +// and its predecessors. Portions created by Inprise Corporation are +// Copyright (C) Inprise Corporation. +// +// All Rights Reserved. +// Contributor(s): ______________________________________. +// TMN (Mike Nordell) 11.APR.2001 - Reduce compiler warnings in generated code +// +// +//____________________________________________________________ +// +// $Id: int_cxx.cpp,v 1.1 2001-07-12 06:32:02 bellardo Exp $ +// + +#include "../jrd/ib_stdio.h" +#include "../jrd/common.h" +#include +#include "../include/jrd/gds.h" +#include "../gpre/gpre.h" +#include "../gpre/gpre_proto.h" +#include "../gpre/lang_proto.h" +#include "../jrd/gds_proto.h" + +static void align(int); +static void asgn_from(REF, int); +static void asgn_to(REF); +static void gen_at_end(ACT, int); +static int gen_blr(int *, int, TEXT *); +static void gen_compile(REQ, int); +static void gen_database(ACT, int); +static void gen_emodify(ACT, int); +static void gen_estore(ACT, int); +static void gen_endfor(ACT, int); +static void gen_erase(ACT, int); +static void gen_for(ACT, int); +static TEXT *gen_name(TEXT *, REF); +static void gen_raw(REQ); +static void gen_receive(REQ, POR); +static void gen_request(REQ); +static void gen_routine(ACT, int); +static void gen_s_end(ACT, int); +static void gen_s_fetch(ACT, int); +static void gen_s_start(ACT, int); +static void gen_send(REQ, POR, int); +static void gen_start(REQ, POR, int); +static void gen_type(ACT, int); +static void gen_variable(ACT, int); +static void make_port(POR, int); +static void printa(int, TEXT *, ...); + +static int first_flag = 0; + +#define INDENT 3 +#define BEGIN printa (column, "{") +#define END printa (column, "}") + +#if !(defined JPN_SJIS || defined JPN_EUC) +#define GDS_VTOV "gds__vtov" +#define JRD_VTOF "jrd_vtof" +#define VTO_CALL "%s ((SCHAR*)%s, (SCHAR*)%s, %d);" +#else +#define GDS_VTOV "gds__vtov2" +#define JRD_VTOF "jrd_vtof2" +#define VTO_CALL "%s (%s, %s, %d, %d);" +#endif + + +//____________________________________________________________ +// +// + +void INT_CXX_action( ACT action, int column) +{ + +// Put leading braces where required + + switch (action->act_type) { + case ACT_for: + case ACT_insert: + case ACT_modify: + case ACT_store: + case ACT_s_fetch: + case ACT_s_start: + BEGIN; + align(column); + } + + switch (action->act_type) { + case ACT_at_end: + gen_at_end(action, column); + return; + case ACT_b_declare: + case ACT_database: + gen_database(action, column); + return; + case ACT_endfor: + gen_endfor(action, column); + break; + case ACT_endmodify: + gen_emodify(action, column); + break; + case ACT_endstore: + gen_estore(action, column); + break; + case ACT_erase: + gen_erase(action, column); + return; + case ACT_for: + gen_for(action, column); + return; + case ACT_hctef: + break; + case ACT_insert: + case ACT_routine: + gen_routine(action, column); + return; + case ACT_s_end: + gen_s_end(action, column); + return; + case ACT_s_fetch: + gen_s_fetch(action, column); + return; + case ACT_s_start: + gen_s_start(action, column); + break; + case ACT_type: + gen_type(action, column); + return; + case ACT_variable: + gen_variable(action, column); + return; + default: + return; + } + +// Put in a trailing brace for those actions still with us + + END; +} + + +//____________________________________________________________ +// +// Align output to a specific column for output. +// + +static void align( int column) +{ + int i; + + if (column < 0) + return; + + ib_putc('\n', out_file); + + for (i = column / 8; i; --i) + ib_putc('\t', out_file); + + for (i = column % 8; i; --i) + ib_putc(' ', out_file); +} + + +//____________________________________________________________ +// +// Build an assignment from a host language variable to +// a port variable. +// + +static void asgn_from( REF reference, int column) +{ + FLD field; + TEXT *value, variable[20], temp[20]; + + for (; reference; reference = reference->ref_next) { + field = reference->ref_field; + align(column); + gen_name(variable, reference); + if (reference->ref_source) + value = gen_name(temp, reference->ref_source); + else + value = reference->ref_value; + + /* To avoid chopping off a double byte kanji character in between + the two bytes, generate calls to gds__ftof2 gds$_vtof2, + gds$_vtov2 and jrd_vtof2 wherever necessary */ + + if (!field || field->fld_dtype == dtype_text) + ib_fprintf(out_file, VTO_CALL, + JRD_VTOF, + value, variable, field->fld_length, sw_interp); + else if (!field || field->fld_dtype == dtype_cstring) + ib_fprintf(out_file, VTO_CALL, + GDS_VTOV, + value, variable, field->fld_length, sw_interp); + else + ib_fprintf(out_file, "%s = %s;", variable, value); + } + +} + + +//____________________________________________________________ +// +// Build an assignment to a host language variable from +// a port variable. +// + +static void asgn_to( REF reference) +{ + FLD field; + REF source; + TEXT s[20]; + + source = reference->ref_friend; + field = source->ref_field; + gen_name(s, source); + +#if (! (defined JPN_SJIS || defined JPN_EUC) ) + + if (!field || field->fld_dtype == dtype_text) + ib_fprintf(out_file, "gds__ftov (%s, %d, %s, sizeof (%s));", + s, + field->fld_length, + reference->ref_value, reference->ref_value); + else if (!field || field->fld_dtype == dtype_cstring) + ib_fprintf(out_file, "gds__vtov ((SCHAR*)%s, (SCHAR*)%s, sizeof (%s));", + s, reference->ref_value, reference->ref_value); + +#else + +// To avoid chopping off a double byte kanji character in between +// the two bytes, generate calls to gds__ftof2 gds$_vtof2 and +// gds$_vtov2 wherever necessary + + if (!field || field->fld_dtype == dtype_text) + ib_fprintf(out_file, "gds__ftov2 (%s, %d, %s, sizeof (%s), %d);", + s, + field->fld_length, + reference->ref_value, reference->ref_value, sw_interp); + else if (!field || field->fld_dtype == dtype_cstring) + ib_fprintf(out_file, "gds__vtov2 (%s, %s, sizeof (%s), %d);", + s, reference->ref_value, reference->ref_value, sw_interp); + +#endif + else + ib_fprintf(out_file, "%s = %s;", reference->ref_value, s); +} + + +//____________________________________________________________ +// +// Generate code for AT END clause of FETCH. +// + +static void gen_at_end( ACT action, int column) +{ + REQ request; + TEXT s[20]; + + request = action->act_request; + printa(column, "if (!%s) ", gen_name(s, request->req_eof)); +} + + +//____________________________________________________________ +// +// Callback routine for BLR pretty printer. +// + +static int gen_blr( int *user_arg, int offset, TEXT * string) +{ + + ib_fprintf(out_file, "%s\n", string); + + return TRUE; +} + + +//____________________________________________________________ +// +// Generate text to compile a request. +// + +static void gen_compile( REQ request, int column) +{ + DBB db; + SYM symbol; + + column += INDENT; + db = request->req_database; + symbol = db->dbb_name; + ib_fprintf(out_file, "if (!%s)", request->req_handle); + align(column); + ib_fprintf(out_file, + "%s = (BLK) CMP_compile2 (tdbb, (UCHAR*)jrd_%d, TRUE);", + request->req_handle, request->req_ident); +} + + +//____________________________________________________________ +// +// Generate insertion text for the database statement. +// + +static void gen_database( ACT action, int column) +{ + REQ request; + + if (first_flag++ != 0) + return; + + align(0); + for (request = requests; request; request = request->req_next) + gen_request(request); +} + + +//____________________________________________________________ +// +// Generate substitution text for END_MODIFY. +// + +static void gen_emodify( ACT action, int column) +{ + UPD modify; + REF reference, source; + FLD field; + TEXT s1[20], s2[20]; + + modify = (UPD) action->act_object; + + for (reference = modify->upd_port->por_references; reference; + reference = reference->ref_next) { + if (!(source = reference->ref_source)) + continue; + field = reference->ref_field; + align(column); + +#if (! (defined JPN_SJIS || defined JPN_EUC) ) + + if (field->fld_dtype == dtype_text) + ib_fprintf(out_file, "jrd_ftof (%s, %d, %s, %d);", + gen_name(s1, source), + field->fld_length, + gen_name(s2, reference), field->fld_length); + else if (field->fld_dtype == dtype_cstring) + ib_fprintf(out_file, "gds__vtov ((SCHAR*)%s, (SCHAR*)%s, %d);", + gen_name(s1, source), + gen_name(s2, reference), field->fld_length); + +#else + + /* To avoid chopping off a double byte kanji character in between + the two bytes, generate calls to gds__ftof2 gds$_vtof2 and + gds$_vtov2 wherever necessary + Cannot find where jrd_fof is defined. It needs Japanization too */ + + if (field->fld_dtype == dtype_text) + ib_fprintf(out_file, "jrd_ftof (%s, %d, %s, %d);", + gen_name(s1, source), + field->fld_length, + gen_name(s2, reference), field->fld_length); + else if (field->fld_dtype == dtype_cstring) + ib_fprintf(out_file, "gds__vtov2 (%s, %s, %d, %d);", + gen_name(s1, source), + gen_name(s2, reference), field->fld_length, sw_interp); + +#endif + else + ib_fprintf(out_file, "%s = %s;", + gen_name(s1, reference), gen_name(s2, source)); + } + + gen_send(action->act_request, modify->upd_port, column); +} + + +//____________________________________________________________ +// +// Generate substitution text for END_STORE. +// + +static void gen_estore( ACT action, int column) +{ + REQ request; + + request = action->act_request; + align(column); + gen_compile(request, column); + gen_start(request, request->req_primary, column); +} + + +//____________________________________________________________ +// +// Generate definitions associated with a single request. +// + +static void gen_endfor( ACT action, int column) +{ + REQ request; + + request = action->act_request; + column += INDENT; + + if (request->req_sync) + gen_send(request, request->req_sync, column); + + END; +} + + +//____________________________________________________________ +// +// Generate substitution text for ERASE. +// + +static void gen_erase( ACT action, int column) +{ + UPD erase; + + erase = (UPD) action->act_object; + gen_send(erase->upd_request, erase->upd_port, column); +} + + +//____________________________________________________________ +// +// Generate substitution text for FOR statement. +// + +static void gen_for( ACT action, int column) +{ + REQ request; + TEXT s[20]; + + gen_s_start(action, column); + + align(column); + request = action->act_request; + ib_fprintf(out_file, "while (1)"); + column += INDENT; + BEGIN; + align(column); + gen_receive(action->act_request, request->req_primary); + align(column); + ib_fprintf(out_file, "if (!%s) break;", gen_name(s, request->req_eof)); +} + + +//____________________________________________________________ +// +// Generate a name for a reference. Name is constructed from +// port and parameter idents. +// + +static TEXT *gen_name( TEXT * string, REF reference) +{ + + sprintf(string, "jrd_%d.jrd_%d", + reference->ref_port->por_ident, reference->ref_ident); + + return string; +} + + +//____________________________________________________________ +// +// Generate BLR in raw, numeric form. Ugly but dense. +// + +static void gen_raw( REQ request) +{ + UCHAR *blr, c; + TEXT buffer[80], *p; + int blr_length; + + blr = request->req_blr; + blr_length = request->req_length; + p = buffer; + align(0); + + while (--blr_length) { + c = *blr++; + if ((c >= 'A' && c <= 'Z') || c == '$' || c == '_') + sprintf(p, "'%c',", c); + else + sprintf(p, "%d,", c); + while (*p) + p++; + if (p - buffer > 60) { + ib_fprintf(out_file, "%s\n", buffer); + p = buffer; + *p = 0; + } + } + + ib_fprintf(out_file, "%s%d", buffer, blr_eoc); +} + + +//____________________________________________________________ +// +// Generate a send or receive call for a port. +// + +static void gen_receive( REQ request, POR port) +{ + + ib_fprintf(out_file, + "EXE_receive (tdbb, (REQ)%s, %d, %d, (UCHAR*)&jrd_%d);", + request->req_handle, port->por_msg_number, port->por_length, + port->por_ident); +} + + +//____________________________________________________________ +// +// Generate definitions associated with a single request. +// + +static void gen_request( REQ request) +{ + + if (!(request->req_flags & REQ_exp_hand)) + ib_fprintf(out_file, "static void\t*%s;\t/* request handle */\n", + request->req_handle); + + ib_fprintf(out_file, "static CONST UCHAR\tjrd_%d [%d] =", + request->req_ident, request->req_length); + align(INDENT); + ib_fprintf(out_file, "{\t/* blr string */\n", request->req_ident); + + if (sw_raw) + gen_raw(request); + else + gds__print_blr(request->req_blr, (FPTR_VOID) gen_blr, 0, 0); + + printa(INDENT, "};\t/* end of blr string */\n"); +} + + +//____________________________________________________________ +// +// Process routine head. If there are requests in the +// routine, insert local definitions. +// + +static void gen_routine( ACT action, int column) +{ + REQ request; + POR port; + + for (request = (REQ) action->act_object; request; + request = request->req_routine) for (port = request->req_ports; port; + port = port->por_next) + make_port(port, column + INDENT); +} + + +//____________________________________________________________ +// +// Generate substitution text for END_STREAM. +// + +static void gen_s_end( ACT action, int column) +{ + REQ request; + + request = action->act_request; + printa(column, "EXE_unwind (tdbb, %s);", request->req_handle); +} + + +//____________________________________________________________ +// +// Generate substitution text for FETCH. +// + +static void gen_s_fetch( ACT action, int column) +{ + REQ request; + + request = action->act_request; + if (request->req_sync) + gen_send(request, request->req_sync, column); + + gen_receive(action->act_request, request->req_primary); +} + + +//____________________________________________________________ +// +// Generate text to compile and start a stream. This is +// used both by START_STREAM and FOR +// + +static void gen_s_start( ACT action, int column) +{ + REQ request; + POR port; + + request = action->act_request; + gen_compile(request, column); + + if (port = request->req_vport) + asgn_from(port->por_references, column); + + gen_start(request, port, column); +} + + +//____________________________________________________________ +// +// Generate a send or receive call for a port. +// + +static void gen_send( REQ request, POR port, int column) +{ + align(column); + ib_fprintf(out_file, "EXE_send (tdbb, (REQ)%s, %d, %d, (UCHAR*)&jrd_%d);", + request->req_handle, + port->por_msg_number, port->por_length, port->por_ident); +} + + +//____________________________________________________________ +// +// Generate a START. +// + +static void gen_start( REQ request, POR port, int column) +{ + align(column); + + ib_fprintf(out_file, "EXE_start (tdbb, (REQ)%s, %s);", + request->req_handle, request->req_trans); + + if (port) + gen_send(request, port, column); +} + + +//____________________________________________________________ +// +// Substitute for a variable reference. +// + +static void gen_type( ACT action, int column) +{ + + printa(column, "%ld", action->act_object); +} + + +//____________________________________________________________ +// +// Substitute for a variable reference. +// + +static void gen_variable( ACT action, int column) +{ + TEXT s[20]; + + align(column); + ib_fprintf(out_file, gen_name(s, action->act_object)); + +} + + +//____________________________________________________________ +// +// Insert a port record description in output. +// + +static void make_port( POR port, int column) +{ + FLD field; + REF reference; + SYM symbol; + TEXT *name, s[50]; + + printa(column, "struct {"); + + for (reference = port->por_references; reference; + reference = reference->ref_next) { + align(column + INDENT); + field = reference->ref_field; + symbol = field->fld_symbol; + name = symbol->sym_string; + switch (field->fld_dtype) { + case dtype_short: + ib_fprintf(out_file, " SSHORT jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; + + case dtype_long: + ib_fprintf(out_file, " SLONG jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; + +// ** Begin sql date/time/timestamp * + case dtype_sql_date: + ib_fprintf(out_file, " ISC_DATE jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; + + case dtype_sql_time: + ib_fprintf(out_file, " ISC_TIME jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; + + case dtype_timestamp: + ib_fprintf(out_file, " ISC_TIMESTAMP jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; +// ** End sql date/time/timestamp * + + case dtype_int64: + ib_fprintf(out_file, " ISC_INT64 jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; + + case dtype_quad: + case dtype_blob: + ib_fprintf(out_file, " GDS__QUAD jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; + + case dtype_cstring: + case dtype_text: + ib_fprintf(out_file, " TEXT jrd_%d [%d];\t/* %s */", + reference->ref_ident, field->fld_length, name); + break; + + case dtype_float: + ib_fprintf(out_file, " float jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; + + case dtype_double: + ib_fprintf(out_file, " double jrd_%d;\t/* %s */", + reference->ref_ident, name); + break; + + default: + sprintf(s, "datatype %d unknown for field %s, msg %d", + field->fld_dtype, name, port->por_msg_number); + CPR_error(s); + return; + } + } + align(column); + ib_fprintf(out_file, "} jrd_%d;", port->por_ident); +} + + +//____________________________________________________________ +// +// Print a fixed string at a particular column. +// + +static void printa( int column, TEXT * string, ...) +{ + va_list ptr; + + VA_START(ptr, string); + align(column); + ib_vfprintf(out_file, string, ptr); +} diff --git a/src/isql/extract.e b/src/isql/extract.epp similarity index 95% rename from src/isql/extract.e rename to src/isql/extract.epp index a567a26af0..c180cc4c81 100644 --- a/src/isql/extract.e +++ b/src/isql/extract.epp @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: extract.e,v 1.1.1.1 2001-05-23 13:26:02 tamlin Exp $ + * $Id: extract.epp,v 1.1 2001-07-12 06:32:02 bellardo Exp $ * Revision 1.3 2000/11/22 17:07:25 patrickgriffin * In get_procedure_args change comment style from // to /* * @@ -124,9 +124,9 @@ SSHORT EXTRACT_ddl( int flag, SCHAR * tabname) if (!DB) { - if (isc_attach_database(gds__status, 0, Db_name, &DB, 0, (SCHAR *) 0)) + if (isc_attach_database(gds_status, 0, Db_name, &DB, 0, (SCHAR *) 0)) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return (SSHORT) FINI_ERROR; } did_attach = TRUE; @@ -174,16 +174,16 @@ SSHORT EXTRACT_ddl( int flag, SCHAR * tabname) sprintf(Print_buffer, " %s", NEWLINE); ISQL_printf(Out, Print_buffer); - if (!gds__trans) + if (!gds_trans) { - if (isc_start_transaction(gds__status, - &gds__trans, + if (isc_start_transaction(gds_status, + &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return (SSHORT) FINI_ERROR; } did_start = TRUE; @@ -220,18 +220,18 @@ SSHORT EXTRACT_ddl( int flag, SCHAR * tabname) list_all_grants(); } - if (gds__trans && did_start) - if (isc_commit_transaction(gds__status, &gds__trans)) + if (gds_trans && did_start) + if (isc_commit_transaction(gds_status, &gds_trans)) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return (SSHORT) FINI_ERROR; } if (DB && did_attach) { - if (isc_detach_database(gds__status, &DB)) + if (isc_detach_database(gds_status, &DB)) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return (SSHORT) FINI_ERROR; } DB = NULL; @@ -343,9 +343,9 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { if (new_name) - ISQL_copy_SQL_id (new_name, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (new_name, (TEXT**) &SQL_identifier, DBL_QUOTE); else - ISQL_copy_SQL_id (relation_name, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (relation_name, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "CREATE TABLE %s ", SQL_identifier); } else @@ -354,7 +354,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, ISQL_printf (Out, Print_buffer); if (!REL.RDB$EXTERNAL_FILE.NULL) { - ISQL_copy_SQL_id (REL.RDB$EXTERNAL_FILE, &SQL_identifier2, + ISQL_copy_SQL_id (REL.RDB$EXTERNAL_FILE, (TEXT**) &SQL_identifier2, SINGLE_QUOTE); sprintf (Print_buffer, "EXTERNAL FILE %s ", SQL_identifier2); ISQL_printf (Out, Print_buffer); @@ -370,7 +370,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { ISQL_copy_SQL_id (ISQL_blankterm (RFR.RDB$FIELD_NAME), - &SQL_identifier, DBL_QUOTE); + (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "%s ", SQL_identifier); } else @@ -388,7 +388,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, { ISQL_printf (Out, "COMPUTED BY "); if (!FLD.RDB$COMPUTED_SOURCE.NULL) - ISQL_print_validation (Out, &FLD.RDB$COMPUTED_SOURCE, 1, gds__trans); + ISQL_print_validation (Out, &FLD.RDB$COMPUTED_SOURCE, 1, (SLONG*) gds_trans); } else if (!((strncmp(FLD.RDB$FIELD_NAME, "RDB$", 4) == 0) && isdigit (FLD.RDB$FIELD_NAME[4]) && @@ -397,7 +397,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, ISQL_blankterm (FLD.RDB$FIELD_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (FLD.RDB$FIELD_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (FLD.RDB$FIELD_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "%s", SQL_identifier); } else @@ -579,7 +579,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (CON.RDB$CONSTRAINT_NAME, &SQL_identifier, + ISQL_copy_SQL_id (CON.RDB$CONSTRAINT_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, " CONSTRAINT %s", SQL_identifier); } @@ -590,7 +590,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, } END_FOR ON_ERROR - ISQL_errmsg (gds__status); + ISQL_errmsg (gds_status); return (SSHORT)FINI_ERROR; END_ERROR; @@ -625,7 +625,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, ON_ERROR if (!V33) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return (SSHORT) FINI_ERROR; } END_ERROR; @@ -656,7 +656,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, ISQL_blankterm(RELC.RDB$CONSTRAINT_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (RELC.RDB$CONSTRAINT_NAME, &SQL_identifier, + ISQL_copy_SQL_id (RELC.RDB$CONSTRAINT_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "CONSTRAINT %s ", SQL_identifier); } @@ -681,7 +681,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); if (collist) ISQL_FREE(collist); return (SSHORT) FINI_ERROR; @@ -717,13 +717,13 @@ void EXTRACT_list_view( SCHAR * viewname) SSHORT first; if (!DB) - if (isc_attach_database(gds__status, 0, Db_name, &DB, 0, (SCHAR *) 0)) + if (isc_attach_database(gds_status, 0, Db_name, &DB, 0, (SCHAR *) 0)) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return (SSHORT) FINI_ERROR; } - if (!gds__trans) - isc_start_transaction(gds__status, &gds__trans, 1, &DB, 0, + if (!gds_trans) + isc_start_transaction(gds_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0); /* If this is a view, use print_blob to print the view text */ @@ -739,7 +739,7 @@ void EXTRACT_list_view( SCHAR * viewname) ISQL_blankterm (REL.RDB$RELATION_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) - ISQL_copy_SQL_id (REL.RDB$RELATION_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (REL.RDB$RELATION_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); else strcpy (SQL_identifier, REL.RDB$RELATION_NAME); @@ -773,7 +773,7 @@ void EXTRACT_list_view( SCHAR * viewname) END_FOR ON_ERROR - ISQL_errmsg (gds__status); + ISQL_errmsg (gds_status); return; END_ERROR; @@ -786,7 +786,7 @@ void EXTRACT_list_view( SCHAR * viewname) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; } @@ -962,7 +962,7 @@ static void get_procedure_args( SCHAR * proc_name) ON_ERROR if (!V33) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; } END_ERROR; @@ -1041,7 +1041,7 @@ static void list_all_grants(void) if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (XX.RDB$ROLE_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (XX.RDB$ROLE_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "CREATE ROLE %s;%s", SQL_identifier, NEWLINE); } @@ -1052,7 +1052,7 @@ static void list_all_grants(void) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; } @@ -1084,7 +1084,7 @@ static void list_all_grants(void) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; @@ -1119,7 +1119,7 @@ static void list_all_grants(void) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; @@ -1172,7 +1172,7 @@ static void list_all_procs() ISQL_blankterm (PRC.RDB$PROCEDURE_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (PRC.RDB$PROCEDURE_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (PRC.RDB$PROCEDURE_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, create_procedure_str1, SQL_identifier); ISQL_printf (Out, Print_buffer); @@ -1193,7 +1193,7 @@ static void list_all_procs() ON_ERROR if (!V33) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; } END_ERROR; @@ -1207,7 +1207,7 @@ static void list_all_procs() if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (PRC.RDB$PROCEDURE_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (PRC.RDB$PROCEDURE_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "%sALTER PROCEDURE %s ", NEWLINE, SQL_identifier); } @@ -1227,10 +1227,10 @@ static void list_all_procs() END_FOR ON_ERROR - ISQL_msg_get(GEN_ERR, msg, (TEXT *) isc_sqlcode(gds__status), NULL, + ISQL_msg_get(GEN_ERR, msg, (TEXT *) isc_sqlcode(gds_status), NULL, NULL, NULL, NULL); STDERROUT(msg, 1); /* Statement failed, SQLCODE = %d\n\n */ - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; @@ -1282,7 +1282,7 @@ static void list_all_tables( SSHORT flag, SSHORT default_char_set_id) EXTRACT_list_table (REL.RDB$RELATION_NAME, NULL, 0,default_char_set_id); END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); ROLLBACK; return; END_ERROR; @@ -1339,8 +1339,8 @@ static void list_all_triggers() if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (TRG.RDB$TRIGGER_NAME, &SQL_identifier, DBL_QUOTE); - ISQL_copy_SQL_id (TRG.RDB$RELATION_NAME, &SQL_identifier2, DBL_QUOTE); + ISQL_copy_SQL_id (TRG.RDB$TRIGGER_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (TRG.RDB$RELATION_NAME, (TEXT**) &SQL_identifier2, DBL_QUOTE); } else { @@ -1371,7 +1371,7 @@ static void list_all_triggers() END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; @@ -1417,7 +1417,7 @@ static void list_check(void) if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (TRG.RDB$RELATION_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (TRG.RDB$RELATION_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "ALTER TABLE %s ADD %s%s", SQL_identifier, NEWLINE, TAB); } @@ -1432,7 +1432,7 @@ static void list_check(void) ISQL_blankterm(CHK.RDB$CONSTRAINT_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (CHK.RDB$CONSTRAINT_NAME, &SQL_identifier, + ISQL_copy_SQL_id (CHK.RDB$CONSTRAINT_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "CONSTRAINT %s ", SQL_identifier); } @@ -1449,7 +1449,7 @@ static void list_check(void) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; } @@ -1529,7 +1529,7 @@ static void list_create_db(void) ISQL_printf(Out, Print_buffer); /* Get the page size from db_info call */ - SHOW_dbb_parameters(DB, info_buf, page_items, sizeof(page_items), + SHOW_dbb_parameters((SLONG*) DB, info_buf, page_items, sizeof(page_items), translate); sprintf(Print_buffer, " %s", info_buf); ISQL_printf(Out, Print_buffer); @@ -1544,7 +1544,7 @@ static void list_create_db(void) ON_ERROR if (!V33) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; } END_ERROR; @@ -1656,7 +1656,7 @@ static void list_create_db(void) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; @@ -1731,7 +1731,7 @@ static void list_create_db(void) ON_ERROR if (!V33) { - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; } END_ERROR; @@ -1758,7 +1758,7 @@ static void list_create_db(void) } if (!isc_database_info - (gds__status, &DB, sizeof(wal_items), wal_items, BUFFER_LENGTH128, + (gds_status, &DB, sizeof(wal_items), wal_items, BUFFER_LENGTH128, buffer)) { for (d = buffer; *d != isc_info_end;) @@ -1985,7 +1985,7 @@ static void list_domain_table( SCHAR * table_name, SSHORT default_char_set_id) { sprintf (Print_buffer, "%s%s ", NEWLINE, TAB); ISQL_printf (Out, Print_buffer); - ISQL_print_validation (Out, &FLD.RDB$VALIDATION_SOURCE, 0, gds__trans); + ISQL_print_validation (Out, &FLD.RDB$VALIDATION_SOURCE, 0, (SLONG*) gds_trans); } if (FLD.RDB$NULL_FLAG == 1) ISQL_printf (Out, " NOT NULL"); @@ -2010,7 +2010,7 @@ static void list_domain_table( SCHAR * table_name, SSHORT default_char_set_id) ISQL_printf (Out, Print_buffer); END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; } @@ -2051,7 +2051,7 @@ static void list_domains( SSHORT default_char_set_id) if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id(FLD.RDB$FIELD_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id(FLD.RDB$FIELD_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "CREATE DOMAIN %s AS ", SQL_identifier); } else @@ -2176,7 +2176,7 @@ static void list_domains( SSHORT default_char_set_id) { sprintf (Print_buffer, "%s%s ", NEWLINE, TAB); ISQL_printf (Out, Print_buffer); - ISQL_print_validation (Out, &FLD.RDB$VALIDATION_SOURCE, 0, gds__trans); + ISQL_print_validation (Out, &FLD.RDB$VALIDATION_SOURCE, 0, (SLONG*) gds_trans); } if (FLD.RDB$NULL_FLAG == 1) ISQL_printf (Out, " NOT NULL"); @@ -2201,7 +2201,7 @@ static void list_domains( SSHORT default_char_set_id) ISQL_printf (Out, Print_buffer); END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; } @@ -2234,10 +2234,10 @@ static void list_exception(void) first = FALSE; ISQL_blankterm (EXC.RDB$EXCEPTION_NAME); - ISQL_copy_SQL_id (EXC.RDB$MESSAGE, &SQL_identifier2, SINGLE_QUOTE); + ISQL_copy_SQL_id (EXC.RDB$MESSAGE, (TEXT**) &SQL_identifier2, SINGLE_QUOTE); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (EXC.RDB$EXCEPTION_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (EXC.RDB$EXCEPTION_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "CREATE EXCEPTION %s %s%s%s", SQL_identifier, SQL_identifier2, Term, NEWLINE); } @@ -2250,7 +2250,7 @@ static void list_exception(void) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; } @@ -2298,7 +2298,7 @@ static void list_filters(void) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; @@ -2354,7 +2354,7 @@ static void list_foreign() if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (RELC1.RDB$RELATION_NAME, &SQL_identifier, + ISQL_copy_SQL_id (RELC1.RDB$RELATION_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "ALTER TABLE %s ADD ", SQL_identifier); } @@ -2372,7 +2372,7 @@ static void list_foreign() strlen(RELC1.RDB$CONSTRAINT_NAME)); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (RELC1.RDB$CONSTRAINT_NAME, &SQL_identifier, + ISQL_copy_SQL_id (RELC1.RDB$CONSTRAINT_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "CONSTRAINT %s ", SQL_identifier); } @@ -2384,7 +2384,7 @@ static void list_foreign() if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (RELC2.RDB$RELATION_NAME, &SQL_identifier, + ISQL_copy_SQL_id (RELC2.RDB$RELATION_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "FOREIGN KEY (%s) REFERENCES %s ", collist, SQL_identifier); @@ -2422,7 +2422,7 @@ static void list_foreign() END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); ISQL_FREE(collist); return; END_ERROR; @@ -2544,7 +2544,7 @@ static void list_functions(void) END_FOR ON_ERROR - ISQL_errmsg (gds__status); + ISQL_errmsg (gds_status); return; END_ERROR; @@ -2649,7 +2649,7 @@ static void list_functions(void) END_FOR ON_ERROR - ISQL_errmsg (gds__status); + ISQL_errmsg (gds_status); ISQL_FREE (type_buffer); ISQL_FREE (return_buffer); ISQL_FREE (buffer); @@ -2674,7 +2674,7 @@ static void list_functions(void) END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); ISQL_FREE(type_buffer); ISQL_FREE(return_buffer); ISQL_FREE(buffer); @@ -2713,7 +2713,7 @@ static void list_generators(void) ISQL_blankterm (GEN.RDB$GENERATOR_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) - ISQL_copy_SQL_id (GEN.RDB$GENERATOR_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (GEN.RDB$GENERATOR_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); else strcpy (SQL_identifier, GEN.RDB$GENERATOR_NAME); @@ -2724,7 +2724,7 @@ static void list_generators(void) ISQL_printf (Out, Print_buffer); END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; @@ -2786,8 +2786,8 @@ static void list_index() if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (IDX.RDB$INDEX_NAME, &SQL_identifier, DBL_QUOTE); - ISQL_copy_SQL_id (IDX.RDB$RELATION_NAME, &SQL_identifier2, DBL_QUOTE); + ISQL_copy_SQL_id (IDX.RDB$INDEX_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (IDX.RDB$RELATION_NAME, (TEXT**) &SQL_identifier2, DBL_QUOTE); sprintf (Print_buffer, "CREATE%s%s INDEX %s ON %s(", (IDX.RDB$UNIQUE_FLAG ? " UNIQUE" : ""), (IDX.RDB$INDEX_TYPE ? " DESCENDING" : ""), @@ -2812,7 +2812,7 @@ static void list_index() END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); ISQL_FREE(collist); return; END_ERROR; @@ -2849,7 +2849,7 @@ static void list_views() ISQL_blankterm (REL.RDB$RELATION_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) - ISQL_copy_SQL_id (REL.RDB$RELATION_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (REL.RDB$RELATION_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); else strcpy (SQL_identifier, REL.RDB$RELATION_NAME); @@ -2872,7 +2872,7 @@ static void list_views() ISQL_blankterm (RFR.RDB$FIELD_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) - ISQL_copy_SQL_id (RFR.RDB$FIELD_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (RFR.RDB$FIELD_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); else strcpy (SQL_identifier, RFR.RDB$FIELD_NAME); @@ -2882,7 +2882,7 @@ static void list_views() END_FOR ON_ERROR - ISQL_errmsg (gds__status); + ISQL_errmsg (gds_status); return; END_ERROR; sprintf (Print_buffer, ") AS%s", NEWLINE); @@ -2896,7 +2896,7 @@ static void list_views() END_FOR ON_ERROR - ISQL_errmsg(gds__status); + ISQL_errmsg(gds_status); return; END_ERROR; } diff --git a/src/isql/isql.e b/src/isql/isql.epp similarity index 92% rename from src/isql/isql.e rename to src/isql/isql.epp index 3692047865..16cca1cff3 100644 --- a/src/isql/isql.e +++ b/src/isql/isql.epp @@ -21,7 +21,7 @@ * Contributor(s): ______________________________________. */ /* - $Id: isql.e,v 1.1.1.1 2001-05-23 13:26:03 tamlin Exp $ + $Id: isql.epp,v 1.1 2001-07-12 06:32:02 bellardo Exp $ Revision 1.5 2000/11/18 16:49:24 fsg Increased PRINT_BUFFER_LENGTH to 2048 to show larger plans Fixed Bug #122563 in extract.e get_procedure_args @@ -39,6 +39,13 @@ #include #include +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_SIGNAL_H +#include +#endif + #define TIME_ERR 101 #define BLANK '\040' #define DBL_QUOTE '\042' @@ -58,7 +65,8 @@ #if defined(WIN_NT) || defined(GUI_TOOLS) #include #endif -#include "../jrd/codes.h" +// jrd/gds.h already pulls in the error codes, so remove codes.h +// #include "../jrd/codes.h" #include "../include/jrd/gds.h" #include "../isql/isql.h" #include "../jrd/perf.h" @@ -287,7 +295,7 @@ int CLIB_ROUTINE main( int argc, char *argv[]) fAnsiCP = FALSE; if (ulConsoleCP != GetOEMCP() && Warnings) { ISQL_printf(Out, - "WARNING: The current codepage is not supported. Any use of any\n" + (TEXT*) "WARNING: The current codepage is not supported. Any use of any\n" " extended characters may result in incorrect file names.\n"); } } @@ -381,7 +389,7 @@ SSHORT ISQL_main(int argc, char *argv[]) if (Merge_stderr) Errfp = Out; - ISQL_make_upper(tabname); + ISQL_make_upper((UCHAR*) tabname); switch (ret) { case EXTRACT: /* This is a call to do extractions */ @@ -418,17 +426,17 @@ SSHORT ISQL_main(int argc, char *argv[]) case ERR: gds__msg_format(NULL_PTR, ISQL_MSG_FAC, USAGE1, sizeof(helpstring), - helpstring, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + helpstring, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(helpstring, 1); gds__msg_format(NULL_PTR, ISQL_MSG_FAC, USAGE2, sizeof(helpstring), - helpstring, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + helpstring, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(helpstring, 1); gds__msg_format(NULL_PTR, ISQL_MSG_FAC, USAGE3, sizeof(helpstring), - helpstring, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + helpstring, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(helpstring, 1); Exit_value = FINI_ERROR; break; @@ -481,12 +489,12 @@ void ISQL_array_dimensions( TEXT * fieldname) * **************************************/ - ISQL_printf(Out, "["); + ISQL_printf(Out, (TEXT*) "["); /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return; }; @@ -498,7 +506,7 @@ void ISQL_array_dimensions( TEXT * fieldname) /* Format is [lower:upper, lower:upper,..] */ if (FDIM.RDB$DIMENSION > 0) { - ISQL_printf (Out, ", "); + ISQL_printf (Out, (TEXT*) ", "); } sprintf (Print_buffer, "%ld:%ld", FDIM.RDB$LOWER_BOUND, FDIM.RDB$UPPER_BOUND); ISQL_printf (Out, Print_buffer); @@ -509,7 +517,7 @@ void ISQL_array_dimensions( TEXT * fieldname) return; END_ERROR; - ISQL_printf(Out, "] "); + ISQL_printf(Out, (TEXT*) "] "); } @@ -564,8 +572,8 @@ BOOLEAN ISQL_dbcheck(void) if (!Db_name[0]) { if (!Quiet) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, NO_DB, sizeof(errbuf), - errbuf, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); #ifdef GUI_TOOLS /* @@ -574,7 +582,7 @@ BOOLEAN ISQL_dbcheck(void) * The Merge_stderr flag is only set when scripts are running. */ if (Merge_stderr) - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); #endif } else @@ -634,8 +642,8 @@ int ISQL_commit_work( * Don't worry about the error if one occurs it will be network * related and caught later. */ - if (gds__trans) - isc_rollback_transaction(isc_status, &gds__trans); + if (gds_trans) + isc_rollback_transaction(isc_status, &gds_trans); if (response == WISQL_RESPONSE_NO) { /* add command to command history file */ @@ -650,8 +658,8 @@ int ISQL_commit_work( ISQL_errmsg(isc_status); if (!D__trans && !M__trans && !ret_code) { - ISQL_printf(Out, "Work Rolled Back"); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) "Work Rolled Back"); + ISQL_printf(Out, (TEXT*) NEWLINE); } } else { @@ -667,8 +675,8 @@ int ISQL_commit_work( ISQL_errmsg(isc_status); if (!D__trans && !M__trans && !ret_code) { - ISQL_printf(Out, "Work Committed"); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) "Work Committed"); + ISQL_printf(Out, (TEXT*) NEWLINE); } } @@ -694,7 +702,7 @@ void ISQL_copy_SQL_id( TEXT * in_str, TEXT ** output_str, TEXT escape_char) **************************************/ TEXT *p1, *q1; - q1 = output_str; + q1 = (TEXT*) output_str; *q1 = escape_char; q1++; for (p1 = in_str; *p1; p1++) { @@ -742,8 +750,8 @@ void ISQL_errmsg( STATUS * status) && vec[2] == gds_arg_warning && !Warnings)) return; gds__msg_format(NULL_PTR, ISQL_MSG_FAC, 0, sizeof(errbuf), errbuf, - (TEXT *) isc_sqlcode(status), NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); + (TEXT *) isc_sqlcode(status), (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); #ifndef GUI_TOOLS TRANSLATE_CP; STDERROUT(errbuf, 1); @@ -779,7 +787,7 @@ void ISQL_errmsg( STATUS * status) * running. */ if (Merge_stderr) - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); /* Show the error dialog */ wisqlerr(); @@ -844,7 +852,7 @@ void ISQL_warning( STATUS * status) * running. */ if (Merge_stderr) - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); /* Show the error dialog */ wisqlerr(); @@ -874,8 +882,8 @@ void ISQL_exit_db(void) isc_rollback_transaction(isc_status, &D__trans); if (M__trans) isc_rollback_transaction(isc_status, &M__trans); - if (gds__trans) - isc_rollback_transaction(isc_status, &gds__trans); + if (gds_trans) + isc_rollback_transaction(isc_status, &gds_trans); if (Stmt) isc_dsql_free_statement(isc_status, &Stmt, 2); @@ -887,7 +895,7 @@ void ISQL_exit_db(void) Db_name[0] = '\0'; D__trans = NULL; M__trans = NULL; - gds__trans = NULL; + gds_trans = NULL; Stmt = NULL; if (sqlda) ISQL_FREE(sqlda); @@ -932,7 +940,7 @@ int ISQL_frontend_command( if (strcmp(string, WISQL_DROP_DATABASE_LITERAL)) { /* Echo string to Output */ ISQL_printf(Out, string); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } } else { @@ -964,7 +972,7 @@ int ISQL_frontend_command( ret = 0; if (!connect_stmt) - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); return (ret); } @@ -1051,16 +1059,16 @@ int ISQL_extract( */ /* Save off the transaction handle so we can set it to NULL */ - save_trans_handle = gds__trans; - gds__trans = NULL; + save_trans_handle = gds_trans; + gds_trans = NULL; if (type == EXTRACT_VIEW) { ib_fprintf(sf, "/* Extract View %s%s */%s", string, Term, NEWLINE); ib_fflush(sf); - ISQL_printf(Out, "/* Extract View "); + ISQL_printf(Out, (TEXT*) "/* Extract View "); ISQL_printf(Out, string); - ISQL_printf(Out, " */"); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) " */"); + ISQL_printf(Out, (TEXT*) NEWLINE); EXTRACT_list_view(string); } else { @@ -1068,19 +1076,19 @@ int ISQL_extract( ib_fprintf(sf, "/* Extract Table %s%s */%s", string, Term, NEWLINE); ib_fflush(sf); - ISQL_printf(Out, "/* Extract Table "); + ISQL_printf(Out, (TEXT*) "/* Extract Table "); ISQL_printf(Out, string); - ISQL_printf(Out, " */"); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) " */"); + ISQL_printf(Out, (TEXT*) NEWLINE); } else { ib_fprintf(sf, "/* Extract Database %s%s */%s", Db_name, Term, NEWLINE); ib_fflush(sf); - ISQL_printf(Out, "/* Extract Database "); + ISQL_printf(Out, (TEXT*) "/* Extract Database "); ISQL_printf(Out, Db_name); - ISQL_printf(Out, " */"); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) " */"); + ISQL_printf(Out, (TEXT*) NEWLINE); } ret = EXTRACT_ddl(type, string); } @@ -1093,13 +1101,13 @@ int ISQL_extract( * Don't worry about the error if one occurs it will be network related * and caught later. */ - if (gds__trans) - isc_rollback_transaction(isc_status, &gds__trans); + if (gds_trans) + isc_rollback_transaction(isc_status, &gds_trans); /* Restore old tranasaction handle */ - gds__trans = save_trans_handle; + gds_trans = save_trans_handle; - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); return (ret); } @@ -1131,10 +1139,10 @@ void ISQL_build_table_list( /* Transaction for all frontend commands */ if (DB) { - save_trans_handle = gds__trans; - gds__trans = NULL; + save_trans_handle = gds_trans; + gds_trans = NULL; if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) ISQL_errmsg(isc_status); else { SHOW_build_table_namelist(tbl_list); @@ -1143,9 +1151,9 @@ void ISQL_build_table_list( * Don't worry about the error if one occurs it will be network * related and caught later. */ - isc_rollback_transaction(isc_status, &gds__trans); + isc_rollback_transaction(isc_status, &gds_trans); } - gds__trans = save_trans_handle; + gds_trans = save_trans_handle; } return; } @@ -1189,10 +1197,10 @@ void ISQL_query_database( if (V4) { /* Transaction for all frontend commands */ if (DB) { - save_trans_handle = gds__trans; - gds__trans = NULL; + save_trans_handle = gds_trans; + gds_trans = NULL; if (isc_start_transaction(isc_status, - &gds__trans, 1, &DB, 0, (SCHAR *) 0)) + &gds_trans, 1, &DB, 0, (SCHAR *) 0)) ISQL_errmsg(isc_status); else { /* Call SHOW_query_database to determine if the DB is empty */ @@ -1202,8 +1210,8 @@ void ISQL_query_database( * Don't worry about the error if one occurs it will be network * related and caught later. */ - isc_rollback_transaction(isc_status, &gds__trans); - gds__trans = save_trans_handle; + isc_rollback_transaction(isc_status, &gds_trans); + gds_trans = save_trans_handle; } } } @@ -1248,10 +1256,10 @@ void ISQL_build_view_list( /* Transaction for all frontend commands */ if (DB) { - save_trans_handle = gds__trans; - gds__trans = NULL; + save_trans_handle = gds_trans; + gds_trans = NULL; if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) ISQL_errmsg(isc_status); else { SHOW_build_view_namelist(view_list); @@ -1260,9 +1268,9 @@ void ISQL_build_view_list( * Don't worry about the error if one occurs it will be network * related and caught later. */ - isc_rollback_transaction(isc_status, &gds__trans); + isc_rollback_transaction(isc_status, &gds_trans); } - gds__trans = save_trans_handle; + gds_trans = save_trans_handle; } return; } @@ -1353,9 +1361,9 @@ SSHORT ISQL_get_field_length(TEXT * field_name) SSHORT l; /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return 0; }; @@ -1410,9 +1418,9 @@ void ISQL_get_character_sets(SSHORT char_set_id, string[0] = 0; /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return; }; @@ -1505,9 +1513,9 @@ void ISQL_get_default_source(TEXT * rel_name, *blob_id = isc_blob_null; /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return; }; @@ -1567,9 +1575,9 @@ SSHORT ISQL_get_index_segments(TEXT * segs, *segs = '\0'; /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return 0; }; @@ -1586,7 +1594,7 @@ SSHORT ISQL_get_index_segments(TEXT * segs, ISQL_blankterm (SEG.RDB$FIELD_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION && delimited_yes) { - ISQL_copy_SQL_id (SEG.RDB$FIELD_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (SEG.RDB$FIELD_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); } else strcpy (SQL_identifier, SEG.RDB$FIELD_NAME); @@ -1636,9 +1644,9 @@ BOOLEAN ISQL_get_base_column_null_flag(TEXT * view_name, null_flag = TRUE; /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return FALSE; }; @@ -1704,9 +1712,9 @@ BOOLEAN ISQL_get_null_flag(TEXT * rel_name, TEXT * field_name) null_flag = TRUE; /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return FALSE; }; @@ -1830,10 +1838,10 @@ SSHORT ISQL_init(IB_FILE * inputfile, IB_FILE * outputfile) D__trans = NULL; M__trans = NULL; - gds__trans = NULL; + gds_trans = NULL; DB = NULL; Stmt = NULL; - signal(SIGINT, query_abort); + signal(SIGINT, (void (*)(int)) query_abort); sqlda = (XSQLDA *) ISQL_ALLOC((SLONG) (XSQLDA_LENGTH(20))); sqlda->version = SQLDA_VERSION1; @@ -1936,8 +1944,8 @@ void ISQL_disconnect_database( int nQuietMode) * Don't worry about the error if one occurs it will be network * related and caught later. */ - if (DB && gds__trans) - isc_rollback_transaction(isc_status, &gds__trans); + if (DB && gds_trans) + isc_rollback_transaction(isc_status, &gds_trans); /* If there is current user statement, free it I think option 2 is the right one (DSQL_drop), but who knows */ @@ -1956,7 +1964,7 @@ void ISQL_disconnect_database( int nQuietMode) Db_name[0] = '\0'; D__trans = NULL; M__trans = NULL; - gds__trans = NULL; + gds_trans = NULL; return; } @@ -1976,9 +1984,9 @@ BOOLEAN ISQL_is_domain(TEXT * field_name) BOOLEAN is_domain = FALSE; /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return FALSE; }; @@ -2069,20 +2077,20 @@ void ISQL_print_validation(IB_FILE * fp, /* Don't bother with null blobs */ - if (blobid->isc_quad_high == 0) + if (blobid->gds_quad_high == 0) return; buffer = (TEXT *) ISQL_ALLOC(BUFFER_LENGTH512); blob = NULL; - if (isc_open_blob(isc_status, &DB, &trans, &blob, blobid)) { + if (isc_open_blob(isc_status, &DB, (void**) &trans, (void**) &blob, blobid)) { ISQL_errmsg(isc_status); if (buffer) ISQL_FREE(buffer); return; } - while (!isc_get_segment(isc_status, &blob, &length, + while (!isc_get_segment(isc_status, (void**) &blob, &length, (USHORT) (BUFFER_LENGTH512 - 1), buffer) || isc_status[1] == isc_segment) { buffer[length] = 0; @@ -2118,7 +2126,7 @@ void ISQL_print_validation(IB_FILE * fp, ISQL_printf(fp, Print_buffer); } - isc_close_blob(isc_status, &blob); + isc_close_blob(isc_status, (void**) &blob); if (isc_status[1]) ISQL_errmsg(isc_status); @@ -2223,13 +2231,13 @@ int ISQL_sql_statement(TEXT * string, ib_fflush(sf); ISQL_printf(Out, string); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); ret = process_statement(string, sqldap); if (ret == SKIP) ret = 0; - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); return (ret); } @@ -2389,8 +2397,8 @@ static SSHORT add_row( TEXT * tabname) */ gds__msg_format(NULL_PTR, ISQL_MSG_FAC, ADD_PROMPT, sizeof(infobuf), - infobuf, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + infobuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(infobuf, 1); done = FALSE; @@ -2443,7 +2451,7 @@ static SSHORT add_row( TEXT * tabname) /* Convert first 4 chars to upper case for comparison */ strncpy(cmd, buffer, 4); cmd[4] = '\0'; - ISQL_make_upper(cmd); + ISQL_make_upper((UCHAR*) cmd); /* If the user writes NULL, put a null in the column */ @@ -2514,7 +2522,7 @@ static SSHORT add_row( TEXT * tabname) ULONG date[2]; stringvalue = (SCHAR *) ISQL_ALLOC((SLONG) (ivar->sqllen + 1)); - isc_encode_date(×, date); + isc_encode_date(×, (GDS_QUAD_t*) date); ivar->sqldata = stringvalue; *(ULONG *) stringvalue = date[1]; }; @@ -2534,7 +2542,7 @@ static SSHORT add_row( TEXT * tabname) times.tm_mon--; stringvalue = (SCHAR *) ISQL_ALLOC((SLONG) (ivar->sqllen + 1)); - isc_encode_date(×, date); + isc_encode_date(×, (GDS_QUAD_t*) date); ivar->sqldata = stringvalue; ((ULONG *) stringvalue)[0] = date[0]; if (type == SQL_TIMESTAMP) @@ -2576,7 +2584,7 @@ static SSHORT add_row( TEXT * tabname) } if ((dscale = var->sqlscale) < 0) { SSHORT lscale = 0; - if (get_numeric(buffer, length, &lscale, &n) != TRUE) { + if (get_numeric((UCHAR*) buffer, length, &lscale, &n) != TRUE) { STDERROUT("Input parsing problem", 1); done = TRUE; } @@ -2584,7 +2592,7 @@ static SSHORT add_row( TEXT * tabname) dscale = var->sqlscale - lscale; if (dscale > 0) { TEXT *err_buf[256]; - sprintf(err_buf, + sprintf((char*) err_buf, "input error: input scale %d exceeds the field's scale %d", -lscale, -var->sqlscale); STDERROUT(err_buf, 1); @@ -2676,7 +2684,7 @@ static SSHORT blobedit( TEXT * action, TEXT ** cmd) /* Find the high and low values of the blob id */ - sscanf(p, "%x:%x", &blobid.isc_quad_high, &blobid.isc_quad_low); + sscanf(p, "%x:%x", &blobid.gds_quad_high, &blobid.gds_quad_low); /* If it isn't an explicit blobedit, then do a dump. Since this is a user operation, put it on the M__trans handle */ @@ -2713,12 +2721,12 @@ static void col_check( TEXT * tabname, SSHORT * colnumber) /* Query to get array info and computed source not available in the sqlda */ - ISQL_make_upper(tabname); + ISQL_make_upper((UCHAR*) tabname); /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); return; }; @@ -2901,17 +2909,17 @@ static SSHORT copy_table( TEXT * source, TEXT * destination, TEXT * otherdb) /* If we can't open a temp file then bail */ gds__msg_format(NULL_PTR, ISQL_MSG_FAC, FILE_OPEN_ERR, sizeof(errbuf), - errbuf, ftmp, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + errbuf, ftmp, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); Exit_value = FINI_ERROR; return END; } - ISQL_make_upper(source); + ISQL_make_upper((UCHAR*) source); if (EXTRACT_list_table(source, destination, domain_flag, -1)) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, NOT_FOUND, sizeof(errbuf), - errbuf, source, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, source, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); (void) ib_fclose(Out); } @@ -2927,8 +2935,8 @@ static SSHORT copy_table( TEXT * source, TEXT * destination, TEXT * otherdb) sprintf(cmd, "isql -q %s -i %s", altdb, ftmp); if (system(cmd)) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, COPY_ERR, sizeof(errbuf), - errbuf, destination, altdb, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, destination, altdb, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); } } @@ -3089,7 +3097,7 @@ static SSHORT create_db( TEXT * statement, TEXT * d_name) gds__msg_format(NULL_PTR, ISQL_MSG_FAC, INCOMPLETE_STR, sizeof(errbuf), errbuf, "create database statement", - NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); return (FAIL); } @@ -3128,7 +3136,7 @@ static SSHORT create_db( TEXT * statement, TEXT * d_name) gds__msg_format(NULL_PTR, ISQL_MSG_FAC, INCOMPLETE_STR, sizeof(errbuf), errbuf, "create database statement", - NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); return (FAIL); } @@ -3250,8 +3258,8 @@ static void do_isql(void) /* If we can't open a temp file then bail */ gds__msg_format(NULL_PTR, ISQL_MSG_FAC, FILE_OPEN_ERR, MSG_LENGTH, - errbuf, Tmpfile, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, Tmpfile, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); Exit_value = FINI_ERROR; exit(Exit_value); @@ -3259,7 +3267,7 @@ static void do_isql(void) /* Open database and start tansaction */ - signal(SIGINT, query_abort); + signal(SIGINT, (void (*)(int)) query_abort); /* * We will not excute this for now on WINDOWS. We are not prompting for @@ -3300,8 +3308,8 @@ static void do_isql(void) isc_rollback_transaction(isc_status, &D__trans); if (M__trans) isc_rollback_transaction(isc_status, &M__trans); - if (gds__trans) - isc_rollback_transaction(isc_status, &gds__trans); + if (gds_trans) + isc_rollback_transaction(isc_status, &gds_trans); /* * If there is current user statement, free it * option 2 does the drop @@ -3322,8 +3330,8 @@ static void do_isql(void) if (!Db_name[0] && (ret == CONT)) { if (!Quiet) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, NO_DB, MSG_LENGTH, - errbuf, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); + errbuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); #ifdef GUI_TOOLS /* @@ -3333,7 +3341,7 @@ static void do_isql(void) * running. */ if (Merge_stderr) - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); #endif } ret = SKIP; @@ -3354,8 +3362,8 @@ static void do_isql(void) #endif if ((ret == EOF) && Continuation) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, UNEXPECTED_EOF, - MSG_LENGTH, errbuf, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR); + MSG_LENGTH, errbuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); #ifndef GUI_TOOLS STDERROUT(errbuf, 1); #else @@ -3369,16 +3377,16 @@ static void do_isql(void) isc_rollback_transaction(isc_status, &D__trans); if (M__trans) isc_rollback_transaction(isc_status, &M__trans); - if (gds__trans) - isc_rollback_transaction(isc_status, &gds__trans); + if (gds_trans) + isc_rollback_transaction(isc_status, &gds_trans); } else { if (D__trans) COMMIT_TRANS(&D__trans); if (M__trans) COMMIT_TRANS(&M__trans); - if (gds__trans) - COMMIT_TRANS(&gds__trans); + if (gds_trans) + COMMIT_TRANS(&gds_trans); } /* * If there is current user statement, free it @@ -3402,8 +3410,8 @@ static void do_isql(void) isc_rollback_transaction(isc_status, &D__trans); if (M__trans) isc_rollback_transaction(isc_status, &M__trans); - if (gds__trans) - isc_rollback_transaction(isc_status, &gds__trans); + if (gds_trans) + isc_rollback_transaction(isc_status, &gds_trans); /* * If there is current user statement, free it * I think option 2 is the right one (DSQL_drop), but who knows @@ -3434,7 +3442,7 @@ static void do_isql(void) Db_name[0] = '\0'; D__trans = NULL; M__trans = NULL; - gds__trans = NULL; + gds_trans = NULL; /* Should have a valid Temp file pointer */ assert(Ofp != (IB_FILE *) - 1) @@ -3479,8 +3487,8 @@ static SSHORT drop_db(void) errbuf = (TEXT *) ISQL_ALLOC((SLONG) MSG_LENGTH); if (errbuf) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, SERVER_TOO_OLD, - MSG_LENGTH, errbuf, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR); + MSG_LENGTH, errbuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); ISQL_FREE(errbuf); } @@ -3501,7 +3509,7 @@ static SSHORT drop_db(void) /* The database got dropped with or without errors */ M__trans = NULL; - gds__trans = NULL; + gds_trans = NULL; Stmt = NULL; D__trans = NULL; @@ -3570,8 +3578,8 @@ static SSHORT edit( TEXT ** cmd) } else { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, FILE_OPEN_ERR, MSG_LENGTH, - errbuf, file, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, file, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); } } @@ -3629,14 +3637,14 @@ static int end_trans(void) if (M__trans) { if (Interactive) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, COMMIT_PROMPT, - sizeof(infobuf), infobuf, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR); + sizeof(infobuf), infobuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); ISQL_prompt(infobuf); (void) ib_fgets(buffer, BUFFER_LENGTH80, ib_stdin); if (isyesno(buffer)) { /* check for Yes answer */ gds__msg_format(NULL_PTR, ISQL_MSG_FAC, COMMIT_MSG, - sizeof(infobuf), infobuf, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR); + sizeof(infobuf), infobuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(infobuf, 1); if (DB && M__trans) { if (isc_commit_transaction(isc_status, &M__trans)) { @@ -3648,8 +3656,8 @@ static int end_trans(void) } else { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, ROLLBACK_MSG, - sizeof(infobuf), infobuf, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR); + sizeof(infobuf), infobuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(infobuf, 1); if (DB && M__trans) { if (isc_rollback_transaction(isc_status, &M__trans)) { @@ -3673,8 +3681,8 @@ static int end_trans(void) ISQL_MSG_FAC, ROLLBACK_MSG, sizeof(infobuf), infobuf, - NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(infobuf, 1); #endif if (isc_rollback_transaction(isc_status, &M__trans)) { @@ -3818,8 +3826,8 @@ static SSHORT frontend( TEXT * statement) ** raise an error */ gds__msg_format(NULL_PTR, ISQL_MSG_FAC, CMD_ERR, MSG_LENGTH, - errbuf, statement, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, statement, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); ISQL_FREE(errbuf); ISQL_FREE(buffer); @@ -3878,7 +3886,7 @@ static SSHORT frontend( TEXT * statement) p++; strcpy(lparms[i], parms[i]); if (!role_found) - ISQL_make_upper(parms[i]); + ISQL_make_upper((UCHAR*) parms[i]); role_found = FALSE; } @@ -3890,9 +3898,9 @@ static SSHORT frontend( TEXT * statement) if (!strcmp(parms[0], "SHOW")) { /* Transaction for all frontend commands */ - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); /* Free the frontend command */ for (j = 0; j < MAX_TERMS; j++) @@ -3907,14 +3915,14 @@ static SSHORT frontend( TEXT * statement) return FAIL; } ret = SHOW_metadata(parms, lparms); - if (gds__trans) - COMMIT_TRANS(&gds__trans); + if (gds_trans) + COMMIT_TRANS(&gds_trans); } #ifdef DEV_BUILD else if (!strcmp(parms[0], "ADD")) { - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); /* Free the frontend command */ for (j = 0; j < MAX_TERMS; j++) @@ -3929,13 +3937,13 @@ static SSHORT frontend( TEXT * statement) return FAIL; } ret = add_row(parms[1]); - if (gds__trans) - COMMIT_TRANS(&gds__trans); + if (gds_trans) + COMMIT_TRANS(&gds_trans); } else if (!strcmp(parms[0], "COPY")) { - if (DB && !gds__trans) + if (DB && !gds_trans) if (isc_start_transaction - (isc_status, &gds__trans, 1, &DB, 0, (SCHAR *) 0)) { + (isc_status, &gds_trans, 1, &DB, 0, (SCHAR *) 0)) { ISQL_errmsg(isc_status); /* Free the frontend command */ for (j = 0; j < MAX_TERMS; j++) @@ -3950,8 +3958,8 @@ static SSHORT frontend( TEXT * statement) return FAIL; } ret = copy_table(parms[1], parms[2], lparms[3]); - if (gds__trans) - COMMIT_TRANS(&gds__trans); + if (gds_trans) + COMMIT_TRANS(&gds_trans); } #endif #ifdef MU_ISQL @@ -4022,7 +4030,7 @@ static SSHORT frontend( TEXT * statement) ret = newtrans(cmd); else if ((!strcmp(parms[1], "TERM")) || (!strcmp(parms[1], "TERMINATOR"))) { - a = (*lparms[2]) ? lparms[2] : DEFTERM; + a = (TEXT*) ((*lparms[2]) ? lparms[2] : DEFTERM); Termlen = strlen(a); if (Termlen <= MAXTERM_LENGTH) { @@ -4107,7 +4115,7 @@ static SSHORT frontend( TEXT * statement) " setting. Client SQL dialect still remains 1.", NEWLINE); SQL_dialect = old_SQL_dialect; /* restore SQL dialect */ - ISQL_printf(Out, bad_dialect_buf); + ISQL_printf(Out, (TEXT*) bad_dialect_buf); } } else @@ -4144,7 +4152,7 @@ static SSHORT frontend( TEXT * statement) " when connecting to Database SQL dialect ", dialect_spoken, " database. ", NEWLINE); - ISQL_printf(Out, bad_dialect_buf); + ISQL_printf(Out, (TEXT*) bad_dialect_buf); } } } @@ -4283,8 +4291,8 @@ static SSHORT frontend( TEXT * statement) ret = CONT; /* In case any default transaction was started - commit it here */ - if (gds__trans) - COMMIT_TRANS(&gds__trans); + if (gds_trans) + COMMIT_TRANS(&gds_trans); /* Free the frontend command */ @@ -4298,12 +4306,12 @@ static SSHORT frontend( TEXT * statement) if (ret == ERR) { if (bad_dialect == TRUE) gds__msg_format(NULL_PTR, ISQL_MSG_FAC, CMD_ERR, MSG_LENGTH, - errbuf, bad_dialect_buf, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); + errbuf, bad_dialect_buf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); else gds__msg_format(NULL_PTR, ISQL_MSG_FAC, CMD_ERR, MSG_LENGTH, - errbuf, cmd, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, cmd, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); } #endif @@ -4531,7 +4539,7 @@ static SSHORT get_statement(TEXT ** statement_ref, if (Echo) { /* Terminate to print entire statement */ *p = '\0'; - ISQL_printf(Out, statement); + ISQL_printf(Out, (TEXT*) statement); } #ifdef GUI_TOOLS @@ -4649,11 +4657,11 @@ static SSHORT get_statement(TEXT ** statement_ref, if ((USHORT) (bufsize + 512) < bufsize) { /* If we allocate any more, we would be in danger of overflowing the variable bufsize */ - errbuf = (TEXT *) ISQL_ALLOC((SLONG) MSG_LENGTH); + errbuf = (SSHORT *) ISQL_ALLOC((SLONG) MSG_LENGTH); if (errbuf) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, BUFFER_OVERFLOW, - MSG_LENGTH, errbuf, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR); + MSG_LENGTH, (TEXT*) errbuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); ISQL_FREE(errbuf); } @@ -4846,7 +4854,7 @@ void ISQL_get_version( BOOLEAN call_by_create_db) dialect_spoken = 0; if (isc_database_info(isc_status, &DB, sizeof(db_version_info), - db_version_info, sizeof(buffer), buffer)) { + (SCHAR*) db_version_info, sizeof(buffer), (SCHAR*) buffer)) { ISQL_errmsg(isc_status); return; } @@ -4857,27 +4865,27 @@ void ISQL_get_version( BOOLEAN call_by_create_db) USHORT length; item = (UCHAR) * p++; - length = isc_vax_integer(p, sizeof(USHORT)); + length = isc_vax_integer((SCHAR*) p, sizeof(USHORT)); p += sizeof(USHORT); switch (item) { case isc_info_ods_version: - major_ods = isc_vax_integer(p, length); + major_ods = isc_vax_integer((SCHAR*) p, length); break; case isc_info_ods_minor_version: - minor_ods = isc_vax_integer(p, length); + minor_ods = isc_vax_integer((SCHAR*) p, length); break; case isc_info_db_sql_dialect: - dialect_spoken = isc_vax_integer(p, length); + dialect_spoken = isc_vax_integer((SCHAR*) p, length); if (major_ods < ODS_VERSION10) { if (SQL_dialect > SQL_DIALECT_V5 && Warnings) { - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); sprintf(bad_dialect_buf, "%s%s%s%d%s%s", "WARNING: Pre IB V6 database only speaks", " SQL dialect 1 and ", "does not accept Client SQL dialect ", SQL_dialect, " . Client SQL dialect is reset to 1.", NEWLINE); - ISQL_printf(Out, bad_dialect_buf); + ISQL_printf(Out, (TEXT*) bad_dialect_buf); } } else { /* ODS 10 databases */ @@ -4897,13 +4905,13 @@ void ISQL_get_version( BOOLEAN call_by_create_db) } if (print_warning && Warnings) { print_warning = FALSE; - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); sprintf(bad_dialect_buf, "%s%d%s%d%s%s", "WARNING: This database speaks SQL dialect ", dialect_spoken, " but Client SQL dialect was set to ", SQL_dialect, " .", NEWLINE); - ISQL_printf(Out, bad_dialect_buf); + ISQL_printf(Out, (TEXT*) bad_dialect_buf); } } break; @@ -4913,7 +4921,7 @@ void ISQL_get_version( BOOLEAN call_by_create_db) ** remote server. */ if (SQL_dialect && SQL_dialect != SQL_DIALECT_V5 && Warnings) { - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); if (call_by_create_db) sprintf(bad_dialect_buf, "%s%s%d%s%s", "WARNING: Pre IB V6 server only speaks SQL dialect 1", @@ -5192,44 +5200,44 @@ static SSHORT print_sets(void) **************************************/ COLLIST *p; - ISQL_printf(Out, "Print statistics: "); - ISQL_printf(Out, (Stats ? "ON" : "OFF")); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) "Print statistics: "); + ISQL_printf(Out,(TEXT*) (Stats ? "ON" : "OFF")); + ISQL_printf(Out, (TEXT*) NEWLINE); #ifndef GUI_TOOLS - ISQL_printf(Out, "Echo commands: "); - ISQL_printf(Out, (Echo ? "ON" : "OFF")); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) "Echo commands: "); + ISQL_printf(Out, (TEXT*) (Echo ? "ON" : "OFF")); + ISQL_printf(Out, (TEXT*) NEWLINE); #endif - ISQL_printf(Out, "List format: "); - ISQL_printf(Out, (List ? "ON" : "OFF")); - ISQL_printf(Out, NEWLINE); - ISQL_printf(Out, "Row Count: "); - ISQL_printf(Out, (Docount ? "ON" : "OFF")); - ISQL_printf(Out, NEWLINE); - ISQL_printf(Out, "Autocommit DDL: "); - ISQL_printf(Out, (Autocommit ? "ON" : "OFF")); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) "List format: "); + ISQL_printf(Out, (TEXT*) (List ? "ON" : "OFF")); + ISQL_printf(Out, (TEXT*) NEWLINE); + ISQL_printf(Out, (TEXT*) "Row Count: "); + ISQL_printf(Out, (TEXT*) (Docount ? "ON" : "OFF")); + ISQL_printf(Out, (TEXT*) NEWLINE); + ISQL_printf(Out, (TEXT*) "Autocommit DDL: "); + ISQL_printf(Out, (TEXT*) (Autocommit ? "ON" : "OFF")); + ISQL_printf(Out, (TEXT*) NEWLINE); #ifdef SCROLLABLE_CURSORS - ISQL_printf(Out, "Autofetch records: "); - ISQL_printf(Out, (Autofetch ? "ON" : "OFF")); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) "Autofetch records: "); + ISQL_printf(Out, (TEXT*) (Autofetch ? "ON" : "OFF")); + ISQL_printf(Out, (TEXT*) NEWLINE); #endif - ISQL_printf(Out, "Access Plan: "); - ISQL_printf(Out, (Plan ? "ON" : "OFF")); - ISQL_printf(Out, NEWLINE); - ISQL_printf (Out, "Access Plan only: "); - ISQL_printf (Out, (Planonly ? "ON" : "OFF")); - ISQL_printf (Out, NEWLINE); - ISQL_printf(Out, "Display BLOB type: "); + ISQL_printf(Out, (TEXT*) "Access Plan: "); + ISQL_printf(Out, (TEXT*) (Plan ? "ON" : "OFF")); + ISQL_printf(Out, (TEXT*) NEWLINE); + ISQL_printf (Out, (TEXT*) "Access Plan only: "); + ISQL_printf (Out, (TEXT*) (Planonly ? "ON" : "OFF")); + ISQL_printf (Out, (TEXT*) NEWLINE); + ISQL_printf(Out, (TEXT*) "Display BLOB type: "); if (Doblob == ALL_BLOBS) - ISQL_printf(Out, "ALL"); + ISQL_printf(Out, (TEXT*) "ALL"); else if (Doblob == NO_BLOBS) - ISQL_printf(Out, "NONE"); + ISQL_printf(Out, (TEXT*) "NONE"); else { - sprintf(Print_buffer, "%d", Doblob); + sprintf(Print_buffer, (TEXT*) "%d", Doblob); ISQL_printf(Out, Print_buffer); } - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); if (*ISQL_charset && strcmp(ISQL_charset, DEFCHARSET)) { sprintf(Print_buffer, "Set names: %s%s", ISQL_charset, NEWLINE); @@ -5246,9 +5254,9 @@ static SSHORT print_sets(void) p = p->collist_next; } } - ISQL_printf(Out, "Terminator: "); + ISQL_printf(Out, (TEXT*) "Terminator: "); ISQL_printf(Out, Term); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); sprintf(Print_buffer, "Time: %s%s", (Time_display) ? "ON" : "OFF", NEWLINE); ISQL_printf(Out, Print_buffer); @@ -5334,7 +5342,7 @@ static SSHORT help(TEXT * what) ISQL_msg_get(*msgid, msg, NULL, NULL, NULL, NULL, NULL); ISQL_printf(Help, msg); } - ISQL_printf(Help, NEWLINE); + ISQL_printf(Help, (TEXT*) NEWLINE); } #endif return (SKIP); @@ -5412,7 +5420,7 @@ static SSHORT input( TEXT * infile) } else { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, FILE_OPEN_ERR, MSG_LENGTH, - errbuf, file, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + errbuf, file, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); ISQL_FREE(errbuf); return FAIL; @@ -5600,18 +5608,18 @@ static SSHORT newdb( /* Build up a dpb */ dpb = dpb_buffer; - *dpb++ = gds__dpb_version1; + *dpb++ = gds_dpb_version1; if (*ISQL_charset && strcmp(ISQL_charset, DEFCHARSET)) { - *dpb++ = gds__dpb_lc_ctype; + *dpb++ = gds_dpb_lc_ctype; p = (UCHAR *) ISQL_charset; - *dpb++ = strlen(p); + *dpb++ = strlen((char*)p); while (*p) *dpb++ = *p++; } if (l = strlen(local_usr)) { - *dpb++ = gds__dpb_user_name; + *dpb++ = gds_dpb_user_name; *dpb++ = l; p = (UCHAR *) local_usr; while (*p) @@ -5619,7 +5627,7 @@ static SSHORT newdb( } if (l = strlen(local_psw)) { - *dpb++ = gds__dpb_password; + *dpb++ = gds_dpb_password; *dpb++ = l; p = (UCHAR *) local_psw; while (*p) @@ -5684,14 +5692,14 @@ static SSHORT newdb( switch (SQL_dialect) { case SQL_DIALECT_V5: /* Uppercase the Sql Role name */ - for (p1 = local_sql_role, p2 = local_sql_role; + for (p1 = (UCHAR*) local_sql_role, p2 = (UCHAR*) local_sql_role; *p1++ = UPPER7(*p2); p2++); break; case SQL_DIALECT_V6_TRANSITION: case SQL_DIALECT_V6: if (*local_sql_role == DBL_QUOTE || *local_sql_role == SINGLE_QUOTE) { - p1 = p2 = local_sql_role; + p1 = p2 = (UCHAR*) local_sql_role; cnt = 1; delimited_done = FALSE; end_quote = *p1++; @@ -5718,7 +5726,7 @@ static SSHORT newdb( *p2 = '\0'; } else { - for (p1 = local_sql_role, p2 = local_sql_role; + for (p1 = (UCHAR*) local_sql_role, p2 = (UCHAR*) local_sql_role; *p1++ = UPPER7(*p2); p2++); } break; @@ -5753,8 +5761,8 @@ static SSHORT newdb( if (!V4 && !V33) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, SERVER_TOO_OLD, MSG_LENGTH, - errbuf, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); isc_detach_database(isc_status, &DB); DB = 0; @@ -5884,7 +5892,7 @@ static SSHORT newoutput( TEXT * outfile) MSG_LENGTH, errbuf, outfile, - NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); ISQL_FREE(errbuf); } @@ -5920,7 +5928,7 @@ static SSHORT newoutput( TEXT * outfile) MSG_LENGTH, errbuf, SaveOutfileName, - NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); ISQL_FREE(errbuf); } @@ -5944,7 +5952,7 @@ static SSHORT newtrans( TEXT * statement) * Functional description * Intercept and handle a set transaction statement by zeroing M__trans * - * Leave the default transaction, gds__trans, alone + * Leave the default transaction, gds_trans, alone * Parameters: The statement in its entirety * **************************************/ @@ -6191,8 +6199,8 @@ static SSHORT parse_arg( Quiet = TRUE; else if (c == 'Z') { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, VERSION, MSG_LENGTH, - errbuf, GDS_VERSION, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); + errbuf, GDS_VERSION, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); sprintf(Print_buffer, "%s%s", errbuf, NEWLINE); ISQL_printf(Out, Print_buffer); @@ -6223,8 +6231,8 @@ static SSHORT parse_arg( else { /* This is an unknown flag */ gds__msg_format(NULL_PTR, ISQL_MSG_FAC, SWITCH, MSG_LENGTH, - errbuf, s + 1, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + errbuf, s + 1, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); ret = ERR; } @@ -6334,7 +6342,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) } } if (List) - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); else strcat(p, " "); } @@ -6359,9 +6367,9 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) sprintf(p, "%17s ", blobbuf); if (List) { ISQL_printf(Out, blobbuf); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); dtype = print_item_blob(Out, var, M__trans); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } break; @@ -6472,7 +6480,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) /* See if it is character set OCTETS */ if (var->sqlsubtype == 1) { USHORT i; - TEXT *buff2 = ISQL_ALLOC(2 * var->sqllen + 1); + TEXT *buff2 = (TEXT*) ISQL_ALLOC(2 * var->sqllen + 1); /* Convert the string to hex digits */ for (i = 0; i < var->sqllen; i++) { sprintf(&buff2[i * 2], "%02X", string[i]); @@ -6480,7 +6488,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) buff2[(2 * var->sqllen + 1) - 1] = 0; if (List) { ISQL_printf(Out, buff2); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } else sprintf(p, "%s ", buff2); @@ -6488,7 +6496,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) } else if (List) { ISQL_printf(Out, string); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } else { /* Truncate if necessary */ @@ -6499,7 +6507,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) break; case SQL_TIMESTAMP: - isc_decode_date(var->sqldata, ×); + isc_decode_date((GDS_QUAD_t*)var->sqldata, ×); if (SQL_dialect > SQL_DIALECT_V5) { sprintf(d, "%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d.%4.4d", @@ -6537,7 +6545,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) ULONG time_and_date[2]; time_and_date[0] = 0; time_and_date[1] = *(ULONG *) var->sqldata; - isc_decode_date(time_and_date, ×); + isc_decode_date((GDS_QUAD_t*)time_and_date, ×); sprintf(d, "%2.2d:%2.2d:%2.2d.%4.4d", times.tm_hour, times.tm_min, times.tm_sec, (*(ULONG *) var->sqldata) % @@ -6558,7 +6566,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) ULONG time_and_date[2]; time_and_date[0] = *(ULONG *) var->sqldata; time_and_date[1] = 0; - isc_decode_date(time_and_date, ×); + isc_decode_date((GDS_QUAD_t*)time_and_date, ×); sprintf(d, "%4.4d-%2.2d-%2.2d", times.tm_year + 1900, (times.tm_mon + 1), times.tm_mday); @@ -6579,7 +6587,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) if (List) { ISQL_printf(Out, vary->vary_string); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } else { /* Truncate if necessary */ @@ -6669,9 +6677,9 @@ static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) * we can set up a BPB that requests character set transliteration */ if (!isc_blob_lookup_desc - (isc_status, &DB, &trans, var->relname, var->sqlname, &from_desc, + (isc_status, &DB, &trans, (UCHAR*) var->relname, (UCHAR*) var->sqlname, &from_desc, NULL)) { - isc_blob_default_desc(&to_desc, var->relname, var->sqlname); + isc_blob_default_desc(&to_desc, (UCHAR*) var->relname, (UCHAR*) var->sqlname); if (!isc_blob_gen_bpb (isc_status, &to_desc, &from_desc, sizeof(bpb_buffer), bpb_buffer, &bpb_length)) bpb = bpb_buffer; @@ -6690,7 +6698,7 @@ static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) } blob = NULL; - if (isc_open_blob2(isc_status, &DB, &trans, &blob, blobid, bpb_length, + if (isc_open_blob2(isc_status, &DB, (void**) &trans, (void**) &blob, blobid, bpb_length, bpb)) { ISQL_errmsg(isc_status); if (buffer) @@ -6700,9 +6708,9 @@ static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) return ERR; } - while (!isc_get_segment(isc_status, &blob, &length, + while (!isc_get_segment(isc_status, (void**) &blob, &length, (USHORT) (BUFFER_LENGTH512 - 1), - buffer) || isc_status[1] == isc_segment) { + (SCHAR*) buffer) || isc_status[1] == isc_segment) { /* Special displays for blr or acl subtypes */ if (var->sqlsubtype == BLOB_blr || var->sqlsubtype == BLOB_acl) { @@ -6714,16 +6722,16 @@ static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) break; } sprintf(Print_buffer, "%s %s%s", TAB, buffer, NEWLINE); - ISQL_printf(fp, Print_buffer); + ISQL_printf(fp, (TEXT*) Print_buffer); } else { buffer[length] = 0; - ISQL_printf(fp, buffer); + ISQL_printf(fp, (TEXT*) buffer); } } if (isc_status[1] == isc_segstr_eof) - isc_close_blob(isc_status, &blob); + isc_close_blob(isc_status, (void**) &blob); else if (isc_status[1]) { ISQL_errmsg(isc_status); if (buffer) @@ -6838,12 +6846,12 @@ static int print_line( XSQLDA * sqlda, SLONG * pad, TEXT * line) *p = 0; if (List) { - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); return (CONT); } ISQL_printf(Out, line); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); /* If blobdisplay is not wanted, set varnum back to -1 */ @@ -6888,7 +6896,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) * This function uses the isc_dsql user functions rather * than embedded dynamic statements. The user request * is placed on transaction M__trans, while all - * background work is on the default gds__trans. + * background work is on the default gds_trans. * THis function now returns CONT (success) or ERR **************************************/ SLONG *buffer = NULL; @@ -6935,7 +6943,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) /* If statistics are requested, then reserve them here */ if (Stats) - perf_get_info(&DB, &perf_before); + perf_get_info((int**) &DB, &perf_before); /* Prepare the dynamic query stored in string. But put this on the DDL transaction to get maximum visibility of @@ -6949,12 +6957,12 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) if (isc_dsql_prepare(isc_status, &prepare_trans, &Stmt, 0, string, SQL_dialect, sqlda)) { if (SQL_dialect == SQL_DIALECT_V6_TRANSITION && Input_file) { - ISQL_printf(Out, NEWLINE); - ISQL_printf(Out, "**** Error preparing statement:"); - ISQL_printf(Out, NEWLINE); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); + ISQL_printf(Out, (TEXT*) "**** Error preparing statement:"); + ISQL_printf(Out, (TEXT*) NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); ISQL_printf(Out, string); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } ISQL_errmsg(isc_status); return ERR; @@ -7002,30 +7010,30 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) if (input_sqlda->sqld > 0) { UCHAR buffer[100]; USHORT i; - sprintf(buffer, + sprintf((char*) buffer, "\nINPUT SQLDA version: %d sqldaid: %s sqldabc: %ld sqln: %d sqld: %d\n", input_sqlda->version, input_sqlda->sqldaid, input_sqlda->sqldabc, input_sqlda->sqln, input_sqlda->sqld); - ISQL_printf(Out, buffer); + ISQL_printf(Out, (TEXT*) buffer); for (i = 0, var = input_sqlda->sqlvar, end = var + input_sqlda->sqld; var < end; var++, i++) { - sprintf(buffer, + sprintf((char*) buffer, "%02d: sqltype: %d %s %s sqlscale: %d sqlsubtype: %d sqllen: %d\n", i + 1, var->sqltype, sqltype_to_string(var->sqltype), (var->sqltype & 1) ? "Nullable" : " ", var->sqlscale, var->sqlsubtype, var->sqllen); - ISQL_printf(Out, buffer); - sprintf(buffer, " : name: (%d)%*s alias: (%d)%*s\n", + ISQL_printf(Out, (TEXT*) buffer); + sprintf((char*) buffer, " : name: (%d)%*s alias: (%d)%*s\n", var->sqlname_length, var->sqlname_length, var->sqlname, var->aliasname_length, var->aliasname_length, var->aliasname); - ISQL_printf(Out, buffer); - sprintf(buffer, " : table: (%d)%*s owner: (%d)%*s\n", + ISQL_printf(Out, (TEXT*) buffer); + sprintf((char*) buffer, " : table: (%d)%*s owner: (%d)%*s\n", var->relname_length, var->relname_length, var->relname, var->ownname_length, var->ownname_length, var->ownname); - ISQL_printf(Out, buffer); + ISQL_printf(Out, (TEXT*) buffer); } } @@ -7039,8 +7047,8 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) sizeof(info_buffer), info_buffer)) ISQL_errmsg(isc_status); else if (info_buffer[0] == isc_info_sql_stmt_type) { - l = gds__vax_integer(info_buffer + 1, 2); - statement_type = gds__vax_integer(info_buffer + 3, l); + l = gds__vax_integer((UCHAR*) info_buffer + 1, 2); + statement_type = gds__vax_integer((UCHAR*) info_buffer + 3, l); } /* if PLAN is set, print out the plan now */ @@ -7060,7 +7068,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) ISQL_errmsg(isc_status); } else if (plan_buffer[0] == isc_info_sql_get_plan) { - l = gds__vax_integer(plan_buffer + 1, 2); + l = gds__vax_integer((UCHAR*) plan_buffer + 1, 2); sprintf(Print_buffer, "%.*s%s", l, plan_buffer + 3, NEWLINE); ISQL_printf(Diag, Print_buffer); } @@ -7138,9 +7146,9 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) for (p = count_buffer + 3; *p != isc_info_end;) { count_is = *p++; - l = gds__vax_integer(p, 2); + l = gds__vax_integer((UCHAR*) p, 2); p += 2; - count = gds__vax_integer(p, l); + count = gds__vax_integer((UCHAR*) p, l); p += l; if (count_is == count_type) break; @@ -7154,7 +7162,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) } if (Stats) { - perf_get_info(&DB, &perf_after); + perf_get_info((int**) &DB, &perf_after); if (!have_report) { ISQL_msg_get(REPORT1, report_1, NULL, NULL, NULL, NULL, NULL); /* Current memory = !c\nDelta memory = !d\nMax memory = !x\nElapsed time= !e sec\n */ @@ -7167,7 +7175,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) have_report = TRUE; } perf_format(&perf_before, &perf_after, report_1, statistics, - NULL_PTR); + (SSHORT*) NULL_PTR); sprintf(Print_buffer, "%s%s", statistics, NEWLINE); ISQL_printf(Diag, Print_buffer); } @@ -7224,28 +7232,28 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) if (Sqlda_display) { UCHAR buffer[100]; USHORT i; - sprintf(buffer, + sprintf((char*) buffer, "\nOUTPUT SQLDA version: %d sqldaid: %s sqldabc: %ld sqln: %d sqld: %d\n", sqlda->version, sqlda->sqldaid, sqlda->sqldabc, sqlda->sqln, sqlda->sqld); - ISQL_printf(Out, buffer); + ISQL_printf(Out, (TEXT*) buffer); for (i = 0, var = sqlda->sqlvar, end = var + sqlda->sqld; var < end; var++, i++) { - sprintf(buffer, + sprintf((char*) buffer, "%02d: sqltype: %d %s %s sqlscale: %d sqlsubtype: %d sqllen: %d\n", i + 1, var->sqltype, sqltype_to_string(var->sqltype), (var->sqltype & 1) ? "Nullable" : " ", var->sqlscale, var->sqlsubtype, var->sqllen); - ISQL_printf(Out, buffer); - sprintf(buffer, " : name: (%d)%*s alias: (%d)%*s\n", + ISQL_printf(Out, (TEXT*) buffer); + sprintf((char*) buffer, " : name: (%d)%*s alias: (%d)%*s\n", var->sqlname_length, var->sqlname_length, var->sqlname, var->aliasname_length, var->aliasname_length, var->aliasname); - ISQL_printf(Out, buffer); - sprintf(buffer, " : table: (%d)%*s owner: (%d)%*s\n", + ISQL_printf(Out, (TEXT*) buffer); + sprintf((char*) buffer, " : table: (%d)%*s owner: (%d)%*s\n", var->relname_length, var->relname_length, var->relname, var->ownname_length, var->ownname_length, var->ownname); - ISQL_printf(Out, buffer); + ISQL_printf(Out, (TEXT*) buffer); } } #endif @@ -7449,15 +7457,15 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) ret = ERR; } else { - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); if (!List) { ISQL_printf(Out, header); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); ISQL_printf(Out, header2); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } print_line(sqlda, pad, line); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } } @@ -7508,7 +7516,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) gds__msg_format(NULL_PTR, ISQL_MSG_FAC, CMD_ERR, MSG_LENGTH, errbuf, "Expected NEXT, PRIOR, FIRST, LAST, ABSOLUTE , RELATIVE , or QUIT", - NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); STDERROUT(errbuf, 1); } @@ -7529,20 +7537,20 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) #ifdef GUI_TOOLS if (!List && !lines) { - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); ISQL_printf(Out, header); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); ISQL_printf(Out, header2); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } #else if (!List && (lines % Pagelength == 0)) { - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); ISQL_printf(Out, header); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); ISQL_printf(Out, header2); - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); } #endif @@ -7565,13 +7573,13 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) } if (!lines) - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); ret = print_line(sqlda, pad, line); } if (lines) - ISQL_printf(Out, NEWLINE); + ISQL_printf(Out, (TEXT*) NEWLINE); /* Record count printed here upon request */ @@ -7590,7 +7598,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) /* Statistics printed here upon request */ if (Stats) { - perf_get_info(&DB, &perf_after); + perf_get_info((int**) &DB, &perf_after); if (!have_report) { ISQL_msg_get(REPORT1, report_1, NULL, NULL, NULL, NULL, NULL); /* Current memory = !c\nDelta memory = !d\nMax memory = !x\nElapsed time= !e sec\n */ @@ -7603,7 +7611,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) have_report = TRUE; } perf_format(&perf_before, &perf_after, report_1, statistics, - NULL_PTR); + (SSHORT*) NULL_PTR); sprintf(Print_buffer, "%s%s", statistics, NEWLINE); ISQL_printf(Out, Print_buffer); } @@ -7692,35 +7700,35 @@ static UCHAR *sqltype_to_string( USHORT sqltype) **************************************/ switch (sqltype & ~1) { case SQL_TEXT: - return ("TEXT "); + return (UCHAR*)("TEXT "); case SQL_VARYING: - return ("VARYING "); + return (UCHAR*)("VARYING "); case SQL_SHORT: - return ("SHORT "); + return (UCHAR*)("SHORT "); case SQL_LONG: - return ("LONG "); + return (UCHAR*)("LONG "); case SQL_INT64: - return ("INT64 "); + return (UCHAR*) ("INT64 "); case SQL_FLOAT: - return ("FLOAT "); + return (UCHAR*) ("FLOAT "); case SQL_DOUBLE: - return ("DOUBLE "); + return (UCHAR*) ("DOUBLE "); case SQL_D_FLOAT: - return ("D_FLOAT "); + return (UCHAR*) ("D_FLOAT "); case SQL_TIMESTAMP: - return ("TIMESTAMP"); + return (UCHAR*) ("TIMESTAMP"); case SQL_TYPE_DATE: - return ("SQL DATE "); + return (UCHAR*) ("SQL DATE "); case SQL_TYPE_TIME: - return ("TIME "); + return (UCHAR*) ("TIME "); case SQL_BLOB: - return ("BLOB "); + return (UCHAR*) ("BLOB "); case SQL_ARRAY: - return ("ARRAY "); + return (UCHAR*) ("ARRAY "); case SQL_QUAD: - return ("QUAD "); + return (UCHAR*) ("QUAD "); default: - return ("unknown "); + return (UCHAR*) ("unknown "); } } #endif diff --git a/src/isql/show.e b/src/isql/show.epp similarity index 98% rename from src/isql/show.e rename to src/isql/show.epp index 1207e3119a..039276079e 100644 --- a/src/isql/show.e +++ b/src/isql/show.epp @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: show.e,v 1.1.1.1 2001-05-23 13:26:03 tamlin Exp $ + * $Id: show.epp,v 1.1 2001-07-12 06:32:02 bellardo Exp $ * Revision 1.2 2000/11/19 07:02:49 fsg * Change in show.e to use CHARACTER_LENGTH instead of FIELD_LENGTH in * SHOW PROCEDURE @@ -50,6 +50,10 @@ #include "../jrd/obj.h" #include "../jrd/ods.h" +#ifdef HAVE_CTYPE_H +#include +#endif + ASSERT_FILENAME DATABASE DB = EXTERN COMPILETIME "yachts.lnk"; @@ -266,7 +270,7 @@ void SHOW_dbb_parameters(SLONG * db_handle, } if (isc_database_info(status_vector, - &db_handle, + (void**) &db_handle, item_length, db_items, BUFFER_LENGTH128, @@ -616,12 +620,12 @@ int SHOW_grants( SCHAR * object, SCHAR * terminator) prev_field_null != PRV.RDB$FIELD_NAME.NULL) || (!prev_field_null && strcmp (prev_field, PRV.RDB$FIELD_NAME)) || (prev_option != -1 && prev_option != PRV.RDB$GRANT_OPTION)) { - make_priv_string (priv_flags, priv_string); + make_priv_string (priv_flags, (UCHAR*) priv_string); first = FALSE; if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) - ISQL_copy_SQL_id (object, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (object, (TEXT**) &SQL_identifier, DBL_QUOTE); else strcpy (SQL_identifier, object); @@ -652,7 +656,7 @@ int SHOW_grants( SCHAR * object, SCHAR * terminator) case obj_procedure: case obj_sql_role: if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (PRV.RDB$USER, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (PRV.RDB$USER, (TEXT**) &SQL_identifier, DBL_QUOTE); } else strcpy (SQL_identifier, PRV.RDB$USER); @@ -714,7 +718,7 @@ int SHOW_grants( SCHAR * object, SCHAR * terminator) ISQL_blankterm (PRV.RDB$FIELD_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (PRV.RDB$FIELD_NAME, &SQL_identifier, + ISQL_copy_SQL_id (PRV.RDB$FIELD_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf(col_string, " (%s)", SQL_identifier); } @@ -736,11 +740,11 @@ int SHOW_grants( SCHAR * object, SCHAR * terminator) /* Print last case if there was anything to print */ if (prev_option != -1) { - make_priv_string (priv_flags, priv_string); + make_priv_string (priv_flags, (UCHAR*) priv_string); first = FALSE; if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) - ISQL_copy_SQL_id (object, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (object, (TEXT**) &SQL_identifier, DBL_QUOTE); else strcpy (SQL_identifier, object); @@ -784,7 +788,7 @@ int SHOW_grants( SCHAR * object, SCHAR * terminator) case obj_procedure: case obj_sql_role: if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (PRV.RDB$USER, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (PRV.RDB$USER, (TEXT**) &SQL_identifier, DBL_QUOTE); } else strcpy (SQL_identifier, PRV.RDB$USER); @@ -816,7 +820,7 @@ int SHOW_grants( SCHAR * object, SCHAR * terminator) if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (object, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (object, (TEXT**) &SQL_identifier, DBL_QUOTE); } else strcpy (SQL_identifier, object); @@ -854,7 +858,7 @@ int SHOW_grants( SCHAR * object, SCHAR * terminator) ISQL_blankterm (PRV.RDB$RELATION_NAME); strcpy (role_name, PRV.RDB$RELATION_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) - ISQL_copy_SQL_id (role_name, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (role_name, (TEXT**) &SQL_identifier, DBL_QUOTE); else strcpy (SQL_identifier, role_name); @@ -927,7 +931,7 @@ void SHOW_grant_roles( SCHAR * terminator) ISQL_blankterm (PRV.RDB$RELATION_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) { - ISQL_copy_SQL_id (PRV.RDB$RELATION_NAME, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (PRV.RDB$RELATION_NAME, (TEXT**) &SQL_identifier, DBL_QUOTE); sprintf (Print_buffer, "GRANT %s TO %s%s%s%s", SQL_identifier, user_string, with_option, terminator, NEWLINE); } @@ -963,11 +967,11 @@ void SHOW_print_metadata_text_blob( IB_FILE * fp, ISC_QUAD * blobid) /* Don't bother with null blobs */ - if (blobid->isc_quad_high == 0 && blobid->gds_quad_low == 0) + if (blobid->gds_quad_high == 0 && blobid->gds_quad_low == 0) return; blob_handle = NULL; - if (isc_open_blob2(isc_status, &DB, &gds__trans, &blob_handle, blobid, + if (isc_open_blob2(isc_status, &DB, &gds_trans, &blob_handle, blobid, sizeof(metadata_text_bpb), metadata_text_bpb)) { ISQL_errmsg(isc_status); return; @@ -983,7 +987,7 @@ void SHOW_print_metadata_text_blob( IB_FILE * fp, ISC_QUAD * blobid) } while (!isc_get_segment(isc_status, &blob_handle, &length, - (USHORT) (BUFFER_LENGTH512 - 1), buffer) || + (USHORT) (BUFFER_LENGTH512 - 1), (char*) buffer) || isc_status[1] == isc_segment) { /* * Need to step through the buffer until we hit a '\n' and then print the @@ -995,7 +999,7 @@ void SHOW_print_metadata_text_blob( IB_FILE * fp, ISC_QUAD * blobid) if (*b == '\n') { *b = 0; sprintf(Print_buffer, "%s%s", start, NEWLINE); - ISQL_printf(fp, Print_buffer); + ISQL_printf(fp, (TEXT*) Print_buffer); start = b + 1; } } @@ -1003,7 +1007,7 @@ void SHOW_print_metadata_text_blob( IB_FILE * fp, ISC_QUAD * blobid) ISQL_printf(fp, Print_buffer); #else buffer[length] = 0; - ISQL_printf(fp, buffer); + ISQL_printf(fp, (TEXT*) buffer); #endif } #ifdef GUI_TOOLS @@ -1049,8 +1053,8 @@ int SHOW_metadata( SCHAR ** cmd, SCHAR ** lcmd) if ((!strcmp(cmd[1], "VERSION")) || (!strcmp(cmd[1], "VER"))) { gds__msg_format(NULL_PTR, ISQL_MSG_FAC, VERSION, sizeof(msg_string), - msg_string, GDS_VERSION, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + msg_string, GDS_VERSION, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); sprintf(Print_buffer, "%s%s", msg_string, NEWLINE); ISQL_printf(Out, Print_buffer); isc_version(&DB, (FPTR_VOID) local_fprintf, NULL); @@ -1365,12 +1369,12 @@ int SHOW_metadata( SCHAR ** cmd, SCHAR ** lcmd) if (ret == NOT_FOUND) { if (*cmd[2] == '"') gds__msg_format(NULL_PTR, ISQL_MSG_FAC, key, sizeof(msg_string), - msg_string, lcmd[2], NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); + msg_string, lcmd[2], (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR, (TEXT*) NULL_PTR); else gds__msg_format(NULL_PTR, ISQL_MSG_FAC, key, sizeof(msg_string), - msg_string, cmd[2], NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + msg_string, cmd[2], (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); STDERROUT(msg_string, 1); } @@ -1418,10 +1422,10 @@ static SCHAR *remove_delimited_double_quotes( TEXT * string) UCHAR *p, *q, *next_char, *end_of_str; USHORT cmd_len, cnt; - p = string; - q = string; + p = (UCHAR*) string; + q = (UCHAR*) string; cmd_len = strlen(string); - end_of_str = string + cmd_len; + end_of_str = (UCHAR*) (string + cmd_len); for (cnt = 1; cnt < cmd_len && p < end_of_str; cnt++) { p++; @@ -1463,8 +1467,8 @@ static void make_priv_string( USHORT flags, UCHAR * string) for (i = 0; privs[i].priv_string; i++) { if (flags & privs[i].priv_flag) { if (*string) - strcat(string, ", "); - strcat(string, privs[i].priv_string); + strcat((char*) string, ", "); + strcat((char*) string, privs[i].priv_string); } } } @@ -1777,7 +1781,7 @@ static void show_charsets( SCHAR * relation_name, SCHAR * field_name) } -static show_check( SCHAR * object) +static int show_check( SCHAR * object) { /************************************** * @@ -1952,7 +1956,7 @@ static void show_db(void) /* First general database parameters */ - SHOW_dbb_parameters(DB, info_buf, db_items, sizeof(db_items), translate); + SHOW_dbb_parameters((SLONG*) DB, info_buf, db_items, sizeof(db_items), translate); ISQL_printf(Out, info_buf); /* Only v4 databases have log_files */ @@ -2014,7 +2018,7 @@ static void show_db(void) /* And now for Rich's show db parameters */ if (is_wal) { - SHOW_dbb_parameters(DB, info_buf, wal_items, sizeof(wal_items), + SHOW_dbb_parameters((SLONG*) DB, info_buf, wal_items, sizeof(wal_items), translate); ISQL_printf(Out, info_buf); } @@ -2704,7 +2708,7 @@ static int show_generators( SCHAR * object) generator, as in V5. Otherwise, we show him the whole 64-bit value. */ - if (isc_dsql_prepare (isc_status, &gds__trans, &stmt, 0, query, + if (isc_dsql_prepare (isc_status, &gds_trans, &stmt, 0, query, SQL_dialect, &sqlda)) { ISQL_errmsg (isc_status); continue; @@ -2716,7 +2720,7 @@ static int show_generators( SCHAR * object) sqlda.sqlvar[0].sqlind = &indicator; /* Singleton select needs no fetch */ - if (isc_dsql_execute2 (isc_status, &gds__trans, &stmt, + if (isc_dsql_execute2 (isc_status, &gds_trans, &stmt, SQL_dialect, NULL, &sqlda)) { ISQL_errmsg (isc_status); @@ -3151,7 +3155,7 @@ static int show_role( SCHAR * object) ISQL_blankterm (PRV.RDB$RELATION_NAME); strcpy (role_name, PRV.RDB$RELATION_NAME); if (db_SQL_dialect > SQL_DIALECT_V6_TRANSITION) - ISQL_copy_SQL_id (role_name, &SQL_identifier, DBL_QUOTE); + ISQL_copy_SQL_id (role_name, (TEXT**) &SQL_identifier, DBL_QUOTE); else strcpy (SQL_identifier, role_name); diff --git a/src/jrd/blob_filter.e b/src/jrd/blob_filter.epp similarity index 95% rename from src/jrd/blob_filter.e rename to src/jrd/blob_filter.epp index 1b2147500e..9d535bffd0 100644 --- a/src/jrd/blob_filter.e +++ b/src/jrd/blob_filter.epp @@ -1,6 +1,6 @@ /* * PROGRAM: JRD Access Method - * MODULE: blf.e + * MODULE: blf.epp * DESCRIPTION: Blob filter driver * * The contents of this file are subject to the Interbase Public @@ -51,6 +51,7 @@ #include "../jrd/thd_proto.h" #include "../jrd/isc_s_proto.h" #include "../jrd/all_proto.h" +#include "../jrd/codes.h" /* System provided internal filters for filtering internal * subtypes to text. @@ -73,7 +74,7 @@ static STATUS open_blob(TDBB, CTL*, SLONG*, USHORT, - SCHAR*, + UCHAR*, PTR, USHORT, BLF); @@ -141,7 +142,7 @@ STATUS DLL_EXPORT BLF_create_blob(TDBB tdbb, CTL * filter_handle, SLONG * blob_id, USHORT bpb_length, - UCHAR * bpb, PTR callback, BLF filter) + UCHAR * bpb, STATUS (*callback)(), BLF filter) { /************************************** * @@ -155,7 +156,7 @@ STATUS DLL_EXPORT BLF_create_blob(TDBB tdbb, **************************************/ return open_blob(tdbb, tra_handle, filter_handle, - blob_id, bpb_length, bpb, callback, ACTION_create, + blob_id, bpb_length, bpb, (STATUS (*)(USHORT, CTL)) callback, ACTION_create, filter); } @@ -238,7 +239,8 @@ BLF DLL_EXPORT BLF_lookup_internal_filter(TDBB tdbb, SSHORT from, SSHORT to) blf->blf_to = to; blf->blf_filter = filters[from]; exception_msg = (STR) ALLOCPV(type_str, 100); - sprintf(exception_msg->str_data, + // SIGN ISSUE, arg 1 + sprintf((char*)exception_msg->str_data, "Exception occurred in system provided internal filters for filtering internal subtype %d to text.", from); blf->blf_exception_message = exception_msg; @@ -254,7 +256,7 @@ STATUS DLL_EXPORT BLF_open_blob(TDBB tdbb, CTL * filter_handle, SLONG * blob_id, USHORT bpb_length, - UCHAR * bpb, PTR callback, BLF filter) + UCHAR * bpb, STATUS (*callback)(), BLF filter) { /************************************** * @@ -268,7 +270,7 @@ STATUS DLL_EXPORT BLF_open_blob(TDBB tdbb, **************************************/ return open_blob(tdbb, tra_handle, filter_handle, - blob_id, bpb_length, bpb, callback, ACTION_open, filter); + blob_id, bpb_length, bpb, (STATUS (*)(USHORT, CTL)) callback, ACTION_open, filter); } @@ -321,7 +323,7 @@ static STATUS open_blob( TRA tra_handle, CTL * filter_handle, SLONG * blob_id, -USHORT bpb_length, SCHAR * bpb, PTR callback, USHORT action, BLF filter) +USHORT bpb_length, UCHAR * bpb, PTR callback, USHORT action, BLF filter) { /************************************** * @@ -336,7 +338,7 @@ USHORT bpb_length, SCHAR * bpb, PTR callback, USHORT action, BLF filter) STATUS status; CTL prior, control; SSHORT from, to; - SSHORT from_charset, to_charset; + USHORT from_charset, to_charset; struct ctl temp; DBB dbb; STATUS *user_status; diff --git a/src/jrd/boot_codes/codes.h b/src/jrd/boot_codes/codes.h new file mode 100644 index 0000000000..089d118f0a --- /dev/null +++ b/src/jrd/boot_codes/codes.h @@ -0,0 +1,1451 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ +/* + * + * File generated by codes.e - do not edit! + * + */ +#define gds_facility 20 +#define gds_err_base 335544320L +#define gds_err_factor 1 +#define gds_arg_end 0 /* end of argument list */ +#define gds_arg_gds 1 /* generic DSRI status value */ +#define gds_arg_string 2 /* string argument */ +#define gds_arg_cstring 3 /* count & string argument */ +#define gds_arg_number 4 /* numeric argument (long) */ +#define gds_arg_interpreted 5 /* interpreted status code (string) */ +#define gds_arg_vms 6 /* VAX/VMS status code (long) */ +#define gds_arg_unix 7 /* UNIX error code */ +#define gds_arg_domain 8 /* Apollo/Domain error code */ +#define gds_arg_dos 9 /* MSDOS/OS2 error code */ +#define gds_arg_mpexl 10 /* HP MPE/XL error code */ +#define gds_arg_mpexl_ipc 11 /* HP MPE/XL IPC error code */ +#define gds_arg_next_mach 15 /* NeXT/Mach error code */ +#define gds_arg_netware 16 /* NetWare error code */ +#define gds_arg_win32 17 /* Win32 error code */ +#define gds_arg_warning 18 /* warning argument */ + +#define gds__arith_except 335544321L +#define gds__bad_dbkey 335544322L +#define gds__bad_db_format 335544323L +#define gds__bad_db_handle 335544324L +#define gds__bad_dpb_content 335544325L +#define gds__bad_dpb_form 335544326L +#define gds__bad_req_handle 335544327L +#define gds__bad_segstr_handle 335544328L +#define gds__bad_segstr_id 335544329L +#define gds__bad_tpb_content 335544330L +#define gds__bad_tpb_form 335544331L +#define gds__bad_trans_handle 335544332L +#define gds__bug_check 335544333L +#define gds__convert_error 335544334L +#define gds__db_corrupt 335544335L +#define gds__deadlock 335544336L +#define gds__excess_trans 335544337L +#define gds__from_no_match 335544338L +#define gds__infinap 335544339L +#define gds__infona 335544340L +#define gds__infunk 335544341L +#define gds__integ_fail 335544342L +#define gds__invalid_blr 335544343L +#define gds__io_error 335544344L +#define gds__lock_conflict 335544345L +#define gds__metadata_corrupt 335544346L +#define gds__not_valid 335544347L +#define gds__no_cur_rec 335544348L +#define gds__no_dup 335544349L +#define gds__no_finish 335544350L +#define gds__no_meta_update 335544351L +#define gds__no_priv 335544352L +#define gds__no_recon 335544353L +#define gds__no_record 335544354L +#define gds__no_segstr_close 335544355L +#define gds__obsolete_metadata 335544356L +#define gds__open_trans 335544357L +#define gds__port_len 335544358L +#define gds__read_only_field 335544359L +#define gds__read_only_rel 335544360L +#define gds__read_only_trans 335544361L +#define gds__read_only_view 335544362L +#define gds__req_no_trans 335544363L +#define gds__req_sync 335544364L +#define gds__req_wrong_db 335544365L +#define gds__segment 335544366L +#define gds__segstr_eof 335544367L +#define gds__segstr_no_op 335544368L +#define gds__segstr_no_read 335544369L +#define gds__segstr_no_trans 335544370L +#define gds__segstr_no_write 335544371L +#define gds__segstr_wrong_db 335544372L +#define gds__sys_request 335544373L +#define gds__stream_eof 335544374L +#define gds__unavailable 335544375L +#define gds__unres_rel 335544376L +#define gds__uns_ext 335544377L +#define gds__wish_list 335544378L +#define gds__wrong_ods 335544379L +#define gds__wronumarg 335544380L +#define gds__imp_exc 335544381L +#define gds__random 335544382L +#define gds__fatal_conflict 335544383L +#define gds__badblk 335544384L +#define gds__invpoolcl 335544385L +#define gds__nopoolids 335544386L +#define gds__relbadblk 335544387L +#define gds__blktoobig 335544388L +#define gds__bufexh 335544389L +#define gds__syntaxerr 335544390L +#define gds__bufinuse 335544391L +#define gds__bdbincon 335544392L +#define gds__reqinuse 335544393L +#define gds__badodsver 335544394L +#define gds__relnotdef 335544395L +#define gds__fldnotdef 335544396L +#define gds__dirtypage 335544397L +#define gds__waifortra 335544398L +#define gds__doubleloc 335544399L +#define gds__nodnotfnd 335544400L +#define gds__dupnodfnd 335544401L +#define gds__locnotmar 335544402L +#define gds__badpagtyp 335544403L +#define gds__corrupt 335544404L +#define gds__badpage 335544405L +#define gds__badindex 335544406L +#define gds__dbbnotzer 335544407L +#define gds__tranotzer 335544408L +#define gds__trareqmis 335544409L +#define gds__badhndcnt 335544410L +#define gds__wrotpbver 335544411L +#define gds__wroblrver 335544412L +#define gds__wrodpbver 335544413L +#define gds__blobnotsup 335544414L +#define gds__badrelation 335544415L +#define gds__nodetach 335544416L +#define gds__notremote 335544417L +#define gds__trainlim 335544418L +#define gds__notinlim 335544419L +#define gds__traoutsta 335544420L +#define gds__connect_reject 335544421L +#define gds__dbfile 335544422L +#define gds__orphan 335544423L +#define gds__no_lock_mgr 335544424L +#define gds__ctxinuse 335544425L +#define gds__ctxnotdef 335544426L +#define gds__datnotsup 335544427L +#define gds__badmsgnum 335544428L +#define gds__badparnum 335544429L +#define gds__virmemexh 335544430L +#define gds__blocking_signal 335544431L +#define gds__lockmanerr 335544432L +#define gds__journerr 335544433L +#define gds__keytoobig 335544434L +#define gds__nullsegkey 335544435L +#define gds__sqlerr 335544436L +#define gds__wrodynver 335544437L +#define gds__funnotdef 335544438L +#define gds__funmismat 335544439L +#define gds__bad_msg_vec 335544440L +#define gds__bad_detach 335544441L +#define gds__noargacc_read 335544442L +#define gds__noargacc_write 335544443L +#define gds__read_only 335544444L +#define gds__ext_err 335544445L +#define gds__non_updatable 335544446L +#define gds__no_rollback 335544447L +#define gds__bad_sec_info 335544448L +#define gds__invalid_sec_info 335544449L +#define gds__misc_interpreted 335544450L +#define gds__update_conflict 335544451L +#define gds__unlicensed 335544452L +#define gds__obj_in_use 335544453L +#define gds__nofilter 335544454L +#define gds__shadow_accessed 335544455L +#define gds__invalid_sdl 335544456L +#define gds__out_of_bounds 335544457L +#define gds__invalid_dimension 335544458L +#define gds__rec_in_limbo 335544459L +#define gds__shadow_missing 335544460L +#define gds__cant_validate 335544461L +#define gds__cant_start_journal 335544462L +#define gds__gennotdef 335544463L +#define gds__cant_start_logging 335544464L +#define gds__bad_segstr_type 335544465L +#define gds__foreign_key 335544466L +#define gds__high_minor 335544467L +#define gds__tra_state 335544468L +#define gds__trans_invalid 335544469L +#define gds__buf_invalid 335544470L +#define gds__indexnotdefined 335544471L +#define gds__login 335544472L +#define gds__invalid_bookmark 335544473L +#define gds__bad_lock_level 335544474L +#define gds__relation_lock 335544475L +#define gds__record_lock 335544476L +#define gds__max_idx 335544477L +#define gds__jrn_enable 335544478L +#define gds__old_failure 335544479L +#define gds__old_in_progress 335544480L +#define gds__old_no_space 335544481L +#define gds__no_wal_no_jrn 335544482L +#define gds__num_old_files 335544483L +#define gds__wal_file_open 335544484L +#define gds__bad_stmt_handle 335544485L +#define gds__wal_failure 335544486L +#define gds__walw_err 335544487L +#define gds__logh_small 335544488L +#define gds__logh_inv_version 335544489L +#define gds__logh_open_flag 335544490L +#define gds__logh_open_flag2 335544491L +#define gds__logh_diff_dbname 335544492L +#define gds__logf_unexpected_eof 335544493L +#define gds__logr_incomplete 335544494L +#define gds__logr_header_small 335544495L +#define gds__logb_small 335544496L +#define gds__wal_illegal_attach 335544497L +#define gds__wal_invalid_wpb 335544498L +#define gds__wal_err_rollover 335544499L +#define gds__no_wal 335544500L +#define gds__drop_wal 335544501L +#define gds__stream_not_defined 335544502L +#define gds__wal_subsys_error 335544503L +#define gds__wal_subsys_corrupt 335544504L +#define gds__no_archive 335544505L +#define gds__shutinprog 335544506L +#define gds__range_in_use 335544507L +#define gds__range_not_found 335544508L +#define gds__charset_not_found 335544509L +#define gds__lock_timeout 335544510L +#define gds__prcnotdef 335544511L +#define gds__prcmismat 335544512L +#define gds__wal_bugcheck 335544513L +#define gds__wal_cant_expand 335544514L +#define gds__codnotdef 335544515L +#define gds__xcpnotdef 335544516L +#define gds__except 335544517L +#define gds__cache_restart 335544518L +#define gds__bad_lock_handle 335544519L +#define gds__jrn_present 335544520L +#define gds__wal_err_rollover2 335544521L +#define gds__wal_err_logwrite 335544522L +#define gds__wal_err_jrn_comm 335544523L +#define gds__wal_err_expansion 335544524L +#define gds__wal_err_setup 335544525L +#define gds__wal_err_ww_sync 335544526L +#define gds__wal_err_ww_start 335544527L +#define gds__shutdown 335544528L +#define gds__existing_priv_mod 335544529L +#define gds__primary_key_ref 335544530L +#define gds__primary_key_notnull 335544531L +#define gds__ref_cnstrnt_notfound 335544532L +#define gds__foreign_key_notfound 335544533L +#define gds__ref_cnstrnt_update 335544534L +#define gds__check_cnstrnt_update 335544535L +#define gds__check_cnstrnt_del 335544536L +#define gds__integ_index_seg_del 335544537L +#define gds__integ_index_seg_mod 335544538L +#define gds__integ_index_del 335544539L +#define gds__integ_index_mod 335544540L +#define gds__check_trig_del 335544541L +#define gds__check_trig_update 335544542L +#define gds__cnstrnt_fld_del 335544543L +#define gds__cnstrnt_fld_rename 335544544L +#define gds__rel_cnstrnt_update 335544545L +#define gds__constaint_on_view 335544546L +#define gds__invld_cnstrnt_type 335544547L +#define gds__primary_key_exists 335544548L +#define gds__systrig_update 335544549L +#define gds__not_rel_owner 335544550L +#define gds__grant_obj_notfound 335544551L +#define gds__grant_fld_notfound 335544552L +#define gds__grant_nopriv 335544553L +#define gds__nonsql_security_rel 335544554L +#define gds__nonsql_security_fld 335544555L +#define gds__wal_cache_err 335544556L +#define gds__shutfail 335544557L +#define gds__check_constraint 335544558L +#define gds__bad_svc_handle 335544559L +#define gds__shutwarn 335544560L +#define gds__wrospbver 335544561L +#define gds__bad_spb_form 335544562L +#define gds__svcnotdef 335544563L +#define gds__no_jrn 335544564L +#define gds__transliteration_failed 335544565L +#define gds__start_cm_for_wal 335544566L +#define gds__wal_ovflow_log_required 335544567L +#define gds__text_subtype 335544568L +#define gds__dsql_error 335544569L +#define gds__dsql_command_err 335544570L +#define gds__dsql_constant_err 335544571L +#define gds__dsql_cursor_err 335544572L +#define gds__dsql_datatype_err 335544573L +#define gds__dsql_decl_err 335544574L +#define gds__dsql_cursor_update_err 335544575L +#define gds__dsql_cursor_open_err 335544576L +#define gds__dsql_cursor_close_err 335544577L +#define gds__dsql_field_err 335544578L +#define gds__dsql_internal_err 335544579L +#define gds__dsql_relation_err 335544580L +#define gds__dsql_procedure_err 335544581L +#define gds__dsql_request_err 335544582L +#define gds__dsql_sqlda_err 335544583L +#define gds__dsql_var_count_err 335544584L +#define gds__dsql_stmt_handle 335544585L +#define gds__dsql_function_err 335544586L +#define gds__dsql_blob_err 335544587L +#define gds__collation_not_found 335544588L +#define gds__collation_not_for_charset 335544589L +#define gds__dsql_dup_option 335544590L +#define gds__dsql_tran_err 335544591L +#define gds__dsql_invalid_array 335544592L +#define gds__dsql_max_arr_dim_exceeded 335544593L +#define gds__dsql_arr_range_error 335544594L +#define gds__dsql_trigger_err 335544595L +#define gds__dsql_subselect_err 335544596L +#define gds__dsql_crdb_prepare_err 335544597L +#define gds__specify_field_err 335544598L +#define gds__num_field_err 335544599L +#define gds__col_name_err 335544600L +#define gds__where_err 335544601L +#define gds__table_view_err 335544602L +#define gds__distinct_err 335544603L +#define gds__key_field_count_err 335544604L +#define gds__subquery_err 335544605L +#define gds__expression_eval_err 335544606L +#define gds__node_err 335544607L +#define gds__command_end_err 335544608L +#define gds__index_name 335544609L +#define gds__exception_name 335544610L +#define gds__field_name 335544611L +#define gds__token_err 335544612L +#define gds__union_err 335544613L +#define gds__dsql_construct_err 335544614L +#define gds__field_aggregate_err 335544615L +#define gds__field_ref_err 335544616L +#define gds__order_by_err 335544617L +#define gds__return_mode_err 335544618L +#define gds__extern_func_err 335544619L +#define gds__alias_conflict_err 335544620L +#define gds__procedure_conflict_error 335544621L +#define gds__relation_conflict_err 335544622L +#define gds__dsql_domain_err 335544623L +#define gds__idx_seg_err 335544624L +#define gds__node_name_err 335544625L +#define gds__table_name 335544626L +#define gds__proc_name 335544627L +#define gds__idx_create_err 335544628L +#define gds__wal_shadow_err 335544629L +#define gds__dependency 335544630L +#define gds__idx_key_err 335544631L +#define gds__dsql_file_length_err 335544632L +#define gds__dsql_shadow_number_err 335544633L +#define gds__dsql_token_unk_err 335544634L +#define gds__dsql_no_relation_alias 335544635L +#define gds__indexname 335544636L +#define gds__no_stream_plan 335544637L +#define gds__stream_twice 335544638L +#define gds__stream_not_found 335544639L +#define gds__collation_requires_text 335544640L +#define gds__dsql_domain_not_found 335544641L +#define gds__index_unused 335544642L +#define gds__dsql_self_join 335544643L +#define gds__stream_bof 335544644L +#define gds__stream_crack 335544645L +#define gds__db_or_file_exists 335544646L +#define gds__invalid_operator 335544647L +#define gds__conn_lost 335544648L +#define gds__bad_checksum 335544649L +#define gds__page_type_err 335544650L +#define gds__ext_readonly_err 335544651L +#define gds__sing_select_err 335544652L +#define gds__psw_attach 335544653L +#define gds__psw_start_trans 335544654L +#define gds__invalid_direction 335544655L +#define gds__dsql_var_conflict 335544656L +#define gds__dsql_no_blob_array 335544657L +#define gds__dsql_base_table 335544658L +#define gds__duplicate_base_table 335544659L +#define gds__view_alias 335544660L +#define gds__index_root_page_full 335544661L +#define gds__dsql_blob_type_unknown 335544662L +#define gds__req_max_clones_exceeded 335544663L +#define gds__dsql_duplicate_spec 335544664L +#define gds__unique_key_violation 335544665L +#define gds__srvr_version_too_old 335544666L +#define gds__drdb_completed_with_errs 335544667L +#define gds__dsql_procedure_use_err 335544668L +#define gds__dsql_count_mismatch 335544669L +#define gds__blob_idx_err 335544670L +#define gds__array_idx_err 335544671L +#define gds__key_field_err 335544672L +#define gds__no_delete 335544673L +#define gds__del_last_field 335544674L +#define gds__sort_err 335544675L +#define gds__sort_mem_err 335544676L +#define gds__version_err 335544677L +#define gds__inval_key_posn 335544678L +#define gds__no_segments_err 335544679L +#define gds__crrp_data_err 335544680L +#define gds__rec_size_err 335544681L +#define gds__dsql_field_ref 335544682L +#define gds__req_depth_exceeded 335544683L +#define gds__no_field_access 335544684L +#define gds__no_dbkey 335544685L +#define gds__jrn_format_err 335544686L +#define gds__jrn_file_full 335544687L +#define gds__dsql_open_cursor_request 335544688L +#define gds__ib_error 335544689L +#define gds__cache_redef 335544690L +#define gds__cache_too_small 335544691L +#define gds__log_redef 335544692L +#define gds__log_too_small 335544693L +#define gds__partition_too_small 335544694L +#define gds__partition_not_supp 335544695L +#define gds__log_length_spec 335544696L +#define gds__precision_err 335544697L +#define gds__scale_nogt 335544698L +#define gds__expec_short 335544699L +#define gds__expec_long 335544700L +#define gds__expec_ushort 335544701L +#define gds__like_escape_invalid 335544702L +#define gds__svcnoexe 335544703L +#define gds__net_lookup_err 335544704L +#define gds__service_unknown 335544705L +#define gds__host_unknown 335544706L +#define gds__grant_nopriv_on_base 335544707L +#define gds__dyn_fld_ambiguous 335544708L +#define gds__dsql_agg_ref_err 335544709L +#define gds__complex_view 335544710L +#define gds__unprepared_stmt 335544711L +#define gds__expec_positive 335544712L +#define gds__dsql_sqlda_value_err 335544713L +#define gds__invalid_array_id 335544714L +#define gds__extfile_uns_op 335544715L +#define gds__svc_in_use 335544716L +#define gds__err_stack_limit 335544717L +#define gds__invalid_key 335544718L +#define gds__net_init_error 335544719L +#define gds__loadlib_failure 335544720L +#define gds__network_error 335544721L +#define gds__net_connect_err 335544722L +#define gds__net_connect_listen_err 335544723L +#define gds__net_event_connect_err 335544724L +#define gds__net_event_listen_err 335544725L +#define gds__net_read_err 335544726L +#define gds__net_write_err 335544727L +#define gds__integ_index_deactivate 335544728L +#define gds__integ_deactivate_primary 335544729L +#define gds__cse_not_supported 335544730L +#define gds__tra_must_sweep 335544731L +#define gds__unsupported_network_drive 335544732L +#define gds__io_create_err 335544733L +#define gds__io_open_err 335544734L +#define gds__io_close_err 335544735L +#define gds__io_read_err 335544736L +#define gds__io_write_err 335544737L +#define gds__io_delete_err 335544738L +#define gds__io_access_err 335544739L +#define gds__udf_exception 335544740L +#define gds__lost_db_connection 335544741L +#define gds__no_write_user_priv 335544742L +#define gds__token_too_long 335544743L +#define gds__max_att_exceeded 335544744L +#define gds__login_same_as_role_name 335544745L +#define gds__reftable_requires_pk 335544746L +#define gds__usrname_too_long 335544747L +#define gds__password_too_long 335544748L +#define gds__usrname_required 335544749L +#define gds__password_required 335544750L +#define gds__bad_protocol 335544751L +#define gds__dup_usrname_found 335544752L +#define gds__usrname_not_found 335544753L +#define gds__error_adding_sec_record 335544754L +#define gds__error_modifying_sec_record 335544755L +#define gds__error_deleting_sec_record 335544756L +#define gds__error_updating_sec_db 335544757L +#define gds__sort_rec_size_err 335544758L +#define gds__bad_default_value 335544759L +#define gds__invalid_clause 335544760L +#define gds__too_many_handles 335544761L +#define gds__optimizer_blk_exc 335544762L +#define gds__invalid_string_constant 335544763L +#define gds__transitional_date 335544764L +#define gds__read_only_database 335544765L +#define gds__must_be_dialect_2_and_up 335544766L +#define gds__blob_filter_exception 335544767L +#define gds__exception_access_violation 335544768L +#define gds__exception_datatype_missalignment 335544769L +#define gds__exception_array_bounds_exceeded 335544770L +#define gds__exception_float_denormal_operand 335544771L +#define gds__exception_float_divide_by_zero 335544772L +#define gds__exception_float_inexact_result 335544773L +#define gds__exception_float_invalid_operand 335544774L +#define gds__exception_float_overflow 335544775L +#define gds__exception_float_stack_check 335544776L +#define gds__exception_float_underflow 335544777L +#define gds__exception_integer_divide_by_zero 335544778L +#define gds__exception_integer_overflow 335544779L +#define gds__exception_unknown 335544780L +#define gds__exception_stack_overflow 335544781L +#define gds__exception_sigsegv 335544782L +#define gds__exception_sigill 335544783L +#define gds__exception_sigbus 335544784L +#define gds__exception_sigfpe 335544785L +#define gds__ext_file_delete 335544786L +#define gds__ext_file_modify 335544787L +#define gds__adm_task_denied 335544788L +#define gds__extract_input_mismatch 335544789L +#define gds__insufficient_svc_privileges 335544790L +#define gds__file_in_use 335544791L +#define gds__service_att_err 335544792L +#define gds__ddl_not_allowed_by_db_sql_dial 335544793L +#define gds__cancelled 335544794L +#define gds__unexp_spb_form 335544795L +#define gds__sql_dialect_datatype_unsupport 335544796L +#define gds__svcnouser 335544797L +#define gds__depend_on_uncommitted_rel 335544798L +#define gds__svc_name_missing 335544799L +#define gds__too_many_contexts 335544800L +#define gds__datype_notsup 335544801L +#define gds__dialect_reset_warning 335544802L +#define gds__dialect_not_changed 335544803L +#define gds__database_create_failed 335544804L +#define gds__inv_dialect_specified 335544805L +#define gds__valid_db_dialects 335544806L +#define gds__sqlwarn 335544807L +#define gds__dtype_renamed 335544808L +#define gds__extern_func_dir_error 335544809L +#define gds__date_range_exceeded 335544810L +#define gds__inv_client_dialect_specified 335544811L +#define gds__valid_client_dialects 335544812L +#define gds__optimizer_between_err 335544813L +#define gds__service_not_supported 335544814L +#define gds__gfix_db_name 335740929L +#define gds__gfix_invalid_sw 335740930L +#define gds__gfix_incmp_sw 335740932L +#define gds__gfix_replay_req 335740933L +#define gds__gfix_pgbuf_req 335740934L +#define gds__gfix_val_req 335740935L +#define gds__gfix_pval_req 335740936L +#define gds__gfix_trn_req 335740937L +#define gds__gfix_full_req 335740940L +#define gds__gfix_usrname_req 335740941L +#define gds__gfix_pass_req 335740942L +#define gds__gfix_subs_name 335740943L +#define gds__gfix_wal_req 335740944L +#define gds__gfix_sec_req 335740945L +#define gds__gfix_nval_req 335740946L +#define gds__gfix_type_shut 335740947L +#define gds__gfix_retry 335740948L +#define gds__gfix_retry_db 335740951L +#define gds__gfix_exceed_max 335740991L +#define gds__gfix_corrupt_pool 335740992L +#define gds__gfix_mem_exhausted 335740993L +#define gds__gfix_bad_pool 335740994L +#define gds__gfix_trn_not_valid 335740995L +#define gds__gfix_unexp_eoi 335741012L +#define gds__gfix_recon_fail 335741018L +#define gds__gfix_trn_unknown 335741036L +#define gds__gfix_mode_req 335741038L +#define gds__gfix_opt_SQL_dialect 335741039L +#define gds__dsql_dbkey_from_non_table 336003074L +#define gds__dsql_transitional_numeric 336003075L +#define gds__dsql_dialect_warning_expr 336003076L +#define gds__sql_db_dialect_dtype_unsupport 336003077L +#define gds__isc_sql_dialect_conflict_num 336003079L +#define gds__dsql_warning_number_ambiguous 336003080L +#define gds__dsql_warning_number_ambiguous1 336003081L +#define gds__dsql_warn_precision_ambiguous 336003082L +#define gds__dsql_warn_precision_ambiguous1 336003083L +#define gds__dsql_warn_precision_ambiguous2 336003084L +#define gds__dyn_role_does_not_exist 336068796L +#define gds__dyn_no_grant_admin_opt 336068797L +#define gds__dyn_user_not_role_member 336068798L +#define gds__dyn_delete_role_failed 336068799L +#define gds__dyn_grant_role_to_user 336068800L +#define gds__dyn_inv_sql_role_name 336068801L +#define gds__dyn_dup_sql_role 336068802L +#define gds__dyn_kywd_spec_for_role 336068803L +#define gds__dyn_roles_not_supported 336068804L +#define gds__dyn_domain_name_exists 336068812L +#define gds__dyn_field_name_exists 336068813L +#define gds__dyn_dependency_exists 336068814L +#define gds__dyn_dtype_invalid 336068815L +#define gds__dyn_char_fld_too_small 336068816L +#define gds__dyn_invalid_dtype_conversion 336068817L +#define gds__dyn_dtype_conv_invalid 336068818L +#define gds__dyn_zero_len_id 336068820L +#define gds__gbak_unknown_switch 336330753L +#define gds__gbak_page_size_missing 336330754L +#define gds__gbak_page_size_toobig 336330755L +#define gds__gbak_redir_ouput_missing 336330756L +#define gds__gbak_switches_conflict 336330757L +#define gds__gbak_unknown_device 336330758L +#define gds__gbak_no_protection 336330759L +#define gds__gbak_page_size_not_allowed 336330760L +#define gds__gbak_multi_source_dest 336330761L +#define gds__gbak_filename_missing 336330762L +#define gds__gbak_dup_inout_names 336330763L +#define gds__gbak_inv_page_size 336330764L +#define gds__gbak_db_specified 336330765L +#define gds__gbak_db_exists 336330766L +#define gds__gbak_unk_device 336330767L +#define gds__gbak_blob_info_failed 336330772L +#define gds__gbak_unk_blob_item 336330773L +#define gds__gbak_get_seg_failed 336330774L +#define gds__gbak_close_blob_failed 336330775L +#define gds__gbak_open_blob_failed 336330776L +#define gds__gbak_put_blr_gen_id_failed 336330777L +#define gds__gbak_unk_type 336330778L +#define gds__gbak_comp_req_failed 336330779L +#define gds__gbak_start_req_failed 336330780L +#define gds__gbak_rec_failed 336330781L +#define gds__gbak_rel_req_failed 336330782L +#define gds__gbak_db_info_failed 336330783L +#define gds__gbak_no_db_desc 336330784L +#define gds__gbak_db_create_failed 336330785L +#define gds__gbak_decomp_len_error 336330786L +#define gds__gbak_tbl_missing 336330787L +#define gds__gbak_blob_col_missing 336330788L +#define gds__gbak_create_blob_failed 336330789L +#define gds__gbak_put_seg_failed 336330790L +#define gds__gbak_rec_len_exp 336330791L +#define gds__gbak_inv_rec_len 336330792L +#define gds__gbak_exp_data_type 336330793L +#define gds__gbak_gen_id_failed 336330794L +#define gds__gbak_unk_rec_type 336330795L +#define gds__gbak_inv_bkup_ver 336330796L +#define gds__gbak_missing_bkup_desc 336330797L +#define gds__gbak_string_trunc 336330798L +#define gds__gbak_cant_rest_record 336330799L +#define gds__gbak_send_failed 336330800L +#define gds__gbak_no_tbl_name 336330801L +#define gds__gbak_unexp_eof 336330802L +#define gds__gbak_db_format_too_old 336330803L +#define gds__gbak_inv_array_dim 336330804L +#define gds__gbak_xdr_len_expected 336330807L +#define gds__gbak_open_bkup_error 336330817L +#define gds__gbak_open_error 336330818L +#define gds__gbak_missing_block_fac 336330934L +#define gds__gbak_inv_block_fac 336330935L +#define gds__gbak_block_fac_specified 336330936L +#define gds__gbak_missing_username 336330940L +#define gds__gbak_missing_password 336330941L +#define gds__gbak_missing_skipped_bytes 336330952L +#define gds__gbak_inv_skipped_bytes 336330953L +#define gds__gbak_err_restore_charset 336330965L +#define gds__gbak_err_restore_collation 336330967L +#define gds__gbak_read_error 336330972L +#define gds__gbak_write_error 336330973L +#define gds__gbak_db_in_use 336330985L +#define gds__gbak_sysmemex 336330990L +#define gds__gbak_restore_role_failed 336331002L +#define gds__gbak_role_op_missing 336331005L +#define gds__gbak_page_buffers_missing 336331010L +#define gds__gbak_page_buffers_wrong_param 336331011L +#define gds__gbak_page_buffers_restore 336331012L +#define gds__gbak_inv_size 336331014L +#define gds__gbak_file_outof_sequence 336331015L +#define gds__gbak_join_file_missing 336331016L +#define gds__gbak_stdin_not_supptd 336331017L +#define gds__gbak_stdout_not_supptd 336331018L +#define gds__gbak_bkup_corrupt 336331019L +#define gds__gbak_unk_db_file_spec 336331020L +#define gds__gbak_hdr_write_failed 336331021L +#define gds__gbak_disk_space_ex 336331022L +#define gds__gbak_size_lt_min 336331023L +#define gds__gbak_svc_name_missing 336331025L +#define gds__gbak_not_ownr 336331026L +#define gds__gbak_mode_req 336331031L +#define gds__gsec_cant_open_db 336723983L +#define gds__gsec_switches_error 336723984L +#define gds__gsec_no_op_spec 336723985L +#define gds__gsec_no_usr_name 336723986L +#define gds__gsec_err_add 336723987L +#define gds__gsec_err_modify 336723988L +#define gds__gsec_err_find_mod 336723989L +#define gds__gsec_err_rec_not_found 336723990L +#define gds__gsec_err_delete 336723991L +#define gds__gsec_err_find_del 336723992L +#define gds__gsec_err_find_disp 336723996L +#define gds__gsec_inv_param 336723997L +#define gds__gsec_op_specified 336723998L +#define gds__gsec_pw_specified 336723999L +#define gds__gsec_uid_specified 336724000L +#define gds__gsec_gid_specified 336724001L +#define gds__gsec_proj_specified 336724002L +#define gds__gsec_org_specified 336724003L +#define gds__gsec_fname_specified 336724004L +#define gds__gsec_mname_specified 336724005L +#define gds__gsec_lname_specified 336724006L +#define gds__gsec_inv_switch 336724008L +#define gds__gsec_amb_switch 336724009L +#define gds__gsec_no_op_specified 336724010L +#define gds__gsec_params_not_allowed 336724011L +#define gds__gsec_incompat_switch 336724012L +#define gds__gsec_inv_username 336724044L +#define gds__gsec_inv_pw_length 336724045L +#define gds__gsec_db_specified 336724046L +#define gds__gsec_db_admin_specified 336724047L +#define gds__gsec_db_admin_pw_specified 336724048L +#define gds__gsec_sql_role_specified 336724049L +#define gds__license_no_file 336789504L +#define gds__license_op_specified 336789523L +#define gds__license_op_missing 336789524L +#define gds__license_inv_switch 336789525L +#define gds__license_inv_switch_combo 336789526L +#define gds__license_inv_op_combo 336789527L +#define gds__license_amb_switch 336789528L +#define gds__license_inv_parameter 336789529L +#define gds__license_param_specified 336789530L +#define gds__license_param_req 336789531L +#define gds__license_syntx_error 336789532L +#define gds__license_dup_id 336789534L +#define gds__license_inv_id_key 336789535L +#define gds__license_err_remove 336789536L +#define gds__license_err_update 336789537L +#define gds__license_err_convert 336789538L +#define gds__license_err_unk 336789539L +#define gds__license_svc_err_add 336789540L +#define gds__license_svc_err_remove 336789541L +#define gds__license_eval_exists 336789563L +#define gds__gstat_unknown_switch 336920577L +#define gds__gstat_retry 336920578L +#define gds__gstat_wrong_ods 336920579L +#define gds__gstat_unexpected_eof 336920580L +#define gds__gstat_open_err 336920605L +#define gds__gstat_read_err 336920606L +#define gds__gstat_sysmemex 336920607L +#define gds_err_max 690 + +/***********************/ +/* ISC Error Codes */ +/***********************/ + +#define isc_facility 20 +#define isc_err_base 335544320L +#define isc_err_factor 1 +#define isc_arg_end 0 /* end of argument list */ +#define isc_arg_gds 1 /* generic DSRI status value */ +#define isc_arg_string 2 /* string argument */ +#define isc_arg_cstring 3 /* count & string argument */ +#define isc_arg_number 4 /* numeric argument (long) */ +#define isc_arg_interpreted 5 /* interpreted status code (string) */ +#define isc_arg_vms 6 /* VAX/VMS status code (long) */ +#define isc_arg_unix 7 /* UNIX error code */ +#define isc_arg_domain 8 /* Apollo/Domain error code */ +#define isc_arg_dos 9 /* MSDOS/OS2 error code */ +#define isc_arg_mpexl 10 /* HP MPE/XL error code */ +#define isc_arg_mpexl_ipc 11 /* HP MPE/XL IPC error code */ +#define isc_arg_next_mach 15 /* NeXT/Mach error code */ +#define isc_arg_netware 16 /* NetWare error code */ +#define isc_arg_win32 17 /* Win32 error code */ +#define isc_arg_warning 18 /* warning argument */ + +#define isc_arith_except 335544321L +#define isc_bad_dbkey 335544322L +#define isc_bad_db_format 335544323L +#define isc_bad_db_handle 335544324L +#define isc_bad_dpb_content 335544325L +#define isc_bad_dpb_form 335544326L +#define isc_bad_req_handle 335544327L +#define isc_bad_segstr_handle 335544328L +#define isc_bad_segstr_id 335544329L +#define isc_bad_tpb_content 335544330L +#define isc_bad_tpb_form 335544331L +#define isc_bad_trans_handle 335544332L +#define isc_bug_check 335544333L +#define isc_convert_error 335544334L +#define isc_db_corrupt 335544335L +#define isc_deadlock 335544336L +#define isc_excess_trans 335544337L +#define isc_from_no_match 335544338L +#define isc_infinap 335544339L +#define isc_infona 335544340L +#define isc_infunk 335544341L +#define isc_integ_fail 335544342L +#define isc_invalid_blr 335544343L +#define isc_io_error 335544344L +#define isc_lock_conflict 335544345L +#define isc_metadata_corrupt 335544346L +#define isc_not_valid 335544347L +#define isc_no_cur_rec 335544348L +#define isc_no_dup 335544349L +#define isc_no_finish 335544350L +#define isc_no_meta_update 335544351L +#define isc_no_priv 335544352L +#define isc_no_recon 335544353L +#define isc_no_record 335544354L +#define isc_no_segstr_close 335544355L +#define isc_obsolete_metadata 335544356L +#define isc_open_trans 335544357L +#define isc_port_len 335544358L +#define isc_read_only_field 335544359L +#define isc_read_only_rel 335544360L +#define isc_read_only_trans 335544361L +#define isc_read_only_view 335544362L +#define isc_req_no_trans 335544363L +#define isc_req_sync 335544364L +#define isc_req_wrong_db 335544365L +#define isc_segment 335544366L +#define isc_segstr_eof 335544367L +#define isc_segstr_no_op 335544368L +#define isc_segstr_no_read 335544369L +#define isc_segstr_no_trans 335544370L +#define isc_segstr_no_write 335544371L +#define isc_segstr_wrong_db 335544372L +#define isc_sys_request 335544373L +#define isc_stream_eof 335544374L +#define isc_unavailable 335544375L +#define isc_unres_rel 335544376L +#define isc_uns_ext 335544377L +#define isc_wish_list 335544378L +#define isc_wrong_ods 335544379L +#define isc_wronumarg 335544380L +#define isc_imp_exc 335544381L +#define isc_random 335544382L +#define isc_fatal_conflict 335544383L +#define isc_badblk 335544384L +#define isc_invpoolcl 335544385L +#define isc_nopoolids 335544386L +#define isc_relbadblk 335544387L +#define isc_blktoobig 335544388L +#define isc_bufexh 335544389L +#define isc_syntaxerr 335544390L +#define isc_bufinuse 335544391L +#define isc_bdbincon 335544392L +#define isc_reqinuse 335544393L +#define isc_badodsver 335544394L +#define isc_relnotdef 335544395L +#define isc_fldnotdef 335544396L +#define isc_dirtypage 335544397L +#define isc_waifortra 335544398L +#define isc_doubleloc 335544399L +#define isc_nodnotfnd 335544400L +#define isc_dupnodfnd 335544401L +#define isc_locnotmar 335544402L +#define isc_badpagtyp 335544403L +#define isc_corrupt 335544404L +#define isc_badpage 335544405L +#define isc_badindex 335544406L +#define isc_dbbnotzer 335544407L +#define isc_tranotzer 335544408L +#define isc_trareqmis 335544409L +#define isc_badhndcnt 335544410L +#define isc_wrotpbver 335544411L +#define isc_wroblrver 335544412L +#define isc_wrodpbver 335544413L +#define isc_blobnotsup 335544414L +#define isc_badrelation 335544415L +#define isc_nodetach 335544416L +#define isc_notremote 335544417L +#define isc_trainlim 335544418L +#define isc_notinlim 335544419L +#define isc_traoutsta 335544420L +#define isc_connect_reject 335544421L +#define isc_dbfile 335544422L +#define isc_orphan 335544423L +#define isc_no_lock_mgr 335544424L +#define isc_ctxinuse 335544425L +#define isc_ctxnotdef 335544426L +#define isc_datnotsup 335544427L +#define isc_badmsgnum 335544428L +#define isc_badparnum 335544429L +#define isc_virmemexh 335544430L +#define isc_blocking_signal 335544431L +#define isc_lockmanerr 335544432L +#define isc_journerr 335544433L +#define isc_keytoobig 335544434L +#define isc_nullsegkey 335544435L +#define isc_sqlerr 335544436L +#define isc_wrodynver 335544437L +#define isc_funnotdef 335544438L +#define isc_funmismat 335544439L +#define isc_bad_msg_vec 335544440L +#define isc_bad_detach 335544441L +#define isc_noargacc_read 335544442L +#define isc_noargacc_write 335544443L +#define isc_read_only 335544444L +#define isc_ext_err 335544445L +#define isc_non_updatable 335544446L +#define isc_no_rollback 335544447L +#define isc_bad_sec_info 335544448L +#define isc_invalid_sec_info 335544449L +#define isc_misc_interpreted 335544450L +#define isc_update_conflict 335544451L +#define isc_unlicensed 335544452L +#define isc_obj_in_use 335544453L +#define isc_nofilter 335544454L +#define isc_shadow_accessed 335544455L +#define isc_invalid_sdl 335544456L +#define isc_out_of_bounds 335544457L +#define isc_invalid_dimension 335544458L +#define isc_rec_in_limbo 335544459L +#define isc_shadow_missing 335544460L +#define isc_cant_validate 335544461L +#define isc_cant_start_journal 335544462L +#define isc_gennotdef 335544463L +#define isc_cant_start_logging 335544464L +#define isc_bad_segstr_type 335544465L +#define isc_foreign_key 335544466L +#define isc_high_minor 335544467L +#define isc_tra_state 335544468L +#define isc_trans_invalid 335544469L +#define isc_buf_invalid 335544470L +#define isc_indexnotdefined 335544471L +#define isc_login 335544472L +#define isc_invalid_bookmark 335544473L +#define isc_bad_lock_level 335544474L +#define isc_relation_lock 335544475L +#define isc_record_lock 335544476L +#define isc_max_idx 335544477L +#define isc_jrn_enable 335544478L +#define isc_old_failure 335544479L +#define isc_old_in_progress 335544480L +#define isc_old_no_space 335544481L +#define isc_no_wal_no_jrn 335544482L +#define isc_num_old_files 335544483L +#define isc_wal_file_open 335544484L +#define isc_bad_stmt_handle 335544485L +#define isc_wal_failure 335544486L +#define isc_walw_err 335544487L +#define isc_logh_small 335544488L +#define isc_logh_inv_version 335544489L +#define isc_logh_open_flag 335544490L +#define isc_logh_open_flag2 335544491L +#define isc_logh_diff_dbname 335544492L +#define isc_logf_unexpected_eof 335544493L +#define isc_logr_incomplete 335544494L +#define isc_logr_header_small 335544495L +#define isc_logb_small 335544496L +#define isc_wal_illegal_attach 335544497L +#define isc_wal_invalid_wpb 335544498L +#define isc_wal_err_rollover 335544499L +#define isc_no_wal 335544500L +#define isc_drop_wal 335544501L +#define isc_stream_not_defined 335544502L +#define isc_wal_subsys_error 335544503L +#define isc_wal_subsys_corrupt 335544504L +#define isc_no_archive 335544505L +#define isc_shutinprog 335544506L +#define isc_range_in_use 335544507L +#define isc_range_not_found 335544508L +#define isc_charset_not_found 335544509L +#define isc_lock_timeout 335544510L +#define isc_prcnotdef 335544511L +#define isc_prcmismat 335544512L +#define isc_wal_bugcheck 335544513L +#define isc_wal_cant_expand 335544514L +#define isc_codnotdef 335544515L +#define isc_xcpnotdef 335544516L +#define isc_except 335544517L +#define isc_cache_restart 335544518L +#define isc_bad_lock_handle 335544519L +#define isc_jrn_present 335544520L +#define isc_wal_err_rollover2 335544521L +#define isc_wal_err_logwrite 335544522L +#define isc_wal_err_jrn_comm 335544523L +#define isc_wal_err_expansion 335544524L +#define isc_wal_err_setup 335544525L +#define isc_wal_err_ww_sync 335544526L +#define isc_wal_err_ww_start 335544527L +#define isc_shutdown 335544528L +#define isc_existing_priv_mod 335544529L +#define isc_primary_key_ref 335544530L +#define isc_primary_key_notnull 335544531L +#define isc_ref_cnstrnt_notfound 335544532L +#define isc_foreign_key_notfound 335544533L +#define isc_ref_cnstrnt_update 335544534L +#define isc_check_cnstrnt_update 335544535L +#define isc_check_cnstrnt_del 335544536L +#define isc_integ_index_seg_del 335544537L +#define isc_integ_index_seg_mod 335544538L +#define isc_integ_index_del 335544539L +#define isc_integ_index_mod 335544540L +#define isc_check_trig_del 335544541L +#define isc_check_trig_update 335544542L +#define isc_cnstrnt_fld_del 335544543L +#define isc_cnstrnt_fld_rename 335544544L +#define isc_rel_cnstrnt_update 335544545L +#define isc_constaint_on_view 335544546L +#define isc_invld_cnstrnt_type 335544547L +#define isc_primary_key_exists 335544548L +#define isc_systrig_update 335544549L +#define isc_not_rel_owner 335544550L +#define isc_grant_obj_notfound 335544551L +#define isc_grant_fld_notfound 335544552L +#define isc_grant_nopriv 335544553L +#define isc_nonsql_security_rel 335544554L +#define isc_nonsql_security_fld 335544555L +#define isc_wal_cache_err 335544556L +#define isc_shutfail 335544557L +#define isc_check_constraint 335544558L +#define isc_bad_svc_handle 335544559L +#define isc_shutwarn 335544560L +#define isc_wrospbver 335544561L +#define isc_bad_spb_form 335544562L +#define isc_svcnotdef 335544563L +#define isc_no_jrn 335544564L +#define isc_transliteration_failed 335544565L +#define isc_start_cm_for_wal 335544566L +#define isc_wal_ovflow_log_required 335544567L +#define isc_text_subtype 335544568L +#define isc_dsql_error 335544569L +#define isc_dsql_command_err 335544570L +#define isc_dsql_constant_err 335544571L +#define isc_dsql_cursor_err 335544572L +#define isc_dsql_datatype_err 335544573L +#define isc_dsql_decl_err 335544574L +#define isc_dsql_cursor_update_err 335544575L +#define isc_dsql_cursor_open_err 335544576L +#define isc_dsql_cursor_close_err 335544577L +#define isc_dsql_field_err 335544578L +#define isc_dsql_internal_err 335544579L +#define isc_dsql_relation_err 335544580L +#define isc_dsql_procedure_err 335544581L +#define isc_dsql_request_err 335544582L +#define isc_dsql_sqlda_err 335544583L +#define isc_dsql_var_count_err 335544584L +#define isc_dsql_stmt_handle 335544585L +#define isc_dsql_function_err 335544586L +#define isc_dsql_blob_err 335544587L +#define isc_collation_not_found 335544588L +#define isc_collation_not_for_charset 335544589L +#define isc_dsql_dup_option 335544590L +#define isc_dsql_tran_err 335544591L +#define isc_dsql_invalid_array 335544592L +#define isc_dsql_max_arr_dim_exceeded 335544593L +#define isc_dsql_arr_range_error 335544594L +#define isc_dsql_trigger_err 335544595L +#define isc_dsql_subselect_err 335544596L +#define isc_dsql_crdb_prepare_err 335544597L +#define isc_specify_field_err 335544598L +#define isc_num_field_err 335544599L +#define isc_col_name_err 335544600L +#define isc_where_err 335544601L +#define isc_table_view_err 335544602L +#define isc_distinct_err 335544603L +#define isc_key_field_count_err 335544604L +#define isc_subquery_err 335544605L +#define isc_expression_eval_err 335544606L +#define isc_node_err 335544607L +#define isc_command_end_err 335544608L +#define isc_index_name 335544609L +#define isc_exception_name 335544610L +#define isc_field_name 335544611L +#define isc_token_err 335544612L +#define isc_union_err 335544613L +#define isc_dsql_construct_err 335544614L +#define isc_field_aggregate_err 335544615L +#define isc_field_ref_err 335544616L +#define isc_order_by_err 335544617L +#define isc_return_mode_err 335544618L +#define isc_extern_func_err 335544619L +#define isc_alias_conflict_err 335544620L +#define isc_procedure_conflict_error 335544621L +#define isc_relation_conflict_err 335544622L +#define isc_dsql_domain_err 335544623L +#define isc_idx_seg_err 335544624L +#define isc_node_name_err 335544625L +#define isc_table_name 335544626L +#define isc_proc_name 335544627L +#define isc_idx_create_err 335544628L +#define isc_wal_shadow_err 335544629L +#define isc_dependency 335544630L +#define isc_idx_key_err 335544631L +#define isc_dsql_file_length_err 335544632L +#define isc_dsql_shadow_number_err 335544633L +#define isc_dsql_token_unk_err 335544634L +#define isc_dsql_no_relation_alias 335544635L +#define isc_indexname 335544636L +#define isc_no_stream_plan 335544637L +#define isc_stream_twice 335544638L +#define isc_stream_not_found 335544639L +#define isc_collation_requires_text 335544640L +#define isc_dsql_domain_not_found 335544641L +#define isc_index_unused 335544642L +#define isc_dsql_self_join 335544643L +#define isc_stream_bof 335544644L +#define isc_stream_crack 335544645L +#define isc_db_or_file_exists 335544646L +#define isc_invalid_operator 335544647L +#define isc_conn_lost 335544648L +#define isc_bad_checksum 335544649L +#define isc_page_type_err 335544650L +#define isc_ext_readonly_err 335544651L +#define isc_sing_select_err 335544652L +#define isc_psw_attach 335544653L +#define isc_psw_start_trans 335544654L +#define isc_invalid_direction 335544655L +#define isc_dsql_var_conflict 335544656L +#define isc_dsql_no_blob_array 335544657L +#define isc_dsql_base_table 335544658L +#define isc_duplicate_base_table 335544659L +#define isc_view_alias 335544660L +#define isc_index_root_page_full 335544661L +#define isc_dsql_blob_type_unknown 335544662L +#define isc_req_max_clones_exceeded 335544663L +#define isc_dsql_duplicate_spec 335544664L +#define isc_unique_key_violation 335544665L +#define isc_srvr_version_too_old 335544666L +#define isc_drdb_completed_with_errs 335544667L +#define isc_dsql_procedure_use_err 335544668L +#define isc_dsql_count_mismatch 335544669L +#define isc_blob_idx_err 335544670L +#define isc_array_idx_err 335544671L +#define isc_key_field_err 335544672L +#define isc_no_delete 335544673L +#define isc_del_last_field 335544674L +#define isc_sort_err 335544675L +#define isc_sort_mem_err 335544676L +#define isc_version_err 335544677L +#define isc_inval_key_posn 335544678L +#define isc_no_segments_err 335544679L +#define isc_crrp_data_err 335544680L +#define isc_rec_size_err 335544681L +#define isc_dsql_field_ref 335544682L +#define isc_req_depth_exceeded 335544683L +#define isc_no_field_access 335544684L +#define isc_no_dbkey 335544685L +#define isc_jrn_format_err 335544686L +#define isc_jrn_file_full 335544687L +#define isc_dsql_open_cursor_request 335544688L +#define isc_ib_error 335544689L +#define isc_cache_redef 335544690L +#define isc_cache_too_small 335544691L +#define isc_log_redef 335544692L +#define isc_log_too_small 335544693L +#define isc_partition_too_small 335544694L +#define isc_partition_not_supp 335544695L +#define isc_log_length_spec 335544696L +#define isc_precision_err 335544697L +#define isc_scale_nogt 335544698L +#define isc_expec_short 335544699L +#define isc_expec_long 335544700L +#define isc_expec_ushort 335544701L +#define isc_like_escape_invalid 335544702L +#define isc_svcnoexe 335544703L +#define isc_net_lookup_err 335544704L +#define isc_service_unknown 335544705L +#define isc_host_unknown 335544706L +#define isc_grant_nopriv_on_base 335544707L +#define isc_dyn_fld_ambiguous 335544708L +#define isc_dsql_agg_ref_err 335544709L +#define isc_complex_view 335544710L +#define isc_unprepared_stmt 335544711L +#define isc_expec_positive 335544712L +#define isc_dsql_sqlda_value_err 335544713L +#define isc_invalid_array_id 335544714L +#define isc_extfile_uns_op 335544715L +#define isc_svc_in_use 335544716L +#define isc_err_stack_limit 335544717L +#define isc_invalid_key 335544718L +#define isc_net_init_error 335544719L +#define isc_loadlib_failure 335544720L +#define isc_network_error 335544721L +#define isc_net_connect_err 335544722L +#define isc_net_connect_listen_err 335544723L +#define isc_net_event_connect_err 335544724L +#define isc_net_event_listen_err 335544725L +#define isc_net_read_err 335544726L +#define isc_net_write_err 335544727L +#define isc_integ_index_deactivate 335544728L +#define isc_integ_deactivate_primary 335544729L +#define isc_cse_not_supported 335544730L +#define isc_tra_must_sweep 335544731L +#define isc_unsupported_network_drive 335544732L +#define isc_io_create_err 335544733L +#define isc_io_open_err 335544734L +#define isc_io_close_err 335544735L +#define isc_io_read_err 335544736L +#define isc_io_write_err 335544737L +#define isc_io_delete_err 335544738L +#define isc_io_access_err 335544739L +#define isc_udf_exception 335544740L +#define isc_lost_db_connection 335544741L +#define isc_no_write_user_priv 335544742L +#define isc_token_too_long 335544743L +#define isc_max_att_exceeded 335544744L +#define isc_login_same_as_role_name 335544745L +#define isc_reftable_requires_pk 335544746L +#define isc_usrname_too_long 335544747L +#define isc_password_too_long 335544748L +#define isc_usrname_required 335544749L +#define isc_password_required 335544750L +#define isc_bad_protocol 335544751L +#define isc_dup_usrname_found 335544752L +#define isc_usrname_not_found 335544753L +#define isc_error_adding_sec_record 335544754L +#define isc_error_modifying_sec_record 335544755L +#define isc_error_deleting_sec_record 335544756L +#define isc_error_updating_sec_db 335544757L +#define isc_sort_rec_size_err 335544758L +#define isc_bad_default_value 335544759L +#define isc_invalid_clause 335544760L +#define isc_too_many_handles 335544761L +#define isc_optimizer_blk_exc 335544762L +#define isc_invalid_string_constant 335544763L +#define isc_transitional_date 335544764L +#define isc_read_only_database 335544765L +#define isc_must_be_dialect_2_and_up 335544766L +#define isc_blob_filter_exception 335544767L +#define isc_exception_access_violation 335544768L +#define isc_exception_datatype_missalignment 335544769L +#define isc_exception_array_bounds_exceeded 335544770L +#define isc_exception_float_denormal_operand 335544771L +#define isc_exception_float_divide_by_zero 335544772L +#define isc_exception_float_inexact_result 335544773L +#define isc_exception_float_invalid_operand 335544774L +#define isc_exception_float_overflow 335544775L +#define isc_exception_float_stack_check 335544776L +#define isc_exception_float_underflow 335544777L +#define isc_exception_integer_divide_by_zero 335544778L +#define isc_exception_integer_overflow 335544779L +#define isc_exception_unknown 335544780L +#define isc_exception_stack_overflow 335544781L +#define isc_exception_sigsegv 335544782L +#define isc_exception_sigill 335544783L +#define isc_exception_sigbus 335544784L +#define isc_exception_sigfpe 335544785L +#define isc_ext_file_delete 335544786L +#define isc_ext_file_modify 335544787L +#define isc_adm_task_denied 335544788L +#define isc_extract_input_mismatch 335544789L +#define isc_insufficient_svc_privileges 335544790L +#define isc_file_in_use 335544791L +#define isc_service_att_err 335544792L +#define isc_ddl_not_allowed_by_db_sql_dial 335544793L +#define isc_cancelled 335544794L +#define isc_unexp_spb_form 335544795L +#define isc_sql_dialect_datatype_unsupport 335544796L +#define isc_svcnouser 335544797L +#define isc_depend_on_uncommitted_rel 335544798L +#define isc_svc_name_missing 335544799L +#define isc_too_many_contexts 335544800L +#define isc_datype_notsup 335544801L +#define isc_dialect_reset_warning 335544802L +#define isc_dialect_not_changed 335544803L +#define isc_database_create_failed 335544804L +#define isc_inv_dialect_specified 335544805L +#define isc_valid_db_dialects 335544806L +#define isc_sqlwarn 335544807L +#define isc_dtype_renamed 335544808L +#define isc_extern_func_dir_error 335544809L +#define isc_date_range_exceeded 335544810L +#define isc_inv_client_dialect_specified 335544811L +#define isc_valid_client_dialects 335544812L +#define isc_optimizer_between_err 335544813L +#define isc_service_not_supported 335544814L +#define isc_gfix_db_name 335740929L +#define isc_gfix_invalid_sw 335740930L +#define isc_gfix_incmp_sw 335740932L +#define isc_gfix_replay_req 335740933L +#define isc_gfix_pgbuf_req 335740934L +#define isc_gfix_val_req 335740935L +#define isc_gfix_pval_req 335740936L +#define isc_gfix_trn_req 335740937L +#define isc_gfix_full_req 335740940L +#define isc_gfix_usrname_req 335740941L +#define isc_gfix_pass_req 335740942L +#define isc_gfix_subs_name 335740943L +#define isc_gfix_wal_req 335740944L +#define isc_gfix_sec_req 335740945L +#define isc_gfix_nval_req 335740946L +#define isc_gfix_type_shut 335740947L +#define isc_gfix_retry 335740948L +#define isc_gfix_retry_db 335740951L +#define isc_gfix_exceed_max 335740991L +#define isc_gfix_corrupt_pool 335740992L +#define isc_gfix_mem_exhausted 335740993L +#define isc_gfix_bad_pool 335740994L +#define isc_gfix_trn_not_valid 335740995L +#define isc_gfix_unexp_eoi 335741012L +#define isc_gfix_recon_fail 335741018L +#define isc_gfix_trn_unknown 335741036L +#define isc_gfix_mode_req 335741038L +#define isc_gfix_opt_SQL_dialect 335741039L +#define isc_dsql_dbkey_from_non_table 336003074L +#define isc_dsql_transitional_numeric 336003075L +#define isc_dsql_dialect_warning_expr 336003076L +#define isc_sql_db_dialect_dtype_unsupport 336003077L +#define isc_isc_sql_dialect_conflict_num 336003079L +#define isc_dsql_warning_number_ambiguous 336003080L +#define isc_dsql_warning_number_ambiguous1 336003081L +#define isc_dsql_warn_precision_ambiguous 336003082L +#define isc_dsql_warn_precision_ambiguous1 336003083L +#define isc_dsql_warn_precision_ambiguous2 336003084L +#define isc_dyn_role_does_not_exist 336068796L +#define isc_dyn_no_grant_admin_opt 336068797L +#define isc_dyn_user_not_role_member 336068798L +#define isc_dyn_delete_role_failed 336068799L +#define isc_dyn_grant_role_to_user 336068800L +#define isc_dyn_inv_sql_role_name 336068801L +#define isc_dyn_dup_sql_role 336068802L +#define isc_dyn_kywd_spec_for_role 336068803L +#define isc_dyn_roles_not_supported 336068804L +#define isc_dyn_domain_name_exists 336068812L +#define isc_dyn_field_name_exists 336068813L +#define isc_dyn_dependency_exists 336068814L +#define isc_dyn_dtype_invalid 336068815L +#define isc_dyn_char_fld_too_small 336068816L +#define isc_dyn_invalid_dtype_conversion 336068817L +#define isc_dyn_dtype_conv_invalid 336068818L +#define isc_dyn_zero_len_id 336068820L +#define isc_gbak_unknown_switch 336330753L +#define isc_gbak_page_size_missing 336330754L +#define isc_gbak_page_size_toobig 336330755L +#define isc_gbak_redir_ouput_missing 336330756L +#define isc_gbak_switches_conflict 336330757L +#define isc_gbak_unknown_device 336330758L +#define isc_gbak_no_protection 336330759L +#define isc_gbak_page_size_not_allowed 336330760L +#define isc_gbak_multi_source_dest 336330761L +#define isc_gbak_filename_missing 336330762L +#define isc_gbak_dup_inout_names 336330763L +#define isc_gbak_inv_page_size 336330764L +#define isc_gbak_db_specified 336330765L +#define isc_gbak_db_exists 336330766L +#define isc_gbak_unk_device 336330767L +#define isc_gbak_blob_info_failed 336330772L +#define isc_gbak_unk_blob_item 336330773L +#define isc_gbak_get_seg_failed 336330774L +#define isc_gbak_close_blob_failed 336330775L +#define isc_gbak_open_blob_failed 336330776L +#define isc_gbak_put_blr_gen_id_failed 336330777L +#define isc_gbak_unk_type 336330778L +#define isc_gbak_comp_req_failed 336330779L +#define isc_gbak_start_req_failed 336330780L +#define isc_gbak_rec_failed 336330781L +#define isc_gbak_rel_req_failed 336330782L +#define isc_gbak_db_info_failed 336330783L +#define isc_gbak_no_db_desc 336330784L +#define isc_gbak_db_create_failed 336330785L +#define isc_gbak_decomp_len_error 336330786L +#define isc_gbak_tbl_missing 336330787L +#define isc_gbak_blob_col_missing 336330788L +#define isc_gbak_create_blob_failed 336330789L +#define isc_gbak_put_seg_failed 336330790L +#define isc_gbak_rec_len_exp 336330791L +#define isc_gbak_inv_rec_len 336330792L +#define isc_gbak_exp_data_type 336330793L +#define isc_gbak_gen_id_failed 336330794L +#define isc_gbak_unk_rec_type 336330795L +#define isc_gbak_inv_bkup_ver 336330796L +#define isc_gbak_missing_bkup_desc 336330797L +#define isc_gbak_string_trunc 336330798L +#define isc_gbak_cant_rest_record 336330799L +#define isc_gbak_send_failed 336330800L +#define isc_gbak_no_tbl_name 336330801L +#define isc_gbak_unexp_eof 336330802L +#define isc_gbak_db_format_too_old 336330803L +#define isc_gbak_inv_array_dim 336330804L +#define isc_gbak_xdr_len_expected 336330807L +#define isc_gbak_open_bkup_error 336330817L +#define isc_gbak_open_error 336330818L +#define isc_gbak_missing_block_fac 336330934L +#define isc_gbak_inv_block_fac 336330935L +#define isc_gbak_block_fac_specified 336330936L +#define isc_gbak_missing_username 336330940L +#define isc_gbak_missing_password 336330941L +#define isc_gbak_missing_skipped_bytes 336330952L +#define isc_gbak_inv_skipped_bytes 336330953L +#define isc_gbak_err_restore_charset 336330965L +#define isc_gbak_err_restore_collation 336330967L +#define isc_gbak_read_error 336330972L +#define isc_gbak_write_error 336330973L +#define isc_gbak_db_in_use 336330985L +#define isc_gbak_sysmemex 336330990L +#define isc_gbak_restore_role_failed 336331002L +#define isc_gbak_role_op_missing 336331005L +#define isc_gbak_page_buffers_missing 336331010L +#define isc_gbak_page_buffers_wrong_param 336331011L +#define isc_gbak_page_buffers_restore 336331012L +#define isc_gbak_inv_size 336331014L +#define isc_gbak_file_outof_sequence 336331015L +#define isc_gbak_join_file_missing 336331016L +#define isc_gbak_stdin_not_supptd 336331017L +#define isc_gbak_stdout_not_supptd 336331018L +#define isc_gbak_bkup_corrupt 336331019L +#define isc_gbak_unk_db_file_spec 336331020L +#define isc_gbak_hdr_write_failed 336331021L +#define isc_gbak_disk_space_ex 336331022L +#define isc_gbak_size_lt_min 336331023L +#define isc_gbak_svc_name_missing 336331025L +#define isc_gbak_not_ownr 336331026L +#define isc_gbak_mode_req 336331031L +#define isc_gsec_cant_open_db 336723983L +#define isc_gsec_switches_error 336723984L +#define isc_gsec_no_op_spec 336723985L +#define isc_gsec_no_usr_name 336723986L +#define isc_gsec_err_add 336723987L +#define isc_gsec_err_modify 336723988L +#define isc_gsec_err_find_mod 336723989L +#define isc_gsec_err_rec_not_found 336723990L +#define isc_gsec_err_delete 336723991L +#define isc_gsec_err_find_del 336723992L +#define isc_gsec_err_find_disp 336723996L +#define isc_gsec_inv_param 336723997L +#define isc_gsec_op_specified 336723998L +#define isc_gsec_pw_specified 336723999L +#define isc_gsec_uid_specified 336724000L +#define isc_gsec_gid_specified 336724001L +#define isc_gsec_proj_specified 336724002L +#define isc_gsec_org_specified 336724003L +#define isc_gsec_fname_specified 336724004L +#define isc_gsec_mname_specified 336724005L +#define isc_gsec_lname_specified 336724006L +#define isc_gsec_inv_switch 336724008L +#define isc_gsec_amb_switch 336724009L +#define isc_gsec_no_op_specified 336724010L +#define isc_gsec_params_not_allowed 336724011L +#define isc_gsec_incompat_switch 336724012L +#define isc_gsec_inv_username 336724044L +#define isc_gsec_inv_pw_length 336724045L +#define isc_gsec_db_specified 336724046L +#define isc_gsec_db_admin_specified 336724047L +#define isc_gsec_db_admin_pw_specified 336724048L +#define isc_gsec_sql_role_specified 336724049L +#define isc_license_no_file 336789504L +#define isc_license_op_specified 336789523L +#define isc_license_op_missing 336789524L +#define isc_license_inv_switch 336789525L +#define isc_license_inv_switch_combo 336789526L +#define isc_license_inv_op_combo 336789527L +#define isc_license_amb_switch 336789528L +#define isc_license_inv_parameter 336789529L +#define isc_license_param_specified 336789530L +#define isc_license_param_req 336789531L +#define isc_license_syntx_error 336789532L +#define isc_license_dup_id 336789534L +#define isc_license_inv_id_key 336789535L +#define isc_license_err_remove 336789536L +#define isc_license_err_update 336789537L +#define isc_license_err_convert 336789538L +#define isc_license_err_unk 336789539L +#define isc_license_svc_err_add 336789540L +#define isc_license_svc_err_remove 336789541L +#define isc_license_eval_exists 336789563L +#define isc_gstat_unknown_switch 336920577L +#define isc_gstat_retry 336920578L +#define isc_gstat_wrong_ods 336920579L +#define isc_gstat_unexpected_eof 336920580L +#define isc_gstat_open_err 336920605L +#define isc_gstat_read_err 336920606L +#define isc_gstat_sysmemex 336920607L +#define isc_err_max 690 + diff --git a/src/jrd/boot_codes/codetext.h b/src/jrd/boot_codes/codetext.h new file mode 100644 index 0000000000..bf51649369 --- /dev/null +++ b/src/jrd/boot_codes/codetext.h @@ -0,0 +1,713 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ +/* + * + * File generated by codes.e - do not edit! + * + */ +"arith_except", 335544321, +"bad_dbkey", 335544322, +"bad_db_format", 335544323, +"bad_db_handle", 335544324, +"bad_dpb_content", 335544325, +"bad_dpb_form", 335544326, +"bad_req_handle", 335544327, +"bad_segstr_handle", 335544328, +"bad_segstr_id", 335544329, +"bad_tpb_content", 335544330, +"bad_tpb_form", 335544331, +"bad_trans_handle", 335544332, +"bug_check", 335544333, +"convert_error", 335544334, +"db_corrupt", 335544335, +"deadlock", 335544336, +"excess_trans", 335544337, +"from_no_match", 335544338, +"infinap", 335544339, +"infona", 335544340, +"infunk", 335544341, +"integ_fail", 335544342, +"invalid_blr", 335544343, +"io_error", 335544344, +"lock_conflict", 335544345, +"metadata_corrupt", 335544346, +"not_valid", 335544347, +"no_cur_rec", 335544348, +"no_dup", 335544349, +"no_finish", 335544350, +"no_meta_update", 335544351, +"no_priv", 335544352, +"no_recon", 335544353, +"no_record", 335544354, +"no_segstr_close", 335544355, +"obsolete_metadata", 335544356, +"open_trans", 335544357, +"port_len", 335544358, +"read_only_field", 335544359, +"read_only_rel", 335544360, +"read_only_trans", 335544361, +"read_only_view", 335544362, +"req_no_trans", 335544363, +"req_sync", 335544364, +"req_wrong_db", 335544365, +"segment", 335544366, +"segstr_eof", 335544367, +"segstr_no_op", 335544368, +"segstr_no_read", 335544369, +"segstr_no_trans", 335544370, +"segstr_no_write", 335544371, +"segstr_wrong_db", 335544372, +"sys_request", 335544373, +"stream_eof", 335544374, +"unavailable", 335544375, +"unres_rel", 335544376, +"uns_ext", 335544377, +"wish_list", 335544378, +"wrong_ods", 335544379, +"wronumarg", 335544380, +"imp_exc", 335544381, +"random", 335544382, +"fatal_conflict", 335544383, +"badblk", 335544384, +"invpoolcl", 335544385, +"nopoolids", 335544386, +"relbadblk", 335544387, +"blktoobig", 335544388, +"bufexh", 335544389, +"syntaxerr", 335544390, +"bufinuse", 335544391, +"bdbincon", 335544392, +"reqinuse", 335544393, +"badodsver", 335544394, +"relnotdef", 335544395, +"fldnotdef", 335544396, +"dirtypage", 335544397, +"waifortra", 335544398, +"doubleloc", 335544399, +"nodnotfnd", 335544400, +"dupnodfnd", 335544401, +"locnotmar", 335544402, +"badpagtyp", 335544403, +"corrupt", 335544404, +"badpage", 335544405, +"badindex", 335544406, +"dbbnotzer", 335544407, +"tranotzer", 335544408, +"trareqmis", 335544409, +"badhndcnt", 335544410, +"wrotpbver", 335544411, +"wroblrver", 335544412, +"wrodpbver", 335544413, +"blobnotsup", 335544414, +"badrelation", 335544415, +"nodetach", 335544416, +"notremote", 335544417, +"trainlim", 335544418, +"notinlim", 335544419, +"traoutsta", 335544420, +"connect_reject", 335544421, +"dbfile", 335544422, +"orphan", 335544423, +"no_lock_mgr", 335544424, +"ctxinuse", 335544425, +"ctxnotdef", 335544426, +"datnotsup", 335544427, +"badmsgnum", 335544428, +"badparnum", 335544429, +"virmemexh", 335544430, +"blocking_signal", 335544431, +"lockmanerr", 335544432, +"journerr", 335544433, +"keytoobig", 335544434, +"nullsegkey", 335544435, +"sqlerr", 335544436, +"wrodynver", 335544437, +"funnotdef", 335544438, +"funmismat", 335544439, +"bad_msg_vec", 335544440, +"bad_detach", 335544441, +"noargacc_read", 335544442, +"noargacc_write", 335544443, +"read_only", 335544444, +"ext_err", 335544445, +"non_updatable", 335544446, +"no_rollback", 335544447, +"bad_sec_info", 335544448, +"invalid_sec_info", 335544449, +"misc_interpreted", 335544450, +"update_conflict", 335544451, +"unlicensed", 335544452, +"obj_in_use", 335544453, +"nofilter", 335544454, +"shadow_accessed", 335544455, +"invalid_sdl", 335544456, +"out_of_bounds", 335544457, +"invalid_dimension", 335544458, +"rec_in_limbo", 335544459, +"shadow_missing", 335544460, +"cant_validate", 335544461, +"cant_start_journal", 335544462, +"gennotdef", 335544463, +"cant_start_logging", 335544464, +"bad_segstr_type", 335544465, +"foreign_key", 335544466, +"high_minor", 335544467, +"tra_state", 335544468, +"trans_invalid", 335544469, +"buf_invalid", 335544470, +"indexnotdefined", 335544471, +"login", 335544472, +"invalid_bookmark", 335544473, +"bad_lock_level", 335544474, +"relation_lock", 335544475, +"record_lock", 335544476, +"max_idx", 335544477, +"jrn_enable", 335544478, +"old_failure", 335544479, +"old_in_progress", 335544480, +"old_no_space", 335544481, +"no_wal_no_jrn", 335544482, +"num_old_files", 335544483, +"wal_file_open", 335544484, +"bad_stmt_handle", 335544485, +"wal_failure", 335544486, +"walw_err", 335544487, +"logh_small", 335544488, +"logh_inv_version", 335544489, +"logh_open_flag", 335544490, +"logh_open_flag2", 335544491, +"logh_diff_dbname", 335544492, +"logf_unexpected_eof", 335544493, +"logr_incomplete", 335544494, +"logr_header_small", 335544495, +"logb_small", 335544496, +"wal_illegal_attach", 335544497, +"wal_invalid_wpb", 335544498, +"wal_err_rollover", 335544499, +"no_wal", 335544500, +"drop_wal", 335544501, +"stream_not_defined", 335544502, +"wal_subsys_error", 335544503, +"wal_subsys_corrupt", 335544504, +"no_archive", 335544505, +"shutinprog", 335544506, +"range_in_use", 335544507, +"range_not_found", 335544508, +"charset_not_found", 335544509, +"lock_timeout", 335544510, +"prcnotdef", 335544511, +"prcmismat", 335544512, +"wal_bugcheck", 335544513, +"wal_cant_expand", 335544514, +"codnotdef", 335544515, +"xcpnotdef", 335544516, +"except", 335544517, +"cache_restart", 335544518, +"bad_lock_handle", 335544519, +"jrn_present", 335544520, +"wal_err_rollover2", 335544521, +"wal_err_logwrite", 335544522, +"wal_err_jrn_comm", 335544523, +"wal_err_expansion", 335544524, +"wal_err_setup", 335544525, +"wal_err_ww_sync", 335544526, +"wal_err_ww_start", 335544527, +"shutdown", 335544528, +"existing_priv_mod", 335544529, +"primary_key_ref", 335544530, +"primary_key_notnull", 335544531, +"ref_cnstrnt_notfound", 335544532, +"foreign_key_notfound", 335544533, +"ref_cnstrnt_update", 335544534, +"check_cnstrnt_update", 335544535, +"check_cnstrnt_del", 335544536, +"integ_index_seg_del", 335544537, +"integ_index_seg_mod", 335544538, +"integ_index_del", 335544539, +"integ_index_mod", 335544540, +"check_trig_del", 335544541, +"check_trig_update", 335544542, +"cnstrnt_fld_del", 335544543, +"cnstrnt_fld_rename", 335544544, +"rel_cnstrnt_update", 335544545, +"constaint_on_view", 335544546, +"invld_cnstrnt_type", 335544547, +"primary_key_exists", 335544548, +"systrig_update", 335544549, +"not_rel_owner", 335544550, +"grant_obj_notfound", 335544551, +"grant_fld_notfound", 335544552, +"grant_nopriv", 335544553, +"nonsql_security_rel", 335544554, +"nonsql_security_fld", 335544555, +"wal_cache_err", 335544556, +"shutfail", 335544557, +"check_constraint", 335544558, +"bad_svc_handle", 335544559, +"shutwarn", 335544560, +"wrospbver", 335544561, +"bad_spb_form", 335544562, +"svcnotdef", 335544563, +"no_jrn", 335544564, +"transliteration_failed", 335544565, +"start_cm_for_wal", 335544566, +"wal_ovflow_log_required", 335544567, +"text_subtype", 335544568, +"dsql_error", 335544569, +"dsql_command_err", 335544570, +"dsql_constant_err", 335544571, +"dsql_cursor_err", 335544572, +"dsql_datatype_err", 335544573, +"dsql_decl_err", 335544574, +"dsql_cursor_update_err", 335544575, +"dsql_cursor_open_err", 335544576, +"dsql_cursor_close_err", 335544577, +"dsql_field_err", 335544578, +"dsql_internal_err", 335544579, +"dsql_relation_err", 335544580, +"dsql_procedure_err", 335544581, +"dsql_request_err", 335544582, +"dsql_sqlda_err", 335544583, +"dsql_var_count_err", 335544584, +"dsql_stmt_handle", 335544585, +"dsql_function_err", 335544586, +"dsql_blob_err", 335544587, +"collation_not_found", 335544588, +"collation_not_for_charset", 335544589, +"dsql_dup_option", 335544590, +"dsql_tran_err", 335544591, +"dsql_invalid_array", 335544592, +"dsql_max_arr_dim_exceeded", 335544593, +"dsql_arr_range_error", 335544594, +"dsql_trigger_err", 335544595, +"dsql_subselect_err", 335544596, +"dsql_crdb_prepare_err", 335544597, +"specify_field_err", 335544598, +"num_field_err", 335544599, +"col_name_err", 335544600, +"where_err", 335544601, +"table_view_err", 335544602, +"distinct_err", 335544603, +"key_field_count_err", 335544604, +"subquery_err", 335544605, +"expression_eval_err", 335544606, +"node_err", 335544607, +"command_end_err", 335544608, +"index_name", 335544609, +"exception_name", 335544610, +"field_name", 335544611, +"token_err", 335544612, +"union_err", 335544613, +"dsql_construct_err", 335544614, +"field_aggregate_err", 335544615, +"field_ref_err", 335544616, +"order_by_err", 335544617, +"return_mode_err", 335544618, +"extern_func_err", 335544619, +"alias_conflict_err", 335544620, +"procedure_conflict_error", 335544621, +"relation_conflict_err", 335544622, +"dsql_domain_err", 335544623, +"idx_seg_err", 335544624, +"node_name_err", 335544625, +"table_name", 335544626, +"proc_name", 335544627, +"idx_create_err", 335544628, +"wal_shadow_err", 335544629, +"dependency", 335544630, +"idx_key_err", 335544631, +"dsql_file_length_err", 335544632, +"dsql_shadow_number_err", 335544633, +"dsql_token_unk_err", 335544634, +"dsql_no_relation_alias", 335544635, +"indexname", 335544636, +"no_stream_plan", 335544637, +"stream_twice", 335544638, +"stream_not_found", 335544639, +"collation_requires_text", 335544640, +"dsql_domain_not_found", 335544641, +"index_unused", 335544642, +"dsql_self_join", 335544643, +"stream_bof", 335544644, +"stream_crack", 335544645, +"db_or_file_exists", 335544646, +"invalid_operator", 335544647, +"conn_lost", 335544648, +"bad_checksum", 335544649, +"page_type_err", 335544650, +"ext_readonly_err", 335544651, +"sing_select_err", 335544652, +"psw_attach", 335544653, +"psw_start_trans", 335544654, +"invalid_direction", 335544655, +"dsql_var_conflict", 335544656, +"dsql_no_blob_array", 335544657, +"dsql_base_table", 335544658, +"duplicate_base_table", 335544659, +"view_alias", 335544660, +"index_root_page_full", 335544661, +"dsql_blob_type_unknown", 335544662, +"req_max_clones_exceeded", 335544663, +"dsql_duplicate_spec", 335544664, +"unique_key_violation", 335544665, +"srvr_version_too_old", 335544666, +"drdb_completed_with_errs", 335544667, +"dsql_procedure_use_err", 335544668, +"dsql_count_mismatch", 335544669, +"blob_idx_err", 335544670, +"array_idx_err", 335544671, +"key_field_err", 335544672, +"no_delete", 335544673, +"del_last_field", 335544674, +"sort_err", 335544675, +"sort_mem_err", 335544676, +"version_err", 335544677, +"inval_key_posn", 335544678, +"no_segments_err", 335544679, +"crrp_data_err", 335544680, +"rec_size_err", 335544681, +"dsql_field_ref", 335544682, +"req_depth_exceeded", 335544683, +"no_field_access", 335544684, +"no_dbkey", 335544685, +"jrn_format_err", 335544686, +"jrn_file_full", 335544687, +"dsql_open_cursor_request", 335544688, +"ib_error", 335544689, +"cache_redef", 335544690, +"cache_too_small", 335544691, +"log_redef", 335544692, +"log_too_small", 335544693, +"partition_too_small", 335544694, +"partition_not_supp", 335544695, +"log_length_spec", 335544696, +"precision_err", 335544697, +"scale_nogt", 335544698, +"expec_short", 335544699, +"expec_long", 335544700, +"expec_ushort", 335544701, +"like_escape_invalid", 335544702, +"svcnoexe", 335544703, +"net_lookup_err", 335544704, +"service_unknown", 335544705, +"host_unknown", 335544706, +"grant_nopriv_on_base", 335544707, +"dyn_fld_ambiguous", 335544708, +"dsql_agg_ref_err", 335544709, +"complex_view", 335544710, +"unprepared_stmt", 335544711, +"expec_positive", 335544712, +"dsql_sqlda_value_err", 335544713, +"invalid_array_id", 335544714, +"extfile_uns_op", 335544715, +"svc_in_use", 335544716, +"err_stack_limit", 335544717, +"invalid_key", 335544718, +"net_init_error", 335544719, +"loadlib_failure", 335544720, +"network_error", 335544721, +"net_connect_err", 335544722, +"net_connect_listen_err", 335544723, +"net_event_connect_err", 335544724, +"net_event_listen_err", 335544725, +"net_read_err", 335544726, +"net_write_err", 335544727, +"integ_index_deactivate", 335544728, +"integ_deactivate_primary", 335544729, +"cse_not_supported", 335544730, +"tra_must_sweep", 335544731, +"unsupported_network_drive", 335544732, +"io_create_err", 335544733, +"io_open_err", 335544734, +"io_close_err", 335544735, +"io_read_err", 335544736, +"io_write_err", 335544737, +"io_delete_err", 335544738, +"io_access_err", 335544739, +"udf_exception", 335544740, +"lost_db_connection", 335544741, +"no_write_user_priv", 335544742, +"token_too_long", 335544743, +"max_att_exceeded", 335544744, +"login_same_as_role_name", 335544745, +"reftable_requires_pk", 335544746, +"usrname_too_long", 335544747, +"password_too_long", 335544748, +"usrname_required", 335544749, +"password_required", 335544750, +"bad_protocol", 335544751, +"dup_usrname_found", 335544752, +"usrname_not_found", 335544753, +"error_adding_sec_record", 335544754, +"error_modifying_sec_record", 335544755, +"error_deleting_sec_record", 335544756, +"error_updating_sec_db", 335544757, +"sort_rec_size_err", 335544758, +"bad_default_value", 335544759, +"invalid_clause", 335544760, +"too_many_handles", 335544761, +"optimizer_blk_exc", 335544762, +"invalid_string_constant", 335544763, +"transitional_date", 335544764, +"read_only_database", 335544765, +"must_be_dialect_2_and_up", 335544766, +"blob_filter_exception", 335544767, +"exception_access_violation", 335544768, +"exception_datatype_missalignmen", 335544769, +"exception_array_bounds_exceeded", 335544770, +"exception_float_denormal_operan", 335544771, +"exception_float_divide_by_zero", 335544772, +"exception_float_inexact_result", 335544773, +"exception_float_invalid_operand", 335544774, +"exception_float_overflow", 335544775, +"exception_float_stack_check", 335544776, +"exception_float_underflow", 335544777, +"exception_integer_divide_by_zer", 335544778, +"exception_integer_overflow", 335544779, +"exception_unknown", 335544780, +"exception_stack_overflow", 335544781, +"exception_sigsegv", 335544782, +"exception_sigill", 335544783, +"exception_sigbus", 335544784, +"exception_sigfpe", 335544785, +"ext_file_delete", 335544786, +"ext_file_modify", 335544787, +"adm_task_denied", 335544788, +"extract_input_mismatch", 335544789, +"insufficient_svc_privileges", 335544790, +"file_in_use", 335544791, +"service_att_err", 335544792, +"ddl_not_allowed_by_db_sql_dial", 335544793, +"cancelled", 335544794, +"unexp_spb_form", 335544795, +"sql_dialect_datatype_unsupport", 335544796, +"svcnouser", 335544797, +"depend_on_uncommitted_rel", 335544798, +"svc_name_missing", 335544799, +"too_many_contexts", 335544800, +"datype_notsup", 335544801, +"dialect_reset_warning", 335544802, +"dialect_not_changed", 335544803, +"database_create_failed", 335544804, +"inv_dialect_specified", 335544805, +"valid_db_dialects", 335544806, +"sqlwarn", 335544807, +"dtype_renamed", 335544808, +"extern_func_dir_error", 335544809, +"date_range_exceeded", 335544810, +"inv_client_dialect_specified", 335544811, +"valid_client_dialects", 335544812, +"optimizer_between_err", 335544813, +"service_not_supported", 335544814, +"gfix_db_name", 335740929, +"gfix_invalid_sw", 335740930, +"gfix_incmp_sw", 335740932, +"gfix_replay_req", 335740933, +"gfix_pgbuf_req", 335740934, +"gfix_val_req", 335740935, +"gfix_pval_req", 335740936, +"gfix_trn_req", 335740937, +"gfix_full_req", 335740940, +"gfix_usrname_req", 335740941, +"gfix_pass_req", 335740942, +"gfix_subs_name", 335740943, +"gfix_wal_req", 335740944, +"gfix_sec_req", 335740945, +"gfix_nval_req", 335740946, +"gfix_type_shut", 335740947, +"gfix_retry", 335740948, +"gfix_retry_db", 335740951, +"gfix_exceed_max", 335740991, +"gfix_corrupt_pool", 335740992, +"gfix_mem_exhausted", 335740993, +"gfix_bad_pool", 335740994, +"gfix_trn_not_valid", 335740995, +"gfix_unexp_eoi", 335741012, +"gfix_recon_fail", 335741018, +"gfix_trn_unknown", 335741036, +"gfix_mode_req", 335741038, +"gfix_opt_SQL_dialect", 335741039, +"dsql_dbkey_from_non_table", 336003074, +"dsql_transitional_numeric", 336003075, +"dsql_dialect_warning_expr", 336003076, +"sql_db_dialect_dtype_unsupport", 336003077, +"isc_sql_dialect_conflict_num", 336003079, +"dsql_warning_number_ambiguous", 336003080, +"dsql_warning_number_ambiguous1", 336003081, +"dsql_warn_precision_ambiguous", 336003082, +"dsql_warn_precision_ambiguous1", 336003083, +"dsql_warn_precision_ambiguous2", 336003084, +"dyn_role_does_not_exist", 336068796, +"dyn_no_grant_admin_opt", 336068797, +"dyn_user_not_role_member", 336068798, +"dyn_delete_role_failed", 336068799, +"dyn_grant_role_to_user", 336068800, +"dyn_inv_sql_role_name", 336068801, +"dyn_dup_sql_role", 336068802, +"dyn_kywd_spec_for_role", 336068803, +"dyn_roles_not_supported", 336068804, +"dyn_domain_name_exists", 336068812, +"dyn_field_name_exists", 336068813, +"dyn_dependency_exists", 336068814, +"dyn_dtype_invalid", 336068815, +"dyn_char_fld_too_small", 336068816, +"dyn_invalid_dtype_conversion", 336068817, +"dyn_dtype_conv_invalid", 336068818, +"dyn_zero_len_id", 336068820, +"gbak_unknown_switch", 336330753, +"gbak_page_size_missing", 336330754, +"gbak_page_size_toobig", 336330755, +"gbak_redir_ouput_missing", 336330756, +"gbak_switches_conflict", 336330757, +"gbak_unknown_device", 336330758, +"gbak_no_protection", 336330759, +"gbak_page_size_not_allowed", 336330760, +"gbak_multi_source_dest", 336330761, +"gbak_filename_missing", 336330762, +"gbak_dup_inout_names", 336330763, +"gbak_inv_page_size", 336330764, +"gbak_db_specified", 336330765, +"gbak_db_exists", 336330766, +"gbak_unk_device", 336330767, +"gbak_blob_info_failed", 336330772, +"gbak_unk_blob_item", 336330773, +"gbak_get_seg_failed", 336330774, +"gbak_close_blob_failed", 336330775, +"gbak_open_blob_failed", 336330776, +"gbak_put_blr_gen_id_failed", 336330777, +"gbak_unk_type", 336330778, +"gbak_comp_req_failed", 336330779, +"gbak_start_req_failed", 336330780, +"gbak_rec_failed", 336330781, +"gbak_rel_req_failed", 336330782, +"gbak_db_info_failed", 336330783, +"gbak_no_db_desc", 336330784, +"gbak_db_create_failed", 336330785, +"gbak_decomp_len_error", 336330786, +"gbak_tbl_missing", 336330787, +"gbak_blob_col_missing", 336330788, +"gbak_create_blob_failed", 336330789, +"gbak_put_seg_failed", 336330790, +"gbak_rec_len_exp", 336330791, +"gbak_inv_rec_len", 336330792, +"gbak_exp_data_type", 336330793, +"gbak_gen_id_failed", 336330794, +"gbak_unk_rec_type", 336330795, +"gbak_inv_bkup_ver", 336330796, +"gbak_missing_bkup_desc", 336330797, +"gbak_string_trunc", 336330798, +"gbak_cant_rest_record", 336330799, +"gbak_send_failed", 336330800, +"gbak_no_tbl_name", 336330801, +"gbak_unexp_eof", 336330802, +"gbak_db_format_too_old", 336330803, +"gbak_inv_array_dim", 336330804, +"gbak_xdr_len_expected", 336330807, +"gbak_open_bkup_error", 336330817, +"gbak_open_error", 336330818, +"gbak_missing_block_fac", 336330934, +"gbak_inv_block_fac", 336330935, +"gbak_block_fac_specified", 336330936, +"gbak_missing_username", 336330940, +"gbak_missing_password", 336330941, +"gbak_missing_skipped_bytes", 336330952, +"gbak_inv_skipped_bytes", 336330953, +"gbak_err_restore_charset", 336330965, +"gbak_err_restore_collation", 336330967, +"gbak_read_error", 336330972, +"gbak_write_error", 336330973, +"gbak_db_in_use", 336330985, +"gbak_sysmemex", 336330990, +"gbak_restore_role_failed", 336331002, +"gbak_role_op_missing", 336331005, +"gbak_page_buffers_missing", 336331010, +"gbak_page_buffers_wrong_param", 336331011, +"gbak_page_buffers_restore", 336331012, +"gbak_inv_size", 336331014, +"gbak_file_outof_sequence", 336331015, +"gbak_join_file_missing", 336331016, +"gbak_stdin_not_supptd", 336331017, +"gbak_stdout_not_supptd", 336331018, +"gbak_bkup_corrupt", 336331019, +"gbak_unk_db_file_spec", 336331020, +"gbak_hdr_write_failed", 336331021, +"gbak_disk_space_ex", 336331022, +"gbak_size_lt_min", 336331023, +"gbak_svc_name_missing", 336331025, +"gbak_not_ownr", 336331026, +"gbak_mode_req", 336331031, +"gsec_cant_open_db", 336723983, +"gsec_switches_error", 336723984, +"gsec_no_op_spec", 336723985, +"gsec_no_usr_name", 336723986, +"gsec_err_add", 336723987, +"gsec_err_modify", 336723988, +"gsec_err_find_mod", 336723989, +"gsec_err_rec_not_found", 336723990, +"gsec_err_delete", 336723991, +"gsec_err_find_del", 336723992, +"gsec_err_find_disp", 336723996, +"gsec_inv_param", 336723997, +"gsec_op_specified", 336723998, +"gsec_pw_specified", 336723999, +"gsec_uid_specified", 336724000, +"gsec_gid_specified", 336724001, +"gsec_proj_specified", 336724002, +"gsec_org_specified", 336724003, +"gsec_fname_specified", 336724004, +"gsec_mname_specified", 336724005, +"gsec_lname_specified", 336724006, +"gsec_inv_switch", 336724008, +"gsec_amb_switch", 336724009, +"gsec_no_op_specified", 336724010, +"gsec_params_not_allowed", 336724011, +"gsec_incompat_switch", 336724012, +"gsec_inv_username", 336724044, +"gsec_inv_pw_length", 336724045, +"gsec_db_specified", 336724046, +"gsec_db_admin_specified", 336724047, +"gsec_db_admin_pw_specified", 336724048, +"gsec_sql_role_specified", 336724049, +"license_no_file", 336789504, +"license_op_specified", 336789523, +"license_op_missing", 336789524, +"license_inv_switch", 336789525, +"license_inv_switch_combo", 336789526, +"license_inv_op_combo", 336789527, +"license_amb_switch", 336789528, +"license_inv_parameter", 336789529, +"license_param_specified", 336789530, +"license_param_req", 336789531, +"license_syntx_error", 336789532, +"license_dup_id", 336789534, +"license_inv_id_key", 336789535, +"license_err_remove", 336789536, +"license_err_update", 336789537, +"license_err_convert", 336789538, +"license_err_unk", 336789539, +"license_svc_err_add", 336789540, +"license_svc_err_remove", 336789541, +"license_eval_exists", 336789563, +"gstat_unknown_switch", 336920577, +"gstat_retry", 336920578, +"gstat_wrong_ods", 336920579, +"gstat_unexpected_eof", 336920580, +"gstat_open_err", 336920605, +"gstat_read_err", 336920606, +"gstat_sysmemex", 336920607, diff --git a/src/jrd/boot_codes/files.txt b/src/jrd/boot_codes/files.txt new file mode 100644 index 0000000000..7d9e50d202 --- /dev/null +++ b/src/jrd/boot_codes/files.txt @@ -0,0 +1,9 @@ +gds_codes.pas +gds_codes.ftn +codes.h +iberror.h +codetext.h +msgs.h +rdb_codes.h +sql_code.h +msg_facs.h diff --git a/src/jrd/boot_codes/iberror.h b/src/jrd/boot_codes/iberror.h new file mode 100644 index 0000000000..8f14b6b0dd --- /dev/null +++ b/src/jrd/boot_codes/iberror.h @@ -0,0 +1,727 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ +/* + * + * File generated by codes.e - do not edit! + * + */ +/* + * MODULE: iberror.h + * DESCRIPTION: ISC error codes + * + */ + + + +/***********************/ +/* ISC Error Codes */ +/***********************/ + +#define isc_arith_except 335544321L +#define isc_bad_dbkey 335544322L +#define isc_bad_db_format 335544323L +#define isc_bad_db_handle 335544324L +#define isc_bad_dpb_content 335544325L +#define isc_bad_dpb_form 335544326L +#define isc_bad_req_handle 335544327L +#define isc_bad_segstr_handle 335544328L +#define isc_bad_segstr_id 335544329L +#define isc_bad_tpb_content 335544330L +#define isc_bad_tpb_form 335544331L +#define isc_bad_trans_handle 335544332L +#define isc_bug_check 335544333L +#define isc_convert_error 335544334L +#define isc_db_corrupt 335544335L +#define isc_deadlock 335544336L +#define isc_excess_trans 335544337L +#define isc_from_no_match 335544338L +#define isc_infinap 335544339L +#define isc_infona 335544340L +#define isc_infunk 335544341L +#define isc_integ_fail 335544342L +#define isc_invalid_blr 335544343L +#define isc_io_error 335544344L +#define isc_lock_conflict 335544345L +#define isc_metadata_corrupt 335544346L +#define isc_not_valid 335544347L +#define isc_no_cur_rec 335544348L +#define isc_no_dup 335544349L +#define isc_no_finish 335544350L +#define isc_no_meta_update 335544351L +#define isc_no_priv 335544352L +#define isc_no_recon 335544353L +#define isc_no_record 335544354L +#define isc_no_segstr_close 335544355L +#define isc_obsolete_metadata 335544356L +#define isc_open_trans 335544357L +#define isc_port_len 335544358L +#define isc_read_only_field 335544359L +#define isc_read_only_rel 335544360L +#define isc_read_only_trans 335544361L +#define isc_read_only_view 335544362L +#define isc_req_no_trans 335544363L +#define isc_req_sync 335544364L +#define isc_req_wrong_db 335544365L +#define isc_segment 335544366L +#define isc_segstr_eof 335544367L +#define isc_segstr_no_op 335544368L +#define isc_segstr_no_read 335544369L +#define isc_segstr_no_trans 335544370L +#define isc_segstr_no_write 335544371L +#define isc_segstr_wrong_db 335544372L +#define isc_sys_request 335544373L +#define isc_stream_eof 335544374L +#define isc_unavailable 335544375L +#define isc_unres_rel 335544376L +#define isc_uns_ext 335544377L +#define isc_wish_list 335544378L +#define isc_wrong_ods 335544379L +#define isc_wronumarg 335544380L +#define isc_imp_exc 335544381L +#define isc_random 335544382L +#define isc_fatal_conflict 335544383L +#define isc_badblk 335544384L +#define isc_invpoolcl 335544385L +#define isc_nopoolids 335544386L +#define isc_relbadblk 335544387L +#define isc_blktoobig 335544388L +#define isc_bufexh 335544389L +#define isc_syntaxerr 335544390L +#define isc_bufinuse 335544391L +#define isc_bdbincon 335544392L +#define isc_reqinuse 335544393L +#define isc_badodsver 335544394L +#define isc_relnotdef 335544395L +#define isc_fldnotdef 335544396L +#define isc_dirtypage 335544397L +#define isc_waifortra 335544398L +#define isc_doubleloc 335544399L +#define isc_nodnotfnd 335544400L +#define isc_dupnodfnd 335544401L +#define isc_locnotmar 335544402L +#define isc_badpagtyp 335544403L +#define isc_corrupt 335544404L +#define isc_badpage 335544405L +#define isc_badindex 335544406L +#define isc_dbbnotzer 335544407L +#define isc_tranotzer 335544408L +#define isc_trareqmis 335544409L +#define isc_badhndcnt 335544410L +#define isc_wrotpbver 335544411L +#define isc_wroblrver 335544412L +#define isc_wrodpbver 335544413L +#define isc_blobnotsup 335544414L +#define isc_badrelation 335544415L +#define isc_nodetach 335544416L +#define isc_notremote 335544417L +#define isc_trainlim 335544418L +#define isc_notinlim 335544419L +#define isc_traoutsta 335544420L +#define isc_connect_reject 335544421L +#define isc_dbfile 335544422L +#define isc_orphan 335544423L +#define isc_no_lock_mgr 335544424L +#define isc_ctxinuse 335544425L +#define isc_ctxnotdef 335544426L +#define isc_datnotsup 335544427L +#define isc_badmsgnum 335544428L +#define isc_badparnum 335544429L +#define isc_virmemexh 335544430L +#define isc_blocking_signal 335544431L +#define isc_lockmanerr 335544432L +#define isc_journerr 335544433L +#define isc_keytoobig 335544434L +#define isc_nullsegkey 335544435L +#define isc_sqlerr 335544436L +#define isc_wrodynver 335544437L +#define isc_funnotdef 335544438L +#define isc_funmismat 335544439L +#define isc_bad_msg_vec 335544440L +#define isc_bad_detach 335544441L +#define isc_noargacc_read 335544442L +#define isc_noargacc_write 335544443L +#define isc_read_only 335544444L +#define isc_ext_err 335544445L +#define isc_non_updatable 335544446L +#define isc_no_rollback 335544447L +#define isc_bad_sec_info 335544448L +#define isc_invalid_sec_info 335544449L +#define isc_misc_interpreted 335544450L +#define isc_update_conflict 335544451L +#define isc_unlicensed 335544452L +#define isc_obj_in_use 335544453L +#define isc_nofilter 335544454L +#define isc_shadow_accessed 335544455L +#define isc_invalid_sdl 335544456L +#define isc_out_of_bounds 335544457L +#define isc_invalid_dimension 335544458L +#define isc_rec_in_limbo 335544459L +#define isc_shadow_missing 335544460L +#define isc_cant_validate 335544461L +#define isc_cant_start_journal 335544462L +#define isc_gennotdef 335544463L +#define isc_cant_start_logging 335544464L +#define isc_bad_segstr_type 335544465L +#define isc_foreign_key 335544466L +#define isc_high_minor 335544467L +#define isc_tra_state 335544468L +#define isc_trans_invalid 335544469L +#define isc_buf_invalid 335544470L +#define isc_indexnotdefined 335544471L +#define isc_login 335544472L +#define isc_invalid_bookmark 335544473L +#define isc_bad_lock_level 335544474L +#define isc_relation_lock 335544475L +#define isc_record_lock 335544476L +#define isc_max_idx 335544477L +#define isc_jrn_enable 335544478L +#define isc_old_failure 335544479L +#define isc_old_in_progress 335544480L +#define isc_old_no_space 335544481L +#define isc_no_wal_no_jrn 335544482L +#define isc_num_old_files 335544483L +#define isc_wal_file_open 335544484L +#define isc_bad_stmt_handle 335544485L +#define isc_wal_failure 335544486L +#define isc_walw_err 335544487L +#define isc_logh_small 335544488L +#define isc_logh_inv_version 335544489L +#define isc_logh_open_flag 335544490L +#define isc_logh_open_flag2 335544491L +#define isc_logh_diff_dbname 335544492L +#define isc_logf_unexpected_eof 335544493L +#define isc_logr_incomplete 335544494L +#define isc_logr_header_small 335544495L +#define isc_logb_small 335544496L +#define isc_wal_illegal_attach 335544497L +#define isc_wal_invalid_wpb 335544498L +#define isc_wal_err_rollover 335544499L +#define isc_no_wal 335544500L +#define isc_drop_wal 335544501L +#define isc_stream_not_defined 335544502L +#define isc_wal_subsys_error 335544503L +#define isc_wal_subsys_corrupt 335544504L +#define isc_no_archive 335544505L +#define isc_shutinprog 335544506L +#define isc_range_in_use 335544507L +#define isc_range_not_found 335544508L +#define isc_charset_not_found 335544509L +#define isc_lock_timeout 335544510L +#define isc_prcnotdef 335544511L +#define isc_prcmismat 335544512L +#define isc_wal_bugcheck 335544513L +#define isc_wal_cant_expand 335544514L +#define isc_codnotdef 335544515L +#define isc_xcpnotdef 335544516L +#define isc_except 335544517L +#define isc_cache_restart 335544518L +#define isc_bad_lock_handle 335544519L +#define isc_jrn_present 335544520L +#define isc_wal_err_rollover2 335544521L +#define isc_wal_err_logwrite 335544522L +#define isc_wal_err_jrn_comm 335544523L +#define isc_wal_err_expansion 335544524L +#define isc_wal_err_setup 335544525L +#define isc_wal_err_ww_sync 335544526L +#define isc_wal_err_ww_start 335544527L +#define isc_shutdown 335544528L +#define isc_existing_priv_mod 335544529L +#define isc_primary_key_ref 335544530L +#define isc_primary_key_notnull 335544531L +#define isc_ref_cnstrnt_notfound 335544532L +#define isc_foreign_key_notfound 335544533L +#define isc_ref_cnstrnt_update 335544534L +#define isc_check_cnstrnt_update 335544535L +#define isc_check_cnstrnt_del 335544536L +#define isc_integ_index_seg_del 335544537L +#define isc_integ_index_seg_mod 335544538L +#define isc_integ_index_del 335544539L +#define isc_integ_index_mod 335544540L +#define isc_check_trig_del 335544541L +#define isc_check_trig_update 335544542L +#define isc_cnstrnt_fld_del 335544543L +#define isc_cnstrnt_fld_rename 335544544L +#define isc_rel_cnstrnt_update 335544545L +#define isc_constaint_on_view 335544546L +#define isc_invld_cnstrnt_type 335544547L +#define isc_primary_key_exists 335544548L +#define isc_systrig_update 335544549L +#define isc_not_rel_owner 335544550L +#define isc_grant_obj_notfound 335544551L +#define isc_grant_fld_notfound 335544552L +#define isc_grant_nopriv 335544553L +#define isc_nonsql_security_rel 335544554L +#define isc_nonsql_security_fld 335544555L +#define isc_wal_cache_err 335544556L +#define isc_shutfail 335544557L +#define isc_check_constraint 335544558L +#define isc_bad_svc_handle 335544559L +#define isc_shutwarn 335544560L +#define isc_wrospbver 335544561L +#define isc_bad_spb_form 335544562L +#define isc_svcnotdef 335544563L +#define isc_no_jrn 335544564L +#define isc_transliteration_failed 335544565L +#define isc_start_cm_for_wal 335544566L +#define isc_wal_ovflow_log_required 335544567L +#define isc_text_subtype 335544568L +#define isc_dsql_error 335544569L +#define isc_dsql_command_err 335544570L +#define isc_dsql_constant_err 335544571L +#define isc_dsql_cursor_err 335544572L +#define isc_dsql_datatype_err 335544573L +#define isc_dsql_decl_err 335544574L +#define isc_dsql_cursor_update_err 335544575L +#define isc_dsql_cursor_open_err 335544576L +#define isc_dsql_cursor_close_err 335544577L +#define isc_dsql_field_err 335544578L +#define isc_dsql_internal_err 335544579L +#define isc_dsql_relation_err 335544580L +#define isc_dsql_procedure_err 335544581L +#define isc_dsql_request_err 335544582L +#define isc_dsql_sqlda_err 335544583L +#define isc_dsql_var_count_err 335544584L +#define isc_dsql_stmt_handle 335544585L +#define isc_dsql_function_err 335544586L +#define isc_dsql_blob_err 335544587L +#define isc_collation_not_found 335544588L +#define isc_collation_not_for_charset 335544589L +#define isc_dsql_dup_option 335544590L +#define isc_dsql_tran_err 335544591L +#define isc_dsql_invalid_array 335544592L +#define isc_dsql_max_arr_dim_exceeded 335544593L +#define isc_dsql_arr_range_error 335544594L +#define isc_dsql_trigger_err 335544595L +#define isc_dsql_subselect_err 335544596L +#define isc_dsql_crdb_prepare_err 335544597L +#define isc_specify_field_err 335544598L +#define isc_num_field_err 335544599L +#define isc_col_name_err 335544600L +#define isc_where_err 335544601L +#define isc_table_view_err 335544602L +#define isc_distinct_err 335544603L +#define isc_key_field_count_err 335544604L +#define isc_subquery_err 335544605L +#define isc_expression_eval_err 335544606L +#define isc_node_err 335544607L +#define isc_command_end_err 335544608L +#define isc_index_name 335544609L +#define isc_exception_name 335544610L +#define isc_field_name 335544611L +#define isc_token_err 335544612L +#define isc_union_err 335544613L +#define isc_dsql_construct_err 335544614L +#define isc_field_aggregate_err 335544615L +#define isc_field_ref_err 335544616L +#define isc_order_by_err 335544617L +#define isc_return_mode_err 335544618L +#define isc_extern_func_err 335544619L +#define isc_alias_conflict_err 335544620L +#define isc_procedure_conflict_error 335544621L +#define isc_relation_conflict_err 335544622L +#define isc_dsql_domain_err 335544623L +#define isc_idx_seg_err 335544624L +#define isc_node_name_err 335544625L +#define isc_table_name 335544626L +#define isc_proc_name 335544627L +#define isc_idx_create_err 335544628L +#define isc_wal_shadow_err 335544629L +#define isc_dependency 335544630L +#define isc_idx_key_err 335544631L +#define isc_dsql_file_length_err 335544632L +#define isc_dsql_shadow_number_err 335544633L +#define isc_dsql_token_unk_err 335544634L +#define isc_dsql_no_relation_alias 335544635L +#define isc_indexname 335544636L +#define isc_no_stream_plan 335544637L +#define isc_stream_twice 335544638L +#define isc_stream_not_found 335544639L +#define isc_collation_requires_text 335544640L +#define isc_dsql_domain_not_found 335544641L +#define isc_index_unused 335544642L +#define isc_dsql_self_join 335544643L +#define isc_stream_bof 335544644L +#define isc_stream_crack 335544645L +#define isc_db_or_file_exists 335544646L +#define isc_invalid_operator 335544647L +#define isc_conn_lost 335544648L +#define isc_bad_checksum 335544649L +#define isc_page_type_err 335544650L +#define isc_ext_readonly_err 335544651L +#define isc_sing_select_err 335544652L +#define isc_psw_attach 335544653L +#define isc_psw_start_trans 335544654L +#define isc_invalid_direction 335544655L +#define isc_dsql_var_conflict 335544656L +#define isc_dsql_no_blob_array 335544657L +#define isc_dsql_base_table 335544658L +#define isc_duplicate_base_table 335544659L +#define isc_view_alias 335544660L +#define isc_index_root_page_full 335544661L +#define isc_dsql_blob_type_unknown 335544662L +#define isc_req_max_clones_exceeded 335544663L +#define isc_dsql_duplicate_spec 335544664L +#define isc_unique_key_violation 335544665L +#define isc_srvr_version_too_old 335544666L +#define isc_drdb_completed_with_errs 335544667L +#define isc_dsql_procedure_use_err 335544668L +#define isc_dsql_count_mismatch 335544669L +#define isc_blob_idx_err 335544670L +#define isc_array_idx_err 335544671L +#define isc_key_field_err 335544672L +#define isc_no_delete 335544673L +#define isc_del_last_field 335544674L +#define isc_sort_err 335544675L +#define isc_sort_mem_err 335544676L +#define isc_version_err 335544677L +#define isc_inval_key_posn 335544678L +#define isc_no_segments_err 335544679L +#define isc_crrp_data_err 335544680L +#define isc_rec_size_err 335544681L +#define isc_dsql_field_ref 335544682L +#define isc_req_depth_exceeded 335544683L +#define isc_no_field_access 335544684L +#define isc_no_dbkey 335544685L +#define isc_jrn_format_err 335544686L +#define isc_jrn_file_full 335544687L +#define isc_dsql_open_cursor_request 335544688L +#define isc_ib_error 335544689L +#define isc_cache_redef 335544690L +#define isc_cache_too_small 335544691L +#define isc_log_redef 335544692L +#define isc_log_too_small 335544693L +#define isc_partition_too_small 335544694L +#define isc_partition_not_supp 335544695L +#define isc_log_length_spec 335544696L +#define isc_precision_err 335544697L +#define isc_scale_nogt 335544698L +#define isc_expec_short 335544699L +#define isc_expec_long 335544700L +#define isc_expec_ushort 335544701L +#define isc_like_escape_invalid 335544702L +#define isc_svcnoexe 335544703L +#define isc_net_lookup_err 335544704L +#define isc_service_unknown 335544705L +#define isc_host_unknown 335544706L +#define isc_grant_nopriv_on_base 335544707L +#define isc_dyn_fld_ambiguous 335544708L +#define isc_dsql_agg_ref_err 335544709L +#define isc_complex_view 335544710L +#define isc_unprepared_stmt 335544711L +#define isc_expec_positive 335544712L +#define isc_dsql_sqlda_value_err 335544713L +#define isc_invalid_array_id 335544714L +#define isc_extfile_uns_op 335544715L +#define isc_svc_in_use 335544716L +#define isc_err_stack_limit 335544717L +#define isc_invalid_key 335544718L +#define isc_net_init_error 335544719L +#define isc_loadlib_failure 335544720L +#define isc_network_error 335544721L +#define isc_net_connect_err 335544722L +#define isc_net_connect_listen_err 335544723L +#define isc_net_event_connect_err 335544724L +#define isc_net_event_listen_err 335544725L +#define isc_net_read_err 335544726L +#define isc_net_write_err 335544727L +#define isc_integ_index_deactivate 335544728L +#define isc_integ_deactivate_primary 335544729L +#define isc_cse_not_supported 335544730L +#define isc_tra_must_sweep 335544731L +#define isc_unsupported_network_drive 335544732L +#define isc_io_create_err 335544733L +#define isc_io_open_err 335544734L +#define isc_io_close_err 335544735L +#define isc_io_read_err 335544736L +#define isc_io_write_err 335544737L +#define isc_io_delete_err 335544738L +#define isc_io_access_err 335544739L +#define isc_udf_exception 335544740L +#define isc_lost_db_connection 335544741L +#define isc_no_write_user_priv 335544742L +#define isc_token_too_long 335544743L +#define isc_max_att_exceeded 335544744L +#define isc_login_same_as_role_name 335544745L +#define isc_reftable_requires_pk 335544746L +#define isc_usrname_too_long 335544747L +#define isc_password_too_long 335544748L +#define isc_usrname_required 335544749L +#define isc_password_required 335544750L +#define isc_bad_protocol 335544751L +#define isc_dup_usrname_found 335544752L +#define isc_usrname_not_found 335544753L +#define isc_error_adding_sec_record 335544754L +#define isc_error_modifying_sec_record 335544755L +#define isc_error_deleting_sec_record 335544756L +#define isc_error_updating_sec_db 335544757L +#define isc_sort_rec_size_err 335544758L +#define isc_bad_default_value 335544759L +#define isc_invalid_clause 335544760L +#define isc_too_many_handles 335544761L +#define isc_optimizer_blk_exc 335544762L +#define isc_invalid_string_constant 335544763L +#define isc_transitional_date 335544764L +#define isc_read_only_database 335544765L +#define isc_must_be_dialect_2_and_up 335544766L +#define isc_blob_filter_exception 335544767L +#define isc_exception_access_violation 335544768L +#define isc_exception_datatype_missalignment 335544769L +#define isc_exception_array_bounds_exceeded 335544770L +#define isc_exception_float_denormal_operand 335544771L +#define isc_exception_float_divide_by_zero 335544772L +#define isc_exception_float_inexact_result 335544773L +#define isc_exception_float_invalid_operand 335544774L +#define isc_exception_float_overflow 335544775L +#define isc_exception_float_stack_check 335544776L +#define isc_exception_float_underflow 335544777L +#define isc_exception_integer_divide_by_zero 335544778L +#define isc_exception_integer_overflow 335544779L +#define isc_exception_unknown 335544780L +#define isc_exception_stack_overflow 335544781L +#define isc_exception_sigsegv 335544782L +#define isc_exception_sigill 335544783L +#define isc_exception_sigbus 335544784L +#define isc_exception_sigfpe 335544785L +#define isc_ext_file_delete 335544786L +#define isc_ext_file_modify 335544787L +#define isc_adm_task_denied 335544788L +#define isc_extract_input_mismatch 335544789L +#define isc_insufficient_svc_privileges 335544790L +#define isc_file_in_use 335544791L +#define isc_service_att_err 335544792L +#define isc_ddl_not_allowed_by_db_sql_dial 335544793L +#define isc_cancelled 335544794L +#define isc_unexp_spb_form 335544795L +#define isc_sql_dialect_datatype_unsupport 335544796L +#define isc_svcnouser 335544797L +#define isc_depend_on_uncommitted_rel 335544798L +#define isc_svc_name_missing 335544799L +#define isc_too_many_contexts 335544800L +#define isc_datype_notsup 335544801L +#define isc_dialect_reset_warning 335544802L +#define isc_dialect_not_changed 335544803L +#define isc_database_create_failed 335544804L +#define isc_inv_dialect_specified 335544805L +#define isc_valid_db_dialects 335544806L +#define isc_sqlwarn 335544807L +#define isc_dtype_renamed 335544808L +#define isc_extern_func_dir_error 335544809L +#define isc_date_range_exceeded 335544810L +#define isc_inv_client_dialect_specified 335544811L +#define isc_valid_client_dialects 335544812L +#define isc_optimizer_between_err 335544813L +#define isc_service_not_supported 335544814L +#define isc_gfix_db_name 335740929L +#define isc_gfix_invalid_sw 335740930L +#define isc_gfix_incmp_sw 335740932L +#define isc_gfix_replay_req 335740933L +#define isc_gfix_pgbuf_req 335740934L +#define isc_gfix_val_req 335740935L +#define isc_gfix_pval_req 335740936L +#define isc_gfix_trn_req 335740937L +#define isc_gfix_full_req 335740940L +#define isc_gfix_usrname_req 335740941L +#define isc_gfix_pass_req 335740942L +#define isc_gfix_subs_name 335740943L +#define isc_gfix_wal_req 335740944L +#define isc_gfix_sec_req 335740945L +#define isc_gfix_nval_req 335740946L +#define isc_gfix_type_shut 335740947L +#define isc_gfix_retry 335740948L +#define isc_gfix_retry_db 335740951L +#define isc_gfix_exceed_max 335740991L +#define isc_gfix_corrupt_pool 335740992L +#define isc_gfix_mem_exhausted 335740993L +#define isc_gfix_bad_pool 335740994L +#define isc_gfix_trn_not_valid 335740995L +#define isc_gfix_unexp_eoi 335741012L +#define isc_gfix_recon_fail 335741018L +#define isc_gfix_trn_unknown 335741036L +#define isc_gfix_mode_req 335741038L +#define isc_gfix_opt_SQL_dialect 335741039L +#define isc_dsql_dbkey_from_non_table 336003074L +#define isc_dsql_transitional_numeric 336003075L +#define isc_dsql_dialect_warning_expr 336003076L +#define isc_sql_db_dialect_dtype_unsupport 336003077L +#define isc_isc_sql_dialect_conflict_num 336003079L +#define isc_dsql_warning_number_ambiguous 336003080L +#define isc_dsql_warning_number_ambiguous1 336003081L +#define isc_dsql_warn_precision_ambiguous 336003082L +#define isc_dsql_warn_precision_ambiguous1 336003083L +#define isc_dsql_warn_precision_ambiguous2 336003084L +#define isc_dyn_role_does_not_exist 336068796L +#define isc_dyn_no_grant_admin_opt 336068797L +#define isc_dyn_user_not_role_member 336068798L +#define isc_dyn_delete_role_failed 336068799L +#define isc_dyn_grant_role_to_user 336068800L +#define isc_dyn_inv_sql_role_name 336068801L +#define isc_dyn_dup_sql_role 336068802L +#define isc_dyn_kywd_spec_for_role 336068803L +#define isc_dyn_roles_not_supported 336068804L +#define isc_dyn_domain_name_exists 336068812L +#define isc_dyn_field_name_exists 336068813L +#define isc_dyn_dependency_exists 336068814L +#define isc_dyn_dtype_invalid 336068815L +#define isc_dyn_char_fld_too_small 336068816L +#define isc_dyn_invalid_dtype_conversion 336068817L +#define isc_dyn_dtype_conv_invalid 336068818L +#define isc_dyn_zero_len_id 336068820L +#define isc_gbak_unknown_switch 336330753L +#define isc_gbak_page_size_missing 336330754L +#define isc_gbak_page_size_toobig 336330755L +#define isc_gbak_redir_ouput_missing 336330756L +#define isc_gbak_switches_conflict 336330757L +#define isc_gbak_unknown_device 336330758L +#define isc_gbak_no_protection 336330759L +#define isc_gbak_page_size_not_allowed 336330760L +#define isc_gbak_multi_source_dest 336330761L +#define isc_gbak_filename_missing 336330762L +#define isc_gbak_dup_inout_names 336330763L +#define isc_gbak_inv_page_size 336330764L +#define isc_gbak_db_specified 336330765L +#define isc_gbak_db_exists 336330766L +#define isc_gbak_unk_device 336330767L +#define isc_gbak_blob_info_failed 336330772L +#define isc_gbak_unk_blob_item 336330773L +#define isc_gbak_get_seg_failed 336330774L +#define isc_gbak_close_blob_failed 336330775L +#define isc_gbak_open_blob_failed 336330776L +#define isc_gbak_put_blr_gen_id_failed 336330777L +#define isc_gbak_unk_type 336330778L +#define isc_gbak_comp_req_failed 336330779L +#define isc_gbak_start_req_failed 336330780L +#define isc_gbak_rec_failed 336330781L +#define isc_gbak_rel_req_failed 336330782L +#define isc_gbak_db_info_failed 336330783L +#define isc_gbak_no_db_desc 336330784L +#define isc_gbak_db_create_failed 336330785L +#define isc_gbak_decomp_len_error 336330786L +#define isc_gbak_tbl_missing 336330787L +#define isc_gbak_blob_col_missing 336330788L +#define isc_gbak_create_blob_failed 336330789L +#define isc_gbak_put_seg_failed 336330790L +#define isc_gbak_rec_len_exp 336330791L +#define isc_gbak_inv_rec_len 336330792L +#define isc_gbak_exp_data_type 336330793L +#define isc_gbak_gen_id_failed 336330794L +#define isc_gbak_unk_rec_type 336330795L +#define isc_gbak_inv_bkup_ver 336330796L +#define isc_gbak_missing_bkup_desc 336330797L +#define isc_gbak_string_trunc 336330798L +#define isc_gbak_cant_rest_record 336330799L +#define isc_gbak_send_failed 336330800L +#define isc_gbak_no_tbl_name 336330801L +#define isc_gbak_unexp_eof 336330802L +#define isc_gbak_db_format_too_old 336330803L +#define isc_gbak_inv_array_dim 336330804L +#define isc_gbak_xdr_len_expected 336330807L +#define isc_gbak_open_bkup_error 336330817L +#define isc_gbak_open_error 336330818L +#define isc_gbak_missing_block_fac 336330934L +#define isc_gbak_inv_block_fac 336330935L +#define isc_gbak_block_fac_specified 336330936L +#define isc_gbak_missing_username 336330940L +#define isc_gbak_missing_password 336330941L +#define isc_gbak_missing_skipped_bytes 336330952L +#define isc_gbak_inv_skipped_bytes 336330953L +#define isc_gbak_err_restore_charset 336330965L +#define isc_gbak_err_restore_collation 336330967L +#define isc_gbak_read_error 336330972L +#define isc_gbak_write_error 336330973L +#define isc_gbak_db_in_use 336330985L +#define isc_gbak_sysmemex 336330990L +#define isc_gbak_restore_role_failed 336331002L +#define isc_gbak_role_op_missing 336331005L +#define isc_gbak_page_buffers_missing 336331010L +#define isc_gbak_page_buffers_wrong_param 336331011L +#define isc_gbak_page_buffers_restore 336331012L +#define isc_gbak_inv_size 336331014L +#define isc_gbak_file_outof_sequence 336331015L +#define isc_gbak_join_file_missing 336331016L +#define isc_gbak_stdin_not_supptd 336331017L +#define isc_gbak_stdout_not_supptd 336331018L +#define isc_gbak_bkup_corrupt 336331019L +#define isc_gbak_unk_db_file_spec 336331020L +#define isc_gbak_hdr_write_failed 336331021L +#define isc_gbak_disk_space_ex 336331022L +#define isc_gbak_size_lt_min 336331023L +#define isc_gbak_svc_name_missing 336331025L +#define isc_gbak_not_ownr 336331026L +#define isc_gbak_mode_req 336331031L +#define isc_gsec_cant_open_db 336723983L +#define isc_gsec_switches_error 336723984L +#define isc_gsec_no_op_spec 336723985L +#define isc_gsec_no_usr_name 336723986L +#define isc_gsec_err_add 336723987L +#define isc_gsec_err_modify 336723988L +#define isc_gsec_err_find_mod 336723989L +#define isc_gsec_err_rec_not_found 336723990L +#define isc_gsec_err_delete 336723991L +#define isc_gsec_err_find_del 336723992L +#define isc_gsec_err_find_disp 336723996L +#define isc_gsec_inv_param 336723997L +#define isc_gsec_op_specified 336723998L +#define isc_gsec_pw_specified 336723999L +#define isc_gsec_uid_specified 336724000L +#define isc_gsec_gid_specified 336724001L +#define isc_gsec_proj_specified 336724002L +#define isc_gsec_org_specified 336724003L +#define isc_gsec_fname_specified 336724004L +#define isc_gsec_mname_specified 336724005L +#define isc_gsec_lname_specified 336724006L +#define isc_gsec_inv_switch 336724008L +#define isc_gsec_amb_switch 336724009L +#define isc_gsec_no_op_specified 336724010L +#define isc_gsec_params_not_allowed 336724011L +#define isc_gsec_incompat_switch 336724012L +#define isc_gsec_inv_username 336724044L +#define isc_gsec_inv_pw_length 336724045L +#define isc_gsec_db_specified 336724046L +#define isc_gsec_db_admin_specified 336724047L +#define isc_gsec_db_admin_pw_specified 336724048L +#define isc_gsec_sql_role_specified 336724049L +#define isc_license_no_file 336789504L +#define isc_license_op_specified 336789523L +#define isc_license_op_missing 336789524L +#define isc_license_inv_switch 336789525L +#define isc_license_inv_switch_combo 336789526L +#define isc_license_inv_op_combo 336789527L +#define isc_license_amb_switch 336789528L +#define isc_license_inv_parameter 336789529L +#define isc_license_param_specified 336789530L +#define isc_license_param_req 336789531L +#define isc_license_syntx_error 336789532L +#define isc_license_dup_id 336789534L +#define isc_license_inv_id_key 336789535L +#define isc_license_err_remove 336789536L +#define isc_license_err_update 336789537L +#define isc_license_err_convert 336789538L +#define isc_license_err_unk 336789539L +#define isc_license_svc_err_add 336789540L +#define isc_license_svc_err_remove 336789541L +#define isc_license_eval_exists 336789563L +#define isc_gstat_unknown_switch 336920577L +#define isc_gstat_retry 336920578L +#define isc_gstat_wrong_ods 336920579L +#define isc_gstat_unexpected_eof 336920580L +#define isc_gstat_open_err 336920605L +#define isc_gstat_read_err 336920606L +#define isc_gstat_sysmemex 336920607L +#define isc_err_max 690 + diff --git a/src/jrd/boot_codes/msg_facs.h b/src/jrd/boot_codes/msg_facs.h new file mode 100644 index 0000000000..050aeceb4c --- /dev/null +++ b/src/jrd/boot_codes/msg_facs.h @@ -0,0 +1,52 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ +/* + * + * File generated by codes.e - do not edit! + * + */ +/* + * MODULE: msg_facs.h + * DESCRIPTION: ISC message facilities + * + */ + + + +/******************************/ +/* ISC message facilities */ +/******************************/ + +typedef struct _facilities { + int fac_code; + char *facility; + }; + +static CONST struct _facilities facilities[] = { + 0, "JRD ", + 3, "GFIX ", + 7, "DSQL ", + 8, "DYN ", + 12, "GBAK ", + 18, "GSEC ", + 19, "LICENSE ", + 21, "GSTAT ", + 0, NULL}; + + diff --git a/src/jrd/boot_codes/msgs.h b/src/jrd/boot_codes/msgs.h new file mode 100644 index 0000000000..dbaacb0e14 --- /dev/null +++ b/src/jrd/boot_codes/msgs.h @@ -0,0 +1,715 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ +/* + * + * File generated by codes.e - do not edit! + * + */ +"unassigned code", +"arithmetic exception, numeric overflow, or string truncation", /*1, arith_except */ +"invalid database key", /*2, bad_dbkey */ +"file %s is not a valid database", /*3, bad_db_format */ +"invalid database handle (no active connection)", /*4, bad_db_handle */ +"bad parameters on attach or create database", /*5, bad_dpb_content */ +"unrecognized database parameter block", /*6, bad_dpb_form */ +"invalid request handle", /*7, bad_req_handle */ +"invalid BLOB handle", /*8, bad_segstr_handle */ +"invalid BLOB ID", /*9, bad_segstr_id */ +"invalid parameter in transaction parameter block", /*10, bad_tpb_content */ +"invalid format for transaction parameter block", /*11, bad_tpb_form */ +"invalid transaction handle (expecting explicit transaction start)", /*12, bad_trans_handle */ +"internal gds software consistency check (%s)", /*13, bug_check */ +"conversion error from string \"%s\"", /*14, convert_error */ +"database file appears corrupt (%s)", /*15, db_corrupt */ +"deadlock", /*16, deadlock */ +"attempt to start more than %ld transactions", /*17, excess_trans */ +"no match for first value expression", /*18, from_no_match */ +"information type inappropriate for object specified", /*19, infinap */ +"no information of this type available for object specified", /*20, infona */ +"unknown information item", /*21, infunk */ +"action cancelled by trigger (%ld) to preserve data integrity", /*22, integ_fail */ +"invalid request BLR at offset %ld", /*23, invalid_blr */ +"I/O error for file %.0s\"%s\"", /*24, io_error */ +"lock conflict on no wait transaction", /*25, lock_conflict */ +"corrupt system table", /*26, metadata_corrupt */ +"validation error for column %s, value \"%s\"", /*27, not_valid */ +"no current record for fetch operation", /*28, no_cur_rec */ +"attempt to store duplicate value (visible to active transactions) in unique index \"%s\"", /*29, no_dup */ +"program attempted to exit without finishing database", /*30, no_finish */ +"unsuccessful metadata update", /*31, no_meta_update */ +"no permission for %s access to %s %s", /*32, no_priv */ +"transaction is not in limbo", /*33, no_recon */ +"invalid database key", /*34, no_record */ +"BLOB was not closed", /*35, no_segstr_close */ +"metadata is obsolete", /*36, obsolete_metadata */ +"cannot disconnect database with open transactions (%ld active)", /*37, open_trans */ +"message length error (encountered %ld, expected %ld)", /*38, port_len */ +"attempted update of read-only column", /*39, read_only_field */ +"attempted update of read-only table", /*40, read_only_rel */ +"attempted update during read-only transaction", /*41, read_only_trans */ +"cannot update read-only view %s", /*42, read_only_view */ +"no transaction for request", /*43, req_no_trans */ +"request synchronization error", /*44, req_sync */ +"request referenced an unavailable database", /*45, req_wrong_db */ +"segment buffer length shorter than expected", /*46, segment */ +"attempted retrieval of more segments than exist", /*47, segstr_eof */ +"attempted invalid operation on a BLOB", /*48, segstr_no_op */ +"attempted read of a new, open BLOB", /*49, segstr_no_read */ +"attempted action on blob outside transaction", /*50, segstr_no_trans */ +"attempted write to read-only BLOB", /*51, segstr_no_write */ +"attempted reference to BLOB in unavailable database", /*52, segstr_wrong_db */ +"operating system directive %s failed", /*53, sys_request */ +"attempt to fetch past the last record in a record stream", /*54, stream_eof */ +"unavailable database", /*55, unavailable */ +"table %s was omitted from the transaction reserving list", /*56, unres_rel */ +"request includes a DSRI extension not supported in this implementation", /*57, uns_ext */ +"feature is not supported", /*58, wish_list */ +"unsupported on-disk structure for file %s; found %ld, support %ld", /*59, wrong_ods */ +"wrong number of arguments on call", /*60, wronumarg */ +"Implementation limit exceeded", /*61, imp_exc */ +"%s", /*62, random */ +"unrecoverable conflict with limbo transaction %ld", /*63, fatal_conflict */ +"internal error", /*64, badblk */ +"internal error", /*65, invpoolcl */ +"too many requests", /*66, nopoolids */ +"internal error", /*67, relbadblk */ +"block size exceeds implementation restriction", /*68, blktoobig */ +"buffer exhausted", /*69, bufexh */ +"BLR syntax error: expected %s at offset %ld, encountered %ld", /*70, syntaxerr */ +"buffer in use", /*71, bufinuse */ +"internal error", /*72, bdbincon */ +"request in use", /*73, reqinuse */ +"incompatible version of on-disk structure", /*74, badodsver */ +"table %s is not defined", /*75, relnotdef */ +"column %s is not defined in table %s", /*76, fldnotdef */ +"internal error", /*77, dirtypage */ +"internal error", /*78, waifortra */ +"internal error", /*79, doubleloc */ +"internal error", /*80, nodnotfnd */ +"internal error", /*81, dupnodfnd */ +"internal error", /*82, locnotmar */ +"page %ld is of wrong type (expected %ld, found %ld)", /*83, badpagtyp */ +"database corrupted", /*84, corrupt */ +"checksum error on database page %ld", /*85, badpage */ +"index is broken", /*86, badindex */ +"database handle not zero", /*87, dbbnotzer */ +"transaction handle not zero", /*88, tranotzer */ +"transaction--request mismatch (synchronization error)", /*89, trareqmis */ +"bad handle count", /*90, badhndcnt */ +"wrong version of transaction parameter block", /*91, wrotpbver */ +"unsupported BLR version (expected %ld, encountered %ld)", /*92, wroblrver */ +"wrong version of database parameter block", /*93, wrodpbver */ +"BLOB and array data types are not supported for %s operation", /*94, blobnotsup */ +"database corrupted", /*95, badrelation */ +"internal error", /*96, nodetach */ +"internal error", /*97, notremote */ +"transaction in limbo", /*98, trainlim */ +"transaction not in limbo", /*99, notinlim */ +"transaction outstanding", /*100, traoutsta */ +"connection rejected by remote interface", /*101, connect_reject */ +"internal error", /*102, dbfile */ +"internal error", /*103, orphan */ +"no lock manager available", /*104, no_lock_mgr */ +"context already in use (BLR error)", /*105, ctxinuse */ +"context not defined (BLR error)", /*106, ctxnotdef */ +"data operation not supported", /*107, datnotsup */ +"undefined message number", /*108, badmsgnum */ +"bad parameter number", /*109, badparnum */ +"unable to allocate memory from operating system", /*110, virmemexh */ +"blocking signal has been received", /*111, blocking_signal */ +"lock manager error", /*112, lockmanerr */ +"communication error with journal \"%s\"", /*113, journerr */ +"key size exceeds implementation restriction for index \"%s\"", /*114, keytoobig */ +"null segment of UNIQUE KEY", /*115, nullsegkey */ +"SQL error code = %ld", /*116, sqlerr */ +"wrong DYN version", /*117, wrodynver */ +"function %s is not defined", /*118, funnotdef */ +"function %s could not be matched", /*119, funmismat */ +"", /*120, bad_msg_vec */ +"database detach completed with errors", /*121, bad_detach */ +"database system cannot read argument %ld", /*122, noargacc_read */ +"database system cannot write argument %ld", /*123, noargacc_write */ +"operation not supported", /*124, read_only */ +"%s extension error", /*125, ext_err */ +"not updatable", /*126, non_updatable */ +"no rollback performed", /*127, no_rollback */ +"", /*128, bad_sec_info */ +"", /*129, invalid_sec_info */ +"%s", /*130, misc_interpreted */ +"update conflicts with concurrent update", /*131, update_conflict */ +"product %s is not licensed", /*132, unlicensed */ +"object %s is in use", /*133, obj_in_use */ +"filter not found to convert type %ld to type %ld", /*134, nofilter */ +"cannot attach active shadow file", /*135, shadow_accessed */ +"invalid slice description language at offset %ld", /*136, invalid_sdl */ +"subscript out of bounds", /*137, out_of_bounds */ +"column not array or invalid dimensions (expected %ld, encountered %ld)", /*138, invalid_dimension */ +"record from transaction %ld is stuck in limbo", /*139, rec_in_limbo */ +"a file in manual shadow %ld is unavailable", /*140, shadow_missing */ +"secondary server attachments cannot validate databases", /*141, cant_validate */ +"secondary server attachments cannot start journaling", /*142, cant_start_journal */ +"generator %s is not defined", /*143, gennotdef */ +"secondary server attachments cannot start logging", /*144, cant_start_logging */ +"invalid BLOB type for operation", /*145, bad_segstr_type */ +"violation of FOREIGN KEY constraint \"%s\" on table \"%s\"", /*146, foreign_key */ +"minor version too high found %ld expected %ld", /*147, high_minor */ +"transaction %ld is %s", /*148, tra_state */ +"transaction marked invalid by I/O error", /*149, trans_invalid */ +"cache buffer for page %ld invalid", /*150, buf_invalid */ +"there is no index in table %s with id %d", /*151, indexnotdefined */ +"Your user name and password are not defined. Ask your database administrator to set up an InterBase login.", /*152, login */ +"invalid bookmark handle", /*153, invalid_bookmark */ +"invalid lock level %d", /*154, bad_lock_level */ +"lock on table %s conflicts with existing lock", /*155, relation_lock */ +"requested record lock conflicts with existing lock", /*156, record_lock */ +"maximum indexes per table (%d) exceeded", /*157, max_idx */ +"enable journal for database before starting online dump", /*158, jrn_enable */ +"online dump failure. Retry dump", /*159, old_failure */ +"an online dump is already in progress", /*160, old_in_progress */ +"no more disk/tape space. Cannot continue online dump", /*161, old_no_space */ +"journaling allowed only if database has Write-ahead Log", /*162, no_wal_no_jrn */ +"maximum number of online dump files that can be specified is 16", /*163, num_old_files */ +"error in opening Write-ahead Log file during recovery", /*164, wal_file_open */ +"invalid statement handle", /*165, bad_stmt_handle */ +"Write-ahead log subsystem failure", /*166, wal_failure */ +"WAL Writer error", /*167, walw_err */ +"Log file header of %s too small", /*168, logh_small */ +"Invalid version of log file %s", /*169, logh_inv_version */ +"Log file %s not latest in the chain but open flag still set", /*170, logh_open_flag */ +"Log file %s not closed properly; database recovery may be required", /*171, logh_open_flag2 */ +"Database name in the log file %s is different", /*172, logh_diff_dbname */ +"Unexpected end of log file %s at offset %ld", /*173, logf_unexpected_eof */ +"Incomplete log record at offset %ld in log file %s", /*174, logr_incomplete */ +"Log record header too small at offset %ld in log file %s", /*175, logr_header_small */ +"Log block too small at offset %ld in log file %s", /*176, logb_small */ +"Illegal attempt to attach to an uninitialized WAL segment for %s", /*177, wal_illegal_attach */ +"Invalid WAL parameter block option %s", /*178, wal_invalid_wpb */ +"Cannot roll over to the next log file %s", /*179, wal_err_rollover */ +"database does not use Write-ahead Log", /*180, no_wal */ +"cannot drop log file when journaling is enabled", /*181, drop_wal */ +"reference to invalid stream number", /*182, stream_not_defined */ +"WAL subsystem encountered error", /*183, wal_subsys_error */ +"WAL subsystem corrupted", /*184, wal_subsys_corrupt */ +"must specify archive file when enabling long term journal for databases with round-robin log files", /*185, no_archive */ +"database %s shutdown in progress", /*186, shutinprog */ +"refresh range number %ld already in use", /*187, range_in_use */ +"refresh range number %ld not found", /*188, range_not_found */ +"CHARACTER SET %s is not defined", /*189, charset_not_found */ +"lock time-out on wait transaction", /*190, lock_timeout */ +"procedure %s is not defined", /*191, prcnotdef */ +"parameter mismatch for procedure %s", /*192, prcmismat */ +"Database %s: WAL subsystem bug for pid %d\ +%s", /*193, wal_bugcheck */ +"Could not expand the WAL segment for database %s", /*194, wal_cant_expand */ +"status code %s unknown", /*195, codnotdef */ +"exception %s not defined", /*196, xcpnotdef */ +"exception %d", /*197, except */ +"restart shared cache manager", /*198, cache_restart */ +"invalid lock handle", /*199, bad_lock_handle */ +"long-term journaling already enabled", /*200, jrn_present */ +"Unable to roll over; please see InterBase log.", /*201, wal_err_rollover2 */ +"WAL I/O error. Please see InterBase log.", /*202, wal_err_logwrite */ +"WAL writer - Journal server communication error. Please see InterBase log.", /*203, wal_err_jrn_comm */ +"WAL buffers cannot be increased. Please see InterBase log.", /*204, wal_err_expansion */ +"WAL setup error. Please see InterBase log.", /*205, wal_err_setup */ +"WAL writer synchronization error for the database %s", /*206, wal_err_ww_sync */ +"Cannot start WAL writer for the database %s", /*207, wal_err_ww_start */ +"database %s shutdown", /*208, shutdown */ +"cannot modify an existing user privilege", /*209, existing_priv_mod */ +"Cannot delete PRIMARY KEY being used in FOREIGN KEY definition.", /*210, primary_key_ref */ +"Column used in a PRIMARY/UNIQUE constraint must be NOT NULL.", /*211, primary_key_notnull */ +"Name of Referential Constraint not defined in constraints table.", /*212, ref_cnstrnt_notfound */ +"Non-existent PRIMARY or UNIQUE KEY specified for FOREIGN KEY.", /*213, foreign_key_notfound */ +"Cannot update constraints (RDB$REF_CONSTRAINTS).", /*214, ref_cnstrnt_update */ +"Cannot update constraints (RDB$CHECK_CONSTRAINTS).", /*215, check_cnstrnt_update */ +"Cannot delete CHECK constraint entry (RDB$CHECK_CONSTRAINTS)", /*216, check_cnstrnt_del */ +"Cannot delete index segment used by an Integrity Constraint", /*217, integ_index_seg_del */ +"Cannot update index segment used by an Integrity Constraint", /*218, integ_index_seg_mod */ +"Cannot delete index used by an Integrity Constraint", /*219, integ_index_del */ +"Cannot modify index used by an Integrity Constraint", /*220, integ_index_mod */ +"Cannot delete trigger used by a CHECK Constraint", /*221, check_trig_del */ +"Cannot update trigger used by a CHECK Constraint", /*222, check_trig_update */ +"Cannot delete column being used in an Integrity Constraint.", /*223, cnstrnt_fld_del */ +"Cannot rename column being used in an Integrity Constraint.", /*224, cnstrnt_fld_rename */ +"Cannot update constraints (RDB$RELATION_CONSTRAINTS).", /*225, rel_cnstrnt_update */ +"Cannot define constraints on views", /*226, constaint_on_view */ +"internal gds software consistency check (invalid RDB$CONSTRAINT_TYPE)", /*227, invld_cnstrnt_type */ +"Attempt to define a second PRIMARY KEY for the same table", /*228, primary_key_exists */ +"cannot modify or erase a system trigger", /*229, systrig_update */ +"only the owner of a table may reassign ownership", /*230, not_rel_owner */ +"could not find table/procedure for GRANT", /*231, grant_obj_notfound */ +"could not find column for GRANT", /*232, grant_fld_notfound */ +"user does not have GRANT privileges for operation", /*233, grant_nopriv */ +"table/procedure has non-SQL security class defined", /*234, nonsql_security_rel */ +"column has non-SQL security class defined", /*235, nonsql_security_fld */ +"Write-ahead Log without shared cache configuration not allowed", /*236, wal_cache_err */ +"database shutdown unsuccessful", /*237, shutfail */ +"Operation violates CHECK constraint %s on view or table %s", /*238, check_constraint */ +"invalid service handle", /*239, bad_svc_handle */ +"database %s shutdown in %d seconds", /*240, shutwarn */ +"wrong version of service parameter block", /*241, wrospbver */ +"unrecognized service parameter block", /*242, bad_spb_form */ +"service %s is not defined", /*243, svcnotdef */ +"long-term journaling not enabled", /*244, no_jrn */ +"Cannot transliterate character between character sets", /*245, transliteration_failed */ +"WAL defined; Cache Manager must be started first", /*246, start_cm_for_wal */ +"Overflow log specification required for round-robin log", /*247, wal_ovflow_log_required */ +"Implementation of text subtype %d not located.", /*248, text_subtype */ +"Dynamic SQL Error", /*249, dsql_error */ +"Invalid command", /*250, dsql_command_err */ +"Data type for constant unknown", /*251, dsql_constant_err */ +"Cursor unknown", /*252, dsql_cursor_err */ +"Data type unknown", /*253, dsql_datatype_err */ +"Declared cursor already exists", /*254, dsql_decl_err */ +"Cursor not updatable", /*255, dsql_cursor_update_err */ +"Attempt to reopen an open cursor", /*256, dsql_cursor_open_err */ +"Attempt to reclose a closed cursor", /*257, dsql_cursor_close_err */ +"Column unknown", /*258, dsql_field_err */ +"Internal error", /*259, dsql_internal_err */ +"Table unknown", /*260, dsql_relation_err */ +"Procedure unknown", /*261, dsql_procedure_err */ +"Request unknown", /*262, dsql_request_err */ +"SQLDA missing or incorrect version, or incorrect number/type of variables", /*263, dsql_sqlda_err */ +"Count of columns does not equal count of values", /*264, dsql_var_count_err */ +"Invalid statement handle", /*265, dsql_stmt_handle */ +"Function unknown", /*266, dsql_function_err */ +"Column is not a BLOB", /*267, dsql_blob_err */ +"COLLATION %s is not defined", /*268, collation_not_found */ +"COLLATION %s is not valid for specified CHARACTER SET", /*269, collation_not_for_charset */ +"Option specified more than once", /*270, dsql_dup_option */ +"Unknown transaction option", /*271, dsql_tran_err */ +"Invalid array reference", /*272, dsql_invalid_array */ +"Array declared with too many dimensions", /*273, dsql_max_arr_dim_exceeded */ +"Illegal array dimension range", /*274, dsql_arr_range_error */ +"Trigger unknown", /*275, dsql_trigger_err */ +"Subselect illegal in this context", /*276, dsql_subselect_err */ +"Cannot prepare a CREATE DATABASE/SCHEMA statement", /*277, dsql_crdb_prepare_err */ +"must specify column name for view select expression", /*278, specify_field_err */ +"number of columns does not match select list", /*279, num_field_err */ +"Only simple column names permitted for VIEW WITH CHECK OPTION", /*280, col_name_err */ +"No WHERE clause for VIEW WITH CHECK OPTION", /*281, where_err */ +"Only one table allowed for VIEW WITH CHECK OPTION", /*282, table_view_err */ +"DISTINCT, GROUP or HAVING not permitted for VIEW WITH CHECK OPTION", /*283, distinct_err */ +"FOREIGN KEY column count does not match PRIMARY KEY", /*284, key_field_count_err */ +"No subqueries permitted for VIEW WITH CHECK OPTION", /*285, subquery_err */ +"expression evaluation not supported", /*286, expression_eval_err */ +"gen.c: node not supported", /*287, node_err */ +"Unexpected end of command", /*288, command_end_err */ +"INDEX %s", /*289, index_name */ +"EXCEPTION %s", /*290, exception_name */ +"COLUMN %s", /*291, field_name */ +"Token unknown", /*292, token_err */ +"union not supported", /*293, union_err */ +"Unsupported DSQL construct", /*294, dsql_construct_err */ +"column used with aggregate", /*295, field_aggregate_err */ +"invalid column reference", /*296, field_ref_err */ +"invalid ORDER BY clause", /*297, order_by_err */ +"Return mode by value not allowed for this data type", /*298, return_mode_err */ +" External functions cannot have more than 10 parameters", /*299, extern_func_err */ +"alias %s conflicts with an alias in the same statement", /*300, alias_conflict_err */ +"alias %s conflicts with a procedure in the same statement", /*301, procedure_conflict_error */ +"alias %s conflicts with a table in the same statement", /*302, relation_conflict_err */ +"Illegal use of keyword VALUE", /*303, dsql_domain_err */ +"segment count of 0 defined for index %s", /*304, idx_seg_err */ +"A node name is not permitted in a secondary, shadow, cache or log file name", /*305, node_name_err */ +"TABLE %s", /*306, table_name */ +"PROCEDURE %s", /*307, proc_name */ +"cannot create index %s", /*308, idx_create_err */ +"Write-ahead Log with shadowing configuration not allowed", /*309, wal_shadow_err */ +"there are %ld dependencies", /*310, dependency */ +"too many keys defined for index %s", /*311, idx_key_err */ +"Preceding file did not specify length, so %s must include starting page number", /*312, dsql_file_length_err */ +"Shadow number must be a positive integer", /*313, dsql_shadow_number_err */ +"Token unknown - line %ld, char %ld", /*314, dsql_token_unk_err */ +"there is no alias or table named %s at this scope level", /*315, dsql_no_relation_alias */ +"there is no index %s for table %s", /*316, indexname */ +"table %s is not referenced in plan", /*317, no_stream_plan */ +"table %s is referenced more than once in plan; use aliases to distinguish", /*318, stream_twice */ +"table %s is referenced in the plan but not the from list", /*319, stream_not_found */ +"Invalid use of CHARACTER SET or COLLATE", /*320, collation_requires_text */ +"Specified domain or source column does not exist", /*321, dsql_domain_not_found */ +"index %s cannot be used in the specified plan", /*322, index_unused */ +"the table %s is referenced twice; use aliases to differentiate", /*323, dsql_self_join */ +"illegal operation when at beginning of stream", /*324, stream_bof */ +"the current position is on a crack", /*325, stream_crack */ +"database or file exists", /*326, db_or_file_exists */ +"invalid comparison operator for find operation", /*327, invalid_operator */ +"Connection lost to pipe server", /*328, conn_lost */ +"bad checksum", /*329, bad_checksum */ +"wrong page type", /*330, page_type_err */ +"Cannot insert because the file is readonly or is on a read only medium.", /*331, ext_readonly_err */ +"multiple rows in singleton select", /*332, sing_select_err */ +"cannot attach to password database", /*333, psw_attach */ +"cannot start transaction for password database", /*334, psw_start_trans */ +"invalid direction for find operation", /*335, invalid_direction */ +"variable %s conflicts with parameter in same procedure", /*336, dsql_var_conflict */ +"Array/BLOB/DATE data types not allowed in arithmetic", /*337, dsql_no_blob_array */ +"%s is not a valid base table of the specified view", /*338, dsql_base_table */ +"table %s is referenced twice in view; use an alias to distinguish", /*339, duplicate_base_table */ +"view %s has more than one base table; use aliases to distinguish", /*340, view_alias */ +"cannot add index, index root page is full.", /*341, index_root_page_full */ +"BLOB SUB_TYPE %s is not defined", /*342, dsql_blob_type_unknown */ +"Too many concurrent executions of the same request", /*343, req_max_clones_exceeded */ +"duplicate specification of %s - not supported", /*344, dsql_duplicate_spec */ +"violation of PRIMARY or UNIQUE KEY constraint \"%s\" on table \"%s\"", /*345, unique_key_violation */ +"server version too old to support all CREATE DATABASE options", /*346, srvr_version_too_old */ +"drop database completed with errors", /*347, drdb_completed_with_errs */ +"procedure %s does not return any values", /*348, dsql_procedure_use_err */ +"count of column list and variable list do not match", /*349, dsql_count_mismatch */ +"attempt to index BLOB column in index %s", /*350, blob_idx_err */ +"attempt to index array column in index %s", /*351, array_idx_err */ +"too few key columns found for index %s (incorrect column name?)", /*352, key_field_err */ +"cannot delete", /*353, no_delete */ +"last column in a table cannot be deleted", /*354, del_last_field */ +"sort error", /*355, sort_err */ +"sort error: not enough memory", /*356, sort_mem_err */ +"too many versions", /*357, version_err */ +"invalid key position", /*358, inval_key_posn */ +"segments not allowed in expression index %s", /*359, no_segments_err */ +"sort error: corruption in data structure", /*360, crrp_data_err */ +"new record size of %ld bytes is too big", /*361, rec_size_err */ +"Inappropriate self-reference of column", /*362, dsql_field_ref */ +"request depth exceeded. (Recursive definition?)", /*363, req_depth_exceeded */ +"cannot access column %s in view %s", /*364, no_field_access */ +"dbkey not available for multi-table views", /*365, no_dbkey */ +"journal file wrong format", /*366, jrn_format_err */ +"intermediate journal file full", /*367, jrn_file_full */ +"The prepare statement identifies a prepare statement with an open cursor", /*368, dsql_open_cursor_request */ +"InterBase error", /*369, ib_error */ +"Cache redefined", /*370, cache_redef */ +"Insufficient memory to allocate page buffer cache", /*371, cache_too_small */ +"Log redefined", /*372, log_redef */ +"Log size too small", /*373, log_too_small */ +"Log partition size too small", /*374, partition_too_small */ +"Partitions not supported in series of log file specification", /*375, partition_not_supp */ +"Total length of a partitioned log must be specified", /*376, log_length_spec */ +"Precision must be from 1 to 18", /*377, precision_err */ +"Scale must be between zero and precision", /*378, scale_nogt */ +"Short integer expected", /*379, expec_short */ +"Long integer expected", /*380, expec_long */ +"Unsigned short integer expected", /*381, expec_ushort */ +"Invalid ESCAPE sequence", /*382, like_escape_invalid */ +"service %s does not have an associated executable", /*383, svcnoexe */ +"Failed to locate host machine.", /*384, net_lookup_err */ +"Undefined service %s/%s.", /*385, service_unknown */ +"The specified name was not found in the hosts file or Domain Name Services.", /*386, host_unknown */ +"user does not have GRANT privileges on base table/view for operation", /*387, grant_nopriv_on_base */ +"Ambiguous column reference.", /*388, dyn_fld_ambiguous */ +"Invalid aggregate reference", /*389, dsql_agg_ref_err */ +"navigational stream %ld references a view with more than one base table", /*390, complex_view */ +"Attempt to execute an unprepared dynamic SQL statement.", /*391, unprepared_stmt */ +"Positive value expected", /*392, expec_positive */ +"Incorrect values within SQLDA structure", /*393, dsql_sqlda_value_err */ +"invalid blob id", /*394, invalid_array_id */ +"Operation not supported for EXTERNAL FILE table %s", /*395, extfile_uns_op */ +"Service is currently busy: %s", /*396, svc_in_use */ +"stack size insufficent to execute current request", /*397, err_stack_limit */ +"Invalid key for find operation", /*398, invalid_key */ +"Error initializing the network software.", /*399, net_init_error */ +"Unable to load required library %s.", /*400, loadlib_failure */ +"Unable to complete network request to host \"%s\".", /*401, network_error */ +"Failed to establish a connection.", /*402, net_connect_err */ +"Error while listening for an incoming connection.", /*403, net_connect_listen_err */ +"Failed to establish a secondary connection for event processing.", /*404, net_event_connect_err */ +"Error while listening for an incoming event connection request.", /*405, net_event_listen_err */ +"Error reading data from the connection.", /*406, net_read_err */ +"Error writing data to the connection.", /*407, net_write_err */ +"Cannot deactivate index used by an Integrity Constraint", /*408, integ_index_deactivate */ +"Cannot deactivate primary index", /*409, integ_deactivate_primary */ +"Client/Server Express not supported in this release", /*410, cse_not_supported */ +"", /*411, tra_must_sweep */ +"Access to databases on file servers is not supported.", /*412, unsupported_network_drive */ +"Error while trying to create file", /*413, io_create_err */ +"Error while trying to open file", /*414, io_open_err */ +"Error while trying to close file", /*415, io_close_err */ +"Error while trying to read from file", /*416, io_read_err */ +"Error while trying to write to file", /*417, io_write_err */ +"Error while trying to delete file", /*418, io_delete_err */ +"Error while trying to access file", /*419, io_access_err */ +"A fatal exception occurred during the execution of a user defined function.", /*420, udf_exception */ +"connection lost to database", /*421, lost_db_connection */ +"User cannot write to RDB$USER_PRIVILEGES", /*422, no_write_user_priv */ +"token size exceeds limit", /*423, token_too_long */ +"Maximum user count exceeded. Contact your database administrator.", /*424, max_att_exceeded */ +"Your login %s is same as one of the SQL role name. Ask your database administrator to set up a valid InterBase login.", /*425, login_same_as_role_name */ +"\"REFERENCES table\" without \"(column)\" requires PRIMARY KEY on referenced table", /*426, reftable_requires_pk */ +"The username entered is too long. Maximum length is 31 bytes.", /*427, usrname_too_long */ +"The password specified is too long. Maximum length is 8 bytes.", /*428, password_too_long */ +"A username is required for this operation.", /*429, usrname_required */ +"A password is required for this operation", /*430, password_required */ +"The network protocol specified is invalid", /*431, bad_protocol */ +"A duplicate user name was found in the security database", /*432, dup_usrname_found */ +"The user name specified was not found in the security database", /*433, usrname_not_found */ +"An error occurred while attempting to add the user.", /*434, error_adding_sec_record */ +"An error occurred while attempting to modify the user record.", /*435, error_modifying_sec_record */ +"An error occurred while attempting to delete the user record.", /*436, error_deleting_sec_record */ +"An error occurred while updating the security database.", /*437, error_updating_sec_db */ +"sort record size of %ld bytes is too big", /*438, sort_rec_size_err */ +"can not define a not null column with NULL as default value", /*439, bad_default_value */ +"invalid clause --- '%s'", /*440, invalid_clause */ +"too many open handles to database", /*441, too_many_handles */ +"size of optimizer block exceeded", /*442, optimizer_blk_exc */ +"a string constant is delimited by double quotes", /*443, invalid_string_constant */ +"DATE must be changed to TIMESTAMP", /*444, transitional_date */ +"attempted update on read-only database", /*445, read_only_database */ +"SQL dialect %s is not supported in this database", /*446, must_be_dialect_2_and_up */ +"A fatal exception occurred during the execution of a blob filter.", /*447, blob_filter_exception */ +"Access violation. The code attempted to access a virtual address without privilege to do so.", /*448, exception_access_violation */ +"Datatype misalignment. The attempted to read or write a value that was not stored on a memory boundary.", /*449, exception_datatype_missalignment*/ +"Array bounds exceeded. The code attempted to access an array element that is out of bounds.", /*450, exception_array_bounds_exceeded */ +"Float denormal operand. One of the floating-point operands is too small to represent a standard float value.", /*451, exception_float_denormal_operand*/ +"Floating-point divide by zero. The code attempted to divide a floating-point value by zero.", /*452, exception_float_divide_by_zero */ +"Floating-point inexact result. The result of a floating-point operation cannot be represented as a deciaml fraction.", /*453, exception_float_inexact_result */ +"Floating-point invalid operand. An indeterminant error occurred during a floating-point operation.", /*454, exception_float_invalid_operand */ +"Floating-point overflow. The exponent of a floating-point operation is greater than the magnitude allowed.", /*455, exception_float_overflow */ +"Floating-point stack check. The stack overflowed or underflowed as the result of a floating-point operation.", /*456, exception_float_stack_check */ +"Floating-point underflow. The exponent of a floating-point operation is less than the magnitude allowed.", /*457, exception_float_underflow */ +"Integer divide by zero. The code attempted to divide an integer value by an integer divisor of zero.", /*458, exception_integer_divide_by_zero*/ +"Integer overflow. The result of an integer operation caused the most significant bit of the result to carry.", /*459, exception_integer_overflow */ +"An exception occurred that does not have a description. Exception number %X.", /*460, exception_unknown */ +"Stack overflow. The resource requirements of the runtime stack have exceeded the memory available to it.", /*461, exception_stack_overflow */ +"Segmentation Fault. The code attempted to access memory without priviledges.", /*462, exception_sigsegv */ +"Illegal Instruction. The Code attempted to perfrom an illegal operation.", /*463, exception_sigill */ +"Bus Error. The Code caused a system bus error.", /*464, exception_sigbus */ +"Floating Point Error. The Code caused an Arithmetic Exception or a floating point exception.", /*465, exception_sigfpe */ +"Cannot delete rows from external files.", /*466, ext_file_delete */ +"Cannot update rows in external files.", /*467, ext_file_modify */ +"Unable to perform operation. You must be either SYSDBA or owner of the database", /*468, adm_task_denied */ +"Specified EXTRACT part does not exist in input datatype", /*469, extract_input_mismatch */ +"Service %s requires SYSDBA permissions. Reattach to the Service Manager using the SYSDBA account.", /*470, insufficient_svc_privileges */ +"The file %s is currently in use by another process. Try again later.", /*471, file_in_use */ +"Cannot attach to services manager", /*472, service_att_err */ +"Metadata update statement is not allowed by the current database SQL dialect %d", /*473, ddl_not_allowed_by_db_sql_dial */ +"operation was cancelled", /*474, cancelled */ +"unexpected item in service parameter block, expected %s", /*475, unexp_spb_form */ +"Client SQL dialect %d does not support reference to %s datatype", /*476, sql_dialect_datatype_unsupport */ +"user name and password are required while attaching to the services manager", /*477, svcnouser */ +"You created an indirect dependency on uncommitted metadata. You must roll back the current transaction.", /*478, depend_on_uncommitted_rel */ +"The service name was not specified.", /*479, svc_name_missing */ +"Too many Contexts of Relation/Procedure/Views. Maximum allowed is 127", /*480, too_many_contexts */ +"data type not supported for arithmetic", /*481, datype_notsup */ +"Database dialect being changed from 3 to 1", /*482, dialect_reset_warning */ +"Database dialect not changed.", /*483, dialect_not_changed */ +"Unable to create database %s", /*484, database_create_failed */ +"Database dialect %d is not a valid dialect.", /*485, inv_dialect_specified */ +"Valid database dialects are %s.", /*486, valid_db_dialects */ +"SQL warning code = %ld", /*487, sqlwarn */ +"DATE data type is now called TIMESTAMP", /*488, dtype_renamed */ +"Function %s is in %s, which is not in a permitted directory for external functions.", /*489, extern_func_dir_error */ +"value exceeds the range for valid dates", /*490, date_range_exceeded */ +"passed client dialect %d is not a valid dialect.", /*491, inv_client_dialect_specified */ +"Valid client dialects are %s.", /*492, valid_client_dialects */ +"Unsupported field type specified in BETWEEN predicate.", /*493, optimizer_between_err */ +"Services functionality will be supported in a later version of the product", /*494, service_not_supported */ +"data base file name (%s) already given", /*495, gfix_db_name */ +"invalid switch %s", /*496, gfix_invalid_sw */ +"incompatible switch combination", /*497, gfix_incmp_sw */ +"replay log pathname required", /*498, gfix_replay_req */ +"number of page buffers for cache required", /*499, gfix_pgbuf_req */ +"numeric value required", /*500, gfix_val_req */ +"positive numeric value required", /*501, gfix_pval_req */ +"number of transactions per sweep required", /*502, gfix_trn_req */ +"\"full\" or \"reserve\" required", /*503, gfix_full_req */ +"user name required", /*504, gfix_usrname_req */ +"password required", /*505, gfix_pass_req */ +"subsystem name", /*506, gfix_subs_name */ +"\"wal\" required", /*507, gfix_wal_req */ +"number of seconds required", /*508, gfix_sec_req */ +"numeric value between 0 and 32767 inclusive required", /*509, gfix_nval_req */ +"must specify type of shutdown", /*510, gfix_type_shut */ +"please retry, specifying an option", /*511, gfix_retry */ +"please retry, giving a database name", /*512, gfix_retry_db */ +"internal block exceeds maximum size", /*513, gfix_exceed_max */ +"corrupt pool", /*514, gfix_corrupt_pool */ +"virtual memory exhausted", /*515, gfix_mem_exhausted */ +"bad pool id", /*516, gfix_bad_pool */ +"Transaction state %d not in valid range.", /*517, gfix_trn_not_valid */ +"unexpected end of input", /*518, gfix_unexp_eoi */ +"failed to reconnect to a transaction in database %s", /*519, gfix_recon_fail */ +"Transaction description item unknown", /*520, gfix_trn_unknown */ +"\"read_only\" or \"read_write\" required", /*521, gfix_mode_req */ +" -sql_dialect set database dialect n", /*522, gfix_opt_SQL_dialect */ +"Cannot SELECT RDB$DB_KEY from a stored procedure.", /*523, dsql_dbkey_from_non_table */ +"Precision 10 to 18 changed from DOUBLE PRECISION in SQL dialect 1 to 64-bit scaled integer in SQL dialect 3", /*524, dsql_transitional_numeric */ +"Use of %s expression that returns different results in dialect 1 and dialect 3", /*525, dsql_dialect_warning_expr */ +"Database SQL dialect %d does not support reference to %s datatype", /*526, sql_db_dialect_dtype_unsupport */ +"DB dialect %d and client dialect %d conflict with respect to numeric precision %d.", /*527, isc_sql_dialect_conflict_num */ +"WARNING: Numeric literal %s is interpreted as a floating-point", /*528, dsql_warning_number_ambiguous */ +"value in SQL dialect 1, but as an exact numeric value in SQL dialect 3.", /*529, dsql_warning_number_ambiguous1 */ +"WARNING: NUMERIC and DECIMAL fields with precision 10 or greater are stored", /*530, dsql_warn_precision_ambiguous */ +"as approximate floating-point values in SQL dialect 1, but as 64-bit", /*531, dsql_warn_precision_ambiguous1 */ +"integers in SQL dialect 3.", /*532, dsql_warn_precision_ambiguous2 */ +"SQL role %s does not exist", /*533, dyn_role_does_not_exist */ +"user %s has no grant admin option on SQL role %s", /*534, dyn_no_grant_admin_opt */ +"user %s is not a member of SQL role %s", /*535, dyn_user_not_role_member */ +"%s is not the owner of SQL role %s", /*536, dyn_delete_role_failed */ +"%s is a SQL role and not a user", /*537, dyn_grant_role_to_user */ +"user name %s could not be used for SQL role", /*538, dyn_inv_sql_role_name */ +"SQL role %s already exists", /*539, dyn_dup_sql_role */ +"keyword %s can not be used as a SQL role name", /*540, dyn_kywd_spec_for_role */ +"SQL roles are not supported in on older versions of the database. A backup and restore of the database is required.", /*541, dyn_roles_not_supported */ +"Cannot rename domain %s to %s. A domain with that name already exists.", /*542, dyn_domain_name_exists */ +"Cannot rename column %s to %s. A column with that name already exists in table %s.", /*543, dyn_field_name_exists */ +"Column %s from table %s is referenced in %s", /*544, dyn_dependency_exists */ +"Cannot change datatype for column %s. Changing datatype is not supported for BLOB or ARRAY columns.", /*545, dyn_dtype_invalid */ +"New size specified for column %s must be at least %d characters.", /*546, dyn_char_fld_too_small */ +"Cannot change datatype for %s. Conversion from base type %s to %s is not supported.", /*547, dyn_invalid_dtype_conversion */ +"Cannot change datatype for column %s from a character type to a non-character type.", /*548, dyn_dtype_conv_invalid */ +"Zero length identifiers are not allowed", /*549, dyn_zero_len_id */ +"found unknown switch", /*550, gbak_unknown_switch */ +"page size parameter missing", /*551, gbak_page_size_missing */ +"Page size specified (%ld) greater than limit (8192 bytes)", /*552, gbak_page_size_toobig */ +"redirect location for output is not specified", /*553, gbak_redir_ouput_missing */ +"conflicting switches for backup/restore", /*554, gbak_switches_conflict */ +"device type %s not known", /*555, gbak_unknown_device */ +"protection is not there yet", /*556, gbak_no_protection */ +"page size is allowed only on restore or create", /*557, gbak_page_size_not_allowed */ +"multiple sources or destinations specified", /*558, gbak_multi_source_dest */ +"requires both input and output filenames", /*559, gbak_filename_missing */ +"input and output have the same name. Disallowed.", /*560, gbak_dup_inout_names */ +"expected page size, encountered \"%s\"", /*561, gbak_inv_page_size */ +"REPLACE specified, but the first file %s is a database", /*562, gbak_db_specified */ +"database %s already exists. To replace it, use the -R switch", /*563, gbak_db_exists */ +"device type not specified", /*564, gbak_unk_device */ +"gds_$blob_info failed", /*565, gbak_blob_info_failed */ +"do not understand BLOB INFO item %ld", /*566, gbak_unk_blob_item */ +"gds_$get_segment failed", /*567, gbak_get_seg_failed */ +"gds_$close_blob failed", /*568, gbak_close_blob_failed */ +"gds_$open_blob failed", /*569, gbak_open_blob_failed */ +"Failed in put_blr_gen_id", /*570, gbak_put_blr_gen_id_failed */ +"data type %ld not understood", /*571, gbak_unk_type */ +"gds_$compile_request failed", /*572, gbak_comp_req_failed */ +"gds_$start_request failed", /*573, gbak_start_req_failed */ +" gds_$receive failed", /*574, gbak_rec_failed */ +"gds_$release_request failed", /*575, gbak_rel_req_failed */ +" gds_$database_info failed", /*576, gbak_db_info_failed */ +"Expected database description record", /*577, gbak_no_db_desc */ +"failed to create database %s", /*578, gbak_db_create_failed */ +"RESTORE: decompression length error", /*579, gbak_decomp_len_error */ +"cannot find table %s", /*580, gbak_tbl_missing */ +"Cannot find column for BLOB", /*581, gbak_blob_col_missing */ +"gds_$create_blob failed", /*582, gbak_create_blob_failed */ +"gds_$put_segment failed", /*583, gbak_put_seg_failed */ +"expected record length", /*584, gbak_rec_len_exp */ +"wrong length record, expected %ld encountered %ld", /*585, gbak_inv_rec_len */ +"expected data attribute", /*586, gbak_exp_data_type */ +"Failed in store_blr_gen_id", /*587, gbak_gen_id_failed */ +"do not recognize record type %ld", /*588, gbak_unk_rec_type */ +"Expected backup version 1, 2, or 3. Found %ld", /*589, gbak_inv_bkup_ver */ +"expected backup description record", /*590, gbak_missing_bkup_desc */ +"string truncated", /*591, gbak_string_trunc */ +" warning -- record could not be restored", /*592, gbak_cant_rest_record */ +"gds_$send failed", /*593, gbak_send_failed */ +"no table name for data", /*594, gbak_no_tbl_name */ +"unexpected end of file on backup file", /*595, gbak_unexp_eof */ +"database format %ld is too old to restore to", /*596, gbak_db_format_too_old */ +"array dimension for column %s is invalid", /*597, gbak_inv_array_dim */ +"Expected XDR record length", /*598, gbak_xdr_len_expected */ +"cannot open backup file %s", /*599, gbak_open_bkup_error */ +"cannot open status and error output file %s", /*600, gbak_open_error */ +"blocking factor parameter missing", /*601, gbak_missing_block_fac */ +"expected blocking factor, encountered \"%s\"", /*602, gbak_inv_block_fac */ +"a blocking factor may not be used in conjunction with device CT", /*603, gbak_block_fac_specified */ +"user name parameter missing", /*604, gbak_missing_username */ +"password parameter missing", /*605, gbak_missing_password */ +" missing parameter for the number of bytes to be skipped", /*606, gbak_missing_skipped_bytes */ +"expected number of bytes to be skipped, encountered \"%s\"", /*607, gbak_inv_skipped_bytes */ +"Bad attribute for RDB$CHARACTER_SETS", /*608, gbak_err_restore_charset */ +"Bad attribute for RDB$COLLATIONS", /*609, gbak_err_restore_collation */ +"Unexpected I/O error while reading from backup file", /*610, gbak_read_error */ +"Unexpected I/O error while writing to backup file", /*611, gbak_write_error */ +"could not drop database %s (database might be in use)", /*612, gbak_db_in_use */ +"System memory exhausted", /*613, gbak_sysmemex */ +"Bad attributes for restoring SQL role", /*614, gbak_restore_role_failed */ +"SQL role parameter missing", /*615, gbak_role_op_missing */ +"page buffers parameter missing", /*616, gbak_page_buffers_missing */ +"expected page buffers, encountered \"%s\"", /*617, gbak_page_buffers_wrong_param */ +"page buffers is allowed only on restore or create", /*618, gbak_page_buffers_restore */ +"size specification either missing or incorrect for file %s", /*619, gbak_inv_size */ +"file %s out of sequence", /*620, gbak_file_outof_sequence */ +"can't join -- one of the files missing", /*621, gbak_join_file_missing */ +" standard input is not supported when using join operation", /*622, gbak_stdin_not_supptd */ +"standard output is not supported when using split operation", /*623, gbak_stdout_not_supptd */ +"backup file %s might be corrupt", /*624, gbak_bkup_corrupt */ +"database file specification missing", /*625, gbak_unk_db_file_spec */ +"can't write a header record to file %s", /*626, gbak_hdr_write_failed */ +"free disk space exhausted", /*627, gbak_disk_space_ex */ +"file size given (%d) is less than minimum allowed (%d)", /*628, gbak_size_lt_min */ +"service name parameter missing", /*629, gbak_svc_name_missing */ +"Cannot restore over current database, must be SYSDBA or owner of the existing database.", /*630, gbak_not_ownr */ +"\"read_only\" or \"read_write\" required", /*631, gbak_mode_req */ +"unable to open database", /*632, gsec_cant_open_db */ +"error in switch specifications", /*633, gsec_switches_error */ +"no operation specified", /*634, gsec_no_op_spec */ +"no user name specified", /*635, gsec_no_usr_name */ +"add record error", /*636, gsec_err_add */ +"modify record error", /*637, gsec_err_modify */ +"find/modify record error", /*638, gsec_err_find_mod */ +"record not found for user: %s", /*639, gsec_err_rec_not_found */ +"delete record error", /*640, gsec_err_delete */ +"find/delete record error", /*641, gsec_err_find_del */ +"find/display record error", /*642, gsec_err_find_disp */ +"invalid parameter, no switch defined", /*643, gsec_inv_param */ +"operation already specified", /*644, gsec_op_specified */ +"password already specified", /*645, gsec_pw_specified */ +"uid already specified", /*646, gsec_uid_specified */ +"gid already specified", /*647, gsec_gid_specified */ +"project already specified", /*648, gsec_proj_specified */ +"organization already specified", /*649, gsec_org_specified */ +"first name already specified", /*650, gsec_fname_specified */ +"middle name already specified", /*651, gsec_mname_specified */ +"last name already specified", /*652, gsec_lname_specified */ +"invalid switch specified", /*653, gsec_inv_switch */ +"ambiguous switch specified", /*654, gsec_amb_switch */ +"no operation specified for parameters", /*655, gsec_no_op_specified */ +"no parameters allowed for this operation", /*656, gsec_params_not_allowed */ +"incompatible switches specified", /*657, gsec_incompat_switch */ +"Invalid user name (maximum 31 bytes allowed)", /*658, gsec_inv_username */ +"Warning - maximum 8 significant bytes of password used", /*659, gsec_inv_pw_length */ +"database already specified", /*660, gsec_db_specified */ +"database administrator name already specified", /*661, gsec_db_admin_specified */ +"database administrator password already specified", /*662, gsec_db_admin_pw_specified */ +"SQL role name already specified", /*663, gsec_sql_role_specified */ +"The license file does not exist or could not be opened for read", /*664, license_no_file */ +"operation already specified", /*665, license_op_specified */ +"no operation specified", /*666, license_op_missing */ +"invalid switch", /*667, license_inv_switch */ +"invalid switch combination", /*668, license_inv_switch_combo */ +"illegal operation/switch combination", /*669, license_inv_op_combo */ +"ambiguous switch", /*670, license_amb_switch */ +"invalid parameter, no switch specified", /*671, license_inv_parameter */ +"switch does not take any parameter", /*672, license_param_specified */ +"switch requires a parameter", /*673, license_param_req */ +"syntax error in command line", /*674, license_syntx_error */ +"The certificate was not added. A duplicate ID exists in the license file.", /*675, license_dup_id */ +"The certificate was not added. Invalid certificate ID / Key combination.", /*676, license_inv_id_key */ +"The certificate was not removed. The key does not exist or corresponds to a temporary evaluation license.", /*677, license_err_remove */ +"An error occurred updating the license file. Operation cancelled.", /*678, license_err_update */ +"The certificate could not be validated based on the information given. Please recheck the ID and key information.", /*679, license_err_convert */ +"Operation failed. An unknown error occurred.", /*680, license_err_unk */ +"Add license operation failed, KEY: %s ID: %s", /*681, license_svc_err_add */ +"Remove license operation failed, KEY: %s", /*682, license_svc_err_remove */ +"The evaluation license has already been used on this server. You need to purchase a non-evaluation license.", /*683, license_eval_exists */ +"found unknown switch", /*684, gstat_unknown_switch */ +"please retry, giving a database name", /*685, gstat_retry */ +"Wrong ODS version, expected %d, encountered %d", /*686, gstat_wrong_ods */ +"Unexpected end of database file.", /*687, gstat_unexpected_eof */ +"Can't open database file %s", /*688, gstat_open_err */ +"Can't read a database page", /*689, gstat_read_err */ +"System memory exhausted", /*690, gstat_sysmemex */ diff --git a/src/jrd/boot_codes/rdb_codes.h b/src/jrd/boot_codes/rdb_codes.h new file mode 100644 index 0000000000..84e26d2d12 --- /dev/null +++ b/src/jrd/boot_codes/rdb_codes.h @@ -0,0 +1,713 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ +/* + * + * File generated by codes.e - do not edit! + * + */ +195919882, +195919890, +195919898, +195919906, +195919914, +195919922, +195919930, +195919938, +195919946, +195919954, +195919962, +195919970, +195919978, +195919987, +195919995, +195920002, +195920011, +195920019, +20480152, +195920027, +195920036, +195920044, +195920051, +20480196, +195920059, +195920066, +195920074, +195920082, +195920090, +195920098, +195920106, +195920114, +195920122, +195920130, +195920139, +20480290, +20480298, +20480306, +20480314, +20480322, +20480330, +20480338, +20480346, +20480354, +20480362, +20480369, +20480378, +20480386, +20480394, +20480402, +20480410, +20480418, +20480436, +20480426, +195920146, +195920154, +195920162, +195920170, +20480546, +195920186, +195920195, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +20480498, +20480504, +20480516, +20480524, +20480530, +20480538, +20480554, +20480562, +0, +0, +195920202, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0, diff --git a/src/jrd/boot_codes/sql_code.h b/src/jrd/boot_codes/sql_code.h new file mode 100644 index 0000000000..24fe20b4d4 --- /dev/null +++ b/src/jrd/boot_codes/sql_code.h @@ -0,0 +1,716 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ +/* + * + * File generated by codes.e - do not edit! + * + */ +static CONST SSHORT FAR_VARIABLE gds__sql_code [] = { + 0 /* No Error */, +-802 /* 1 arith_except  */, +-901 /* 2 bad_dbkey  */, +-922 /* 3 bad_db_format  */, +-904 /* 4 bad_db_handle  */, +-924 /* 5 bad_dpb_content  */, +-901 /* 6 bad_dpb_form  */, +-501 /* 7 bad_req_handle  */, +-901 /* 8 bad_segstr_handle  */, +-901 /* 9 bad_segstr_id  */, +-901 /* 10 bad_tpb_content  */, +-901 /* 11 bad_tpb_form  */, +-901 /* 12 bad_trans_handle  */, +-902 /* 13 bug_check  */, +-413 /* 14 convert_error  */, +-902 /* 15 db_corrupt  */, +-913 /* 16 deadlock  */, +-901 /* 17 excess_trans  */, + 100 /* 18 from_no_match  */, +-901 /* 19 infinap  */, +-901 /* 20 infona  */, +-901 /* 21 infunk  */, +-901 /* 22 integ_fail  */, +-104 /* 23 invalid_blr  */, +-902 /* 24 io_error  */, +-901 /* 25 lock_conflict  */, +-902 /* 26 metadata_corrupt  */, +-625 /* 27 not_valid  */, +-508 /* 28 no_cur_rec  */, +-803 /* 29 no_dup  */, +-901 /* 30 no_finish  */, +-607 /* 31 no_meta_update  */, +-551 /* 32 no_priv  */, +-901 /* 33 no_recon  */, + 100 /* 34 no_record  */, +-901 /* 35 no_segstr_close  */, +-820 /* 36 obsolete_metadata  */, +-901 /* 37 open_trans  */, +-901 /* 38 port_len  */, +-151 /* 39 read_only_field  */, +-150 /* 40 read_only_rel  */, +-817 /* 41 read_only_trans  */, +-150 /* 42 read_only_view  */, +-901 /* 43 req_no_trans  */, +-901 /* 44 req_sync  */, +-901 /* 45 req_wrong_db  */, + 101 /* 46 segment  */, + 100 /* 47 segstr_eof  */, +-402 /* 48 segstr_no_op  */, +-901 /* 49 segstr_no_read  */, +-901 /* 50 segstr_no_trans  */, +-817 /* 51 segstr_no_write  */, +-901 /* 52 segstr_wrong_db  */, +-902 /* 53 sys_request  */, + 100 /* 54 stream_eof  */, +-904 /* 55 unavailable  */, +-901 /* 56 unres_rel  */, +-901 /* 57 uns_ext  */, +-901 /* 58 wish_list  */, +-820 /* 59 wrong_ods  */, +-804 /* 60 wronumarg  */, +-904 /* 61 imp_exc  */, +-901 /* 62 random  */, +-901 /* 63 fatal_conflict  */, +-902 /* 64 badblk  */, +-902 /* 65 invpoolcl  */, +-904 /* 66 nopoolids  */, +-902 /* 67 relbadblk  */, +-902 /* 68 blktoobig  */, +-904 /* 69 bufexh  */, +-104 /* 70 syntaxerr  */, +-904 /* 71 bufinuse  */, +-901 /* 72 bdbincon  */, +-904 /* 73 reqinuse  */, +-902 /* 74 badodsver  */, +-219 /* 75 relnotdef  */, +-205 /* 76 fldnotdef  */, +-902 /* 77 dirtypage  */, +-902 /* 78 waifortra  */, +-902 /* 79 doubleloc  */, +-902 /* 80 nodnotfnd  */, +-902 /* 81 dupnodfnd  */, +-902 /* 82 locnotmar  */, +-689 /* 83 badpagtyp  */, +-902 /* 84 corrupt  */, +-902 /* 85 badpage  */, +-902 /* 86 badindex  */, +-901 /* 87 dbbnotzer  */, +-901 /* 88 tranotzer  */, +-902 /* 89 trareqmis  */, +-902 /* 90 badhndcnt  */, +-902 /* 91 wrotpbver  */, +-902 /* 92 wroblrver  */, +-902 /* 93 wrodpbver  */, +-402 /* 94 blobnotsup  */, +-902 /* 95 badrelation  */, +-902 /* 96 nodetach  */, +-902 /* 97 notremote  */, +-901 /* 98 trainlim  */, +-901 /* 99 notinlim  */, +-901 /* 100 traoutsta  */, +-923 /* 101 connect_reject  */, +-902 /* 102 dbfile  */, +-902 /* 103 orphan  */, +-904 /* 104 no_lock_mgr  */, +-104 /* 105 ctxinuse  */, +-104 /* 106 ctxnotdef  */, +-402 /* 107 datnotsup  */, +-901 /* 108 badmsgnum  */, +-104 /* 109 badparnum  */, +-904 /* 110 virmemexh  */, +-901 /* 111 blocking_signal  */, +-902 /* 112 lockmanerr  */, +-924 /* 113 journerr  */, +-664 /* 114 keytoobig  */, +-407 /* 115 nullsegkey  */, +-902 /* 116 sqlerr  */, +-820 /* 117 wrodynver  */, +-172 /* 118 funnotdef  */, +-171 /* 119 funmismat  */, +-104 /* 120 bad_msg_vec  */, +-924 /* 121 bad_detach  */, +-901 /* 122 noargacc_read  */, +-901 /* 123 noargacc_write  */, +-817 /* 124 read_only  */, +-677 /* 125 ext_err  */, +-150 /* 126 non_updatable  */, +-926 /* 127 no_rollback  */, +-902 /* 128 bad_sec_info  */, +-902 /* 129 invalid_sec_info  */, +-901 /* 130 misc_interpreted  */, +-904 /* 131 update_conflict  */, +-906 /* 132 unlicensed  */, +-904 /* 133 obj_in_use  */, +-413 /* 134 nofilter  */, +-904 /* 135 shadow_accessed  */, +-104 /* 136 invalid_sdl  */, +-406 /* 137 out_of_bounds  */, +-171 /* 138 invalid_dimension  */, +-911 /* 139 rec_in_limbo  */, +-904 /* 140 shadow_missing  */, +-923 /* 141 cant_validate  */, +-923 /* 142 cant_start_journal  */, +-204 /* 143 gennotdef  */, +-923 /* 144 cant_start_logging  */, +-685 /* 145 bad_segstr_type  */, +-530 /* 146 foreign_key  */, +-820 /* 147 high_minor  */, +-901 /* 148 tra_state  */, +-532 /* 149 trans_invalid  */, +-902 /* 150 buf_invalid  */, +-902 /* 151 indexnotdefined  */, +-902 /* 152 login  */, +-823 /* 153 invalid_bookmark  */, +-824 /* 154 bad_lock_level  */, +-615 /* 155 relation_lock  */, +-615 /* 156 record_lock  */, +-692 /* 157 max_idx  */, +-902 /* 158 jrn_enable  */, +-902 /* 159 old_failure  */, +-902 /* 160 old_in_progress  */, +-902 /* 161 old_no_space  */, +-902 /* 162 no_wal_no_jrn  */, +-902 /* 163 num_old_files  */, +-902 /* 164 wal_file_open  */, +-901 /* 165 bad_stmt_handle  */, +-902 /* 166 wal_failure  */, +-230 /* 167 walw_err  */, +-231 /* 168 logh_small  */, +-232 /* 169 logh_inv_version  */, +-233 /* 170 logh_open_flag  */, +-234 /* 171 logh_open_flag2  */, +-235 /* 172 logh_diff_dbname  */, +-236 /* 173 logf_unexpected_eof  */, +-237 /* 174 logr_incomplete  */, +-238 /* 175 logr_header_small  */, +-239 /* 176 logb_small  */, +-240 /* 177 wal_illegal_attach  */, +-241 /* 178 wal_invalid_wpb  */, +-242 /* 179 wal_err_rollover  */, +-243 /* 180 no_wal  */, +-615 /* 181 drop_wal  */, +-204 /* 182 stream_not_defined  */, +-244 /* 183 wal_subsys_error  */, +-245 /* 184 wal_subsys_corrupt  */, +-902 /* 185 no_archive  */, +-902 /* 186 shutinprog  */, +-615 /* 187 range_in_use  */, +-834 /* 188 range_not_found  */, +-204 /* 189 charset_not_found  */, +-901 /* 190 lock_timeout  */, +-204 /* 191 prcnotdef  */, +-170 /* 192 prcmismat  */, +-246 /* 193 wal_bugcheck  */, +-247 /* 194 wal_cant_expand  */, +-204 /* 195 codnotdef  */, +-204 /* 196 xcpnotdef  */, +-836 /* 197 except  */, +-837 /* 198 cache_restart  */, +-825 /* 199 bad_lock_handle  */, +-902 /* 200 jrn_present  */, +-248 /* 201 wal_err_rollover2  */, +-249 /* 202 wal_err_logwrite  */, +-250 /* 203 wal_err_jrn_comm  */, +-251 /* 204 wal_err_expansion  */, +-252 /* 205 wal_err_setup  */, +-253 /* 206 wal_err_ww_sync  */, +-254 /* 207 wal_err_ww_start  */, +-902 /* 208 shutdown  */, +-553 /* 209 existing_priv_mod  */, +-616 /* 210 primary_key_ref  */, +-291 /* 211 primary_key_notnull  */, +-204 /* 212 ref_cnstrnt_notfound  */, +-660 /* 213 foreign_key_notfound  */, +-292 /* 214 ref_cnstrnt_update  */, +-293 /* 215 check_cnstrnt_update  */, +-294 /* 216 check_cnstrnt_del  */, +-618 /* 217 integ_index_seg_del  */, +-618 /* 218 integ_index_seg_mod  */, +-616 /* 219 integ_index_del  */, +-616 /* 220 integ_index_mod  */, +-616 /* 221 check_trig_del  */, +-617 /* 222 check_trig_update  */, +-616 /* 223 cnstrnt_fld_del  */, +-617 /* 224 cnstrnt_fld_rename  */, +-295 /* 225 rel_cnstrnt_update  */, +-150 /* 226 constaint_on_view  */, +-296 /* 227 invld_cnstrnt_type  */, +-831 /* 228 primary_key_exists  */, +-607 /* 229 systrig_update  */, +-552 /* 230 not_rel_owner  */, +-204 /* 231 grant_obj_notfound  */, +-205 /* 232 grant_fld_notfound  */, +-552 /* 233 grant_nopriv  */, + -84 /* 234 nonsql_security_rel  */, + -84 /* 235 nonsql_security_fld  */, +-255 /* 236 wal_cache_err  */, +-902 /* 237 shutfail  */, +-297 /* 238 check_constraint  */, +-901 /* 239 bad_svc_handle  */, +-838 /* 240 shutwarn  */, +-901 /* 241 wrospbver  */, +-901 /* 242 bad_spb_form  */, +-901 /* 243 svcnotdef  */, +-902 /* 244 no_jrn  */, +-314 /* 245 transliteration_failed  */, +-257 /* 246 start_cm_for_wal  */, +-258 /* 247 wal_ovflow_log_required  */, +-204 /* 248 text_subtype  */, +-902 /* 249 dsql_error  */, +-104 /* 250 dsql_command_err  */, +-103 /* 251 dsql_constant_err  */, +-504 /* 252 dsql_cursor_err  */, +-204 /* 253 dsql_datatype_err  */, +-502 /* 254 dsql_decl_err  */, +-510 /* 255 dsql_cursor_update_err  */, +-502 /* 256 dsql_cursor_open_err  */, +-501 /* 257 dsql_cursor_close_err  */, +-206 /* 258 dsql_field_err  */, +-104 /* 259 dsql_internal_err  */, +-204 /* 260 dsql_relation_err  */, +-204 /* 261 dsql_procedure_err  */, +-518 /* 262 dsql_request_err  */, +-804 /* 263 dsql_sqlda_err  */, +-804 /* 264 dsql_var_count_err  */, +-826 /* 265 dsql_stmt_handle  */, +-804 /* 266 dsql_function_err  */, +-206 /* 267 dsql_blob_err  */, +-204 /* 268 collation_not_found  */, +-204 /* 269 collation_not_for_charset  */, +-104 /* 270 dsql_dup_option  */, +-104 /* 271 dsql_tran_err  */, +-104 /* 272 dsql_invalid_array  */, +-604 /* 273 dsql_max_arr_dim_exceeded  */, +-604 /* 274 dsql_arr_range_error  */, +-204 /* 275 dsql_trigger_err  */, +-206 /* 276 dsql_subselect_err  */, +-531 /* 277 dsql_crdb_prepare_err  */, +-157 /* 278 specify_field_err  */, +-158 /* 279 num_field_err  */, +-806 /* 280 col_name_err  */, +-807 /* 281 where_err  */, +-808 /* 282 table_view_err  */, +-809 /* 283 distinct_err  */, +-832 /* 284 key_field_count_err  */, +-810 /* 285 subquery_err  */, +-833 /* 286 expression_eval_err  */, +-599 /* 287 node_err  */, +-104 /* 288 command_end_err  */, +-901 /* 289 index_name  */, +-901 /* 290 exception_name  */, +-901 /* 291 field_name  */, +-104 /* 292 token_err  */, +-901 /* 293 union_err  */, +-901 /* 294 dsql_construct_err  */, +-830 /* 295 field_aggregate_err  */, +-829 /* 296 field_ref_err  */, +-208 /* 297 order_by_err  */, +-171 /* 298 return_mode_err  */, +-170 /* 299 extern_func_err  */, +-204 /* 300 alias_conflict_err  */, +-204 /* 301 procedure_conflict_error  */, +-204 /* 302 relation_conflict_err  */, +-901 /* 303 dsql_domain_err  */, +-663 /* 304 idx_seg_err  */, +-599 /* 305 node_name_err  */, +-901 /* 306 table_name  */, +-901 /* 307 proc_name  */, +-660 /* 308 idx_create_err  */, +-259 /* 309 wal_shadow_err  */, +-616 /* 310 dependency  */, +-663 /* 311 idx_key_err  */, +-597 /* 312 dsql_file_length_err  */, +-598 /* 313 dsql_shadow_number_err  */, +-104 /* 314 dsql_token_unk_err  */, +-204 /* 315 dsql_no_relation_alias  */, +-204 /* 316 indexname  */, +-281 /* 317 no_stream_plan  */, +-282 /* 318 stream_twice  */, +-283 /* 319 stream_not_found  */, +-204 /* 320 collation_requires_text  */, +-901 /* 321 dsql_domain_not_found  */, +-284 /* 322 index_unused  */, +-282 /* 323 dsql_self_join  */, +-596 /* 324 stream_bof  */, +-595 /* 325 stream_crack  */, +-601 /* 326 db_or_file_exists  */, +-401 /* 327 invalid_operator  */, +-924 /* 328 conn_lost  */, +-835 /* 329 bad_checksum  */, +-689 /* 330 page_type_err  */, +-816 /* 331 ext_readonly_err  */, +-811 /* 332 sing_select_err  */, +-902 /* 333 psw_attach  */, +-902 /* 334 psw_start_trans  */, +-827 /* 335 invalid_direction  */, +-901 /* 336 dsql_var_conflict  */, +-607 /* 337 dsql_no_blob_array  */, +-155 /* 338 dsql_base_table  */, +-282 /* 339 duplicate_base_table  */, +-282 /* 340 view_alias  */, +-904 /* 341 index_root_page_full  */, +-204 /* 342 dsql_blob_type_unknown  */, +-693 /* 343 req_max_clones_exceeded  */, +-637 /* 344 dsql_duplicate_spec  */, +-803 /* 345 unique_key_violation  */, +-901 /* 346 srvr_version_too_old  */, +-909 /* 347 drdb_completed_with_errs  */, + -84 /* 348 dsql_procedure_use_err  */, +-313 /* 349 dsql_count_mismatch  */, +-685 /* 350 blob_idx_err  */, +-685 /* 351 array_idx_err  */, +-663 /* 352 key_field_err  */, +-901 /* 353 no_delete  */, +-616 /* 354 del_last_field  */, +-901 /* 355 sort_err  */, +-904 /* 356 sort_mem_err  */, +-841 /* 357 version_err  */, +-828 /* 358 inval_key_posn  */, +-690 /* 359 no_segments_err  */, +-600 /* 360 crrp_data_err  */, +-691 /* 361 rec_size_err  */, +-605 /* 362 dsql_field_ref  */, +-904 /* 363 req_depth_exceeded  */, +-694 /* 364 no_field_access  */, +-162 /* 365 no_dbkey  */, +-839 /* 366 jrn_format_err  */, +-840 /* 367 jrn_file_full  */, +-519 /* 368 dsql_open_cursor_request  */, +-999 /* 369 ib_error  */, +-260 /* 370 cache_redef  */, +-239 /* 371 cache_too_small  */, +-260 /* 372 log_redef  */, +-239 /* 373 log_too_small  */, +-239 /* 374 partition_too_small  */, +-261 /* 375 partition_not_supp  */, +-261 /* 376 log_length_spec  */, +-842 /* 377 precision_err  */, +-842 /* 378 scale_nogt  */, +-842 /* 379 expec_short  */, +-842 /* 380 expec_long  */, +-842 /* 381 expec_ushort  */, +-105 /* 382 like_escape_invalid  */, +-901 /* 383 svcnoexe  */, +-901 /* 384 net_lookup_err  */, +-901 /* 385 service_unknown  */, +-901 /* 386 host_unknown  */, +-552 /* 387 grant_nopriv_on_base  */, +-203 /* 388 dyn_fld_ambiguous  */, +-104 /* 389 dsql_agg_ref_err  */, +-282 /* 390 complex_view  */, +-901 /* 391 unprepared_stmt  */, +-842 /* 392 expec_positive  */, +-804 /* 393 dsql_sqlda_value_err  */, +-104 /* 394 invalid_array_id  */, +-816 /* 395 extfile_uns_op  */, +-901 /* 396 svc_in_use  */, +-902 /* 397 err_stack_limit  */, +-827 /* 398 invalid_key  */, +-901 /* 399 net_init_error  */, +-901 /* 400 loadlib_failure  */, +-902 /* 401 network_error  */, +-902 /* 402 net_connect_err  */, +-902 /* 403 net_connect_listen_err  */, +-902 /* 404 net_event_connect_err  */, +-902 /* 405 net_event_listen_err  */, +-902 /* 406 net_read_err  */, +-902 /* 407 net_write_err  */, +-616 /* 408 integ_index_deactivate  */, +-616 /* 409 integ_deactivate_primary  */, +-104 /* 410 cse_not_supported  */, +-901 /* 411 tra_must_sweep  */, +-902 /* 412 unsupported_network_drive  */, +-902 /* 413 io_create_err  */, +-902 /* 414 io_open_err  */, +-902 /* 415 io_close_err  */, +-902 /* 416 io_read_err  */, +-902 /* 417 io_write_err  */, +-902 /* 418 io_delete_err  */, +-902 /* 419 io_access_err  */, +-901 /* 420 udf_exception  */, +-901 /* 421 lost_db_connection  */, +-901 /* 422 no_write_user_priv  */, +-104 /* 423 token_too_long  */, +-906 /* 424 max_att_exceeded  */, +-902 /* 425 login_same_as_role_name  */, +-607 /* 426 reftable_requires_pk  */, + -85 /* 427 usrname_too_long  */, + -85 /* 428 password_too_long  */, + -85 /* 429 usrname_required  */, + -85 /* 430 password_required  */, + -85 /* 431 bad_protocol  */, + -85 /* 432 dup_usrname_found  */, + -85 /* 433 usrname_not_found  */, + -85 /* 434 error_adding_sec_record  */, + -85 /* 435 error_modifying_sec_record  */, + -85 /* 436 error_deleting_sec_record  */, + -85 /* 437 error_updating_sec_db  */, +-904 /* 438 sort_rec_size_err  */, +-204 /* 439 bad_default_value  */, +-204 /* 440 invalid_clause  */, +-904 /* 441 too_many_handles  */, +-904 /* 442 optimizer_blk_exc  */, +-104 /* 443 invalid_string_constant  */, +-104 /* 444 transitional_date  */, +-817 /* 445 read_only_database  */, +-817 /* 446 must_be_dialect_2_and_up  */, +-901 /* 447 blob_filter_exception  */, +-901 /* 448 exception_access_violation  */, +-901 /* 449 exception_datatype_missalignment */, +-901 /* 450 exception_array_bounds_exceeded  */, +-901 /* 451 exception_float_denormal_operand */, +-901 /* 452 exception_float_divide_by_zero  */, +-901 /* 453 exception_float_inexact_result  */, +-901 /* 454 exception_float_invalid_operand  */, +-901 /* 455 exception_float_overflow  */, +-901 /* 456 exception_float_stack_check  */, +-901 /* 457 exception_float_underflow  */, +-901 /* 458 exception_integer_divide_by_zero */, +-901 /* 459 exception_integer_overflow  */, +-901 /* 460 exception_unknown  */, +-901 /* 461 exception_stack_overflow  */, +-901 /* 462 exception_sigsegv  */, +-901 /* 463 exception_sigill  */, +-901 /* 464 exception_sigbus  */, +-901 /* 465 exception_sigfpe  */, +-901 /* 466 ext_file_delete  */, +-901 /* 467 ext_file_modify  */, +-901 /* 468 adm_task_denied  */, +-105 /* 469 extract_input_mismatch  */, +-551 /* 470 insufficient_svc_privileges  */, +-902 /* 471 file_in_use  */, +-904 /* 472 service_att_err  */, +-817 /* 473 ddl_not_allowed_by_db_sql_dial  */, +-901 /* 474 cancelled  */, +-902 /* 475 unexp_spb_form  */, +-104 /* 476 sql_dialect_datatype_unsupport  */, +-901 /* 477 svcnouser  */, +-104 /* 478 depend_on_uncommitted_rel  */, +-904 /* 479 svc_name_missing  */, +-204 /* 480 too_many_contexts  */, +-901 /* 481 datype_notsup  */, + 501 /* 482 dialect_reset_warning  */, +-901 /* 483 dialect_not_changed  */, +-901 /* 484 database_create_failed  */, +-901 /* 485 inv_dialect_specified  */, +-901 /* 486 valid_db_dialects  */, + 300 /* 487 sqlwarn  */, + 301 /* 488 dtype_renamed  */, +-902 /* 489 extern_func_dir_error  */, +-833 /* 490 date_range_exceeded  */, +-901 /* 491 inv_client_dialect_specified  */, +-901 /* 492 valid_client_dialects  */, +-904 /* 493 optimizer_between_err  */, +-901 /* 494 service_not_supported  */, +-901 /* 1 gfix_db_name  */, +-901 /* 2 gfix_invalid_sw  */, +-901 /* 4 gfix_incmp_sw  */, +-901 /* 5 gfix_replay_req  */, +-901 /* 6 gfix_pgbuf_req  */, +-901 /* 7 gfix_val_req  */, +-901 /* 8 gfix_pval_req  */, +-901 /* 9 gfix_trn_req  */, +-901 /* 12 gfix_full_req  */, +-901 /* 13 gfix_usrname_req  */, +-901 /* 14 gfix_pass_req  */, +-901 /* 15 gfix_subs_name  */, +-901 /* 16 gfix_wal_req  */, +-901 /* 17 gfix_sec_req  */, +-901 /* 18 gfix_nval_req  */, +-901 /* 19 gfix_type_shut  */, +-901 /* 20 gfix_retry  */, +-901 /* 23 gfix_retry_db  */, +-901 /* 63 gfix_exceed_max  */, +-901 /* 64 gfix_corrupt_pool  */, +-901 /* 65 gfix_mem_exhausted  */, +-901 /* 66 gfix_bad_pool  */, +-901 /* 67 gfix_trn_not_valid  */, +-901 /* 84 gfix_unexp_eoi  */, +-901 /* 90 gfix_recon_fail  */, +-901 /* 108 gfix_trn_unknown  */, +-901 /* 110 gfix_mode_req  */, + 0 /* 111 gfix_opt_SQL_dialect  */, +-607 /* 2 dsql_dbkey_from_non_table  */, +-104 /* 3 dsql_transitional_numeric  */, + 301 /* 4 dsql_dialect_warning_expr  */, +-104 /* 5 sql_db_dialect_dtype_unsupport  */, +-817 /* 7 isc_sql_dialect_conflict_num  */, + 301 /* 8 dsql_warning_number_ambiguous  */, + 301 /* 9 dsql_warning_number_ambiguous1  */, + 301 /* 10 dsql_warn_precision_ambiguous  */, + 301 /* 11 dsql_warn_precision_ambiguous1  */, + 301 /* 12 dsql_warn_precision_ambiguous2  */, +-901 /* 188 dyn_role_does_not_exist  */, +-901 /* 189 dyn_no_grant_admin_opt  */, +-901 /* 190 dyn_user_not_role_member  */, +-901 /* 191 dyn_delete_role_failed  */, +-901 /* 192 dyn_grant_role_to_user  */, +-901 /* 193 dyn_inv_sql_role_name  */, +-901 /* 194 dyn_dup_sql_role  */, +-901 /* 195 dyn_kywd_spec_for_role  */, +-901 /* 196 dyn_roles_not_supported  */, +-612 /* 204 dyn_domain_name_exists  */, +-612 /* 205 dyn_field_name_exists  */, +-383 /* 206 dyn_dependency_exists  */, +-315 /* 207 dyn_dtype_invalid  */, +-829 /* 208 dyn_char_fld_too_small  */, +-829 /* 209 dyn_invalid_dtype_conversion  */, +-829 /* 210 dyn_dtype_conv_invalid  */, +-901 /* 212 dyn_zero_len_id  */, +-901 /* 1 gbak_unknown_switch  */, +-901 /* 2 gbak_page_size_missing  */, +-901 /* 3 gbak_page_size_toobig  */, +-901 /* 4 gbak_redir_ouput_missing  */, +-901 /* 5 gbak_switches_conflict  */, +-901 /* 6 gbak_unknown_device  */, +-901 /* 7 gbak_no_protection  */, +-901 /* 8 gbak_page_size_not_allowed  */, +-901 /* 9 gbak_multi_source_dest  */, +-901 /* 10 gbak_filename_missing  */, +-901 /* 11 gbak_dup_inout_names  */, +-901 /* 12 gbak_inv_page_size  */, +-901 /* 13 gbak_db_specified  */, +-901 /* 14 gbak_db_exists  */, +-901 /* 15 gbak_unk_device  */, +-901 /* 20 gbak_blob_info_failed  */, +-901 /* 21 gbak_unk_blob_item  */, +-901 /* 22 gbak_get_seg_failed  */, +-901 /* 23 gbak_close_blob_failed  */, +-901 /* 24 gbak_open_blob_failed  */, +-901 /* 25 gbak_put_blr_gen_id_failed  */, +-901 /* 26 gbak_unk_type  */, +-901 /* 27 gbak_comp_req_failed  */, +-901 /* 28 gbak_start_req_failed  */, +-901 /* 29 gbak_rec_failed  */, +-901 /* 30 gbak_rel_req_failed  */, +-901 /* 31 gbak_db_info_failed  */, +-901 /* 32 gbak_no_db_desc  */, +-901 /* 33 gbak_db_create_failed  */, +-901 /* 34 gbak_decomp_len_error  */, +-901 /* 35 gbak_tbl_missing  */, +-901 /* 36 gbak_blob_col_missing  */, +-901 /* 37 gbak_create_blob_failed  */, +-901 /* 38 gbak_put_seg_failed  */, +-901 /* 39 gbak_rec_len_exp  */, +-901 /* 40 gbak_inv_rec_len  */, +-901 /* 41 gbak_exp_data_type  */, +-901 /* 42 gbak_gen_id_failed  */, +-901 /* 43 gbak_unk_rec_type  */, +-901 /* 44 gbak_inv_bkup_ver  */, +-901 /* 45 gbak_missing_bkup_desc  */, +-901 /* 46 gbak_string_trunc  */, +-901 /* 47 gbak_cant_rest_record  */, +-901 /* 48 gbak_send_failed  */, +-901 /* 49 gbak_no_tbl_name  */, +-901 /* 50 gbak_unexp_eof  */, +-901 /* 51 gbak_db_format_too_old  */, +-901 /* 52 gbak_inv_array_dim  */, +-901 /* 55 gbak_xdr_len_expected  */, +-901 /* 65 gbak_open_bkup_error  */, +-901 /* 66 gbak_open_error  */, +-901 /* 182 gbak_missing_block_fac  */, +-901 /* 183 gbak_inv_block_fac  */, +-901 /* 184 gbak_block_fac_specified  */, +-901 /* 188 gbak_missing_username  */, +-901 /* 189 gbak_missing_password  */, +-901 /* 200 gbak_missing_skipped_bytes  */, +-901 /* 201 gbak_inv_skipped_bytes  */, +-901 /* 213 gbak_err_restore_charset  */, +-901 /* 215 gbak_err_restore_collation  */, +-901 /* 220 gbak_read_error  */, +-901 /* 221 gbak_write_error  */, +-901 /* 233 gbak_db_in_use  */, +-901 /* 238 gbak_sysmemex  */, +-901 /* 250 gbak_restore_role_failed  */, +-901 /* 253 gbak_role_op_missing  */, +-901 /* 258 gbak_page_buffers_missing  */, +-901 /* 259 gbak_page_buffers_wrong_param  */, +-901 /* 260 gbak_page_buffers_restore  */, +-901 /* 262 gbak_inv_size  */, +-901 /* 263 gbak_file_outof_sequence  */, +-901 /* 264 gbak_join_file_missing  */, +-901 /* 265 gbak_stdin_not_supptd  */, +-901 /* 266 gbak_stdout_not_supptd  */, +-901 /* 267 gbak_bkup_corrupt  */, +-901 /* 268 gbak_unk_db_file_spec  */, +-901 /* 269 gbak_hdr_write_failed  */, +-901 /* 270 gbak_disk_space_ex  */, +-901 /* 271 gbak_size_lt_min  */, +-901 /* 273 gbak_svc_name_missing  */, +-901 /* 274 gbak_not_ownr  */, +-901 /* 279 gbak_mode_req  */, +-901 /* 15 gsec_cant_open_db  */, +-901 /* 16 gsec_switches_error  */, +-901 /* 17 gsec_no_op_spec  */, +-901 /* 18 gsec_no_usr_name  */, +-901 /* 19 gsec_err_add  */, +-901 /* 20 gsec_err_modify  */, +-901 /* 21 gsec_err_find_mod  */, +-901 /* 22 gsec_err_rec_not_found  */, +-901 /* 23 gsec_err_delete  */, +-901 /* 24 gsec_err_find_del  */, +-901 /* 28 gsec_err_find_disp  */, +-901 /* 29 gsec_inv_param  */, +-901 /* 30 gsec_op_specified  */, +-901 /* 31 gsec_pw_specified  */, +-901 /* 32 gsec_uid_specified  */, +-901 /* 33 gsec_gid_specified  */, +-901 /* 34 gsec_proj_specified  */, +-901 /* 35 gsec_org_specified  */, +-901 /* 36 gsec_fname_specified  */, +-901 /* 37 gsec_mname_specified  */, +-901 /* 38 gsec_lname_specified  */, +-901 /* 40 gsec_inv_switch  */, +-901 /* 41 gsec_amb_switch  */, +-901 /* 42 gsec_no_op_specified  */, +-901 /* 43 gsec_params_not_allowed  */, +-901 /* 44 gsec_incompat_switch  */, +-901 /* 76 gsec_inv_username  */, +-901 /* 77 gsec_inv_pw_length  */, +-901 /* 78 gsec_db_specified  */, +-901 /* 79 gsec_db_admin_specified  */, +-901 /* 80 gsec_db_admin_pw_specified  */, +-901 /* 81 gsec_sql_role_specified  */, +-901 /* 0 license_no_file  */, +-901 /* 19 license_op_specified  */, +-901 /* 20 license_op_missing  */, +-901 /* 21 license_inv_switch  */, +-901 /* 22 license_inv_switch_combo  */, +-901 /* 23 license_inv_op_combo  */, +-901 /* 24 license_amb_switch  */, +-901 /* 25 license_inv_parameter  */, +-901 /* 26 license_param_specified  */, +-901 /* 27 license_param_req  */, +-901 /* 28 license_syntx_error  */, +-901 /* 30 license_dup_id  */, +-901 /* 31 license_inv_id_key  */, +-901 /* 32 license_err_remove  */, +-901 /* 33 license_err_update  */, +-901 /* 34 license_err_convert  */, +-901 /* 35 license_err_unk  */, +-901 /* 36 license_svc_err_add  */, +-901 /* 37 license_svc_err_remove  */, +-901 /* 59 license_eval_exists  */, +-901 /* 1 gstat_unknown_switch  */, +-901 /* 2 gstat_retry  */, +-901 /* 3 gstat_wrong_ods  */, +-901 /* 4 gstat_unexpected_eof  */, +-901 /* 29 gstat_open_err  */, +-901 /* 30 gstat_read_err  */, +-901 /* 31 gstat_sysmemex  */ +}; diff --git a/src/jrd/codes.e b/src/jrd/codes.epp similarity index 100% rename from src/jrd/codes.e rename to src/jrd/codes.epp diff --git a/src/jrd/common.h b/src/jrd/common.h index 33639fc7fd..db883db529 100644 --- a/src/jrd/common.h +++ b/src/jrd/common.h @@ -27,7 +27,7 @@ * readonly databases. */ /* -$Id: common.h,v 1.3 2001-07-12 05:46:05 bellardo Exp $ +$Id: common.h,v 1.4 2001-07-12 06:32:03 bellardo Exp $ */ #ifndef JRD_COMMON_H @@ -1483,4 +1483,7 @@ typedef struct in_sw_tab_t { } *IN_SW_TAB; +/* Just to be safe we will still define READONLY_DATABASE as it gets phased out */ +#define READONLY_DATABASE 1 + #endif /* JRD_COMMON_H */ diff --git a/src/jrd/dfw.e b/src/jrd/dfw.epp similarity index 97% rename from src/jrd/dfw.e rename to src/jrd/dfw.epp index db7771aa91..4c734eac82 100644 --- a/src/jrd/dfw.e +++ b/src/jrd/dfw.epp @@ -87,6 +87,12 @@ #include "../jrd/seg_proto.h" #endif +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "../jrd/codes.h" + /* Pick up system relation ids */ #define RELATION(name,id,ods) id, @@ -725,7 +731,7 @@ void DFW_update_index( DFW work, USHORT id, float selectivity) FOR(REQUEST_HANDLE request) IDX IN RDB$INDICES WITH IDX.RDB$INDEX_NAME EQ work->dfw_name if (!REQUEST(irq_m_index)) - REQUEST(irq_m_index) = request; + REQUEST(irq_m_index) = (BLK)request; MODIFY IDX USING IDX.RDB$INDEX_ID = id + 1; IDX.RDB$STATISTICS = selectivity; @@ -1220,7 +1226,7 @@ static BOOLEAN compute_security(TDBB tdbb, **************************************/ DBB dbb; BLK handle; - SCL class; + SCL s_class; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -1234,13 +1240,13 @@ static BOOLEAN compute_security(TDBB tdbb, case 3: /* Get security class. This may return NULL if it doesn't exist */ - class = SCL_recompute_class(tdbb, work->dfw_name); + s_class = SCL_recompute_class(tdbb, work->dfw_name); handle = NULL; FOR(REQUEST_HANDLE handle) X IN RDB$DATABASE WITH X.RDB$SECURITY_CLASS EQ work->dfw_name - tdbb->tdbb_attachment->att_security_class = class; + tdbb->tdbb_attachment->att_security_class = s_class; END_FOR; CMP_release(tdbb, (REQ)handle); @@ -1535,7 +1541,7 @@ static BOOLEAN create_index(TDBB tdbb, defined enforces a foreign key constraint. This will prevent the constraint from being violated during index construction. */ - if (MET_lookup_partner(tdbb, relation, &idx, work->dfw_name) && + if (MET_lookup_partner(tdbb, relation, &idx, (UCHAR*) work->dfw_name) && (partner_relation = MET_lookup_relation_id( tdbb, idx.idx_primary_relation, @@ -1553,7 +1559,7 @@ static BOOLEAN create_index(TDBB tdbb, IDX_create_index( tdbb, relation, &idx, - work->dfw_name, + (UCHAR*) work->dfw_name, &work->dfw_id, transaction, &selectivity); @@ -1830,7 +1836,7 @@ static BOOLEAN create_relation(TDBB tdbb, work->dfw_lock = NULL; if (!REQUEST(irq_c_relation)) - REQUEST(irq_c_relation) = request; + REQUEST(irq_c_relation) = (BLK) request; /* If relation wasn't found, don't do anymore. This can happen when the relation is created and deleted in the same transaction. */ @@ -1916,7 +1922,7 @@ static BOOLEAN delete_exception(TDBB tdbb, return FALSE; case 1: - check_dependencies(tdbb, work->dfw_name, NULL_PTR, + check_dependencies(tdbb, work->dfw_name, (TEXT*)NULL_PTR, obj_exception, transaction); return TRUE; @@ -2309,7 +2315,7 @@ static BOOLEAN delete_procedure(TDBB tdbb, return FALSE; case 1: - check_dependencies(tdbb, work->dfw_name, NULL_PTR, + check_dependencies(tdbb, work->dfw_name, (TEXT*)NULL_PTR, obj_procedure, transaction); return TRUE; @@ -2348,7 +2354,7 @@ static BOOLEAN delete_procedure(TDBB tdbb, LCK_release(tdbb, procedure->prc_existence_lock); tdbb->tdbb_database-> - dbb_procedures->vec_object[procedure->prc_id] = NULL_PTR; + dbb_procedures->vec_object[procedure->prc_id] = (BLK) NULL_PTR; return FALSE; } @@ -2448,7 +2454,7 @@ static BOOLEAN delete_relation(TDBB tdbb, gds_arg_gds, gds__dependency, gds_arg_number, (SLONG) view_count, 0); /* Msg310: there are %ld dependencies */ - check_dependencies(tdbb, work->dfw_name, NULL_PTR, + check_dependencies(tdbb, work->dfw_name, (TEXT*)NULL_PTR, obj_relation, transaction); return TRUE; @@ -2856,7 +2862,7 @@ static BOOLEAN find_depend_in_dfw(TDBB tdbb, AND FLD.RDB$FIELD_NAME EQ object_name AND REL.RDB$RELATION_NAME EQ RFR.RDB$RELATION_NAME if (!REQUEST(irq_ch_cmp_dpd)) - REQUEST(irq_ch_cmp_dpd) = request; + REQUEST(irq_ch_cmp_dpd) = (BLK) request; if (!find_depend_in_dfw(tdbb, RFR.RDB$FIELD_NAME, obj_computed, REL.RDB$RELATION_ID, transaction)) { @@ -2866,7 +2872,7 @@ static BOOLEAN find_depend_in_dfw(TDBB tdbb, END_FOR; if (!REQUEST(irq_ch_cmp_dpd)) - REQUEST(irq_ch_cmp_dpd) = request; + REQUEST(irq_ch_cmp_dpd) = (BLK) request; return TRUE; } @@ -2889,7 +2895,7 @@ static void get_array_desc( TDBB tdbb, TEXT * field_name, ADS desc) **************************************/ DBB dbb; BLK request; - struct ads_repeat *ranges; + struct ads::ads_repeat *ranges; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -2900,7 +2906,7 @@ static void get_array_desc( TDBB tdbb, TEXT * field_name, ADS desc) D IN RDB$FIELD_DIMENSIONS WITH D.RDB$FIELD_NAME EQ field_name if (!REQUEST(irq_r_fld_dim)) { - REQUEST(irq_r_fld_dim) = request; + REQUEST(irq_r_fld_dim) = (BLK) request; } if (D.RDB$DIMENSION >= 0 && D.RDB$DIMENSION < desc->ads_dimensions) { @@ -2912,7 +2918,7 @@ static void get_array_desc( TDBB tdbb, TEXT * field_name, ADS desc) if (!REQUEST(irq_r_fld_dim)) { - REQUEST(irq_r_fld_dim) = (BLK)request; + REQUEST(irq_r_fld_dim) = (BLK) request; } desc->ads_count = 1; @@ -2965,14 +2971,14 @@ static void get_procedure_dependencies(DFW work) X IN RDB$PROCEDURES WITH X.RDB$PROCEDURE_NAME EQ work->dfw_name if (!REQUEST(irq_c_prc_dpd)) - REQUEST(irq_c_prc_dpd) = handle; + REQUEST(irq_c_prc_dpd) = (BLK) handle; blob_id = X.RDB$PROCEDURE_BLR; procedure = MET_lookup_procedure(tdbb, work->dfw_name); END_FOR; if (!REQUEST(irq_c_prc_dpd)) - REQUEST(irq_c_prc_dpd) = handle; + REQUEST(irq_c_prc_dpd) = (BLK) handle; /* get any dependencies now by parsing the blr */ @@ -2981,12 +2987,12 @@ static void get_procedure_dependencies(DFW work) old_pool = tdbb->tdbb_default; tdbb->tdbb_default = ALL_pool(); MET_get_dependencies(tdbb, - NULL_PTR, - NULL_PTR, - NULL_PTR, + (struct rel*)NULL_PTR, + (TEXT*)NULL_PTR, + (struct csb*)NULL_PTR, (SLONG*)&blob_id, &request, - NULL_PTR, + (struct csb**)NULL_PTR, work->dfw_name, obj_procedure); if (request) @@ -3032,14 +3038,14 @@ static void get_trigger_dependencies( DFW work) X IN RDB$TRIGGERS WITH X.RDB$TRIGGER_NAME EQ work->dfw_name if (!REQUEST(irq_c_trigger)) - REQUEST(irq_c_trigger) = handle; + REQUEST(irq_c_trigger) = (BLK) handle; blob_id = X.RDB$TRIGGER_BLR; relation = MET_lookup_relation(tdbb, X.RDB$RELATION_NAME); END_FOR; if (!REQUEST(irq_c_trigger)) - REQUEST(irq_c_trigger) = handle; + REQUEST(irq_c_trigger) = (BLK) handle; /* get any dependencies now by parsing the blr */ @@ -3048,11 +3054,11 @@ static void get_trigger_dependencies( DFW work) old_pool = tdbb->tdbb_default; tdbb->tdbb_default = ALL_pool(); MET_get_dependencies(tdbb, relation, - NULL_PTR, - NULL_PTR, + (TEXT*)NULL_PTR, + (struct csb*)NULL_PTR, (SLONG*)&blob_id, &request, - NULL_PTR, + (struct csb**)NULL_PTR, work->dfw_name, obj_trigger); ALL_rlpool(tdbb->tdbb_default); @@ -3178,7 +3184,7 @@ static FMT make_format( TDBB tdbb, REL relation, USHORT version, TFB stack) STORE(REQUEST_HANDLE request) FMT IN RDB$FORMATS if (!REQUEST(irq_format3)) - REQUEST(irq_format3) = request; + REQUEST(irq_format3) = (BLK) request; FMT.RDB$FORMAT = version; FMT.RDB$RELATION_ID = relation->rel_id; blob = BLB_create(tdbb, dbb->dbb_sys_trans, (BID)&FMT.RDB$DESCRIPTOR); @@ -3190,7 +3196,7 @@ static FMT make_format( TDBB tdbb, REL relation, USHORT version, TFB stack) END_STORE; if (!REQUEST(irq_format3)) - REQUEST(irq_format3) = request; + REQUEST(irq_format3) = (BLK) request; return format; } @@ -3245,7 +3251,7 @@ static BOOLEAN make_version(TDBB tdbb, computed_field = FALSE; for (n = 0; n < TRIGGER_MAX; n++) - triggers[n] = NULL_PTR; + triggers[n] = (VEC) NULL_PTR; request_fmt1 = (BLK) CMP_find_request(tdbb, irq_format1, IRQ_REQUESTS); @@ -3253,7 +3259,7 @@ static BOOLEAN make_version(TDBB tdbb, FOR(REQUEST_HANDLE request_fmt1) REL IN RDB$RELATIONS WITH REL.RDB$RELATION_NAME EQ work->dfw_name if (!REQUEST(irq_format1)) - REQUEST(irq_format1) = request_fmt1; + REQUEST(irq_format1) = (BLK) request_fmt1; if (!(relation = MET_lookup_relation_id(tdbb, REL.RDB$RELATION_ID, FALSE))) { @@ -3286,7 +3292,7 @@ static BOOLEAN make_version(TDBB tdbb, RFR.RDB$RELATION_NAME EQ work->dfw_name AND RFR.RDB$FIELD_SOURCE EQ FLD.RDB$FIELD_NAME if (!REQUEST(irq_format2)) - REQUEST(irq_format2) = request_fmtx; + REQUEST(irq_format2) = (BLK) request_fmtx; /* Update RFR to reflect new fields id */ @@ -3344,7 +3350,7 @@ static BOOLEAN make_version(TDBB tdbb, n = RFR.RDB$FIELD_ID; put_summary_record(blob, RSR_field_id, (UCHAR*)&n, sizeof(n)); put_summary_record(blob, RSR_field_name, - RFR.RDB$FIELD_NAME, + (UCHAR*) RFR.RDB$FIELD_NAME, name_length(RFR.RDB$FIELD_NAME)); if (!NULL_BLOB(FLD.RDB$COMPUTED_BLR) && !RFR.RDB$VIEW_CONTEXT) @@ -3361,7 +3367,7 @@ static BOOLEAN make_version(TDBB tdbb, (UCHAR*)&n, sizeof(n)); put_summary_record(blob, RSR_base_field, - RFR.RDB$BASE_FIELD, + (UCHAR*) RFR.RDB$BASE_FIELD, name_length(RFR.RDB$BASE_FIELD)); } put_summary_blob(blob, RSR_missing_value, @@ -3383,7 +3389,7 @@ static BOOLEAN make_version(TDBB tdbb, n = name_length(RFR.RDB$SECURITY_CLASS); if (!RFR.RDB$SECURITY_CLASS.NULL && n) put_summary_record(blob, RSR_security_class, - RFR.RDB$SECURITY_CLASS, n); + (UCHAR*) RFR.RDB$SECURITY_CLASS, n); /* Make a temporary field block */ @@ -3468,7 +3474,7 @@ static BOOLEAN make_version(TDBB tdbb, END_FOR; if (!REQUEST(irq_format2)) - REQUEST(irq_format2) = request_fmtx; + REQUEST(irq_format2) = (BLK) request_fmtx; request_fmtx = (BLK) CMP_find_request(tdbb, irq_format4, IRQ_REQUESTS); @@ -3479,12 +3485,12 @@ static BOOLEAN make_version(TDBB tdbb, TRG.RDB$SYSTEM_FLAG NOT MISSING SORTED BY TRG.RDB$TRIGGER_SEQUENCE if (!REQUEST(irq_format4)) - REQUEST(irq_format4) = request_fmtx; + REQUEST(irq_format4) = (BLK) request_fmtx; if (!TRG.RDB$TRIGGER_INACTIVE) { put_summary_record(blob, RSR_trigger_name, - TRG.RDB$TRIGGER_NAME, + (UCHAR*) TRG.RDB$TRIGGER_NAME, name_length(TRG.RDB$TRIGGER_NAME)); /* for a view, load the trigger temporarily -- @@ -3505,7 +3511,7 @@ static BOOLEAN make_version(TDBB tdbb, END_FOR; if (!REQUEST(irq_format4)) - REQUEST(irq_format4) = request_fmtx; + REQUEST(irq_format4) = (BLK) request_fmtx; request_fmtx = (BLK) CMP_find_request(tdbb, irq_format5, IRQ_REQUESTS); @@ -3525,12 +3531,12 @@ static BOOLEAN make_version(TDBB tdbb, AND TRG.RDB$TRIGGER_SOURCE MISSING) SORTED BY TRG.RDB$TRIGGER_SEQUENCE if (!REQUEST(irq_format5)) - REQUEST(irq_format5) = request_fmtx; + REQUEST(irq_format5) = (BLK) request_fmtx; if (!TRG.RDB$TRIGGER_INACTIVE) { put_summary_record(blob, RSR_trigger_name, - TRG.RDB$TRIGGER_NAME, + (UCHAR*) TRG.RDB$TRIGGER_NAME, name_length(TRG.RDB$TRIGGER_NAME)); /* for a view, load the trigger temporarily -- @@ -3551,7 +3557,7 @@ static BOOLEAN make_version(TDBB tdbb, END_FOR; if (!REQUEST(irq_format5)) - REQUEST(irq_format5) = request_fmtx; + REQUEST(irq_format5) = (BLK) request_fmtx; request_fmtx = (BLK) CMP_find_request(tdbb, irq_format6, IRQ_REQUESTS); @@ -3565,12 +3571,12 @@ static BOOLEAN make_version(TDBB tdbb, SORTED BY TRG.RDB$TRIGGER_SEQUENCE if (!REQUEST(irq_format6)) - REQUEST(irq_format6) = request_fmtx; + REQUEST(irq_format6) = (BLK) request_fmtx; if (!TRG.RDB$TRIGGER_INACTIVE) { put_summary_record(blob, RSR_trigger_name, - TRG.RDB$TRIGGER_NAME, + (UCHAR*) TRG.RDB$TRIGGER_NAME, name_length(TRG.RDB$TRIGGER_NAME)); /* for a view, load the trigger temporarily -- @@ -3591,14 +3597,14 @@ static BOOLEAN make_version(TDBB tdbb, END_FOR; if (!REQUEST(irq_format6)) - REQUEST(irq_format6) = request_fmtx; + REQUEST(irq_format6) = (BLK) request_fmtx; BLB_close(tdbb, blob); END_MODIFY; END_FOR; if (!REQUEST(irq_format1)) - REQUEST(irq_format1) = request_fmt1; + REQUEST(irq_format1) = (BLK) request_fmt1; /* If we didn't find the relation, it is probably being dropped */ @@ -3661,7 +3667,7 @@ static BOOLEAN make_version(TDBB tdbb, } relation->rel_flags &= ~REL_scanned; - DFW_post_work(transaction, dfw_scan_relation, NULL_PTR, + DFW_post_work(transaction, dfw_scan_relation, (DSC*) NULL_PTR, relation->rel_id); break; } @@ -3778,7 +3784,7 @@ static BOOLEAN modify_procedure(TDBB tdbb, } LCK_release(tdbb, procedure->prc_existence_lock); tdbb->tdbb_database-> - dbb_procedures->vec_object[procedure->prc_id] = NULL_PTR; + dbb_procedures->vec_object[procedure->prc_id] = (BLK) NULL_PTR; if (!(procedure = MET_lookup_procedure_id(tdbb, work->dfw_id, @@ -3953,7 +3959,7 @@ static void put_summary_blob( BLB blob, RSR_T type, SLONG blob_id[2]) { tdbb->tdbb_setjmp = (UCHAR *) old_env; if (buffer != temp) - ALL_free(buffer); + ALL_free((SCHAR*) buffer); ERR_punt(); } @@ -3963,7 +3969,7 @@ static void put_summary_blob( BLB blob, RSR_T type, SLONG blob_id[2]) tdbb->tdbb_setjmp = (UCHAR *) old_env; if (buffer != temp) - ALL_free(buffer); + ALL_free((SCHAR*) buffer); } @@ -4007,7 +4013,7 @@ static void put_summary_record(BLB blob, { tdbb->tdbb_setjmp = (UCHAR *) old_env; if (buffer != temp) - ALL_free(buffer); + ALL_free((SCHAR*) buffer); ERR_punt(); } @@ -4016,7 +4022,7 @@ static void put_summary_record(BLB blob, tdbb->tdbb_setjmp = (UCHAR *) old_env; if (buffer != temp) - ALL_free(buffer); + ALL_free((SCHAR*) buffer); } diff --git a/src/jrd/dpm.e b/src/jrd/dpm.epp similarity index 97% rename from src/jrd/dpm.e rename to src/jrd/dpm.epp index dc91d34554..026ea0eda7 100644 --- a/src/jrd/dpm.e +++ b/src/jrd/dpm.epp @@ -29,11 +29,6 @@ * Change: Corrected routine to use new variables from PAG_init. */ -/* 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE" - * conditionals, as the engine now fully supports - * readonly databases. - */ - #include "../jrd/ib_stdio.h" #include "../jrd/ibsetjmp.h" #include @@ -69,11 +64,15 @@ #include "../jrd/sqz_proto.h" #include "../jrd/thd_proto.h" +#ifdef DEV_BUILD +#include "../jrd/dbg_proto.h" +#endif + DATABASE DB = FILENAME "ODS.RDB"; #define DECOMPOSE(n, divisor, q, r) {r = n % divisor; q = n / divisor;} #define DECOMPOSE_QUOTIENT(n, divisor, q) {q = n / divisor;} -#define HIGH_WATER(x) ((SSHORT) sizeof (struct dpg) + (SSHORT) sizeof (struct dpg_repeat) * (x - 1)) +#define HIGH_WATER(x) ((SSHORT) sizeof (struct dpg) + (SSHORT) sizeof (dpg::dpg_repeat) * (x - 1)) #define SPACE_FUDGE RHDF_SIZE static void delete_tail(TDBB, RHDF, USHORT); @@ -140,7 +139,7 @@ void DPM_backout( TDBB tdbb, RPB * rpb) DPG page; RHD header; USHORT n; - struct dpg_repeat *index1, *index2; + dpg::dpg_repeat *index1, *index2; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -206,7 +205,7 @@ int DPM_chain( TDBB tdbb, RPB * org_rpb, RPB * new_rpb) ************************************** * * Functional description - * Start here with a plausible, but non-active RPB. + * Start here with a plausible, but non-active RPB. * * We need to create a new version of a record. If the new version * fits on the same page as the old record, things are simple and @@ -214,9 +213,9 @@ int DPM_chain( TDBB tdbb, RPB * org_rpb, RPB * new_rpb) * * Note that we also return FALSE if the record fetched doesn't * match the state of the input rpb, or if there is no record for - * that record number. The caller has to check the results to + * that record number. The caller has to check the results to * see what failed if FALSE is returned. At the moment, there is - * only one caller, VIO_erase. + * only one caller, VIO_erase. * **************************************/ DBB dbb; @@ -228,7 +227,7 @@ int DPM_chain( TDBB tdbb, RPB * org_rpb, RPB * new_rpb) SLONG length, fill; /* Accomodate max record size i.e. 64K */ USHORT size; SSHORT top, offset, n, slot, available, space; - struct dpg_repeat *index, *end; + dpg::dpg_repeat *index, *end; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -254,7 +253,7 @@ int DPM_chain( TDBB tdbb, RPB * org_rpb, RPB * new_rpb) temp = *org_rpb; size = - SQZ_length(tdbb, new_rpb->rpb_address, (int) new_rpb->rpb_length, + SQZ_length(tdbb, (SCHAR*) new_rpb->rpb_address, (int) new_rpb->rpb_length, &dcc); if (!DPM_get(tdbb, org_rpb, LCK_write)) { @@ -334,8 +333,8 @@ int DPM_chain( TDBB tdbb, RPB * org_rpb, RPB * new_rpb) } if (slot == page->dpg_count) { - top += sizeof(struct dpg_repeat); - available -= sizeof(struct dpg_repeat); + top += sizeof(dpg::dpg_repeat); + available -= sizeof(dpg::dpg_repeat); } /* If the record doesn't fit, punt */ @@ -384,7 +383,7 @@ int DPM_chain( TDBB tdbb, RPB * org_rpb, RPB * new_rpb) header->rhd_b_page = new_rpb->rpb_b_page; header->rhd_b_line = new_rpb->rpb_b_line; - SQZ_fast(&dcc, new_rpb->rpb_address, header->rhd_data); + SQZ_fast(&dcc, (SCHAR*) new_rpb->rpb_address, (SCHAR*) header->rhd_data); release_dcc(dcc.dcc_next); if (fill) { @@ -424,7 +423,7 @@ int DPM_compress( TDBB tdbb, DPG page) #else UCHAR temp_page[MAX_PAGE_SIZE]; #endif - struct dpg_repeat *index, *end; + dpg::dpg_repeat *index, *end; JMP_BUF env, *old_env; SET_TDBB(tdbb); @@ -533,7 +532,7 @@ void DPM_create_relation( TDBB tdbb, REL relation) record.jrnda_type = JRNP_DB_HDR_PAGES; record.jrnda_data = window.win_page; CCH_journal_record(tdbb, &root_window, (UCHAR*)&record, JRNDA_SIZE, - NULL_PTR, 0); + (UCHAR*) NULL_PTR, 0); } CCH_RELEASE(tdbb, &root_window); } @@ -645,7 +644,7 @@ void DPM_delete( TDBB tdbb, RPB * rpb, SLONG prior_page) SLONG *ptr, number, sequence; JRNP journal; REL relation; - struct dpg_repeat *index; + dpg::dpg_repeat *index; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -800,7 +799,7 @@ void DPM_delete( TDBB tdbb, RPB * rpb, SLONG prior_page) journal.jrnp_type = JRNP_POINTER_SLOT; journal.jrnp_index = slot; journal.jrnp_length = 0; - CCH_journal_record(tdbb, &pwindow, (UCHAR*)&journal, JRNP_SIZE, NULL_PTR, 0); + CCH_journal_record(tdbb, &pwindow, (UCHAR*)&journal, JRNP_SIZE, (UCHAR*) NULL_PTR, 0); } CCH_RELEASE(tdbb, &pwindow); @@ -834,7 +833,7 @@ void DPM_delete_relation( TDBB tdbb, REL relation) UCHAR *flags, pag_flags; SLONG *page; RHD header; - struct dpg_repeat *line, *end_line; + dpg::dpg_repeat *line, *end_line; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -1106,8 +1105,8 @@ SINT64 DPM_gen_id(TDBB tdbb, SLONG generator, USHORT initialize, SINT64 val) * * Functional description * Generate relation specific value. - * If initialize is set then value of generator is made - * equal to val else generator is incremented by val. + * If initialize is set then value of generator is made + * equal to val else generator is incremented by val. * The resulting value is the result of the function. **************************************/ DBB dbb; @@ -1178,8 +1177,7 @@ SINT64 DPM_gen_id(TDBB tdbb, SLONG generator, USHORT initialize, SINT64 val) if (val || initialize) { if (dbb->dbb_flags & DBB_read_only) ERR_post(isc_read_only_database, 0); - - CCH_MARK(tdbb, &window); + CCH_MARK(tdbb, &window); /* Initialize or increment the quad value in an ODS 10 or later * generator page, or the long value in ODS <= 9. @@ -1202,7 +1200,7 @@ SINT64 DPM_gen_id(TDBB tdbb, SLONG generator, USHORT initialize, SINT64 val) journal.jrng_type = JRNP_GENERATOR; journal.jrng_offset = offset; journal.jrng_genval = *ptr; - CCH_journal_record(tdbb, &window, (UCHAR*)&journal, JRNG_SIZE, NULL_PTR, + CCH_journal_record(tdbb, &window, (UCHAR*)&journal, JRNG_SIZE, (UCHAR*) NULL_PTR, 0); } @@ -1309,7 +1307,7 @@ ULONG DPM_get_blob(TDBB tdbb, * * Functional description * Given a blob block, find the associated blob. If blob is level 0, - * get the data clump, otherwise get the vector of pointers. + * get the data clump, otherwise get the vector of pointers. * * If the delete flag is set, delete the blob header after access * and return the page number. This is a kludge, but less code @@ -1327,7 +1325,7 @@ ULONG DPM_get_blob(TDBB tdbb, VCL vector; UCHAR *p, *q; RPB rpb; - struct dpg_repeat *index; + dpg::dpg_repeat *index; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -1507,7 +1505,7 @@ BOOLEAN DPM_next(TDBB tdbb, rpb->rpb_number--; else if (rpb->rpb_number < 0) { /* if the stream was just opened, assume we want to start - at the end of the stream, so compute the last theoretically + at the end of the stream, so compute the last theoretically possible rpb_number and go down from there */ /** for now, we must force a scan to make sure that we get the last pointer page: this should be changed to use @@ -1686,7 +1684,7 @@ void DPM_pages( END_STORE if (!REQUEST(irq_s_pages)) - REQUEST(irq_s_pages) = request; + REQUEST(irq_s_pages) = (BLK) request; } @@ -1804,7 +1802,7 @@ void DPM_scan_pages( TDBB tdbb) FOR(REQUEST_HANDLE request) X IN RDB$PAGES if (!REQUEST(irq_r_pages)) - REQUEST(irq_r_pages) = request; + REQUEST(irq_r_pages) = (BLK) request; relation = MET_relation(tdbb, X.RDB$RELATION_ID); sequence = X.RDB$PAGE_SEQUENCE; switch (X.RDB$PAGE_TYPE) { @@ -1838,7 +1836,7 @@ void DPM_scan_pages( TDBB tdbb) END_FOR; if (!REQUEST(irq_r_pages)) - REQUEST(irq_r_pages) = request; + REQUEST(irq_r_pages) = (BLK) request; } @@ -1878,7 +1876,7 @@ void DPM_store( TDBB tdbb, register RPB * rpb, LLS * stack, USHORT type) rpb->rpb_f_line, rpb->rpb_flags); #endif - size = SQZ_length(tdbb, rpb->rpb_address, (int) rpb->rpb_length, &dcc); + size = SQZ_length(tdbb, (SCHAR*) rpb->rpb_address, (int) rpb->rpb_length, &dcc); /* If the record isn't going to fit on a page, even if fragmented, handle it a little differently. */ @@ -1893,7 +1891,7 @@ void DPM_store( TDBB tdbb, register RPB * rpb, LLS * stack, USHORT type) fill = 0; length = RHD_SIZE + size + fill; - header = locate_space(tdbb, rpb, (SSHORT)length, stack, NULL_PTR, type); + header = locate_space(tdbb, rpb, (SSHORT)length, stack, (REC) NULL_PTR, type); header->rhd_flags = rpb->rpb_flags; header->rhd_transaction = rpb->rpb_transaction; @@ -1901,7 +1899,7 @@ void DPM_store( TDBB tdbb, register RPB * rpb, LLS * stack, USHORT type) header->rhd_b_page = rpb->rpb_b_page; header->rhd_b_line = rpb->rpb_b_line; - SQZ_fast(&dcc, rpb->rpb_address, header->rhd_data); + SQZ_fast(&dcc, (SCHAR*) rpb->rpb_address, (SCHAR*) header->rhd_data); release_dcc(dcc.dcc_next); #ifdef VIO_DEBUG @@ -2100,7 +2098,7 @@ void DPM_update( TDBB tdbb, register RPB * rpb, LLS * stack, TRA transaction) SLONG length, fill; /* Accomodate max record size i.e. 64K */ USHORT size; SSHORT top, offset, slot, available, space, old_length; - struct dpg_repeat *index, *end; + dpg::dpg_repeat *index, *end; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; @@ -2128,7 +2126,7 @@ void DPM_update( TDBB tdbb, register RPB * rpb, LLS * stack, TRA transaction) CCH_precedence(tdbb, &rpb->rpb_window, -rpb->rpb_transaction); CCH_MARK(tdbb, &rpb->rpb_window); page = (DPG) rpb->rpb_window.win_buffer; - size = SQZ_length(tdbb, rpb->rpb_address, (int) rpb->rpb_length, &dcc); + size = SQZ_length(tdbb, (SCHAR*) rpb->rpb_address, (int) rpb->rpb_length, &dcc); /* It is critical that the record be padded, if necessary, to the length of a fragmented record header. Compute the amount of fill required. */ @@ -2174,7 +2172,7 @@ void DPM_update( TDBB tdbb, register RPB * rpb, LLS * stack, TRA transaction) header->rhd_b_page = rpb->rpb_b_page; header->rhd_b_line = rpb->rpb_b_line; - SQZ_fast(&dcc, rpb->rpb_address, header->rhd_data); + SQZ_fast(&dcc, (SCHAR*) rpb->rpb_address, (SCHAR*) header->rhd_data); release_dcc(dcc.dcc_next); #ifdef VIO_DEBUG @@ -2301,7 +2299,7 @@ static void fragment( * messing with the head until we get back, and, if possible, we'd * like to keep as much space on the original page as we can get. * Making matters worse, we may be storing a new version of the - * record or we may be backing out an old one and replacing it + * record or we may be backing out an old one and replacing it * with one older still (replacing a dead rolled back record with * the preceding version). * @@ -2319,7 +2317,7 @@ static void fragment( * id. Applying deltas to the expanded form of the same version of the * record is a no-op -- but it doesn't cost much and the case is rare. * - * If we're backing out a rolled back version, we've got another + * If we're backing out a rolled back version, we've got another * problem. The rpb we've got is for record version n - 1, not version * n + 1. (e.g. I'm transaction 32 removing the rolled back record * created by transaction 28 and reinstating the committed version @@ -2419,7 +2417,7 @@ static void fragment( first figuring out how much of the original record fits on the original page. */ - pre_header_length = SQZ_compress_length(dcc, rpb->rpb_address, + pre_header_length = SQZ_compress_length(dcc, (SCHAR*) rpb->rpb_address, (int) (available_space - RHDF_SIZE)); @@ -2461,7 +2459,7 @@ static void fragment( post_header_length = - SQZ_compress(dcc, rpb->rpb_address, header->rhdf_data, + SQZ_compress(dcc, (SCHAR*) rpb->rpb_address, (SCHAR*) header->rhdf_data, (int) (available_space - RHDF_SIZE)); #ifdef VIO_DEBUG @@ -2501,7 +2499,7 @@ static void extend_relation( TDBB tdbb, REL relation, WIN * window) * Functional description * Extend a relation with a given page. The window points to an * already allocated, fetched, and marked data page to be inserted - * into the pointer pages for a given relation. + * into the pointer pages for a given relation. * This routine returns a window on the datapage locked for write * **************************************/ @@ -2671,14 +2669,14 @@ static UCHAR *find_space(TDBB tdbb, * data page, and return a pointer to the space. * * To maintain page precedence when objects point to objects, a stack - * of pages of high precedence may be passed in. + * of pages of high precedence may be passed in. * **************************************/ DBB dbb; DPG page; SSHORT i, slot, aligned_size; SSHORT used, space, reserving; - struct dpg_repeat *index; + dpg::dpg_repeat *index; RHD header; SET_TDBB(tdbb); @@ -2712,7 +2710,7 @@ static UCHAR *find_space(TDBB tdbb, slot = i; if (!slot) - used += sizeof(struct dpg_repeat); + used += sizeof(dpg::dpg_repeat); /* If there isn't space, give up */ @@ -2768,7 +2766,7 @@ static BOOLEAN get_header( WIN * window, SSHORT line, register RPB * rpb) **************************************/ DPG page; register RHDF header; - register struct dpg_repeat *index; + register dpg::dpg_repeat *index; page = (DPG) window->win_buffer; if (line >= page->dpg_count) @@ -2873,7 +2871,7 @@ static void journal_segment( TDBB tdbb, WIN * window, USHORT slot) **************************************/ JRNP journal; DPG page; - struct dpg_repeat *index; + dpg::dpg_repeat *index; SET_TDBB(tdbb); @@ -2963,8 +2961,8 @@ static RHD locate_space( } /* Sigh. No space. Extend relation. Try for a while - in case someone grabs the page before we can get it - locked, then give up on the assumption that things + in case someone grabs the page before we can get it + locked, then give up on the assumption that things are really screwed up. */ for (i = 0; i < 20; i++) { @@ -3034,7 +3032,7 @@ static void mark_full( TDBB tdbb, register RPB * rpb) DECOMPOSE(sequence, dbb->dbb_dp_per_pp, pp_sequence, slot); /* Fetch the pointer page, then the data page. Since this is a case of - fetching a second page after having fetched the first page with an + fetching a second page after having fetched the first page with an exclusive latch, care has to be taken to prevent a deadlock. This is accomplished by timing out the second latch request and retrying the whole thing. */ @@ -3251,13 +3249,13 @@ static void store_big_record( release_dcc(head_dcc->dcc_next); size = - SQZ_length(tdbb, rpb->rpb_address, in - (SCHAR *) rpb->rpb_address, + SQZ_length(tdbb, (SCHAR*) rpb->rpb_address, in - (SCHAR *) rpb->rpb_address, head_dcc); header = (RHDF)locate_space(tdbb, rpb, (SSHORT)(RHDF_SIZE + size), stack, - NULL_PTR, + (REC) NULL_PTR, DPM_other); header->rhdf_flags = rhd_incomplete | rhd_large | rpb->rpb_flags; @@ -3267,7 +3265,7 @@ static void store_big_record( header->rhdf_b_line = rpb->rpb_b_line; header->rhdf_f_page = prior; header->rhdf_f_line = 0; - SQZ_fast(head_dcc, rpb->rpb_address, header->rhdf_data); + SQZ_fast(head_dcc, (SCHAR*) rpb->rpb_address, (SCHAR*) header->rhdf_data); release_dcc(head_dcc->dcc_next); if (dbb->dbb_wal) @@ -3293,4 +3291,4 @@ static void store_big_record( } else CCH_RELEASE(tdbb, &rpb->rpb_window); -} \ No newline at end of file +} diff --git a/src/jrd/dyn.e b/src/jrd/dyn.epp similarity index 95% rename from src/jrd/dyn.e rename to src/jrd/dyn.epp index 8b929113ae..71cc37b6c9 100644 --- a/src/jrd/dyn.e +++ b/src/jrd/dyn.epp @@ -111,8 +111,8 @@ void DYN_ddl( ATT attachment, TRA transaction, USHORT length, UCHAR * ddl) ptr = ddl; - if (*ptr++ != gds__dyn_version_1) - ERR_post(gds__wrodynver, 0); + if (*ptr++ != gds_dyn_version_1) + ERR_post(gds_wrodynver, 0); status = tdbb->tdbb_status_vector; *status++ = gds_arg_gds; @@ -171,7 +171,7 @@ void DYN_ddl( ATT attachment, TRA transaction, USHORT length, UCHAR * ddl) VIO_start_save_point(tdbb, transaction); transaction->tra_save_point->sav_verb_count++; - DYN_execute(&gbl, &ptr, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + DYN_execute(&gbl, &ptr, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); transaction->tra_save_point->sav_verb_count--; VIO_verb_cleanup(tdbb, transaction); @@ -339,7 +339,7 @@ void DYN_error(USHORT status_flag, tdbb = GET_THREAD_DATA; - if (tdbb->tdbb_status_vector[1] == gds__no_meta_update) + if (tdbb->tdbb_status_vector[1] == gds_no_meta_update) return; error_buffer = @@ -353,10 +353,10 @@ void DYN_error(USHORT status_flag, v1 = local_status; *v1++ = gds_arg_gds; - *v1++ = gds__no_meta_update; + *v1++ = gds_no_meta_update; if (number) { *v1++ = gds_arg_gds; - *v1++ = gds__random; + *v1++ = gds_random; *v1++ = gds_arg_string; *v1++ = (STATUS) ERR_cstring(error_buffer); } @@ -499,8 +499,8 @@ TEXT * function_name, TEXT * procedure_name) UCHAR verb; switch (verb = *(*ptr)++) { - case gds__dyn_begin: - while (**ptr != gds__dyn_end) + case gds_dyn_begin: + while (**ptr != gds_dyn_end) DYN_execute(gbl, ptr, relation_name, field_name, trigger_name, function_name, procedure_name); ++(*ptr); @@ -509,16 +509,16 @@ TEXT * function_name, TEXT * procedure_name) /* Runtime security-related dynamic DDL should not require licensing. A placeholder case statement for SQL 3 Roles is reserved below. */ - case gds__dyn_grant: + case gds_dyn_grant: grant(gbl, ptr); break; - case gds__dyn_revoke: + case gds_dyn_revoke: revoke(gbl, ptr); break; /*** - case gds__dyn_def_role: + case gds_dyn_def_role: create_role (gbl, ptr); break; ***/ @@ -526,64 +526,64 @@ TEXT * function_name, TEXT * procedure_name) /* make sure that the license allows metadata operations */ switch (verb) { - case gds__dyn_mod_database: + case gds_dyn_mod_database: DYN_modify_database(gbl, ptr); break; - case gds__dyn_def_rel: - case gds__dyn_def_view: + case gds_dyn_def_rel: + case gds_dyn_def_view: DYN_define_relation(gbl, ptr); break; - case gds__dyn_mod_rel: + case gds_dyn_mod_rel: DYN_modify_relation(gbl, ptr); break; - case gds__dyn_delete_rel: + case gds_dyn_delete_rel: DYN_delete_relation(gbl, ptr, relation_name); break; - case gds__dyn_def_security_class: + case gds_dyn_def_security_class: DYN_define_security_class(gbl, ptr); break; - case gds__dyn_delete_security_class: + case gds_dyn_delete_security_class: DYN_delete_security_class(gbl, ptr); break; - case gds__dyn_def_exception: + case gds_dyn_def_exception: DYN_define_exception(gbl, ptr); break; - case gds__dyn_mod_exception: + case gds_dyn_mod_exception: DYN_modify_exception(gbl, ptr); break; - case gds__dyn_del_exception: + case gds_dyn_del_exception: DYN_delete_exception(gbl, ptr); break; - case gds__dyn_def_filter: + case gds_dyn_def_filter: DYN_define_filter(gbl, ptr); break; - case gds__dyn_delete_filter: + case gds_dyn_delete_filter: DYN_delete_filter(gbl, ptr); break; - case gds__dyn_def_function: + case gds_dyn_def_function: DYN_define_function(gbl, ptr); break; - case gds__dyn_def_function_arg: + case gds_dyn_def_function_arg: DYN_define_function_arg(gbl, ptr, function_name); break; - case gds__dyn_delete_function: + case gds_dyn_delete_function: DYN_delete_function(gbl, ptr); break; - case gds__dyn_def_generator: + case gds_dyn_def_generator: DYN_define_generator(gbl, ptr); break; @@ -595,79 +595,79 @@ TEXT * function_name, TEXT * procedure_name) DYN_delete_role(gbl, ptr); break; - case gds__dyn_def_procedure: + case gds_dyn_def_procedure: DYN_define_procedure(gbl, ptr); break; - case gds__dyn_mod_procedure: + case gds_dyn_mod_procedure: DYN_modify_procedure(gbl, ptr); break; - case gds__dyn_delete_procedure: + case gds_dyn_delete_procedure: DYN_delete_procedure(gbl, ptr); break; - case gds__dyn_def_parameter: + case gds_dyn_def_parameter: DYN_define_parameter(gbl, ptr, procedure_name); break; - case gds__dyn_delete_parameter: + case gds_dyn_delete_parameter: DYN_delete_parameter(gbl, ptr, procedure_name); break; - case gds__dyn_def_shadow: + case gds_dyn_def_shadow: DYN_define_shadow(gbl, ptr); break; - case gds__dyn_delete_shadow: + case gds_dyn_delete_shadow: DYN_delete_shadow(gbl, ptr); break; - case gds__dyn_def_trigger: + case gds_dyn_def_trigger: DYN_define_trigger(gbl, ptr, relation_name, NULL, FALSE); break; - case gds__dyn_mod_trigger: + case gds_dyn_mod_trigger: DYN_modify_trigger(gbl, ptr); break; - case gds__dyn_delete_trigger: + case gds_dyn_delete_trigger: DYN_delete_trigger(gbl, ptr); break; - case gds__dyn_def_trigger_msg: + case gds_dyn_def_trigger_msg: DYN_define_trigger_msg(gbl, ptr, trigger_name); break; - case gds__dyn_mod_trigger_msg: + case gds_dyn_mod_trigger_msg: DYN_modify_trigger_msg(gbl, ptr, trigger_name); break; - case gds__dyn_delete_trigger_msg: + case gds_dyn_delete_trigger_msg: DYN_delete_trigger_msg(gbl, ptr, trigger_name); break; - case gds__dyn_def_global_fld: + case gds_dyn_def_global_fld: DYN_define_global_field(gbl, ptr, relation_name, field_name); break; - case gds__dyn_mod_global_fld: + case gds_dyn_mod_global_fld: DYN_modify_global_field(gbl, ptr, relation_name, field_name); break; - case gds__dyn_delete_global_fld: + case gds_dyn_delete_global_fld: DYN_delete_global_field(gbl, ptr); break; - case gds__dyn_def_local_fld: + case gds_dyn_def_local_fld: DYN_define_local_field(gbl, ptr, relation_name, field_name); break; - case gds__dyn_mod_local_fld: + case gds_dyn_mod_local_fld: DYN_modify_local_field(gbl, ptr, relation_name, NULL); break; - case gds__dyn_delete_local_fld: + case gds_dyn_delete_local_fld: DYN_delete_local_field(gbl, ptr, relation_name, field_name); break; @@ -675,40 +675,40 @@ TEXT * function_name, TEXT * procedure_name) DYN_modify_sql_field(gbl, ptr, relation_name, NULL); break; - case gds__dyn_def_sql_fld: + case gds_dyn_def_sql_fld: DYN_define_sql_field(gbl, ptr, relation_name, field_name); break; - case gds__dyn_def_idx: + case gds_dyn_def_idx: DYN_define_index(gbl, ptr, relation_name, verb, NULL, NULL, NULL, NULL); break; - case gds__dyn_rel_constraint: + case gds_dyn_rel_constraint: DYN_define_constraint(gbl, ptr, relation_name, field_name); break; - case gds__dyn_delete_rel_constraint: + case gds_dyn_delete_rel_constraint: DYN_delete_constraint(gbl, ptr, relation_name); break; - case gds__dyn_mod_idx: + case gds_dyn_mod_idx: DYN_modify_index(gbl, ptr); break; - case gds__dyn_delete_idx: + case gds_dyn_delete_idx: DYN_delete_index(gbl, ptr); break; - case gds__dyn_view_relation: + case gds_dyn_view_relation: DYN_define_view_relation(gbl, ptr, relation_name); break; - case gds__dyn_def_dimension: + case gds_dyn_def_dimension: DYN_define_dimension(gbl, ptr, relation_name, field_name); break; - case gds__dyn_delete_dimensions: + case gds_dyn_delete_dimensions: DYN_delete_dimensions(gbl, ptr, relation_name, field_name); break; @@ -1246,19 +1246,19 @@ static void grant( GBL gbl, UCHAR ** ptr) options = 0; obj_type = user_type = -1; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_rel_name: + case gds_dyn_rel_name: obj_type = obj_relation; GET_STRING(ptr, object); break; - case gds__dyn_prc_name: + case gds_dyn_prc_name: obj_type = obj_procedure; GET_STRING(ptr, object); break; - case gds__dyn_fld_name: + case gds_dyn_fld_name: GET_STRING(ptr, field); break; @@ -1267,7 +1267,7 @@ static void grant( GBL gbl, UCHAR ** ptr) GET_STRING(ptr, user); break; - case gds__dyn_grant_user: + case gds_dyn_grant_user: GET_STRING(ptr, user); if (DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) { user_type = obj_sql_role; @@ -1292,22 +1292,22 @@ static void grant( GBL gbl, UCHAR ** ptr) } break; - case gds__dyn_grant_proc: + case gds_dyn_grant_proc: user_type = obj_procedure; GET_STRING(ptr, user); break; - case gds__dyn_grant_trig: + case gds_dyn_grant_trig: user_type = obj_trigger; GET_STRING(ptr, user); break; - case gds__dyn_grant_view: + case gds_dyn_grant_view: user_type = obj_view; GET_STRING(ptr, user); break; - case gds__dyn_grant_options: + case gds_dyn_grant_options: case isc_dyn_grant_admin_options: options = DYN_get_number(ptr); break; @@ -1917,19 +1917,19 @@ static void revoke( GBL gbl, UCHAR ** ptr) obj_type = user_type = -1; options = 0; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_rel_name: + case gds_dyn_rel_name: obj_type = obj_relation; GET_STRING(ptr, object); break; - case gds__dyn_prc_name: + case gds_dyn_prc_name: obj_type = obj_procedure; GET_STRING(ptr, object); break; - case gds__dyn_fld_name: + case gds_dyn_fld_name: GET_STRING(ptr, field); break; @@ -1938,7 +1938,7 @@ static void revoke( GBL gbl, UCHAR ** ptr) GET_STRING(ptr, user); break; - case gds__dyn_grant_user: + case gds_dyn_grant_user: GET_STRING(ptr, user); if (DYN_is_it_sql_role(gbl, user, dummy_name, tdbb)) { user_type = obj_sql_role; @@ -1962,22 +1962,22 @@ static void revoke( GBL gbl, UCHAR ** ptr) } break; - case gds__dyn_grant_proc: + case gds_dyn_grant_proc: user_type = obj_procedure; GET_STRING(ptr, user); break; - case gds__dyn_grant_trig: + case gds_dyn_grant_trig: user_type = obj_trigger; GET_STRING(ptr, user); break; - case gds__dyn_grant_view: + case gds_dyn_grant_view: user_type = obj_view; GET_STRING(ptr, user); break; - case gds__dyn_grant_options: + case gds_dyn_grant_options: options = DYN_get_number(ptr); break; diff --git a/src/jrd/dyn_def.e b/src/jrd/dyn_def.epp similarity index 91% rename from src/jrd/dyn_def.e rename to src/jrd/dyn_def.epp index 3eb63de9f2..218efcd88a 100644 --- a/src/jrd/dyn_def.e +++ b/src/jrd/dyn_def.epp @@ -81,7 +81,7 @@ DATABASE DB = STATIC "yachts.gdb"; -static CONST SCHAR who_blr[] = +static CONST UCHAR who_blr[] = { blr_version5, blr_begin, @@ -187,11 +187,11 @@ void DYN_define_cache( GBL gbl, UCHAR ** ptr) X.RDB$FILE_START.NULL = FALSE; X.RDB$FILE_LENGTH.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_file_length: + case gds_dyn_file_length: X.RDB$FILE_LENGTH = DYN_get_number(ptr); X.RDB$FILE_LENGTH.NULL = FALSE; break; @@ -297,27 +297,27 @@ void DYN_define_constraint( switch (verb = *(*ptr)++) { - case gds__dyn_def_primary_key: + case gds_dyn_def_primary_key: strcpy(CRT.RDB$CONSTRAINT_TYPE, PRIMARY_KEY); break; - case gds__dyn_def_foreign_key: + case gds_dyn_def_foreign_key: foreign_flag = TRUE; strcpy(CRT.RDB$CONSTRAINT_TYPE, FOREIGN_KEY); DYN_terminate(CRT.RDB$CONSTRAINT_NAME, sizeof(CRT.RDB$CONSTRAINT_NAME)); break; - case gds__dyn_def_unique: + case gds_dyn_def_unique: strcpy(CRT.RDB$CONSTRAINT_TYPE, UNIQUE_CNSTRT); break; - case gds__dyn_def_trigger: + case gds_dyn_def_trigger: strcpy(CRT.RDB$CONSTRAINT_TYPE, CHECK_CNSTRT); CRT.RDB$INDEX_NAME.NULL = TRUE; break; - case gds__dyn_fld_not_null: + case gds_dyn_fld_not_null: strcpy(CRT.RDB$CONSTRAINT_TYPE, NOT_NULL_CNSTRT); CRT.RDB$INDEX_NAME.NULL = TRUE; break; @@ -326,7 +326,7 @@ void DYN_define_constraint( DYN_unsupported_verb(); } - if (verb != gds__dyn_def_trigger && verb != gds__dyn_fld_not_null) { + if (verb != gds_dyn_def_trigger && verb != gds_dyn_fld_not_null) { referred_index_name[0] = 0; DYN_define_index(gbl, ptr, relation_name, verb, index_name, referred_index_name, constraint_name, @@ -344,25 +344,25 @@ void DYN_define_constraint( if (!DYN_REQUEST(drq_s_rel_con)) DYN_REQUEST(drq_s_rel_con) = request; - if (verb == gds__dyn_def_trigger) { + if (verb == gds_dyn_def_trigger) { tdbb->tdbb_setjmp = (UCHAR *) old_env; do { DYN_define_trigger(gbl, ptr, relation_name, trigger_name, FALSE); DYN_UTIL_store_check_constraints(tdbb, gbl, constraint_name, trigger_name); - } while ((verb = *(*ptr)++) == gds__dyn_def_trigger); + } while ((verb = *(*ptr)++) == gds_dyn_def_trigger); - if (verb != gds__dyn_end) + if (verb != gds_dyn_end) DYN_unsupported_verb(); return; } - if (verb == gds__dyn_fld_not_null) { + if (verb == gds_dyn_fld_not_null) { tdbb->tdbb_setjmp = (UCHAR *) old_env; DYN_UTIL_store_check_constraints(tdbb, gbl, constraint_name, field_name); - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_unsupported_verb(); return; } @@ -401,7 +401,7 @@ void DYN_define_constraint( unique_count++; str = (STR) ALLOCDV(type_str, sizeof(IDS.RDB$FIELD_NAME) - 1); - strcpy(str->str_data, IDS.RDB$FIELD_NAME); + strcpy((char*)str->str_data, IDS.RDB$FIELD_NAME); LLS_PUSH(str, &field_list); END_FOR; if (!DYN_REQUEST(drq_c_unq_nam)) @@ -468,7 +468,7 @@ void DYN_define_constraint( if (list_ptr) { if (strcmp - (((STR) list_ptr->lls_object)->str_data, + ((char*)((STR) list_ptr->lls_object)->str_data, IDS.RDB$FIELD_NAME)) found = FALSE; list_ptr = list_ptr->lls_next; } @@ -593,20 +593,20 @@ void DYN_define_dimension( if (field_name) strcpy(DIM.RDB$FIELD_NAME, field_name); - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_fld_name: + case gds_dyn_fld_name: GET_STRING(ptr, DIM.RDB$FIELD_NAME); break; - case gds__dyn_dim_upper: + case gds_dyn_dim_upper: DIM.RDB$UPPER_BOUND = DYN_get_number(ptr); DIM.RDB$UPPER_BOUND.NULL = FALSE; break; - case gds__dyn_dim_lower: + case gds_dyn_dim_lower: DIM.RDB$LOWER_BOUND = DYN_get_number(ptr); DIM.RDB$LOWER_BOUND.NULL = FALSE; break; @@ -614,7 +614,7 @@ void DYN_define_dimension( default: --(*ptr); DYN_execute(gbl, ptr, relation_name, field_name, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } } @@ -663,17 +663,17 @@ void DYN_define_exception( GBL gbl, UCHAR ** ptr) X IN RDB$EXCEPTIONS GET_STRING(ptr, X.RDB$EXCEPTION_NAME); X.RDB$MESSAGE.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_xcp_msg: + case gds_dyn_xcp_msg: GET_STRING_2(ptr, X.RDB$MESSAGE); X.RDB$MESSAGE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_xcp_msg2: + case gds_dyn_xcp_msg2: DYN_get_string2(ptr, X.RDB$MESSAGE, sizeof(X.RDB$MESSAGE)); X.RDB$MESSAGE.NULL = FALSE; break; @@ -753,7 +753,7 @@ void DYN_define_file( GET_STRING(ptr, temp_f1); ISC_expand_filename(temp_f1, 0, temp_f); - if (!strcmp(dbb->dbb_filename->str_data, temp_f)) + if (!strcmp((char*)dbb->dbb_filename->str_data, temp_f)) DYN_error_punt(FALSE, 166, NULL, NULL, NULL, NULL, NULL); FOR(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) @@ -771,29 +771,29 @@ void DYN_define_file( X.RDB$FILE_FLAGS.NULL = FALSE; X.RDB$FILE_START.NULL = TRUE; X.RDB$FILE_LENGTH.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_file_start: + case gds_dyn_file_start: temp = DYN_get_number(ptr); *start = MAX(*start, temp); X.RDB$FILE_START = *start; X.RDB$FILE_START.NULL = FALSE; break; - case gds__dyn_file_length: + case gds_dyn_file_length: X.RDB$FILE_LENGTH = DYN_get_number(ptr); X.RDB$FILE_LENGTH.NULL = FALSE; break; - case gds__dyn_shadow_man_auto: + case gds_dyn_shadow_man_auto: man_auto = (USHORT)DYN_get_number(ptr); if (man_auto) X.RDB$FILE_FLAGS |= FILE_manual; break; - case gds__dyn_shadow_conditional: + case gds_dyn_shadow_conditional: if (DYN_get_number(ptr)) X.RDB$FILE_FLAGS |= FILE_conditional; break; @@ -846,37 +846,37 @@ void DYN_define_filter( GBL gbl, UCHAR ** ptr) X.RDB$MODULE_NAME.NULL = TRUE; X.RDB$ENTRYPOINT.NULL = TRUE; X.RDB$DESCRIPTION.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_filter_in_subtype: + case gds_dyn_filter_in_subtype: X.RDB$INPUT_SUB_TYPE = (SSHORT)DYN_get_number(ptr); X.RDB$INPUT_SUB_TYPE.NULL = FALSE; break; - case gds__dyn_filter_out_subtype: + case gds_dyn_filter_out_subtype: X.RDB$OUTPUT_SUB_TYPE = (SSHORT)DYN_get_number(ptr); X.RDB$OUTPUT_SUB_TYPE.NULL = FALSE; break; - case gds__dyn_func_module_name: + case gds_dyn_func_module_name: GET_STRING(ptr, X.RDB$MODULE_NAME); X.RDB$MODULE_NAME.NULL = FALSE; break; - case gds__dyn_func_entry_point: + case gds_dyn_func_entry_point: GET_STRING(ptr, X.RDB$ENTRYPOINT); X.RDB$ENTRYPOINT.NULL = FALSE; break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; break; @@ -936,11 +936,11 @@ void DYN_define_function( GBL gbl, UCHAR ** ptr) X.RDB$MODULE_NAME.NULL = TRUE; X.RDB$ENTRYPOINT.NULL = TRUE; X.RDB$DESCRIPTION.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_func_return_argument: + case gds_dyn_func_return_argument: X.RDB$RETURN_ARGUMENT = (SSHORT)DYN_get_number(ptr); X.RDB$RETURN_ARGUMENT.NULL = FALSE; if (X.RDB$RETURN_ARGUMENT > MAX_UDF_ARGUMENTS) @@ -948,28 +948,28 @@ void DYN_define_function( GBL gbl, UCHAR ** ptr) /* msg 10: "DEFINE FUNCTION failed" */ break; - case gds__dyn_func_module_name: + case gds_dyn_func_module_name: GET_STRING(ptr, X.RDB$MODULE_NAME); X.RDB$MODULE_NAME.NULL = FALSE; break; - case gds__dyn_fld_query_name: + case gds_dyn_fld_query_name: GET_STRING(ptr, X.RDB$QUERY_NAME); X.RDB$QUERY_NAME.NULL = FALSE; break; - case gds__dyn_func_entry_point: + case gds_dyn_func_entry_point: GET_STRING(ptr, X.RDB$ENTRYPOINT); X.RDB$ENTRYPOINT.NULL = FALSE; break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; break; @@ -977,8 +977,8 @@ void DYN_define_function( GBL gbl, UCHAR ** ptr) default: --(*ptr); - DYN_execute(gbl, ptr, NULL_PTR, NULL_PTR, - NULL_PTR, X.RDB$FUNCTION_NAME, NULL_PTR); + DYN_execute(gbl, ptr, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, + (TEXT*)NULL_PTR, X.RDB$FUNCTION_NAME, (TEXT*)NULL_PTR); } } @@ -1055,40 +1055,40 @@ void DYN_define_function_arg(GBL gbl, UCHAR** ptr, TEXT* function_name) X.RDB$FIELD_SUB_TYPE.NULL = TRUE; X.RDB$CHARACTER_SET_ID.NULL = TRUE; X.RDB$FIELD_PRECISION.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_function_name: + case gds_dyn_function_name: GET_STRING(ptr, X.RDB$FUNCTION_NAME); X.RDB$FUNCTION_NAME.NULL = FALSE; break; - case gds__dyn_func_mechanism: + case gds_dyn_func_mechanism: X.RDB$MECHANISM = (SSHORT)DYN_get_number(ptr); X.RDB$MECHANISM.NULL = FALSE; break; - case gds__dyn_fld_type: + case gds_dyn_fld_type: X.RDB$FIELD_TYPE = (SSHORT)DYN_get_number(ptr); X.RDB$FIELD_TYPE.NULL = FALSE; break; - case gds__dyn_fld_sub_type: + case gds_dyn_fld_sub_type: X.RDB$FIELD_SUB_TYPE = (SSHORT)DYN_get_number(ptr); X.RDB$FIELD_SUB_TYPE.NULL = FALSE; break; - case gds__dyn_fld_scale: + case gds_dyn_fld_scale: X.RDB$FIELD_SCALE = (SSHORT)DYN_get_number(ptr); X.RDB$FIELD_SCALE.NULL = FALSE; break; - case gds__dyn_fld_length: + case gds_dyn_fld_length: X.RDB$FIELD_LENGTH = (SSHORT)DYN_get_number(ptr); X.RDB$FIELD_LENGTH.NULL = FALSE; break; - case gds__dyn_fld_character_set: + case gds_dyn_fld_character_set: X.RDB$CHARACTER_SET_ID = (SSHORT)DYN_get_number(ptr); X.RDB$CHARACTER_SET_ID.NULL = FALSE; break; @@ -1102,7 +1102,7 @@ void DYN_define_function_arg(GBL gbl, UCHAR** ptr, TEXT* function_name) * table has no place to store the information * But IB6/FB has the place for this information. CVC 2001. */ - case gds__dyn_fld_char_length: + case gds_dyn_fld_char_length: if (private_getODS() < ODS_10_0) { (void) DYN_get_number(ptr); @@ -1170,7 +1170,7 @@ void DYN_define_generator( GBL gbl, UCHAR ** ptr) tdbb->tdbb_setjmp = (UCHAR *) old_env; - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_error_punt(TRUE, 9, NULL, NULL, NULL, NULL, NULL); /* msg 9: "DEFINE GENERATOR unexpected dyn verb" */ } @@ -1280,7 +1280,7 @@ void DYN_define_role( GBL gbl, UCHAR ** ptr) if (!DYN_REQUEST(drq_role_gens)) DYN_REQUEST(drq_role_gens) = request; - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_error_punt(TRUE, 9, NULL, NULL, NULL, NULL, NULL); /* msg 9: "DEFINE ROLE unexpected dyn verb" */ @@ -1344,20 +1344,20 @@ void DYN_define_global_field( FLD.RDB$COLLATION_ID.NULL = TRUE; FLD.RDB$FIELD_PRECISION.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_system_flag: + case gds_dyn_system_flag: FLD.RDB$SYSTEM_FLAG = (SSHORT)DYN_get_number(ptr); FLD.RDB$SYSTEM_FLAG.NULL = FALSE; break; - case gds__dyn_fld_length: + case gds_dyn_fld_length: FLD.RDB$FIELD_LENGTH = (SSHORT)DYN_get_number(ptr); FLD.RDB$FIELD_LENGTH.NULL = FALSE; break; - case gds__dyn_fld_type: + case gds_dyn_fld_type: dtype = (USHORT)DYN_get_number(ptr); FLD.RDB$FIELD_TYPE = (SSHORT)dtype; switch (dtype) @@ -1390,7 +1390,7 @@ void DYN_define_global_field( } break; - case gds__dyn_fld_scale: + case gds_dyn_fld_scale: FLD.RDB$FIELD_SCALE = (SSHORT)DYN_get_number(ptr); FLD.RDB$FIELD_SCALE.NULL = FALSE; break; @@ -1400,128 +1400,128 @@ void DYN_define_global_field( FLD.RDB$FIELD_PRECISION.NULL = FALSE; break; - case gds__dyn_fld_sub_type: + case gds_dyn_fld_sub_type: FLD.RDB$FIELD_SUB_TYPE = (SSHORT)DYN_get_number(ptr); FLD.RDB$FIELD_SUB_TYPE.NULL = FALSE; break; - case gds__dyn_fld_char_length: + case gds_dyn_fld_char_length: FLD.RDB$CHARACTER_LENGTH = (SSHORT)DYN_get_number(ptr); FLD.RDB$CHARACTER_LENGTH.NULL = FALSE; break; - case gds__dyn_fld_character_set: + case gds_dyn_fld_character_set: FLD.RDB$CHARACTER_SET_ID = (SSHORT)DYN_get_number(ptr); FLD.RDB$CHARACTER_SET_ID.NULL = FALSE; break; - case gds__dyn_fld_collation: + case gds_dyn_fld_collation: FLD.RDB$COLLATION_ID = (SSHORT)DYN_get_number(ptr); FLD.RDB$COLLATION_ID.NULL = FALSE; break; - case gds__dyn_fld_segment_length: + case gds_dyn_fld_segment_length: FLD.RDB$SEGMENT_LENGTH = (SSHORT)DYN_get_number(ptr); FLD.RDB$SEGMENT_LENGTH.NULL = FALSE; break; - case gds__dyn_fld_query_name: + case gds_dyn_fld_query_name: GET_STRING(ptr, FLD.RDB$QUERY_NAME); FLD.RDB$QUERY_NAME.NULL = FALSE; break; - case gds__dyn_fld_query_header: + case gds_dyn_fld_query_header: DYN_put_blr_blob(gbl, ptr, &FLD.RDB$QUERY_HEADER); FLD.RDB$QUERY_HEADER.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_query_header2: + case gds_dyn_fld_query_header2: DYN_put_blr_blob2(gbl, ptr, &FLD.RDB$QUERY_HEADER); FLD.RDB$QUERY_HEADER.NULL = FALSE; break; #endif - case gds__dyn_fld_not_null: + case gds_dyn_fld_not_null: FLD.RDB$NULL_FLAG.NULL = FALSE; FLD.RDB$NULL_FLAG = TRUE; break; - case gds__dyn_fld_missing_value: + case gds_dyn_fld_missing_value: DYN_put_blr_blob(gbl, ptr, &FLD.RDB$MISSING_VALUE); FLD.RDB$MISSING_VALUE.NULL = FALSE; break; - case gds__dyn_fld_computed_blr: + case gds_dyn_fld_computed_blr: DYN_put_blr_blob(gbl, ptr, &FLD.RDB$COMPUTED_BLR); FLD.RDB$COMPUTED_BLR.NULL = FALSE; break; - case gds__dyn_fld_computed_source: + case gds_dyn_fld_computed_source: DYN_put_text_blob(gbl, ptr, &FLD.RDB$COMPUTED_SOURCE); FLD.RDB$COMPUTED_SOURCE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_computed_source2: + case gds_dyn_fld_computed_source2: DYN_put_text_blob2(gbl, ptr, &FLD.RDB$COMPUTED_SOURCE); FLD.RDB$COMPUTED_SOURCE.NULL = FALSE; break; #endif - case gds__dyn_fld_default_value: + case gds_dyn_fld_default_value: FLD.RDB$DEFAULT_VALUE.NULL = FALSE; DYN_put_blr_blob(gbl, ptr, &FLD.RDB$DEFAULT_VALUE); break; - case gds__dyn_fld_default_source: + case gds_dyn_fld_default_source: FLD.RDB$DEFAULT_SOURCE.NULL = FALSE; DYN_put_text_blob(gbl, ptr, &FLD.RDB$DEFAULT_SOURCE); break; - case gds__dyn_fld_validation_blr: + case gds_dyn_fld_validation_blr: DYN_put_blr_blob(gbl, ptr, &FLD.RDB$VALIDATION_BLR); FLD.RDB$VALIDATION_BLR.NULL = FALSE; break; - case gds__dyn_fld_validation_source: + case gds_dyn_fld_validation_source: DYN_put_text_blob(gbl, ptr, &FLD.RDB$VALIDATION_SOURCE); FLD.RDB$VALIDATION_SOURCE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_validation_source2: + case gds_dyn_fld_validation_source2: DYN_put_text_blob2(gbl, ptr, &FLD.RDB$VALIDATION_SOURCE); FLD.RDB$VALIDATION_SOURCE.NULL = FALSE; break; #endif - case gds__dyn_fld_edit_string: + case gds_dyn_fld_edit_string: GET_STRING(ptr, FLD.RDB$EDIT_STRING); FLD.RDB$EDIT_STRING.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_edit_string2: + case gds_dyn_fld_edit_string2: DYN_get_string2(ptr, FLD.RDB$EDIT_STRING, sizeof(FLD.RDB$EDIT_STRING)); FLD.RDB$EDIT_STRING.NULL = FALSE; break; #endif - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &FLD.RDB$DESCRIPTION); FLD.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &FLD.RDB$DESCRIPTION); FLD.RDB$DESCRIPTION.NULL = FALSE; break; #endif - case gds__dyn_fld_dimensions: + case gds_dyn_fld_dimensions: FLD.RDB$DIMENSIONS = (SSHORT)DYN_get_number(ptr); FLD.RDB$DIMENSIONS.NULL = FALSE; break; @@ -1531,7 +1531,7 @@ void DYN_define_global_field( --(*ptr); DYN_execute(gbl, ptr, relation_name, (field_name) ? field_name : FLD.RDB$FIELD_NAME, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } old_env = (JMP_BUF *) tdbb->tdbb_setjmp; @@ -1647,7 +1647,7 @@ void DYN_define_index(GBL gbl, strcpy(new_index_name, IDX.RDB$INDEX_NAME); if (relation_name) strcpy(IDX.RDB$RELATION_NAME, relation_name); - else if (*(*ptr)++ == gds__dyn_rel_name) + else if (*(*ptr)++ == gds_dyn_rel_name) GET_STRING(ptr, IDX.RDB$RELATION_NAME); else DYN_error_punt(FALSE, 14, NULL, NULL, NULL, NULL, NULL); @@ -1685,27 +1685,27 @@ void DYN_define_index(GBL gbl, request = (BLK) CMP_find_request(tdbb, drq_l_lfield, DYN_REQUESTS); id = drq_l_lfield; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_idx_unique: + case gds_dyn_idx_unique: IDX.RDB$UNIQUE_FLAG = (SSHORT)DYN_get_number(ptr); IDX.RDB$UNIQUE_FLAG.NULL = FALSE; break; - case gds__dyn_idx_inactive: + case gds_dyn_idx_inactive: IDX.RDB$INDEX_INACTIVE = (SSHORT)DYN_get_number(ptr); IDX.RDB$INDEX_INACTIVE.NULL = FALSE; break; - case gds__dyn_idx_type: + case gds_dyn_idx_type: IDX.RDB$INDEX_TYPE = (SSHORT)DYN_get_number(ptr); IDX.RDB$INDEX_TYPE.NULL = FALSE; break; - case gds__dyn_fld_name: + case gds_dyn_fld_name: str = (STR) ALLOCDV(type_str, field_name_size - 1); - DYN_get_string(ptr, str->str_data, field_name_size, TRUE); + DYN_get_string((TEXT**)ptr, (TEXT*)str->str_data, field_name_size, TRUE); LLS_PUSH(str, &seg_list); seg_count++; @@ -1790,12 +1790,12 @@ void DYN_define_index(GBL gbl, #ifdef EXPRESSION_INDICES /* for expression indices, store the BLR and the source string */ - case gds__dyn_fld_computed_blr: + case gds_dyn_fld_computed_blr: DYN_put_blr_blob(gbl, ptr, &IDX.RDB$EXPRESSION_BLR); IDX.RDB$EXPRESSION_BLR.NULL = FALSE; break; - case gds__dyn_fld_computed_source: + case gds_dyn_fld_computed_source: DYN_put_text_blob(gbl, ptr, &IDX.RDB$EXPRESSION_SOURCE); IDX.RDB$EXPRESSION_SOURCE.NULL = FALSE; break; @@ -1803,36 +1803,36 @@ void DYN_define_index(GBL gbl, /* for foreign keys, point to the corresponding relation */ - case gds__dyn_idx_foreign_key: + case gds_dyn_idx_foreign_key: GET_STRING(ptr, referenced_relation); break; - case gds__dyn_idx_ref_column: + case gds_dyn_idx_ref_column: str = (STR) ALLOCDV(type_str, field_name_size - 1); - DYN_get_string(ptr, str->str_data, field_name_size, TRUE); + DYN_get_string((TEXT**)ptr, (TEXT*)str->str_data, field_name_size, TRUE); LLS_PUSH(str, &field_list); referred_cols++; break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &IDX.RDB$DESCRIPTION); IDX.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &IDX.RDB$DESCRIPTION); IDX.RDB$DESCRIPTION.NULL = FALSE; break; #endif - case gds__dyn_foreign_key_delete: + case gds_dyn_foreign_key_delete: assert(ri_actionP != NULL); switch (verb = *(*ptr)++) { - case gds__dyn_foreign_key_cascade: + case gds_dyn_foreign_key_cascade: (*ri_actionP) |= FOR_KEY_DEL_CASCADE; - if ((verb = *(*ptr)++) == gds__dyn_def_trigger) + if ((verb = *(*ptr)++) == gds_dyn_def_trigger) { DYN_define_trigger(gbl, ptr, relation_name, trigger_name, TRUE); @@ -1842,9 +1842,9 @@ void DYN_define_index(GBL gbl, else DYN_unsupported_verb(); break; - case gds__dyn_foreign_key_null: + case gds_dyn_foreign_key_null: (*ri_actionP) |= FOR_KEY_DEL_NULL; - if ((verb = *(*ptr)++) == gds__dyn_def_trigger) + if ((verb = *(*ptr)++) == gds_dyn_def_trigger) { DYN_define_trigger(gbl, ptr, relation_name, trigger_name, TRUE); @@ -1854,9 +1854,9 @@ void DYN_define_index(GBL gbl, else DYN_unsupported_verb(); break; - case gds__dyn_foreign_key_default: + case gds_dyn_foreign_key_default: (*ri_actionP) |= FOR_KEY_DEL_DEFAULT; - if ((verb = *(*ptr)++) == gds__dyn_def_trigger) + if ((verb = *(*ptr)++) == gds_dyn_def_trigger) { DYN_define_trigger(gbl, ptr, relation_name, trigger_name, TRUE); @@ -1866,7 +1866,7 @@ void DYN_define_index(GBL gbl, else DYN_unsupported_verb(); break; - case gds__dyn_foreign_key_none: + case gds_dyn_foreign_key_none: (*ri_actionP) |= FOR_KEY_DEL_NONE; break; default: @@ -1875,13 +1875,13 @@ void DYN_define_index(GBL gbl, } break; - case gds__dyn_foreign_key_update: + case gds_dyn_foreign_key_update: assert(ri_actionP != NULL); switch (verb = *(*ptr)++) { - case gds__dyn_foreign_key_cascade: + case gds_dyn_foreign_key_cascade: (*ri_actionP) |= FOR_KEY_UPD_CASCADE; - if ((verb = *(*ptr)++) == gds__dyn_def_trigger) + if ((verb = *(*ptr)++) == gds_dyn_def_trigger) { DYN_define_trigger(gbl, ptr, relation_name, trigger_name, TRUE); @@ -1891,9 +1891,9 @@ void DYN_define_index(GBL gbl, else DYN_unsupported_verb(); break; - case gds__dyn_foreign_key_null: + case gds_dyn_foreign_key_null: (*ri_actionP) |= FOR_KEY_UPD_NULL; - if ((verb = *(*ptr)++) == gds__dyn_def_trigger) + if ((verb = *(*ptr)++) == gds_dyn_def_trigger) { DYN_define_trigger(gbl, ptr, relation_name, trigger_name, TRUE); @@ -1903,9 +1903,9 @@ void DYN_define_index(GBL gbl, else DYN_unsupported_verb(); break; - case gds__dyn_foreign_key_default: + case gds_dyn_foreign_key_default: (*ri_actionP) |= FOR_KEY_UPD_DEFAULT; - if ((verb = *(*ptr)++) == gds__dyn_def_trigger) + if ((verb = *(*ptr)++) == gds_dyn_def_trigger) { DYN_define_trigger(gbl, ptr, relation_name, trigger_name, TRUE); @@ -1915,7 +1915,7 @@ void DYN_define_index(GBL gbl, else DYN_unsupported_verb(); break; - case gds__dyn_foreign_key_none: + case gds_dyn_foreign_key_none: (*ri_actionP) |= FOR_KEY_UPD_NONE; break; default: @@ -1950,8 +1950,8 @@ void DYN_define_index(GBL gbl, str = (STR) LLS_POP(&seg_list); STORE(REQUEST_HANDLE request TRANSACTION_HANDLE gbl->gbl_transaction) X IN RDB$INDEX_SEGMENTS - strcpy(X.RDB$INDEX_NAME, IDX.RDB$INDEX_NAME); - strcpy(X.RDB$FIELD_NAME, str->str_data); + strcpy((char*)X.RDB$INDEX_NAME, (char*)IDX.RDB$INDEX_NAME); + strcpy(X.RDB$FIELD_NAME, (char*)str->str_data); X.RDB$FIELD_POSITION = --fld_count; ALL_release((FRB)str); END_STORE; @@ -2003,13 +2003,13 @@ void DYN_define_index(GBL gbl, to handle a new index, assuming it is the right one */ DYN_terminate(Y.RDB$INDEX_NAME, sizeof(Y.RDB$INDEX_NAME)); - if (strcmp(index_name, Y.RDB$INDEX_NAME)) { + if (strcmp((char*)index_name, (char*)Y.RDB$INDEX_NAME)) { if (list_ptr) found = FALSE; if (found) break; list_ptr = field_list; - strcpy(index_name, Y.RDB$INDEX_NAME); + strcpy((char*)index_name, (char*)Y.RDB$INDEX_NAME); found = TRUE; } @@ -2018,11 +2018,11 @@ void DYN_define_index(GBL gbl, if (list_ptr) { DYN_terminate(Z.RDB$FIELD_NAME, sizeof(Z.RDB$FIELD_NAME)); - DYN_terminate(((STR) list_ptr->lls_object)->str_data, + DYN_terminate((TEXT*)((STR) list_ptr->lls_object)->str_data, (int) ((STR) list_ptr->lls_object)-> str_length); - if (strcmp(((STR) list_ptr->lls_object)->str_data, - Z.RDB$FIELD_NAME)) + if (strcmp((char*)((STR) list_ptr->lls_object)->str_data, + (char*)Z.RDB$FIELD_NAME)) { found = FALSE; } @@ -2041,10 +2041,10 @@ void DYN_define_index(GBL gbl, found = FALSE; if (found) { - strcpy(IDX.RDB$FOREIGN_KEY, index_name); + strcpy((char*)IDX.RDB$FOREIGN_KEY, (char*)index_name); IDX.RDB$FOREIGN_KEY.NULL = FALSE; if (referred_index_name != NULL) - strcpy(referred_index_name, index_name); + strcpy(referred_index_name, (char*)index_name); } else DYN_error_punt(FALSE, 18, NULL, NULL, NULL, NULL, NULL); @@ -2184,150 +2184,150 @@ void DYN_define_local_field(GBL gbl, RFR.RDB$DEFAULT_SOURCE.NULL = TRUE; RFR.RDB$EDIT_STRING.NULL = TRUE; RFR.RDB$COLLATION_ID.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_rel_name: + case gds_dyn_rel_name: GET_STRING(ptr, RFR.RDB$RELATION_NAME); relation_name = RFR.RDB$RELATION_NAME; RFR.RDB$RELATION_NAME.NULL = FALSE; break; - case gds__dyn_fld_source: + case gds_dyn_fld_source: GET_STRING(ptr, RFR.RDB$FIELD_SOURCE); break; - case gds__dyn_fld_base_fld: + case gds_dyn_fld_base_fld: GET_STRING(ptr, RFR.RDB$BASE_FIELD); RFR.RDB$BASE_FIELD.NULL = FALSE; break; - case gds__dyn_fld_query_name: + case gds_dyn_fld_query_name: GET_STRING(ptr, RFR.RDB$QUERY_NAME); RFR.RDB$QUERY_NAME.NULL = FALSE; break; - case gds__dyn_fld_query_header: + case gds_dyn_fld_query_header: DYN_put_blr_blob(gbl, ptr, &RFR.RDB$QUERY_HEADER); RFR.RDB$QUERY_HEADER.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_query_header2: + case gds_dyn_fld_query_header2: DYN_put_blr_blob2(gbl, ptr, &RFR.RDB$QUERY_HEADER); RFR.RDB$QUERY_HEADER.NULL = FALSE; break; #endif - case gds__dyn_fld_edit_string: + case gds_dyn_fld_edit_string: GET_STRING(ptr, RFR.RDB$EDIT_STRING); RFR.RDB$EDIT_STRING.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_edit_string2: + case gds_dyn_fld_edit_string2: DYN_get_string2(ptr, RFR.RDB$EDIT_STRING, sizeof(RFR.RDB$EDIT_STRING)); RFR.RDB$EDIT_STRING.NULL = FALSE; break; #endif - case gds__dyn_fld_position: + case gds_dyn_fld_position: RFR.RDB$FIELD_POSITION = (SSHORT)DYN_get_number(ptr); RFR.RDB$FIELD_POSITION.NULL = FALSE; break; - case gds__dyn_system_flag: + case gds_dyn_system_flag: RFR.RDB$SYSTEM_FLAG = (SSHORT)DYN_get_number(ptr); RFR.RDB$SYSTEM_FLAG.NULL = FALSE; break; - case gds__dyn_fld_update_flag: - case gds__dyn_update_flag: + case gds_dyn_fld_update_flag: + case gds_dyn_update_flag: RFR.RDB$UPDATE_FLAG = (SSHORT)DYN_get_number(ptr); RFR.RDB$UPDATE_FLAG.NULL = FALSE; break; - case gds__dyn_view_context: + case gds_dyn_view_context: RFR.RDB$VIEW_CONTEXT = (SSHORT)DYN_get_number(ptr); RFR.RDB$VIEW_CONTEXT.NULL = FALSE; break; - case gds__dyn_security_class: + case gds_dyn_security_class: GET_STRING(ptr, RFR.RDB$SECURITY_CLASS); RFR.RDB$SECURITY_CLASS.NULL = FALSE; break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &RFR.RDB$DESCRIPTION); RFR.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &RFR.RDB$DESCRIPTION); RFR.RDB$DESCRIPTION.NULL = FALSE; break; #endif - case gds__dyn_fld_computed_blr: + case gds_dyn_fld_computed_blr: DYN_UTIL_generate_field_name(tdbb, gbl, RFR.RDB$FIELD_SOURCE); blr = *ptr; DYN_skip_attribute(ptr); break; - case gds__dyn_fld_computed_source: + case gds_dyn_fld_computed_source: source = (TEXT *) * ptr; DYN_skip_attribute(ptr); break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_computed_source2: + case gds_dyn_fld_computed_source2: source = (TEXT *) * ptr; DYN_skip_attribute2(ptr); break; #endif - case gds__dyn_fld_default_value: + case gds_dyn_fld_default_value: RFR.RDB$DEFAULT_VALUE.NULL = FALSE; DYN_put_blr_blob(gbl, ptr, &RFR.RDB$DEFAULT_VALUE); break; - case gds__dyn_fld_default_source: + case gds_dyn_fld_default_source: RFR.RDB$DEFAULT_SOURCE.NULL = FALSE; DYN_put_text_blob(gbl, ptr, &RFR.RDB$DEFAULT_SOURCE); break; - case gds__dyn_fld_not_null: + case gds_dyn_fld_not_null: RFR.RDB$NULL_FLAG.NULL = FALSE; RFR.RDB$NULL_FLAG = TRUE; break; - case gds__dyn_fld_type: + case gds_dyn_fld_type: dtype = (USHORT)DYN_get_number(ptr); break; - case gds__dyn_fld_length: + case gds_dyn_fld_length: length = (USHORT)DYN_get_number(ptr); lflag = TRUE; break; - case gds__dyn_fld_sub_type: + case gds_dyn_fld_sub_type: stype = (SSHORT)DYN_get_number(ptr); sflag = TRUE; break; - case gds__dyn_fld_char_length: + case gds_dyn_fld_char_length: clength = (USHORT)DYN_get_number(ptr); clflag = TRUE; break; - case gds__dyn_fld_segment_length: + case gds_dyn_fld_segment_length: stype = (SSHORT)DYN_get_number(ptr); slflag = TRUE; break; - case gds__dyn_fld_scale: + case gds_dyn_fld_scale: scale = (SSHORT)DYN_get_number(ptr); scflag = TRUE; break; @@ -2337,12 +2337,12 @@ void DYN_define_local_field(GBL gbl, prflag = TRUE; break; - case gds__dyn_fld_character_set: + case gds_dyn_fld_character_set: charset_id = (SSHORT)DYN_get_number(ptr); charset_id_flag = TRUE; break; - case gds__dyn_fld_collation: + case gds_dyn_fld_collation: RFR.RDB$COLLATION_ID.NULL = FALSE; RFR.RDB$COLLATION_ID = (SSHORT)DYN_get_number(ptr); break; @@ -2350,7 +2350,7 @@ void DYN_define_local_field(GBL gbl, default: --(*ptr); DYN_execute(gbl, ptr, relation_name, RFR.RDB$FIELD_SOURCE, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } if (RFR.RDB$FIELD_POSITION.NULL == TRUE) { @@ -2379,7 +2379,7 @@ void DYN_define_local_field(GBL gbl, DYN_put_text_blob2(gbl, &source, &FLD.RDB$COMPUTED_SOURCE); #else - DYN_put_text_blob(gbl, &source, &FLD.RDB$COMPUTED_SOURCE); + DYN_put_text_blob(gbl, (UCHAR**)&source, &FLD.RDB$COMPUTED_SOURCE); #endif /* (defined JPN_EUC || defined JPN_SJIS) */ } FLD.RDB$FIELD_TYPE = dtype; @@ -2537,36 +2537,36 @@ void DYN_define_log_file( X.RDB$FILE_FLAGS.NULL = FALSE; X.RDB$FILE_FLAGS = 0; GET_STRING(ptr, X.RDB$FILE_NAME); - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_file_length: + case gds_dyn_file_length: X.RDB$FILE_LENGTH = DYN_get_number(ptr); X.RDB$FILE_LENGTH.NULL = FALSE; break; - case gds__dyn_log_file_sequence: + case gds_dyn_log_file_sequence: X.RDB$FILE_SEQUENCE.NULL = FALSE; X.RDB$FILE_SEQUENCE = (SSHORT)DYN_get_number(ptr); break; - case gds__dyn_log_file_partitions: + case gds_dyn_log_file_partitions: X.RDB$FILE_PARTITIONS.NULL = FALSE; X.RDB$FILE_PARTITIONS = (SSHORT)DYN_get_number(ptr); break; - case gds__dyn_log_file_raw: + case gds_dyn_log_file_raw: X.RDB$FILE_FLAGS |= LOG_raw; break; - case gds__dyn_log_file_serial: + case gds_dyn_log_file_serial: X.RDB$FILE_FLAGS |= LOG_serial; #ifdef NETWARE_386 ISC_strip_extension(X.RDB$FILE_NAME); #endif break; - case gds__dyn_log_file_overflow: + case gds_dyn_log_file_overflow: X.RDB$FILE_FLAGS |= LOG_overflow; #ifdef NETWARE_386 ISC_strip_extension(X.RDB$FILE_NAME); @@ -2662,39 +2662,39 @@ void DYN_define_parameter( GBL gbl, UCHAR ** ptr, TEXT * procedure_name) P.RDB$SYSTEM_FLAG.NULL = TRUE; P.RDB$DESCRIPTION.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_system_flag: + case gds_dyn_system_flag: P.RDB$SYSTEM_FLAG = (SSHORT)DYN_get_number(ptr); P.RDB$SYSTEM_FLAG.NULL = FALSE; break; - case gds__dyn_prm_number: + case gds_dyn_prm_number: P.RDB$PARAMETER_NUMBER = (SSHORT)DYN_get_number(ptr); P.RDB$PARAMETER_NUMBER.NULL = FALSE; break; - case gds__dyn_prm_type: + case gds_dyn_prm_type: P.RDB$PARAMETER_TYPE = (SSHORT)DYN_get_number(ptr); P.RDB$PARAMETER_TYPE.NULL = FALSE; break; - case gds__dyn_prc_name: + case gds_dyn_prc_name: GET_STRING(ptr, P.RDB$PROCEDURE_NAME); P.RDB$PROCEDURE_NAME.NULL = FALSE; break; - case gds__dyn_fld_source: + case gds_dyn_fld_source: GET_STRING(ptr, P.RDB$FIELD_SOURCE); P.RDB$FIELD_SOURCE.NULL = FALSE; break; - case gds__dyn_fld_length: + case gds_dyn_fld_length: f_length = (USHORT)DYN_get_number(ptr); break; - case gds__dyn_fld_type: + case gds_dyn_fld_type: f_type = (USHORT)DYN_get_number(ptr); switch (f_type) { @@ -2724,7 +2724,7 @@ void DYN_define_parameter( GBL gbl, UCHAR ** ptr, TEXT * procedure_name) } break; - case gds__dyn_fld_scale: + case gds_dyn_fld_scale: f_scale = (SSHORT)DYN_get_number(ptr); f_scale_null = FALSE; break; @@ -2734,38 +2734,38 @@ void DYN_define_parameter( GBL gbl, UCHAR ** ptr, TEXT * procedure_name) f_precision_null = FALSE; break; - case gds__dyn_fld_sub_type: + case gds_dyn_fld_sub_type: f_subtype = (SSHORT)DYN_get_number(ptr); f_subtype_null = FALSE; break; - case gds__dyn_fld_char_length: + case gds_dyn_fld_char_length: f_charlength = (USHORT)DYN_get_number(ptr); f_charlength_null = FALSE; break; - case gds__dyn_fld_character_set: + case gds_dyn_fld_character_set: f_charset = (SSHORT)DYN_get_number(ptr); f_charset_null = FALSE; break; - case gds__dyn_fld_collation: + case gds_dyn_fld_collation: f_collation = (SSHORT)DYN_get_number(ptr); f_collation_null = FALSE; break; - case gds__dyn_fld_segment_length: + case gds_dyn_fld_segment_length: f_seg_length = (USHORT)DYN_get_number(ptr); f_seg_length_null = FALSE; break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &P.RDB$DESCRIPTION); P.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &P.RDB$DESCRIPTION); P.RDB$DESCRIPTION.NULL = FALSE; break; @@ -2773,8 +2773,8 @@ void DYN_define_parameter( GBL gbl, UCHAR ** ptr, TEXT * procedure_name) default: --(*ptr); - DYN_execute(gbl, ptr, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR, procedure_name); + DYN_execute(gbl, ptr, (TEXT*)NULL_PTR, + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, procedure_name); } if (P.RDB$FIELD_SOURCE.NULL) { /* Need to store dummy global field */ @@ -2892,59 +2892,59 @@ void DYN_define_procedure( GBL gbl, UCHAR ** ptr) P.RDB$PROCEDURE_INPUTS.NULL = TRUE; P.RDB$PROCEDURE_OUTPUTS.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_system_flag: + case gds_dyn_system_flag: P.RDB$SYSTEM_FLAG = (SSHORT)DYN_get_number(ptr); P.RDB$SYSTEM_FLAG.NULL = FALSE; break; - case gds__dyn_prc_blr: + case gds_dyn_prc_blr: P.RDB$PROCEDURE_BLR.NULL = FALSE; DYN_put_blr_blob(gbl, ptr, &P.RDB$PROCEDURE_BLR); break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &P.RDB$DESCRIPTION); P.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &P.RDB$DESCRIPTION); P.RDB$DESCRIPTION.NULL = FALSE; break; #endif - case gds__dyn_prc_source: + case gds_dyn_prc_source: DYN_put_text_blob(gbl, ptr, &P.RDB$PROCEDURE_SOURCE); P.RDB$PROCEDURE_SOURCE.NULL = FALSE; break; - case gds__dyn_prc_inputs: + case gds_dyn_prc_inputs: P.RDB$PROCEDURE_INPUTS = (SSHORT)DYN_get_number(ptr); P.RDB$PROCEDURE_INPUTS.NULL = FALSE; break; - case gds__dyn_prc_outputs: + case gds_dyn_prc_outputs: P.RDB$PROCEDURE_OUTPUTS = (SSHORT)DYN_get_number(ptr); P.RDB$PROCEDURE_OUTPUTS.NULL = FALSE; break; - case gds__dyn_security_class: + case gds_dyn_security_class: GET_STRING(ptr, P.RDB$SECURITY_CLASS); P.RDB$SECURITY_CLASS.NULL = FALSE; break; - case gds__dyn_rel_sql_protection: + case gds_dyn_rel_sql_protection: sql_prot = (USHORT)DYN_get_number(ptr); break; default: --(*ptr); DYN_execute(gbl, ptr, - NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, procedure_name); } @@ -3062,54 +3062,54 @@ void DYN_define_relation( GBL gbl, UCHAR ** ptr) REL.RDB$FLAGS = 0; REL.RDB$FLAGS.NULL = FALSE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_system_flag: + case gds_dyn_system_flag: REL.RDB$SYSTEM_FLAG = DYN_get_number(ptr); REL.RDB$SYSTEM_FLAG.NULL = FALSE; break; - case gds__dyn_sql_object: + case gds_dyn_sql_object: REL.RDB$FLAGS |= REL_sql; break; - case gds__dyn_view_blr: + case gds_dyn_view_blr: REL.RDB$VIEW_BLR.NULL = FALSE; is_a_view = TRUE; DYN_put_blr_blob(gbl, ptr, &REL.RDB$VIEW_BLR); break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &REL.RDB$DESCRIPTION); REL.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &REL.RDB$DESCRIPTION); REL.RDB$DESCRIPTION.NULL = FALSE; break; #endif - case gds__dyn_view_source: + case gds_dyn_view_source: DYN_put_text_blob(gbl, ptr, &REL.RDB$VIEW_SOURCE); REL.RDB$VIEW_SOURCE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_view_source2: + case gds_dyn_view_source2: DYN_put_text_blob2(gbl, ptr, &REL.RDB$VIEW_SOURCE); REL.RDB$VIEW_SOURCE.NULL = FALSE; break; #endif - case gds__dyn_security_class: + case gds_dyn_security_class: GET_STRING(ptr, REL.RDB$SECURITY_CLASS); REL.RDB$SECURITY_CLASS.NULL = FALSE; break; - case gds__dyn_rel_ext_file: + case gds_dyn_rel_ext_file: GET_STRING(ptr, REL.RDB$EXTERNAL_FILE); if (ISC_check_if_remote(REL.RDB$EXTERNAL_FILE, FALSE)) DYN_error_punt(TRUE, 163, NULL, NULL, NULL, NULL, NULL); @@ -3119,7 +3119,7 @@ void DYN_define_relation( GBL gbl, UCHAR ** ptr) REL.RDB$EXTERNAL_FILE.NULL = FALSE; break; - case gds__dyn_rel_sql_protection: + case gds_dyn_rel_sql_protection: REL.RDB$FLAGS |= REL_sql; sql_prot = DYN_get_number(ptr); break; @@ -3127,7 +3127,7 @@ void DYN_define_relation( GBL gbl, UCHAR ** ptr) default: --(*ptr); DYN_execute(gbl, ptr, REL.RDB$RELATION_NAME, field_name, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } if (sql_prot) { @@ -3160,7 +3160,7 @@ void DYN_define_relation( GBL gbl, UCHAR ** ptr) if (!(priv & SCL_read)) { s = tdbb->tdbb_status_vector; *s++ = gds_arg_gds; - *s++ = gds__no_priv; + *s++ = gds_no_priv; *s++ = gds_arg_string; *s++ = (STATUS) "SELECT"; /* Non-Translatable */ *s++ = gds_arg_string; @@ -3241,21 +3241,21 @@ void DYN_define_security_class( GBL gbl, UCHAR ** ptr) GET_STRING(ptr, SC.RDB$SECURITY_CLASS); SC.RDB$ACL.NULL = TRUE; SC.RDB$DESCRIPTION.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_scl_acl: + case gds_dyn_scl_acl: DYN_put_blr_blob(gbl, ptr, &SC.RDB$ACL); SC.RDB$ACL.NULL = FALSE; break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &SC.RDB$DESCRIPTION); SC.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &SC.RDB$DESCRIPTION); SC.RDB$DESCRIPTION.NULL = FALSE; break; @@ -3381,100 +3381,100 @@ void DYN_define_sql_field(GBL gbl, DYN_UTIL_generate_field_name(tdbb, gbl, RFR.RDB$FIELD_SOURCE); strcpy(FLD.RDB$FIELD_NAME, RFR.RDB$FIELD_SOURCE); - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_rel_name: + case gds_dyn_rel_name: GET_STRING(ptr, RFR.RDB$RELATION_NAME); break; - case gds__dyn_fld_query_name: + case gds_dyn_fld_query_name: GET_STRING(ptr, RFR.RDB$QUERY_NAME); RFR.RDB$QUERY_NAME.NULL = FALSE; break; - case gds__dyn_fld_edit_string: + case gds_dyn_fld_edit_string: GET_STRING(ptr, RFR.RDB$EDIT_STRING); RFR.RDB$EDIT_STRING.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_edit_string2: + case gds_dyn_fld_edit_string2: DYN_get_string2(ptr, RFR.RDB$EDIT_STRING, sizeof(RFR.RDB$EDIT_STRING)); RFR.RDB$EDIT_STRING.NULL = FALSE; break; #endif - case gds__dyn_fld_position: + case gds_dyn_fld_position: RFR.RDB$FIELD_POSITION = DYN_get_number(ptr); RFR.RDB$FIELD_POSITION.NULL = FALSE; break; - case gds__dyn_view_context: + case gds_dyn_view_context: RFR.RDB$VIEW_CONTEXT = DYN_get_number(ptr); RFR.RDB$VIEW_CONTEXT.NULL = FALSE; break; - case gds__dyn_system_flag: + case gds_dyn_system_flag: RFR.RDB$SYSTEM_FLAG = FLD.RDB$SYSTEM_FLAG = DYN_get_number(ptr); RFR.RDB$SYSTEM_FLAG.NULL = FLD.RDB$SYSTEM_FLAG.NULL = FALSE; break; - case gds__dyn_update_flag: + case gds_dyn_update_flag: RFR.RDB$UPDATE_FLAG = DYN_get_number(ptr); RFR.RDB$UPDATE_FLAG.NULL = FALSE; break; - case gds__dyn_fld_length: + case gds_dyn_fld_length: FLD.RDB$FIELD_LENGTH = DYN_get_number(ptr); break; - case gds__dyn_fld_computed_blr: + case gds_dyn_fld_computed_blr: FLD.RDB$COMPUTED_BLR.NULL = FALSE; DYN_put_blr_blob(gbl, ptr, &FLD.RDB$COMPUTED_BLR); break; - case gds__dyn_fld_computed_source: + case gds_dyn_fld_computed_source: FLD.RDB$COMPUTED_SOURCE.NULL = FALSE; DYN_put_text_blob(gbl, ptr, &FLD.RDB$COMPUTED_SOURCE); break; - case gds__dyn_fld_default_value: + case gds_dyn_fld_default_value: RFR.RDB$DEFAULT_VALUE.NULL = FALSE; DYN_put_blr_blob(gbl, ptr, &RFR.RDB$DEFAULT_VALUE); break; - case gds__dyn_fld_default_source: + case gds_dyn_fld_default_source: RFR.RDB$DEFAULT_SOURCE.NULL = FALSE; DYN_put_text_blob(gbl, ptr, &RFR.RDB$DEFAULT_SOURCE); break; - case gds__dyn_fld_validation_blr: + case gds_dyn_fld_validation_blr: FLD.RDB$VALIDATION_BLR.NULL = FALSE; DYN_put_blr_blob(gbl, ptr, &FLD.RDB$VALIDATION_BLR); break; - case gds__dyn_fld_not_null: + case gds_dyn_fld_not_null: RFR.RDB$NULL_FLAG.NULL = FALSE; RFR.RDB$NULL_FLAG = TRUE; break; - case gds__dyn_fld_query_header: + case gds_dyn_fld_query_header: DYN_put_blr_blob(gbl, ptr, &RFR.RDB$QUERY_HEADER); RFR.RDB$QUERY_HEADER.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_query_header2: + case gds_dyn_fld_query_header2: DYN_put_blr_blob2(gbl, ptr, &RFR.RDB$QUERY_HEADER); RFR.RDB$QUERY_HEADER.NULL = FALSE; break; #endif - case gds__dyn_fld_type: + case gds_dyn_fld_type: FLD.RDB$FIELD_TYPE = dtype = DYN_get_number(ptr); switch (dtype) { @@ -3504,7 +3504,7 @@ void DYN_define_sql_field(GBL gbl, } break; - case gds__dyn_fld_scale: + case gds_dyn_fld_scale: FLD.RDB$FIELD_SCALE = DYN_get_number(ptr); FLD.RDB$FIELD_SCALE.NULL = FALSE; break; @@ -3514,22 +3514,22 @@ void DYN_define_sql_field(GBL gbl, FLD.RDB$FIELD_PRECISION.NULL = FALSE; break; - case gds__dyn_fld_sub_type: + case gds_dyn_fld_sub_type: FLD.RDB$FIELD_SUB_TYPE = DYN_get_number(ptr); FLD.RDB$FIELD_SUB_TYPE.NULL = FALSE; break; - case gds__dyn_fld_char_length: + case gds_dyn_fld_char_length: FLD.RDB$CHARACTER_LENGTH = DYN_get_number(ptr); FLD.RDB$CHARACTER_LENGTH.NULL = FALSE; break; - case gds__dyn_fld_character_set: + case gds_dyn_fld_character_set: FLD.RDB$CHARACTER_SET_ID = DYN_get_number(ptr); FLD.RDB$CHARACTER_SET_ID.NULL = FALSE; break; - case gds__dyn_fld_collation: + case gds_dyn_fld_collation: /* Note: the global field's collation is not set, just * the local field. There is no full "domain" * created for the local field. @@ -3539,12 +3539,12 @@ void DYN_define_sql_field(GBL gbl, RFR.RDB$COLLATION_ID.NULL = FALSE; break; - case gds__dyn_fld_dimensions: + case gds_dyn_fld_dimensions: FLD.RDB$DIMENSIONS = DYN_get_number(ptr); FLD.RDB$DIMENSIONS.NULL = FALSE; break; - case gds__dyn_fld_segment_length: + case gds_dyn_fld_segment_length: FLD.RDB$SEGMENT_LENGTH = DYN_get_number(ptr); FLD.RDB$SEGMENT_LENGTH.NULL = FALSE; break; @@ -3552,7 +3552,7 @@ void DYN_define_sql_field(GBL gbl, default: --(*ptr); DYN_execute(gbl, ptr, relation_name, RFR.RDB$FIELD_SOURCE, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } if (RFR.RDB$FIELD_POSITION.NULL == TRUE) { @@ -3636,11 +3636,11 @@ void DYN_define_shadow( GBL gbl, UCHAR ** ptr) /* msg 165: "Shadow %ld already exists" */ start = 0; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_def_file: + case gds_dyn_def_file: DYN_define_file(gbl, ptr, shadow_number, &start, 157); break; @@ -3723,47 +3723,47 @@ void DYN_define_trigger( X.RDB$TRIGGER_SOURCE.NULL = TRUE; X.RDB$DESCRIPTION.NULL = TRUE; strcpy(X.RDB$TRIGGER_NAME, t); - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_trg_type: + case gds_dyn_trg_type: X.RDB$TRIGGER_TYPE = DYN_get_number(ptr); X.RDB$TRIGGER_TYPE.NULL = FALSE; break; - case gds__dyn_sql_object: + case gds_dyn_sql_object: X.RDB$FLAGS |= TRG_sql; break; - case gds__dyn_trg_sequence: + case gds_dyn_trg_sequence: X.RDB$TRIGGER_SEQUENCE = DYN_get_number(ptr); break; - case gds__dyn_trg_inactive: + case gds_dyn_trg_inactive: X.RDB$TRIGGER_INACTIVE = DYN_get_number(ptr); break; - case gds__dyn_rel_name: + case gds_dyn_rel_name: GET_STRING(ptr, X.RDB$RELATION_NAME); X.RDB$RELATION_NAME.NULL = FALSE; break; - case gds__dyn_trg_blr: + case gds_dyn_trg_blr: blr = *ptr; DYN_skip_attribute(ptr); DYN_put_blr_blob(gbl, &blr, &X.RDB$TRIGGER_BLR); X.RDB$TRIGGER_BLR.NULL = FALSE; break; - case gds__dyn_trg_source: + case gds_dyn_trg_source: source = (TEXT *) * ptr; DYN_skip_attribute(ptr); - DYN_put_text_blob(gbl, &source, &X.RDB$TRIGGER_SOURCE); + DYN_put_text_blob(gbl, (UCHAR**)&source, &X.RDB$TRIGGER_SOURCE); X.RDB$TRIGGER_SOURCE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_trg_source2: + case gds_dyn_trg_source2: source = (TEXT *) * ptr; DYN_skip_attribute2(ptr); DYN_put_text_blob2(gbl, &source, &X.RDB$TRIGGER_SOURCE); @@ -3771,13 +3771,13 @@ void DYN_define_trigger( break; #endif - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; break; @@ -3785,8 +3785,8 @@ void DYN_define_trigger( default: --(*ptr); - DYN_execute(gbl, ptr, X.RDB$RELATION_NAME, NULL_PTR, - t, NULL_PTR, NULL_PTR); + DYN_execute(gbl, ptr, X.RDB$RELATION_NAME, (TEXT*)NULL_PTR, + t, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } old_env = (JMP_BUF *) tdbb->tdbb_setjmp; @@ -3853,21 +3853,21 @@ void DYN_define_trigger_msg( GBL gbl, UCHAR ** ptr, TEXT * trigger_name) } else X.RDB$TRIGGER_NAME.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_trg_name: + case gds_dyn_trg_name: GET_STRING(ptr, X.RDB$TRIGGER_NAME); X.RDB$TRIGGER_NAME.NULL = FALSE; break; - case gds__dyn_trg_msg: + case gds_dyn_trg_msg: GET_STRING(ptr, X.RDB$MESSAGE); X.RDB$MESSAGE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_trg_msg2: + case gds_dyn_trg_msg2: DYN_get_string2(ptr, X.RDB$MESSAGE, sizeof(X.RDB$MESSAGE)); X.RDB$MESSAGE.NULL = FALSE; break; @@ -3924,23 +3924,23 @@ void DYN_define_view_relation( GBL gbl, UCHAR ** ptr, TEXT * view) GET_STRING(ptr, VRL.RDB$RELATION_NAME); VRL.RDB$CONTEXT_NAME.NULL = TRUE; VRL.RDB$VIEW_CONTEXT.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_view_context: + case gds_dyn_view_context: VRL.RDB$VIEW_CONTEXT = DYN_get_number(ptr); VRL.RDB$VIEW_CONTEXT.NULL = FALSE; break; - case gds__dyn_view_context_name: + case gds_dyn_view_context_name: GET_STRING(ptr, VRL.RDB$CONTEXT_NAME); VRL.RDB$CONTEXT_NAME.NULL = FALSE; break; default: --(*ptr); - DYN_execute(gbl, ptr, VRL.RDB$RELATION_NAME, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR); + DYN_execute(gbl, ptr, VRL.RDB$RELATION_NAME, (TEXT*)NULL_PTR, + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } old_env = (JMP_BUF *) tdbb->tdbb_setjmp; @@ -4130,8 +4130,8 @@ static BOOLEAN get_who( TDBB tdbb, GBL gbl, SCHAR * name) { request = (BLK) CMP_compile2(tdbb, who_blr, TRUE); } - EXE_start(tdbb, request, gbl->gbl_transaction); - EXE_receive(tdbb, request, 0, 32, name); + EXE_start(tdbb, (REQ) request, gbl->gbl_transaction); + EXE_receive(tdbb, (REQ) request, 0, 32, (UCHAR*)name); DYN_rundown_request(old_env, request, drq_l_user_name); diff --git a/src/jrd/dyn_del.e b/src/jrd/dyn_del.epp similarity index 97% rename from src/jrd/dyn_del.e rename to src/jrd/dyn_del.epp index 2a2d376131..164b00d103 100644 --- a/src/jrd/dyn_del.e +++ b/src/jrd/dyn_del.epp @@ -51,6 +51,7 @@ #include "../jrd/inf_proto.h" #include "../jrd/intl_proto.h" #include "../jrd/isc_f_proto.h" +#include "../jrd/met_proto.h" #include "../jrd/thd_proto.h" #include "../jrd/vio_proto.h" @@ -90,7 +91,7 @@ void DYN_delete_constraint( GBL gbl, UCHAR ** ptr, TEXT * relation) if (relation) strcpy(rel_name, relation); - else if (*(*ptr)++ != gds__dyn_rel_name) { + else if (*(*ptr)++ != gds_dyn_rel_name) { DYN_error_punt(FALSE, 128, NULL, NULL, NULL, NULL, NULL); /* msg 128: "No relation specified in delete_constraint" */ } @@ -130,9 +131,9 @@ void DYN_delete_dimensions( delete_dimension_records(gbl, f); - while (*(*ptr)++ != gds__dyn_end) { + while (*(*ptr)++ != gds_dyn_end) { --(*ptr); - DYN_execute(gbl, ptr, NULL_PTR, f, NULL_PTR, NULL_PTR, NULL_PTR); + DYN_execute(gbl, ptr, (TEXT*)NULL_PTR, f, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } } @@ -248,7 +249,7 @@ void DYN_delete_filter( GBL gbl, UCHAR ** ptr) DYN_error_punt(FALSE, 37, NULL, NULL, NULL, NULL, NULL); /* msg 37: "Blob Filter not found" */ - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_unsupported_verb(); } @@ -325,7 +326,7 @@ void DYN_delete_function( GBL gbl, UCHAR ** ptr) DYN_error_punt(FALSE, 41, NULL, NULL, NULL, NULL, NULL); /* msg 41: "Function not found" */ - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_unsupported_verb(); } @@ -410,9 +411,9 @@ void DYN_delete_global_field( GBL gbl, UCHAR ** ptr) /* msg 46: "Field not found" */ } - while (*(*ptr)++ != gds__dyn_end) { + while (*(*ptr)++ != gds_dyn_end) { --(*ptr); - DYN_execute(gbl, ptr, NULL_PTR, f, NULL_PTR, NULL_PTR, NULL_PTR); + DYN_execute(gbl, ptr, (TEXT*)NULL_PTR, f, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } } @@ -476,9 +477,9 @@ void DYN_delete_index( GBL gbl, UCHAR ** ptr) DYN_error_punt(FALSE, 50, NULL, NULL, NULL, NULL, NULL); /* msg 50: "No segments found for index" */ - while (*(*ptr)++ != gds__dyn_end) { + while (*(*ptr)++ != gds_dyn_end) { --(*ptr); - DYN_execute(gbl, ptr, r, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR); + DYN_execute(gbl, ptr, r, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } } @@ -537,7 +538,7 @@ void DYN_delete_local_field( if (relation_name) strcpy(tbl_nm, relation_name); - else if (*(*ptr)++ != gds__dyn_rel_name) { + else if (*(*ptr)++ != gds_dyn_rel_name) { DYN_error_punt(FALSE, 51, NULL, NULL, NULL, NULL, NULL); /* msg 51: "No relation specified in ERASE RFR" */ } @@ -704,10 +705,10 @@ void DYN_delete_local_field( ERASE RFR; found = TRUE; delete_gfield_for_lfield(gbl, RFR.RDB$FIELD_SOURCE); - while (*(*ptr)++ != gds__dyn_end) { + while (*(*ptr)++ != gds_dyn_end) { --(*ptr); DYN_execute(gbl, ptr, RFR.RDB$RELATION_NAME, - RFR.RDB$FIELD_SOURCE, NULL_PTR, NULL_PTR, NULL_PTR); + RFR.RDB$FIELD_SOURCE, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } END_FOR; if (!DYN_REQUEST(drq_e_lfield)) @@ -745,8 +746,8 @@ void DYN_delete_parameter( GBL gbl, UCHAR ** ptr, TEXT * proc_name) JMP_BUF env, *old_env; GET_STRING(ptr, name); - if (**ptr == gds__dyn_prc_name) - DYN_get_string(++ptr, proc_name, PROC_NAME_SIZE, TRUE); + if (**ptr == gds_dyn_prc_name) + DYN_get_string((TEXT**)++ptr, proc_name, PROC_NAME_SIZE, TRUE); tdbb = GET_THREAD_DATA; dbb = tdbb->tdbb_database; @@ -812,7 +813,7 @@ void DYN_delete_parameter( GBL gbl, UCHAR ** ptr, TEXT * proc_name) DYN_error_punt(FALSE, 146, name, proc_name, NULL, NULL, NULL); /* msg 146: "Parameter %s in procedure %s not found" */ - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_unsupported_verb(); } @@ -956,7 +957,7 @@ void DYN_delete_procedure( GBL gbl, UCHAR ** ptr) tdbb->tdbb_setjmp = (UCHAR *) old_env; - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_unsupported_verb(); } @@ -1198,10 +1199,10 @@ void DYN_delete_relation( GBL gbl, UCHAR ** ptr, TEXT * relation) tdbb->tdbb_setjmp = (UCHAR *) old_env; - while (*(*ptr)++ != gds__dyn_end) { + while (*(*ptr)++ != gds_dyn_end) { --(*ptr); - DYN_execute(gbl, ptr, relation_name, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + DYN_execute(gbl, ptr, relation_name, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, + (TEXT*)NULL_PTR); } } @@ -1227,10 +1228,10 @@ void DYN_delete_security_class( GBL gbl, UCHAR ** ptr) DYN_error_punt(FALSE, 75, NULL, NULL, NULL, NULL, NULL); /* msg 75: "Security class not found" */ - while (*(*ptr)++ != gds__dyn_end) { + while (*(*ptr)++ != gds_dyn_end) { --(*ptr); - DYN_execute(gbl, ptr, NULL_PTR, NULL_PTR, NULL_PTR, NULL_PTR, - NULL_PTR); + DYN_execute(gbl, ptr, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, + (TEXT*)NULL_PTR); } } @@ -1307,7 +1308,7 @@ while (files) } ****/ - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_unsupported_verb(); } @@ -1436,7 +1437,7 @@ void DYN_delete_trigger( GBL gbl, UCHAR ** ptr) tdbb->tdbb_setjmp = (UCHAR *) old_env; - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_unsupported_verb(); } @@ -1468,7 +1469,7 @@ void DYN_delete_trigger_msg( GBL gbl, UCHAR ** ptr, TEXT * trigger_name) number = DYN_get_number(ptr); if (trigger_name) strcpy(t, trigger_name); - else if (*(*ptr)++ == gds__dyn_trg_name) + else if (*(*ptr)++ == gds_dyn_trg_name) GET_STRING(ptr, t); else DYN_error_punt(FALSE, 70, NULL, NULL, NULL, NULL, NULL); @@ -1506,7 +1507,7 @@ void DYN_delete_trigger_msg( GBL gbl, UCHAR ** ptr, TEXT * trigger_name) DYN_error_punt(FALSE, 72, NULL, NULL, NULL, NULL, NULL); /* msg 72: "Trigger Message not found" */ - if (*(*ptr)++ != gds__dyn_end) + if (*(*ptr)++ != gds_dyn_end) DYN_unsupported_verb(); } diff --git a/src/jrd/dyn_mod.e b/src/jrd/dyn_mod.epp similarity index 93% rename from src/jrd/dyn_mod.e rename to src/jrd/dyn_mod.epp index 1690ec432c..7005715182 100644 --- a/src/jrd/dyn_mod.e +++ b/src/jrd/dyn_mod.epp @@ -45,6 +45,7 @@ #include "../jrd/blb_proto.h" #include "../jrd/cmp_proto.h" #include "../jrd/dyn_proto.h" +#include "../jrd/dyn_df_proto.h" #include "../jrd/dyn_md_proto.h" #include "../jrd/dyn_ut_proto.h" #include "../jrd/err_proto.h" @@ -53,6 +54,7 @@ #include "../jrd/inf_proto.h" #include "../jrd/intl_proto.h" #include "../jrd/isc_f_proto.h" +#include "../jrd/met_proto.h" #include "../jrd/thd_proto.h" #include "../jrd/vio_proto.h" #include "../jrd/dsc_proto.h" @@ -73,7 +75,7 @@ DATABASE DB = STATIC "yachts.gdb"; #define MAX_CHARS_DOUBLE 22 /* 15 digits + 2 signs + E + decimal + 3 digit exp */ #define MAX_CHARS_FLOAT 13 /* 7 digits + 2 signs + E + decimal + 2 digit exp */ -static UCHAR alloc_info[] = { gds__info_allocation, gds__info_end }; +static UCHAR alloc_info[] = { gds_info_allocation, gds_info_end }; static void drop_cache(GBL); static void drop_log(GBL); static void modify_lfield_type(GBL, UCHAR **, TEXT *, TEXT *); @@ -132,9 +134,9 @@ void DYN_modify_database( GBL gbl, UCHAR ** ptr) /* msg 84: "MODIFY DATABASE failed" */ } - INF_database_info(alloc_info, sizeof(alloc_info), s, sizeof(s)); + INF_database_info((SCHAR*)alloc_info, sizeof(alloc_info), (SCHAR*)s, sizeof(s)); - if (s[0] != gds__info_allocation) { + if (s[0] != gds_info_allocation) { tdbb->tdbb_setjmp = (UCHAR *) old_env; DYN_error_punt(TRUE, 84, NULL, NULL, NULL, NULL, NULL); /* msg 84: "MODIFY DATABASE failed" */ @@ -152,16 +154,16 @@ void DYN_modify_database( GBL gbl, UCHAR ** ptr) DYN_REQUEST(drq_m_database) = request; MODIFY DBB USING - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_security_class: + case gds_dyn_security_class: if (GET_STRING(ptr, DBB.RDB$SECURITY_CLASS)) DBB.RDB$SECURITY_CLASS.NULL = FALSE; else DBB.RDB$SECURITY_CLASS.NULL = TRUE; break; - case gds__dyn_description: + case gds_dyn_description: if (DYN_put_text_blob(gbl, ptr, &DBB.RDB$DESCRIPTION)) DBB.RDB$DESCRIPTION.NULL = FALSE; else @@ -169,7 +171,7 @@ void DYN_modify_database( GBL gbl, UCHAR ** ptr) break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: if (DYN_put_text_blob2(gbl, ptr, &DBB.RDB$DESCRIPTION)) DBB.RDB$DESCRIPTION.NULL = FALSE; else @@ -177,62 +179,62 @@ void DYN_modify_database( GBL gbl, UCHAR ** ptr) break; #endif - case gds__dyn_def_file: + case gds_dyn_def_file: DYN_define_file(gbl, ptr, (SLONG) 0, &start, 158); break; #ifdef SUPERSERVER - case gds__dyn_def_default_log: + case gds_dyn_def_default_log: DYN_define_log_file(gbl, ptr, first_log_file, TRUE); break; - case gds__dyn_def_log_file: + case gds_dyn_def_log_file: DYN_define_log_file(gbl, ptr, first_log_file, FALSE); first_log_file = FALSE; break; #endif - case gds__dyn_def_cache_file: + case gds_dyn_def_cache_file: DYN_define_cache(gbl, ptr); break; - case gds__dyn_log_group_commit_wait: + case gds_dyn_log_group_commit_wait: #ifndef WINDOWS_ONLY group_commit_wait = DYN_get_number(ptr); log_params_defined = TRUE; #endif break; - case gds__dyn_log_buffer_size: + case gds_dyn_log_buffer_size: #ifndef WINDOWS_ONLY log_buffer_size = DYN_get_number(ptr); log_params_defined = TRUE; #endif break; - case gds__dyn_log_check_point_length: + case gds_dyn_log_check_point_length: #ifndef WINDOWS_ONLY check_point_len = DYN_get_number(ptr); log_params_defined = TRUE; #endif break; - case gds__dyn_log_num_of_buffers: + case gds_dyn_log_num_of_buffers: #ifndef WINDOWS_ONLY num_log_buffers = DYN_get_number(ptr); log_params_defined = TRUE; #endif break; - case gds__dyn_drop_cache: + case gds_dyn_drop_cache: drop_cache(gbl); break; - case gds__dyn_drop_log: + case gds_dyn_drop_log: drop_log(gbl); break; - case gds__dyn_fld_character_set_name: + case gds_dyn_fld_character_set_name: if (GET_STRING(ptr, DBB.RDB$CHARACTER_SET_NAME)) DBB.RDB$CHARACTER_SET_NAME.NULL = FALSE; else @@ -241,8 +243,8 @@ void DYN_modify_database( GBL gbl, UCHAR ** ptr) default: --(*ptr); - DYN_execute(gbl, ptr, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR, NULL_PTR); + DYN_execute(gbl, ptr, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } END_MODIFY; END_FOR; @@ -305,15 +307,15 @@ void DYN_modify_exception( GBL gbl, UCHAR ** ptr) found = TRUE; MODIFY X - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_xcp_msg: + case gds_dyn_xcp_msg: GET_STRING(ptr, X.RDB$MESSAGE); X.RDB$MESSAGE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_xcp_msg2: + case gds_dyn_xcp_msg2: DYN_get_string2(ptr, X.RDB$MESSAGE, sizeof(X.RDB$MESSAGE)); X.RDB$MESSAGE.NULL = FALSE; @@ -444,11 +446,11 @@ void DYN_modify_global_field( } - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_fld_name: + case gds_dyn_fld_name: { char newfld[32]; @@ -472,7 +474,7 @@ void DYN_modify_global_field( DIM_DOM.RDB$FIELD_NAME.NULL = FALSE; END_MODIFY; END_FOR; - CMP_release (tdbb, request); + CMP_release (tdbb, (REQ) request); request = NULL; } /* CVC: End modification. */ @@ -502,16 +504,16 @@ void DYN_modify_global_field( break; } - case gds__dyn_rel_name: + case gds_dyn_rel_name: GET_STRING(ptr, new_dom->dyn_rel_name); break; - case gds__dyn_fld_length: + case gds_dyn_fld_length: fldlen = TRUE; new_dom->dyn_dsc.dsc_length = DYN_get_number(ptr); break; - case gds__dyn_fld_type: + case gds_dyn_fld_type: dtype = TRUE; new_dom->dyn_dtype = DYN_get_number(ptr); @@ -549,7 +551,7 @@ void DYN_modify_global_field( } break; - case gds__dyn_fld_scale: + case gds_dyn_fld_scale: scale = TRUE; new_dom->dyn_dsc.dsc_scale = DYN_get_number(ptr); break; @@ -559,71 +561,71 @@ void DYN_modify_global_field( new_dom->dyn_precision = DYN_get_number(ptr); break; - case gds__dyn_fld_sub_type: + case gds_dyn_fld_sub_type: subtype = TRUE; new_dom->dyn_dsc.dsc_sub_type = DYN_get_number(ptr); break; - case gds__dyn_fld_char_length: + case gds_dyn_fld_char_length: charlen = TRUE; new_dom->dyn_charlen = DYN_get_number(ptr); break; - case gds__dyn_fld_collation: + case gds_dyn_fld_collation: collation = TRUE; new_dom->dyn_collation = DYN_get_number(ptr); break; - case gds__dyn_fld_character_set: + case gds_dyn_fld_character_set: charset = TRUE; new_dom->dyn_charset = DYN_get_number(ptr); break; - case gds__dyn_fld_not_null: + case gds_dyn_fld_not_null: nullflg = TRUE; new_dom->dyn_null_flag = TRUE; break; - case gds__dyn_fld_query_name: + case gds_dyn_fld_query_name: qryname = (TEXT *) * ptr; bqryname = TRUE; DYN_skip_attribute(ptr); break; - case gds__dyn_fld_query_header: + case gds_dyn_fld_query_header: qryhdr = (TEXT *) * ptr; bqryhdr = TRUE; DYN_skip_attribute(ptr); break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_query_header2: + case gds_dyn_fld_query_header2: qryhdr2 = (TEXT *) * ptr; bqryhdr2 = TRUE; DYN_skip_attribute2(ptr); break; #endif - case gds__dyn_fld_edit_string: + case gds_dyn_fld_edit_string: edtstr = (TEXT *) * ptr; bedtstr = TRUE; DYN_skip_attribute(ptr); break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_edit_string2: + case gds_dyn_fld_edit_string2: edtstr2 = (TEXT *) * ptr; bedtstr2 = TRUE; DYN_skip_attribute2(ptr); break; #endif - case gds__dyn_fld_missing_value: + case gds_dyn_fld_missing_value: missingval = (TEXT *) * ptr; bmissingval = TRUE; DYN_skip_attribute(ptr); break; - case gds__dyn_single_validation: + case gds_dyn_single_validation: if (single_validate) { EXE_unwind(tdbb, (REQ)request); DYN_error_punt(FALSE, 160, NULL, NULL, NULL, NULL, NULL); @@ -634,7 +636,7 @@ void DYN_modify_global_field( single_validate = TRUE; break; - case gds__dyn_fld_validation_blr: + case gds_dyn_fld_validation_blr: if (single_validate && (!FLD.RDB$VALIDATION_BLR.NULL)) { EXE_unwind(tdbb, (REQ)request); DYN_error_punt(FALSE, 160, NULL, NULL, NULL, NULL, NULL); @@ -649,54 +651,54 @@ void DYN_modify_global_field( DYN_skip_attribute(ptr); break; - case gds__dyn_fld_validation_source: + case gds_dyn_fld_validation_source: fldvaldsrc = (TEXT *) * ptr; bfldvaldsrc = TRUE; DYN_skip_attribute(ptr); break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_validation_source2: + case gds_dyn_fld_validation_source2: fldvaldsrc2 = (TEXT *) * ptr; bfldvaldsrc2 = TRUE; DYN_skip_attribute2(ptr); break; #endif - case gds__dyn_description: + case gds_dyn_description: desc = (TEXT *) * ptr; bdesc = TRUE; DYN_skip_attribute(ptr); break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: desc2 = (TEXT *) * ptr; bdesc2 = TRUE; DYN_skip_attribute2(ptr); break; #endif - case gds__dyn_del_validation: + case gds_dyn_del_validation: bdelvald = TRUE; break; - case gds__dyn_del_default: + case gds_dyn_del_default: bdeldflt = TRUE; break; - case gds__dyn_fld_default_value: + case gds_dyn_fld_default_value: flddftval = (TEXT *) * ptr; bflddftval = TRUE; DYN_skip_attribute(ptr); break; - case gds__dyn_fld_default_source: + case gds_dyn_fld_default_source: flddfltsrc = (TEXT *) * ptr; bflddfltsrc = TRUE; DYN_skip_attribute(ptr); break; - case gds__dyn_fld_dimensions: + case gds_dyn_fld_dimensions: new_dom->dyn_dtype = blr_blob; break; @@ -704,14 +706,14 @@ void DYN_modify_global_field( * any other types. Do nothing with them. */ - case gds__dyn_fld_segment_length: + case gds_dyn_fld_segment_length: DYN_get_number(ptr); break; default: --(*ptr); DYN_execute(gbl, ptr, relation_name, field_name, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } } @@ -789,7 +791,7 @@ void DYN_modify_global_field( } if (bqryhdr) { - if (DYN_put_blr_blob(gbl, &qryhdr, &FLD.RDB$QUERY_HEADER)) + if (DYN_put_blr_blob(gbl, (UCHAR**)&qryhdr, &FLD.RDB$QUERY_HEADER)) FLD.RDB$QUERY_HEADER.NULL = FALSE; else FLD.RDB$QUERY_HEADER.NULL = TRUE; @@ -797,7 +799,7 @@ void DYN_modify_global_field( #if (defined JPN_SJIS || defined JPN_EUC) if (bqryhdr2) { - if (DYN_put_blr_blob2(gbl, &qryhdr2, &FLD.RDB$QUERY_HEADER)) + if (DYN_put_blr_blob2(gbl, (UCHAR**)&qryhdr2, &FLD.RDB$QUERY_HEADER)) FLD.RDB$QUERY_HEADER.NULL = FALSE; else FLD.RDB$QUERY_HEADER.NULL = TRUE; @@ -824,7 +826,7 @@ void DYN_modify_global_field( if (bmissingval) { if (DYN_put_blr_blob - (gbl, &missingval, + (gbl, (UCHAR**)&missingval, &FLD.RDB$MISSING_VALUE)) FLD.RDB$MISSING_VALUE.NULL = FALSE; else @@ -832,7 +834,7 @@ void DYN_modify_global_field( } if (bfldvald) { - if (DYN_put_blr_blob(gbl, &fldvald, &FLD.RDB$VALIDATION_BLR)) + if (DYN_put_blr_blob(gbl, (UCHAR**)&fldvald, &FLD.RDB$VALIDATION_BLR)) FLD.RDB$VALIDATION_BLR.NULL = FALSE; else FLD.RDB$VALIDATION_BLR.NULL = TRUE; @@ -840,7 +842,7 @@ void DYN_modify_global_field( if (bfldvaldsrc) { if (DYN_put_text_blob - (gbl, &fldvaldsrc, + (gbl, (UCHAR**)&fldvaldsrc, &FLD.RDB$VALIDATION_SOURCE)) FLD.RDB$VALIDATION_SOURCE. NULL = FALSE; else @@ -850,7 +852,7 @@ void DYN_modify_global_field( #if (defined JPN_SJIS || defined JPN_EUC) if (bfldvaldsrc2) { if (DYN_put_text_blob2 - (gbl, &fldvaldsrc2, + (gbl, (UCHAR**)&fldvaldsrc2, &FLD.RDB$VALIDATION_SOURCE)) FLD.RDB$VALIDATION_SOURCE. NULL = FALSE; else @@ -859,7 +861,7 @@ void DYN_modify_global_field( #endif if (bdesc) { - if (DYN_put_text_blob(gbl, &desc, &FLD.RDB$DESCRIPTION)) + if (DYN_put_text_blob(gbl, (UCHAR**)&desc, &FLD.RDB$DESCRIPTION)) FLD.RDB$DESCRIPTION.NULL = FALSE; else FLD.RDB$DESCRIPTION.NULL = TRUE; @@ -867,7 +869,7 @@ void DYN_modify_global_field( #if (defined JPN_SJIS || defined JPN_EUC) if (bdesc2) { - if (DYN_put_text_blob2(gbl, &desc2, &FLD.RDB$DESCRIPTION)) + if (DYN_put_text_blob2(gbl, (UCHAR**)&desc2, &FLD.RDB$DESCRIPTION)) FLD.RDB$DESCRIPTION.NULL = FALSE; else FLD.RDB$DESCRIPTION.NULL = TRUE; @@ -885,12 +887,12 @@ void DYN_modify_global_field( if (bflddftval) { FLD.RDB$DEFAULT_VALUE.NULL = FALSE; - DYN_put_blr_blob(gbl, &flddftval, &FLD.RDB$DEFAULT_VALUE); + DYN_put_blr_blob(gbl, (UCHAR**)&flddftval, &FLD.RDB$DEFAULT_VALUE); } if (bflddfltsrc) { FLD.RDB$DEFAULT_SOURCE.NULL = FALSE; - DYN_put_text_blob(gbl, &flddfltsrc, &FLD.RDB$DEFAULT_SOURCE); + DYN_put_text_blob(gbl, (UCHAR**)&flddfltsrc, &FLD.RDB$DEFAULT_SOURCE); } END_MODIFY; @@ -957,19 +959,19 @@ void DYN_modify_index( GBL gbl, UCHAR ** ptr) found = TRUE; MODIFY IDX USING - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_idx_unique: + case gds_dyn_idx_unique: IDX.RDB$UNIQUE_FLAG = DYN_get_number(ptr); IDX.RDB$UNIQUE_FLAG.NULL = FALSE; break; - case gds__dyn_idx_inactive: + case gds_dyn_idx_inactive: IDX.RDB$INDEX_INACTIVE = DYN_get_number(ptr); IDX.RDB$INDEX_INACTIVE.NULL = FALSE; break; - case gds__dyn_description: + case gds_dyn_description: if (DYN_put_text_blob(gbl, ptr, &IDX.RDB$DESCRIPTION)) IDX.RDB$DESCRIPTION.NULL = FALSE; else @@ -977,7 +979,7 @@ void DYN_modify_index( GBL gbl, UCHAR ** ptr) break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: if (DYN_put_text_blob2(gbl, ptr, &IDX.RDB$DESCRIPTION)) IDX.RDB$DESCRIPTION.NULL = FALSE; else @@ -987,7 +989,7 @@ void DYN_modify_index( GBL gbl, UCHAR ** ptr) /* For V4 index selectivity can be set only to -1 */ - case gds__dyn_idx_statistic: + case gds_dyn_idx_statistic: IDX.RDB$STATISTICS = -1.0; IDX.RDB$STATISTICS.NULL = FALSE; break; @@ -1042,18 +1044,18 @@ void DYN_modify_local_field( r[0] = 0; sfflag = qnflag = qhflag = esflag = dflag = scflag = npflag = nnflag = ntflag = FALSE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_rel_name: + case gds_dyn_rel_name: GET_STRING(ptr, r); break; - case gds__dyn_system_flag: + case gds_dyn_system_flag: system_flag = DYN_get_number(ptr); sfflag = TRUE; break; - case gds__dyn_fld_position: + case gds_dyn_fld_position: position = DYN_get_number(ptr); npflag = TRUE; break; @@ -1064,54 +1066,54 @@ void DYN_modify_local_field( DYN_skip_attribute(ptr); break; - case gds__dyn_fld_query_name: + case gds_dyn_fld_query_name: query_name = (TEXT *) * ptr; qnflag = TRUE; DYN_skip_attribute(ptr); break; - case gds__dyn_fld_query_header: + case gds_dyn_fld_query_header: query_header = (TEXT *) * ptr; qhflag = TRUE; DYN_skip_attribute(ptr); break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_query_header2: + case gds_dyn_fld_query_header2: query_header = (TEXT *) * ptr; qhflag = TRUE; DYN_skip_attribute2(ptr); break; #endif - case gds__dyn_fld_edit_string: + case gds_dyn_fld_edit_string: edit_string = (TEXT *) * ptr; esflag = TRUE; DYN_skip_attribute(ptr); break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_fld_edit_string2: + case gds_dyn_fld_edit_string2: edit_string = (TEXT *) * ptr; esflag = TRUE; DYN_skip_attribute2(ptr); break; #endif - case gds__dyn_security_class: + case gds_dyn_security_class: security_class = (TEXT *) * ptr; scflag = TRUE; DYN_skip_attribute(ptr); break; - case gds__dyn_description: + case gds_dyn_description: description = (TEXT *) * ptr; dflag = TRUE; DYN_skip_attribute(ptr); break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: description = (TEXT *) * ptr; dflag = TRUE; DYN_skip_attribute2(ptr); @@ -1121,7 +1123,7 @@ void DYN_modify_local_field( default: --(*ptr); DYN_execute(gbl, ptr, relation_name, field_name, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } request = (BLK) CMP_find_request(tdbb, drq_m_lfield, DYN_REQUESTS); @@ -1180,10 +1182,10 @@ void DYN_modify_local_field( if (qhflag) { #if ( !(defined JPN_SJIS || defined JPN_EUC)) if (DYN_put_blr_blob - (gbl, &query_header, &FLD.RDB$QUERY_HEADER)) + (gbl, (UCHAR**)&query_header, &FLD.RDB$QUERY_HEADER)) #else if (DYN_put_blr_blob2 - (gbl, &query_header, &FLD.RDB$QUERY_HEADER)) + (gbl, (UCHAR**)&query_header, &FLD.RDB$QUERY_HEADER)) #endif FLD.RDB$QUERY_HEADER.NULL = FALSE; else @@ -1210,10 +1212,10 @@ void DYN_modify_local_field( if (dflag) { #if (defined JPN_EUC || defined JPN_SJIS) if (DYN_put_text_blob2 - (gbl, &description, &FLD.RDB$DESCRIPTION)) + (gbl, (UCHAR**)&description, &FLD.RDB$DESCRIPTION)) #else if (DYN_put_text_blob - (gbl, &description, &FLD.RDB$DESCRIPTION)) + (gbl, (UCHAR**)&description, &FLD.RDB$DESCRIPTION)) #endif /* (defined JPN_EUC || defined JPN_SJIS) */ FLD.RDB$DESCRIPTION.NULL = FALSE; else @@ -1293,47 +1295,47 @@ void DYN_modify_procedure( GBL gbl, UCHAR ** ptr) P.RDB$PROCEDURE_INPUTS.NULL = TRUE; P.RDB$PROCEDURE_OUTPUTS.NULL = TRUE; - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_system_flag: + case gds_dyn_system_flag: P.RDB$SYSTEM_FLAG = DYN_get_number(ptr); P.RDB$SYSTEM_FLAG.NULL = FALSE; break; - case gds__dyn_prc_blr: + case gds_dyn_prc_blr: P.RDB$PROCEDURE_BLR.NULL = FALSE; DYN_put_blr_blob(gbl, ptr, &P.RDB$PROCEDURE_BLR); break; - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &P.RDB$DESCRIPTION); P.RDB$DESCRIPTION.NULL = FALSE; break; - case gds__dyn_prc_source: + case gds_dyn_prc_source: DYN_put_text_blob(gbl, ptr, &P.RDB$PROCEDURE_SOURCE); P.RDB$PROCEDURE_SOURCE.NULL = FALSE; break; - case gds__dyn_prc_inputs: + case gds_dyn_prc_inputs: P.RDB$PROCEDURE_INPUTS = DYN_get_number(ptr); P.RDB$PROCEDURE_INPUTS.NULL = FALSE; break; - case gds__dyn_prc_outputs: + case gds_dyn_prc_outputs: P.RDB$PROCEDURE_OUTPUTS = DYN_get_number(ptr); P.RDB$PROCEDURE_OUTPUTS.NULL = FALSE; break; - case gds__dyn_security_class: + case gds_dyn_security_class: GET_STRING(ptr, P.RDB$SECURITY_CLASS); P.RDB$SECURITY_CLASS.NULL = FALSE; break; default: --(*ptr); - DYN_execute(gbl, ptr, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR, procedure_name); + DYN_execute(gbl, ptr, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, procedure_name); } END_MODIFY; @@ -1397,21 +1399,21 @@ void DYN_modify_relation( GBL gbl, UCHAR ** ptr) DYN_error_punt(FALSE, 177, NULL, NULL, NULL, NULL, NULL); found = TRUE; MODIFY REL USING - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_system_flag: + case gds_dyn_system_flag: REL.RDB$SYSTEM_FLAG = DYN_get_number(ptr); REL.RDB$SYSTEM_FLAG.NULL = FALSE; break; - case gds__dyn_security_class: + case gds_dyn_security_class: if (GET_STRING(ptr, REL.RDB$SECURITY_CLASS)) REL.RDB$SECURITY_CLASS.NULL = FALSE; else REL.RDB$SECURITY_CLASS.NULL = TRUE; break; - case gds__dyn_rel_ext_file: + case gds_dyn_rel_ext_file: if (REL.RDB$EXTERNAL_FILE.NULL) { DYN_rundown_request(old_env, request, -1); DYN_error_punt(FALSE, 97, NULL, NULL, NULL, NULL, @@ -1426,7 +1428,7 @@ void DYN_modify_relation( GBL gbl, UCHAR ** ptr) } break; - case gds__dyn_description: + case gds_dyn_description: if (DYN_put_text_blob(gbl, ptr, &REL.RDB$DESCRIPTION)) REL.RDB$DESCRIPTION.NULL = FALSE; else @@ -1434,7 +1436,7 @@ void DYN_modify_relation( GBL gbl, UCHAR ** ptr) break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: if (DYN_put_text_blob2(gbl, ptr, &REL.RDB$DESCRIPTION)) REL.RDB$DESCRIPTION.NULL = FALSE; else @@ -1444,7 +1446,7 @@ void DYN_modify_relation( GBL gbl, UCHAR ** ptr) default: --(*ptr); DYN_execute(gbl, ptr, name, field_name, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } END_MODIFY; END_FOR; @@ -1507,48 +1509,48 @@ void DYN_modify_trigger( GBL gbl, UCHAR ** ptr) found = TRUE; MODIFY X - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_trg_name: + case gds_dyn_trg_name: GET_STRING(ptr, X.RDB$TRIGGER_NAME); break; - case gds__dyn_trg_type: + case gds_dyn_trg_type: X.RDB$TRIGGER_TYPE = DYN_get_number(ptr); X.RDB$TRIGGER_TYPE.NULL = FALSE; break; - case gds__dyn_trg_sequence: + case gds_dyn_trg_sequence: X.RDB$TRIGGER_SEQUENCE = DYN_get_number(ptr); X.RDB$TRIGGER_SEQUENCE.NULL = FALSE; break; - case gds__dyn_trg_inactive: + case gds_dyn_trg_inactive: X.RDB$TRIGGER_INACTIVE = DYN_get_number(ptr); X.RDB$TRIGGER_INACTIVE.NULL = FALSE; break; - case gds__dyn_rel_name: + case gds_dyn_rel_name: GET_STRING(ptr, X.RDB$RELATION_NAME); X.RDB$RELATION_NAME.NULL = FALSE; break; - case gds__dyn_trg_blr: + case gds_dyn_trg_blr: blr = *ptr; DYN_skip_attribute(ptr); DYN_put_blr_blob(gbl, &blr, &X.RDB$TRIGGER_BLR); X.RDB$TRIGGER_BLR.NULL = FALSE; break; - case gds__dyn_trg_source: + case gds_dyn_trg_source: source = (TEXT *) * ptr; DYN_skip_attribute(ptr); - DYN_put_text_blob(gbl, &source, &X.RDB$TRIGGER_SOURCE); + DYN_put_text_blob(gbl, (UCHAR**)&source, &X.RDB$TRIGGER_SOURCE); X.RDB$TRIGGER_SOURCE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_trg_source2: + case gds_dyn_trg_source2: source = (TEXT *) * ptr; DYN_skip_attribute2(ptr); DYN_put_text_blob2(gbl, &source, &X.RDB$TRIGGER_SOURCE); @@ -1556,13 +1558,13 @@ void DYN_modify_trigger( GBL gbl, UCHAR ** ptr) break; #endif - case gds__dyn_description: + case gds_dyn_description: DYN_put_text_blob(gbl, ptr, &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_description2: + case gds_dyn_description2: DYN_put_text_blob2(gbl, ptr, &X.RDB$DESCRIPTION); X.RDB$DESCRIPTION.NULL = FALSE; break; @@ -1570,8 +1572,8 @@ void DYN_modify_trigger( GBL gbl, UCHAR ** ptr) default: --(*ptr); - DYN_execute(gbl, ptr, NULL_PTR, NULL_PTR, - trigger_name, NULL_PTR, NULL_PTR); + DYN_execute(gbl, ptr, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, + trigger_name, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } END_MODIFY; END_FOR; @@ -1623,7 +1625,7 @@ void DYN_modify_trigger_msg( GBL gbl, UCHAR ** ptr, TEXT * trigger_name) number = DYN_get_number(ptr); if (trigger_name) strcpy(t, trigger_name); - else if (*(*ptr)++ == gds__dyn_trg_name) + else if (*(*ptr)++ == gds_dyn_trg_name) GET_STRING(ptr, t); else DYN_error_punt(FALSE, 103, NULL, NULL, NULL, NULL, NULL); @@ -1637,20 +1639,20 @@ void DYN_modify_trigger_msg( GBL gbl, UCHAR ** ptr, TEXT * trigger_name) DYN_REQUEST(drq_m_trg_msg) = request; MODIFY X - while ((verb = *(*ptr)++) != gds__dyn_end) + while ((verb = *(*ptr)++) != gds_dyn_end) switch (verb) { - case gds__dyn_trg_msg_number: + case gds_dyn_trg_msg_number: X.RDB$MESSAGE_NUMBER = DYN_get_number(ptr); X.RDB$MESSAGE_NUMBER.NULL = FALSE; break; - case gds__dyn_trg_msg: + case gds_dyn_trg_msg: GET_STRING(ptr, X.RDB$MESSAGE); X.RDB$MESSAGE.NULL = FALSE; break; #if (defined JPN_SJIS || defined JPN_EUC) - case gds__dyn_trg_msg2: + case gds_dyn_trg_msg2: DYN_get_string2(ptr, X.RDB$MESSAGE, sizeof(X.RDB$MESSAGE)); X.RDB$MESSAGE.NULL = FALSE; @@ -2192,24 +2194,24 @@ void DYN_modify_sql_field(GBL gbl, if (FLD.RDB$DIMENSIONS != 0) orig_fld->dyn_dtype = blr_blob; - while ((verb = *(*ptr)++) != gds__dyn_end) { + while ((verb = *(*ptr)++) != gds_dyn_end) { switch (verb) { - case gds__dyn_fld_source: + case gds_dyn_fld_source: GET_STRING(ptr, dom_fld->dyn_fld_source); get_domain_type(tdbb, dbb, gbl, dom_fld); update_domain = TRUE; break; - case gds__dyn_rel_name: + case gds_dyn_rel_name: GET_STRING(ptr, new_fld->dyn_rel_name); break; - case gds__dyn_fld_length: + case gds_dyn_fld_length: fldlen = TRUE; new_fld->dyn_dsc.dsc_length = DYN_get_number(ptr); break; - case gds__dyn_fld_type: + case gds_dyn_fld_type: dtype = TRUE; new_fld->dyn_dtype = DYN_get_number(ptr); @@ -2247,7 +2249,7 @@ void DYN_modify_sql_field(GBL gbl, } break; - case gds__dyn_fld_scale: + case gds_dyn_fld_scale: scale = TRUE; new_fld->dyn_dsc.dsc_scale = DYN_get_number(ptr); break; @@ -2257,32 +2259,32 @@ void DYN_modify_sql_field(GBL gbl, new_fld->dyn_precision = DYN_get_number(ptr); break; - case gds__dyn_fld_sub_type: + case gds_dyn_fld_sub_type: subtype = TRUE; new_fld->dyn_dsc.dsc_sub_type = DYN_get_number(ptr); break; - case gds__dyn_fld_char_length: + case gds_dyn_fld_char_length: charlen = TRUE; new_fld->dyn_charlen = DYN_get_number(ptr); break; - case gds__dyn_fld_collation: + case gds_dyn_fld_collation: collation = TRUE; new_fld->dyn_collation = DYN_get_number(ptr); break; - case gds__dyn_fld_character_set: + case gds_dyn_fld_character_set: charset = TRUE; new_fld->dyn_charset = DYN_get_number(ptr); break; - case gds__dyn_fld_not_null: + case gds_dyn_fld_not_null: nullflg = TRUE; new_fld->dyn_null_flag = TRUE; break; - case gds__dyn_fld_dimensions: + case gds_dyn_fld_dimensions: new_fld->dyn_dtype = blr_blob; break; @@ -2290,14 +2292,14 @@ void DYN_modify_sql_field(GBL gbl, * any other types. BLOB types are detected above */ - case gds__dyn_fld_segment_length: + case gds_dyn_fld_segment_length: DYN_get_number(ptr); break; default: --(*ptr); DYN_execute(gbl, ptr, relation_name, RFR.RDB$FIELD_SOURCE, - NULL_PTR, NULL_PTR, NULL_PTR); + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); } } END_FOR; /* FLD in RDB$FIELDS */ diff --git a/src/jrd/dyn_util.e b/src/jrd/dyn_util.epp similarity index 98% rename from src/jrd/dyn_util.e rename to src/jrd/dyn_util.epp index 47b6ce3438..253fd371f7 100644 --- a/src/jrd/dyn_util.e +++ b/src/jrd/dyn_util.epp @@ -150,7 +150,7 @@ SINT64 DYN_UTIL_gen_unique_id(TDBB tdbb, p += p[-1]; memcpy(p, gen_id_blr2, sizeof(gen_id_blr2)); p += sizeof(gen_id_blr2); - req_handle = CMP_compile2(tdbb, blr, TRUE); + req_handle = CMP_compile2(tdbb, (UCHAR*)blr, TRUE); } *request = (BLK)req_handle; EXE_start(tdbb, req_handle, dbb->dbb_sys_trans); @@ -388,9 +388,9 @@ void DYN_UTIL_generate_index_name( } do { - if (verb == gds__dyn_def_primary_key) + if (verb == gds_dyn_def_primary_key) format = "RDB$PRIMARY%" QUADFORMAT "d"; - else if (verb == gds__dyn_def_foreign_key) + else if (verb == gds_dyn_def_foreign_key) format = "RDB$FOREIGN%" QUADFORMAT "d"; else format = "RDB$%" QUADFORMAT "d"; @@ -532,7 +532,7 @@ BOOLEAN DYN_UTIL_get_prot(TDBB tdbb, if (!request) { request = CMP_compile2(tdbb, - (SCHAR*)prot_blr, /* const_cast */ + (UCHAR*)prot_blr, /* const_cast */ TRUE); } gds__vtov(rname, in_msg.relation_name, sizeof(in_msg.relation_name)); diff --git a/src/jrd/envelope.e b/src/jrd/envelope.epp similarity index 100% rename from src/jrd/envelope.e rename to src/jrd/envelope.epp diff --git a/src/jrd/fun.e b/src/jrd/fun.epp similarity index 94% rename from src/jrd/fun.e rename to src/jrd/fun.epp index 71448100e1..29bafd2e43 100644 --- a/src/jrd/fun.e +++ b/src/jrd/fun.epp @@ -21,7 +21,7 @@ * Contributor(s): ______________________________________. */ /* -$Id: fun.e,v 1.1.1.1 2001-05-23 13:26:07 tamlin Exp $ +$Id: fun.epp,v 1.1 2001-07-12 06:32:03 bellardo Exp $ */ #include @@ -72,9 +72,9 @@ typedef double (*FPTR_DOUBLE) (); typedef UCHAR *(*FPTR_UCHAR) (); #ifdef VMS -#define CALL_UDF(ptr) (*ptr) (args [0], args[1], args[2], args[3], args [4], args [5], args [6], args [7], args [8], args [9]) +#define CALL_UDF(ptr) (*(SLONG (*)(SLONG, SLONG, SLONG, SLONG, SLONG, SLONG, SLONG, SLONG, SLONG, SLONG))(ptr)) (args [0], args[1], args[2], args[3], args [4], args [5], args [6], args [7], args [8], args [9]) #else -#define CALL_UDF(ptr) (ptr) (args [0], args[1], args[2], args[3], args [4], args [5], args [6], args [7], args [8], args [9]) +#define CALL_UDF(ptr) ((SLONG (*)(SLONG, SLONG, SLONG, SLONG, SLONG, SLONG, SLONG, SLONG, SLONG, SLONG))(ptr)) (args [0], args[1], args[2], args[3], args [4], args [5], args [6], args [7], args [8], args [9]) #endif DATABASE DB = FILENAME "ODS.RDB"; @@ -88,7 +88,7 @@ extern double MTH$CVT_D_G(), MTH$CVT_G_D(); static SSHORT blob_get_segment(BLB, UCHAR *, USHORT, USHORT *); static void blob_put_segment(BLB, UCHAR *, USHORT); static SLONG blob_lseek(BLB, USHORT, SLONG); -static SLONG get_scalar_array(struct fun_repeat *, DSC *, SAD, LLS *); +static SLONG get_scalar_array(fun::fun_repeat *, DSC *, SAD, LLS *); void DLL_EXPORT FUN_evaluate( FUN function, NOD node, VLU value) @@ -119,7 +119,7 @@ void DLL_EXPORT FUN_evaluate( FUN function, NOD node, VLU value) REQ request; BLB blob; BLOB blob_desc; - struct fun_repeat *tail, *end, *return_ptr; + fun::fun_repeat *tail, *end, *return_ptr; JMP_BUF *old_env, env; SSHORT unsup_datatype; @@ -370,8 +370,8 @@ void DLL_EXPORT FUN_evaluate( FUN function, NOD node, VLU value) { if (input->dsc_dtype != dtype_quad && input->dsc_dtype != dtype_blob) - ERR_post(gds__wish_list, - gds_arg_gds, gds__blobnotsup, + ERR_post(gds_wish_list, + gds_arg_gds, gds_blobnotsup, gds_arg_string, "conversion", 0); blob_id = (SLONG *) input->dsc_address; } @@ -380,9 +380,9 @@ void DLL_EXPORT FUN_evaluate( FUN function, NOD node, VLU value) (BID)blob_id); } LLS_PUSH(blob, &blob_stack); - blob_desc->blob_get_segment = blob_get_segment; - blob_desc->blob_put_segment = blob_put_segment; - blob_desc->blob_seek = blob_lseek; + blob_desc->blob_get_segment = (SSHORT (*)())blob_get_segment; + blob_desc->blob_put_segment = (void (*)())blob_put_segment; + blob_desc->blob_seek = (SLONG (*)())blob_lseek; blob_desc->blob_handle = (int *) blob; blob_desc->blob_number_segments = blob->blb_count; blob_desc->blob_max_segment = blob->blb_max_segment; @@ -471,7 +471,7 @@ void DLL_EXPORT FUN_evaluate( FUN function, NOD node, VLU value) else { THREAD_EXIT; - temp_ptr = CALL_UDF(*(FPTR_UCHAR) function->fun_entrypoint); + temp_ptr = (UCHAR*) CALL_UDF(*(FPTR_UCHAR) function->fun_entrypoint); THREAD_ENTER; if (temp_ptr != NULL) @@ -508,7 +508,7 @@ void DLL_EXPORT FUN_evaluate( FUN function, NOD node, VLU value) case dtype_varying: temp_desc = value->vlu_desc; temp_desc.dsc_address = temp_ptr; - temp_desc.dsc_length = strlen(temp_ptr) + 1; + temp_desc.dsc_length = strlen((char*)temp_ptr) + 1; MOV_move(&temp_desc, &value->vlu_desc); break; @@ -621,7 +621,7 @@ FUN DLL_EXPORT FUN_lookup_function(TEXT * name) LLS stack; USHORT count, args, l; ULONG length; - struct fun_repeat *tail, temp[MAX_UDF_ARGUMENTS + 1]; + fun::fun_repeat *tail, temp[MAX_UDF_ARGUMENTS + 1]; #ifdef GATEWAY JMP_BUF *old_env, env; #endif @@ -694,7 +694,7 @@ FUN DLL_EXPORT FUN_lookup_function(TEXT * name) function->fun_type = X.RDB$FUNCTION_TYPE; function->fun_temp_length = length; MOVE_FAST(temp, function->fun_rpt, - (count + 1) * sizeof(struct fun_repeat)); + (count + 1) * sizeof(fun::fun_repeat)); #ifndef WIN_NT /* NT allows blanks in file paths */ for (p = X.RDB$MODULE_NAME; *p && *p != ' '; p++); *p = 0; @@ -710,7 +710,7 @@ FUN DLL_EXPORT FUN_lookup_function(TEXT * name) strlen(EXCEPTION_MESSAGE) + strlen(name) + strlen(X.RDB$ENTRYPOINT) + strlen(X.RDB$MODULE_NAME) + 1); - sprintf(exception_msg->str_data, EXCEPTION_MESSAGE, name, + sprintf((char*)exception_msg->str_data, EXCEPTION_MESSAGE, name, X.RDB$ENTRYPOINT, X.RDB$MODULE_NAME); function->fun_exception_message = exception_msg; @@ -762,7 +762,7 @@ FUN DLL_EXPORT FUN_lookup_function(TEXT * name) function->fun_symbol = symbol = (SYM) ALLOCP(type_sym); symbol->sym_object = (BLK) function; string = (STR) ALLOCPV(type_str, strlen(name)); - strcpy(string->str_data, name); + strcpy((char*)string->str_data, name); symbol->sym_string = (TEXT *) string->str_data; symbol->sym_type = SYM_fun; SYM_insert(symbol); @@ -800,7 +800,7 @@ FUN DLL_EXPORT FUN_resolve(CSB csb, FUN function, NOD args) NOD *ptr, *end; DSC arg; int best_score, score; - struct fun_repeat *tail; + fun::fun_repeat *tail; TDBB tdbb; tdbb = GET_THREAD_DATA; @@ -922,7 +922,7 @@ static SSHORT blob_get_segment( #ifndef GATEWAY -static SLONG get_scalar_array(struct fun_repeat* arg, +static SLONG get_scalar_array(fun::fun_repeat* arg, DSC* value, SAD scalar_desc, LLS* stack) @@ -946,8 +946,8 @@ static SLONG get_scalar_array(struct fun_repeat* arg, UCHAR *data, *temp; DSC from, to; USHORT dimensions; - struct ads_repeat *tail1; - struct sad_repeat *tail2, *end; + ads::ads_repeat *tail1; + sad::sad_repeat *tail2, *end; tdbb = GET_THREAD_DATA; @@ -976,7 +976,7 @@ static SLONG get_scalar_array(struct fun_repeat* arg, for (; n; --n, to.dsc_address += to.dsc_length, from.dsc_address += array_desc->ads_element_length) MOV_move(&from, &to); - ALL_free(data); + ALL_free((SCHAR*)data); data = temp; } @@ -993,6 +993,6 @@ static SLONG get_scalar_array(struct fun_repeat* arg, tail2->sad_lower = tail1->ads_lower; } - return sizeof(struct sad) + (dimensions - 1) * sizeof(struct sad_repeat); + return sizeof(struct sad) + (dimensions - 1) * sizeof(sad::sad_repeat); } #endif diff --git a/src/jrd/grant.e b/src/jrd/grant.epp similarity index 95% rename from src/jrd/grant.e rename to src/jrd/grant.epp index dfe975a70e..69d697a3ac 100644 --- a/src/jrd/grant.e +++ b/src/jrd/grant.epp @@ -149,7 +149,7 @@ int GRANT_privileges( TDBB tdbb, SSHORT phase, DFW work) UCHAR *default_acl; TEXT s_class[32], owner[32], default_class[32]; STR str_buffer = NULL, str_default_buffer = NULL; - USHORT public, aggregate_public, restrct, view; + USHORT public_priv, aggregate_public, restrct, view; ULONG length = ACL_BUFFER_SIZE, *length_ptr = &length; ULONG default_length = ACL_BUFFER_SIZE, *default_length_ptr = &default_length; @@ -203,9 +203,9 @@ int GRANT_privileges( TDBB tdbb, SSHORT phase, DFW work) /* Pick up any relation-level privileges */ - public = get_public_privs(tdbb, work->dfw_name, work->dfw_id); + public_priv = get_public_privs(tdbb, work->dfw_name, work->dfw_id); get_user_privs(tdbb, &acl, work->dfw_name, work->dfw_id, - owner, public, &str_buffer, length_ptr); + owner, public_priv, &str_buffer, length_ptr); if (work->dfw_id == obj_relation) { /* If we have the space to copy the acl list @@ -228,7 +228,7 @@ int GRANT_privileges( TDBB tdbb, SSHORT phase, DFW work) aggregate_public = save_field_privileges(tdbb, &str_buffer, &acl, work->dfw_name, - owner, public, + owner, public_priv, length_ptr); /* SQL tables don't need the 'all priviliges to all views' acl anymore. @@ -254,7 +254,7 @@ int GRANT_privileges( TDBB tdbb, SSHORT phase, DFW work) if (restrct) { - finish_security_class(&default_acl, public, + finish_security_class(&default_acl, public_priv, &str_default_buffer, default_length_ptr); define_default_class( @@ -266,7 +266,7 @@ int GRANT_privileges( TDBB tdbb, SSHORT phase, DFW work) } } else { - finish_security_class(&acl, public, &str_buffer, length_ptr); + finish_security_class(&acl, public_priv, &str_buffer, length_ptr); save_security_class(tdbb, s_class, str_buffer->str_data, (USHORT)(acl - str_buffer->str_data)); } @@ -358,7 +358,7 @@ static void define_default_class( desc.dsc_scale = 0; desc.dsc_ttype = ttype_metadata; desc.dsc_address = (UCHAR *) relation_name; - desc.dsc_length = strlen(desc.dsc_address); + desc.dsc_length = strlen((char*)desc.dsc_address); DFW_post_work(dbb->dbb_sys_trans, dfw_scan_relation, &desc, 0); } @@ -394,7 +394,7 @@ static void delete_security_class( TDBB tdbb, TEXT * s_class) static void finish_security_class(UCHAR** acl_ptr, - USHORT public, + USHORT public_priv, STR* start_ptr, ULONG* length_ptr) { @@ -413,9 +413,9 @@ static void finish_security_class(UCHAR** acl_ptr, acl = *acl_ptr; - if (public) { + if (public_priv) { CHECK_AND_MOVE(acl, ACL_id_list, *start_ptr, length_ptr); - SCL_move_priv(&acl, public, start_ptr, length_ptr); + SCL_move_priv(&acl, public_priv, start_ptr, length_ptr); } CHECK_AND_MOVE(acl, ACL_end, *start_ptr, length_ptr); @@ -439,12 +439,12 @@ static USHORT get_public_privs( **************************************/ DBB dbb; BLK request; - USHORT public; + USHORT public_priv; SET_TDBB(tdbb); dbb = tdbb->tdbb_database; - public = 0; + public_priv = 0; request = (BLK) CMP_find_request(tdbb, irq_grant5, IRQ_REQUESTS); @@ -457,13 +457,13 @@ static USHORT get_public_privs( PRV.RDB$FIELD_NAME MISSING if (!REQUEST(irq_grant5)) REQUEST(irq_grant5) = request; - public |= trans_sql_priv(PRV.RDB$PRIVILEGE); + public_priv |= trans_sql_priv(PRV.RDB$PRIVILEGE); END_FOR; if (!REQUEST(irq_grant5)) REQUEST(irq_grant5) = request; - return public; + return public_priv; } @@ -547,7 +547,7 @@ static void get_user_privs(TDBB tdbb, TEXT* object_name, SSHORT obj_type, TEXT* owner, - USHORT public, + USHORT public_priv, STR* start_ptr, ULONG* length_ptr) { @@ -598,7 +598,7 @@ static void get_user_privs(TDBB tdbb, user_type = PRV.RDB$USER_TYPE; if (user_type == obj_user) { - priv = public; + priv = public_priv; } else { @@ -760,7 +760,7 @@ static void purge_default_class( TEXT * object_name, SSHORT obj_type) desc.dsc_scale = 0; desc.dsc_ttype = ttype_metadata; desc.dsc_address = (UCHAR *) object_name; - desc.dsc_length = strlen(desc.dsc_address); + desc.dsc_length = strlen((char*)desc.dsc_address); DFW_post_work(dbb->dbb_sys_trans, dfw_scan_relation, &desc, 0); } @@ -769,7 +769,7 @@ static USHORT save_field_privileges( TDBB tdbb, STR * str_relation_buffer, UCHAR ** acl_ptr, -TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) +TEXT * relation_name, TEXT * owner, USHORT public_priv, ULONG * length_ptr) { /************************************** * @@ -839,7 +839,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) field_name[0] = 0; user[0] = 0; - aggregate_public = public; + aggregate_public = public_priv; request = (BLK) CMP_find_request(tdbb, irq_grant6, IRQ_REQUESTS); request2 = NULL; @@ -871,7 +871,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) if (strcmp(user, "PUBLIC")) { field_priv = - (USHORT)( public | + (USHORT)( public_priv | priv | squeeze_acl(str_field_buffer->str_data, &field_acl, @@ -884,7 +884,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) &str_field_buffer, field_length_ptr); relation_priv = - (USHORT)( public | + (USHORT)( public_priv | priv | squeeze_acl(relation_buffer->str_data, &relation_acl, @@ -899,7 +899,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) } else { - field_public = field_public | public | priv; + field_public = field_public | public_priv | priv; } } @@ -920,7 +920,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) if (field_name[0]) { aggregate_public |= field_public; finish_security_class(&field_acl, - (USHORT)(field_public | public), + (USHORT)(field_public | public_priv), &str_field_buffer, field_length_ptr); save_security_class( @@ -995,7 +995,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) if (strcmp(user, "PUBLIC")) { field_priv = - (USHORT)( public | + (USHORT)( public_priv | priv | squeeze_acl(str_field_buffer->str_data, &field_acl, @@ -1008,7 +1008,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) &str_field_buffer, field_length_ptr); relation_priv = - (USHORT)( public | + (USHORT)( public_priv | priv | squeeze_acl(relation_buffer->str_data, &relation_acl, @@ -1023,7 +1023,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) } else { - field_public = field_public | public | priv; + field_public = field_public | public_priv | priv; } } @@ -1033,7 +1033,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) { aggregate_public |= field_public; finish_security_class(&field_acl, - (USHORT)(field_public | public), + (USHORT)(field_public | public_priv), &str_field_buffer, field_length_ptr); save_security_class(tdbb, @@ -1045,7 +1045,7 @@ TEXT * relation_name, TEXT * owner, USHORT public, ULONG * length_ptr) desc.dsc_scale = 0; desc.dsc_ttype = ttype_metadata; desc.dsc_address = (UCHAR *) relation_name; - desc.dsc_length = strlen(desc.dsc_address); + desc.dsc_length = strlen((char*)desc.dsc_address); DFW_post_work(dbb->dbb_sys_trans, dfw_update_format, &desc, 0); } @@ -1238,42 +1238,42 @@ static SLONG squeeze_acl(UCHAR* acl_base, case id_person: if (user_type != obj_user) hit = FALSE; - if (check_string(acl, user)) + if (check_string((TEXT*)acl, user)) hit = FALSE; break; case id_sql_role: if (user_type != obj_sql_role) hit = FALSE; - if (check_string(acl, user)) + if (check_string((TEXT*)acl, user)) hit = FALSE; break; case id_view: if (user_type != obj_view) hit = FALSE; - if (check_string(acl, user)) + if (check_string((TEXT*)acl, user)) hit = FALSE; break; case id_procedure: if (user_type != obj_procedure) hit = FALSE; - if (check_string(acl, user)) + if (check_string((TEXT*)acl, user)) hit = FALSE; break; case id_trigger: if (user_type != obj_trigger) hit = FALSE; - if (check_string(acl, user)) + if (check_string((TEXT*)acl, user)) hit = FALSE; break; case id_project: case id_organization: hit = FALSE; - check_string(acl, user); + check_string((TEXT*)acl, user); break; case id_views: @@ -1289,7 +1289,7 @@ static SLONG squeeze_acl(UCHAR* acl_base, case id_group: if (user_type != obj_user_group) hit = FALSE; - if (check_string(acl, user)) + if (check_string((TEXT*)acl, user)) hit = FALSE; break; diff --git a/src/jrd/ini.e b/src/jrd/ini.epp similarity index 96% rename from src/jrd/ini.e rename to src/jrd/ini.epp index 611b9364ab..412b6d540d 100644 --- a/src/jrd/ini.e +++ b/src/jrd/ini.epp @@ -19,9 +19,6 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE" - * conditionals, as the engine now fully supports - * readonly databases. */ #include @@ -61,7 +58,7 @@ DATABASE DB = FILENAME "ODS.RDB"; -#define PAD(string, field) jrd_vtof (string, field, sizeof (field)) +#define PAD(string, field) jrd_vtof ((char*)(string), field, sizeof (field)) #define MAX_ACL_SIZE 4096 #define DEFAULT_CLASS "SQL$DEFAULT" @@ -441,7 +438,7 @@ void INI_format(TEXT* owner) *acl++ = ACL_end; length = acl - buffer; - add_security_to_sys_rel(tdbb, string, "RDB$ROLES", buffer, length); + add_security_to_sys_rel(tdbb, string, "RDB$ROLES", (TEXT*)buffer, length); } @@ -718,10 +715,10 @@ void INI_update_database(void) ************************************** * * Functional description - * Perform changes to ODS that were required + * Perform changes to ODS that were required * since ODS 8 and are dynamically updatable. * - * %% Note %% Update the switch() statement to reflect new major ODS + * %% Note %% Update the switch() statement to reflect new major ODS * addition **************************************/ DBB dbb; @@ -754,7 +751,7 @@ void INI_update_database(void) } /******************************************************************* -** when new engine is attaching an older ODS database +** when new engine is attaching an older ODS database ** perform the necessary modifications ********************************************************************/ @@ -787,7 +784,7 @@ void INI_update_database(void) header = (HDR) CCH_FETCH(tdbb, &window, LCK_write, pag_header); CCH_MARK(tdbb, &window); -/* Only minor upgrades can occur within a major ODS, define which one +/* Only minor upgrades can occur within a major ODS, define which one occured here. */ switch (major_version) { @@ -907,9 +904,9 @@ static void add_index_set(DBB dbb, REL relation; TEXT string[32]; CONST struct ini_idx_t* index; - CONST struct ini_idx_segment_t*segment; + CONST ini_idx_t::ini_idx_segment_t*segment; IDX idx; - struct idx_repeat* tail; + idx::idx_repeat* tail; USHORT position; FLD field; float selectivity; @@ -932,7 +929,7 @@ static void add_index_set(DBB dbb, (((USHORT) DECODE_ODS_MAJOR(index->ini_idx_version_flag)) != major_version))) { - /* The DECODE_ODS_MAJOR() is used (in this case) to instruct the server + /* The DECODE_ODS_MAJOR() is used (in this case) to instruct the server to perform updates for minor ODS versions only within a major ODS */ continue; } @@ -967,7 +964,7 @@ static void add_index_set(DBB dbb, } idx.idx_count = index->ini_idx_segment_count; idx.idx_flags = index->ini_idx_unique_flag; - IDX_create_index(tdbb, relation, &idx, string, NULL_PTR, NULL_PTR, + IDX_create_index(tdbb, relation, &idx, (UCHAR*)string, (USHORT*) NULL_PTR, (TRA) NULL_PTR, &selectivity); X.RDB$INDEX_ID = idx.idx_id + 1; END_STORE; @@ -991,9 +988,9 @@ static void add_new_triggers(USHORT major_version, USHORT minor_version) ************************************** * * Functional description - * Store all new ODS 8.x (x > 0) triggers. + * Store all new ODS 8.x (x > 0) triggers. * The major and minor_version passed in are the ODS versions - * before the ODS is upgraded. + * before the ODS is upgraded. * This routine is used to upgrade ODS versions. * **************************************/ @@ -1086,7 +1083,7 @@ static void add_relation_fields( USHORT minor_version) desc.dsc_dtype = dtype_text; INTL_ASSIGN_DSC(&desc, CS_METADATA, COLLATE_NONE); desc.dsc_address = (UCHAR*) names[relfld[RFLD_R_NAME]]; - desc.dsc_length = strlen(desc.dsc_address); + desc.dsc_length = strlen((char*)desc.dsc_address); DFW_post_work(dbb->dbb_sys_trans, dfw_update_format, &desc, 0); } } @@ -1117,7 +1114,7 @@ static void add_security_to_sys_rel(TDBB tdbb, * * Functional description * - * Add security to system relations. Only the owner of the + * Add security to system relations. Only the owner of the * database has SELECT/INSERT/UPDATE/DELETE privileges on * any system relations. Any other users only has SELECT * privilege. @@ -1139,11 +1136,11 @@ static void add_security_to_sys_rel(TDBB tdbb, strcat(sec_class_name, rel_name); blob = BLB_create(tdbb, dbb->dbb_sys_trans, (BID)&blob_id_1); - BLB_put_segment(tdbb, blob, acl, acl_length); + BLB_put_segment(tdbb, blob, (UCHAR*)acl, acl_length); BLB_close(tdbb, blob); blob = BLB_create(tdbb, dbb->dbb_sys_trans, (BID)&blob_id_2); - BLB_put_segment(tdbb, blob, acl, acl_length); + BLB_put_segment(tdbb, blob, (UCHAR*)acl, acl_length); BLB_close(tdbb, blob); sprintf(default_class, "%s%" QUADFORMAT "d\0", DEFAULT_CLASS, @@ -1203,7 +1200,7 @@ static void add_security_to_sys_rel(TDBB tdbb, STORE(REQUEST_HANDLE handle1) CLS IN RDB$SECURITY_CLASSES - jrd_vtof(sec_class_name, CLS.RDB$SECURITY_CLASS, + jrd_vtof((char*)sec_class_name, CLS.RDB$SECURITY_CLASS, sizeof(CLS.RDB$SECURITY_CLASS)); CLS.RDB$ACL = blob_id_1; END_STORE; @@ -1214,7 +1211,7 @@ static void add_security_to_sys_rel(TDBB tdbb, STORE(REQUEST_HANDLE handle1) CLS IN RDB$SECURITY_CLASSES - jrd_vtof(default_class, CLS.RDB$SECURITY_CLASS, + jrd_vtof((char*)default_class, CLS.RDB$SECURITY_CLASS, sizeof(CLS.RDB$SECURITY_CLASS)); CLS.RDB$ACL = blob_id_2; END_STORE; @@ -1227,7 +1224,7 @@ static void add_security_to_sys_rel(TDBB tdbb, WITH REL.RDB$RELATION_NAME EQ rel_name MODIFY REL USING REL.RDB$DEFAULT_CLASS.NULL = FALSE; - jrd_vtof(default_class, REL.RDB$DEFAULT_CLASS, + jrd_vtof((char*)default_class, REL.RDB$DEFAULT_CLASS, sizeof(REL.RDB$DEFAULT_CLASS)); END_MODIFY; @@ -1293,7 +1290,7 @@ static void modify_relation_field(TDBB tdbb, ************************************** * * Functional description - * Modify a local field according to the + * Modify a local field according to the * passed information. Note that the field id and * field position do not change. * @@ -1325,7 +1322,7 @@ static void store_generator(TDBB tdbb, CONST GEN* generator, BLK* handle) ************************************** * * Functional description - * Store the passed generator according to + * Store the passed generator according to * the information in the generator block. * **************************************/ @@ -1351,7 +1348,7 @@ static void store_global_field(TDBB tdbb, GFLD* gfield, BLK* handle) ************************************** * * Functional description - * Store a global field according to the + * Store a global field according to the * passed information. * **************************************/ @@ -1477,7 +1474,7 @@ static void store_intlnames(TDBB tdbb, DBB dbb) { /************************************** * - * s t o r e _ i n t l n a m e s + * s t o r e _ i n t l n a m e s * ************************************** * @@ -1563,7 +1560,7 @@ static void store_relation_field(TDBB tdbb, ************************************** * * Functional description - * Store a local field according to the + * Store a local field according to the * passed information. * **************************************/ @@ -1596,7 +1593,7 @@ static void store_trigger(TDBB tdbb, CONST TRG* trigger, BLK* handle) ************************************** * * Functional description - * Store the trigger according to the + * Store the trigger according to the * information in the trigger block. * **************************************/ @@ -1615,7 +1612,7 @@ static void store_trigger(TDBB tdbb, CONST TRG* trigger, BLK* handle) desc.dsc_dtype = dtype_text; INTL_ASSIGN_DSC(&desc, CS_METADATA, COLLATE_NONE); desc.dsc_address = (UCHAR*) names[trigger->trg_relation]; - desc.dsc_length = strlen(desc.dsc_address); + desc.dsc_length = strlen((char*)desc.dsc_address); DFW_post_work(trans, dfw_update_format, &desc, 0); /* store the trigger */ @@ -1634,4 +1631,4 @@ static void store_trigger(TDBB tdbb, CONST TRG* trigger, BLK* handle) trigger->trg_length); BLB_close(tdbb, blob); END_STORE; -} \ No newline at end of file +} diff --git a/src/jrd/met.e b/src/jrd/met.epp similarity index 96% rename from src/jrd/met.e rename to src/jrd/met.epp index d2480a52eb..a677cc1dfb 100644 --- a/src/jrd/met.e +++ b/src/jrd/met.epp @@ -19,12 +19,9 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE" - * conditionals, as the engine now fully supports - * readonly databases. */ /* -$Id: met.e,v 1.2 2001-07-10 17:35:13 awharrison Exp $ +$Id: met.epp,v 1.1 2001-07-12 06:32:03 bellardo Exp $ */ #ifdef SHLIB_DEFS @@ -88,6 +85,10 @@ $Id: met.e,v 1.2 2001-07-10 17:35:13 awharrison Exp $ #include "../jrd/sch_proto.h" #include "../jrd/iberr.h" +#ifdef HAVE_CTYPE_H +#include +#endif + #ifdef WINDOWS_ONLY #include "../jrd/seg_proto.h" #endif @@ -186,7 +187,7 @@ void MET_activate_shadow( TDBB tdbb) handle = NULL; FOR(REQUEST_HANDLE handle) X IN RDB$FILES WITH X.RDB$SHADOW_NUMBER NOT MISSING - AND X.RDB$SHADOW_NUMBER EQ 0 + AND X.RDB$SHADOW_NUMBER EQ 0 ERASE X; END_FOR; @@ -223,7 +224,7 @@ void MET_activate_shadow( TDBB tdbb) /* Get rid of WAL after activation. For V4.0, we are not allowing WAL and Shadowing to be configured together. So the following - (commented out) code should be re-visited when we do allow + (commented out) code should be re-visited when we do allow such configuration. */ /*********************** @@ -347,7 +348,7 @@ void MET_delete_dependencies(TDBB tdbb, ************************************** * * Functional description - * Delete all dependencies for the specified + * Delete all dependencies for the specified * object of given type. * **************************************/ @@ -385,7 +386,7 @@ void MET_delete_shadow( TDBB tdbb, USHORT shadow_number) * ************************************** * - * Functional description + * Functional description * When any of the shadows in RDB$FILES for a particular * shadow are deleted, stop shadowing to that file and * remove all other files from the same shadow. @@ -401,7 +402,7 @@ void MET_delete_shadow( TDBB tdbb, USHORT shadow_number) handle = NULL; FOR(REQUEST_HANDLE handle) - X IN RDB$FILES WITH X.RDB$SHADOW_NUMBER EQ shadow_number + X IN RDB$FILES WITH X.RDB$SHADOW_NUMBER EQ shadow_number ERASE X; END_FOR; @@ -436,7 +437,7 @@ void MET_error( TEXT * string, ...) VA_START(ptr, string); vsprintf(s, string, ptr); - ERR_post(gds__no_meta_update, gds_arg_gds, gds__random, gds_arg_string, + ERR_post(gds_no_meta_update, gds_arg_gds, gds_random, gds_arg_string, ERR_cstring(s), 0); } @@ -507,7 +508,7 @@ FMT MET_format(TDBB tdbb, register REL relation, USHORT number) FOR(REQUEST_HANDLE request) X IN RDB$FORMATS WITH X.RDB$RELATION_ID EQ relation->rel_id AND - X.RDB$FORMAT EQ number + X.RDB$FORMAT EQ number if (!REQUEST(irq_r_format)) { @@ -556,7 +557,7 @@ BOOLEAN MET_get_char_subtype(TDBB tdbb, { /************************************** * - * M E T _ g e t _ c h a r _ s u b t y p e + * M E T _ g e t _ c h a r _ s u b t y p e * ************************************** * @@ -637,7 +638,7 @@ NOD MET_get_dependencies(TDBB tdbb, ************************************** * * Functional description - * Get dependencies for an object by parsing + * Get dependencies for an object by parsing * the blr used in its definition. * **************************************/ @@ -657,7 +658,7 @@ NOD MET_get_dependencies(TDBB tdbb, { node = PAR_blr( tdbb, relation, - blob, + (UCHAR*)blob, view_csb, &csb, request, @@ -728,7 +729,7 @@ FLD MET_get_field(REL relation, USHORT id) } -void MET_get_shadow_files( TDBB tdbb, USHORT delete) +void MET_get_shadow_files( TDBB tdbb, USHORT deleteVar) { /************************************** * @@ -738,7 +739,7 @@ void MET_get_shadow_files( TDBB tdbb, USHORT delete) * * Functional description * Check the shadows found in the database against - * our in-memory list: if any new shadow files have + * our in-memory list: if any new shadow files have * been defined since the last time we looked, start * shadowing to them; if any have been deleted, stop * shadowing to them. @@ -762,9 +763,9 @@ void MET_get_shadow_files( TDBB tdbb, USHORT delete) { file_flags = X.RDB$FILE_FLAGS; SDW_start(X.RDB$FILE_NAME, X.RDB$SHADOW_NUMBER, file_flags, - delete); + deleteVar); - /* if the shadow exists, mark the appropriate shadow + /* if the shadow exists, mark the appropriate shadow block as found for the purposes of this routine; if the shadow was conditional and is no longer, note it */ @@ -784,7 +785,7 @@ void MET_get_shadow_files( TDBB tdbb, USHORT delete) CMP_release(tdbb, (REQ)handle); -/* if any current shadows were not defined in database, mark +/* if any current shadows were not defined in database, mark them to be shutdown since they don't exist anymore */ for (shadow = dbb->dbb_shadow; shadow; shadow = shadow->sdw_next) @@ -912,8 +913,8 @@ void MET_load_trigger( if ((TRG.RDB$FLAGS & TRG_ignore_perm) && !verify_TRG_ignore_perm(tdbb, trigger_name)) { gds__msg_format(NULL_PTR, JRD_BUGCHK, 304, sizeof(errmsg), - errmsg, trigger_name, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); + errmsg, trigger_name, (TEXT*)NULL_PTR, (TEXT*)NULL_PTR, + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); ERR_log(JRD_BUGCHK, 304, errmsg); trig_flags &= ~TRG_ignore_perm; @@ -983,7 +984,7 @@ void MET_lookup_cnstrt_for_trigger( { /************************************** * - * M E T _ l o o k u p _ c n s t r t _ f o r _ t r i g g e r + * M E T _ l o o k u p _ c n s t r t _ f o r _ t r i g g e r * ************************************** * @@ -1003,9 +1004,9 @@ void MET_lookup_cnstrt_for_trigger( request = (BLK) CMP_find_request(tdbb, irq_l_check, IRQ_REQUESTS); request2 = (BLK) CMP_find_request(tdbb, irq_l_check2, IRQ_REQUESTS); -/* utilize two requests rather than one so that we +/* utilize two requests rather than one so that we guarantee we always return the name of the relation - that the trigger is defined on, even if we don't + that the trigger is defined on, even if we don't have a check constraint defined for that trigger */ FOR(REQUEST_HANDLE request) @@ -1201,7 +1202,7 @@ int MET_lookup_field(TDBB tdbb, REL relation, CONST TEXT* name) FOR(REQUEST_HANDLE request) X IN RDB$RELATION_FIELDS WITH X.RDB$RELATION_NAME EQ relation->rel_name AND - X.RDB$FIELD_NAME EQ name + X.RDB$FIELD_NAME EQ name if (!REQUEST(irq_l_field)) { @@ -1249,13 +1250,13 @@ BLF MET_lookup_filter(TDBB tdbb, SSHORT from, SSHORT to) FOR(REQUEST_HANDLE request) X IN RDB$FILTERS WITH X.RDB$INPUT_SUB_TYPE EQ from AND - X.RDB$OUTPUT_SUB_TYPE EQ to + X.RDB$OUTPUT_SUB_TYPE EQ to if (!REQUEST(irq_r_filters)) REQUEST(irq_r_filters) = request; MET_exact_name(X.RDB$MODULE_NAME); MET_exact_name(X.RDB$ENTRYPOINT); - filter = + filter = (STATUS (*)(USHORT, CTL)) ISC_lookup_entrypoint(X.RDB$MODULE_NAME, X.RDB$ENTRYPOINT, ISC_EXT_LIB_PATH_ENV); if (filter) @@ -1271,7 +1272,7 @@ BLF MET_lookup_filter(TDBB tdbb, SSHORT from, SSHORT to) strlen(X.RDB$FUNCTION_NAME) + strlen(X.RDB$ENTRYPOINT) + strlen(X.RDB$MODULE_NAME) + 1); - sprintf(exception_msg->str_data, EXCEPTION_MESSAGE, + sprintf((char*)exception_msg->str_data, EXCEPTION_MESSAGE, X.RDB$FUNCTION_NAME, X.RDB$ENTRYPOINT, X.RDB$MODULE_NAME); blf->blf_exception_message = exception_msg; } @@ -1379,7 +1380,7 @@ void DLL_EXPORT MET_lookup_index( FOR(REQUEST_HANDLE request) X IN RDB$INDICES WITH X.RDB$RELATION_NAME EQ relation_name - AND X.RDB$INDEX_ID EQ number + AND X.RDB$INDEX_ID EQ number if (!REQUEST(irq_l_index)) REQUEST(irq_l_index) = request; @@ -1497,7 +1498,7 @@ int MET_lookup_partner( IDX.RDB$INDEX_NAME STARTING WITH "RDB$FOREIGN" AND IDX.RDB$RELATION_NAME EQ relation->rel_name AND IND.RDB$INDEX_NAME EQ IDX.RDB$FOREIGN_KEY AND - IND.RDB$UNIQUE_FLAG NOT MISSING + IND.RDB$UNIQUE_FLAG NOT MISSING if (!REQUEST(irq_foreign1)) { @@ -1515,7 +1516,7 @@ int MET_lookup_partner( references->frgn_reference_ids->vec_object[index_number] = (BLK) (IDX.RDB$INDEX_ID - 1); - + ALL_vector(dbb->dbb_permanent, &references->frgn_relations, (USHORT)index_number); @@ -1627,7 +1628,7 @@ int MET_lookup_partner( keys. */ found = FALSE; - request = NULL_PTR; + request = (BLK) NULL_PTR; FOR(REQUEST_HANDLE request) IDX IN RDB$INDICES CROSS @@ -1735,7 +1736,7 @@ PRC MET_lookup_procedure(TDBB tdbb, SCHAR * name) && (procedure->prc_flags & PRC_scanned) && !(procedure->prc_flags & PRC_being_scanned) && !(procedure->prc_flags & PRC_being_altered) - && (p = procedure->prc_name->str_data)) for (q = name; + && (p = (SCHAR*)procedure->prc_name->str_data)) for (q = (SCHAR*)name; *p == *q; p++, q++) if (*p == 0) @@ -1751,7 +1752,7 @@ PRC MET_lookup_procedure(TDBB tdbb, SCHAR * name) FOR(REQUEST_HANDLE request) P IN RDB$PROCEDURES WITH P.RDB$PROCEDURE_NAME EQ name - if (!REQUEST(irq_l_procedure)) + if (!REQUEST(irq_l_procedure)) REQUEST(irq_l_procedure) = request; procedure = MET_procedure(tdbb, P.RDB$PROCEDURE_ID, 0); @@ -1808,7 +1809,7 @@ PRC MET_lookup_procedure_id(TDBB tdbb, FOR(REQUEST_HANDLE request) P IN RDB$PROCEDURES WITH P.RDB$PROCEDURE_ID EQ id - if (!REQUEST(irq_l_proc_id)) + if (!REQUEST(irq_l_proc_id)) REQUEST(irq_l_proc_id) = request; procedure = MET_procedure(tdbb, P.RDB$PROCEDURE_ID, flags); @@ -2048,7 +2049,7 @@ NOD MET_parse_blob(TDBB tdbb, node = PAR_blr( tdbb, relation, temp->str_data, - NULL_PTR, + (CSB)NULL_PTR, csb_ptr, request_ptr, trigger, @@ -2158,8 +2159,8 @@ void MET_parse_sys_trigger(TDBB tdbb, REL relation) PAR_blr(tdbb, relation, blr, - NULL_PTR, - NULL_PTR, + (CSB) NULL_PTR, + (CSB*) NULL_PTR, &request, TRUE, par_flags); @@ -2209,7 +2210,7 @@ void MET_prepare( TDBB tdbb, TRA transaction, USHORT length, UCHAR * msg) { /************************************** * - * M E T _ p r e p a r e + * M E T _ p r e p a r e * ************************************** * @@ -2291,13 +2292,13 @@ PRC MET_procedure(TDBB tdbb, int id, USHORT flags) dbb->dbb_flags |= DBB_sp_rec_mutex_init; } THREAD_EXIT; - + if (THD_rec_mutex_lock(&dbb->dbb_sp_rec_mutex)) { THREAD_ENTER; return NULL; } - + THREAD_ENTER; #endif /* SUPERSERVER */ @@ -2314,18 +2315,18 @@ PRC MET_procedure(TDBB tdbb, int id, USHORT flags) /* To avoid scanning recursive procedure's blr recursively let's make use of PRC_being_scanned bit. Because this bit is set later in the code, it is not set when we are here first time. - If (in case of rec. procedure) we get here second time it is + If (in case of rec. procedure) we get here second time it is already set and we return half baked procedure. In case of superserver this code is under the rec. mutex protection, thus the only guy (thread) who can get here and see PRC_being_scanned bit set is the guy which started procedure scan and currently holds the mutex. - In case of classic, there is always only one guy and if it + In case of classic, there is always only one guy and if it sees PRC_being_scanned bit set it is safe to assume it is here second time. If procedure has already been scanned - return. This condition - is for those threads that did not find procedure in cach and + is for those threads that did not find procedure in cach and came here to get it from disk. But only one was able to lock the mutex and do the scanning, others were waiting. As soon as the first thread releases the mutex another thread gets in and @@ -2376,7 +2377,7 @@ PRC MET_procedure(TDBB tdbb, int id, USHORT flags) lock->lck_owner_handle = LCK_get_owner_handle(tdbb, lock->lck_type); lock->lck_object = (BLK) procedure; /* TMN: Beware - this is a hairy AND UGLY cast */ - lock->lck_ast = (int (*)()) blocking_ast_procedure; + lock->lck_ast = (int (*)(void*)) blocking_ast_procedure; LCK_lock(tdbb, procedure->prc_existence_lock, LCK_SR, TRUE); @@ -2562,7 +2563,7 @@ REL MET_relation(TDBB tdbb, USHORT id) major_version = (SSHORT) dbb->dbb_ods_version; minor_original = (SSHORT) dbb->dbb_minor_original; -/* From ODS 9 onwards, the first 128 relation IDS have been +/* From ODS 9 onwards, the first 128 relation IDS have been reserved for system relations */ if (ENCODE_ODS(major_version, minor_original) < ODS_9_0) max_sys_rel = (USHORT) USER_REL_INIT_ID_ODS8 - 1; @@ -2585,7 +2586,7 @@ REL MET_relation(TDBB tdbb, USHORT id) lock->lck_owner_handle = LCK_get_owner_handle(tdbb, lock->lck_type); lock->lck_object = (BLK) relation; /* TMN: Beware - this is a hairy AND UGLY cast */ - lock->lck_ast = (int (*)()) blocking_ast_relation; + lock->lck_ast = (int (*)(void*)) blocking_ast_relation; relation->rel_flags |= (REL_check_existence | REL_check_partners); return relation; @@ -2646,7 +2647,7 @@ void MET_remove_procedure( TDBB tdbb, int id, PRC procedure) /* Procedure that is being altered may have references to it by other procedures via pointer to current meta - data structure, so don't loose the structure or the pointer. + data structure, so don't loose the structure or the pointer. if (!(procedure->prc_flags & PRC_being_altered)) vector->vec_object [id] = (BLK) NULL_PTR; */ @@ -2741,7 +2742,7 @@ void MET_revoke( FIRST 1 P IN RDB$USER_PRIVILEGES WITH P.RDB$RELATION_NAME EQ relation AND P.RDB$PRIVILEGE EQ privilege AND - P.RDB$USER EQ revokee + P.RDB$USER EQ revokee if (!REQUEST(irq_revoke1)) REQUEST(irq_revoke1) = request; @@ -2763,7 +2764,7 @@ void MET_revoke( P IN RDB$USER_PRIVILEGES WITH P.RDB$RELATION_NAME EQ relation AND P.RDB$PRIVILEGE EQ privilege AND - P.RDB$GRANTOR EQ revokee + P.RDB$GRANTOR EQ revokee if (!REQUEST(irq_revoke2)) REQUEST(irq_revoke2) = request; @@ -2859,7 +2860,7 @@ void MET_scan_relation( TDBB tdbb, REL relation) sys_triggers = (relation->rel_flags & REL_sys_triggers) ? TRUE : FALSE; relation->rel_flags &= ~(REL_get_dependencies | REL_sys_triggers); for (n = 0; n < TRIGGER_MAX; n++) - triggers[n] = NULL_PTR; + triggers[n] = (VEC) NULL_PTR; old_pool = tdbb->tdbb_default; tdbb->tdbb_default = dbb->dbb_permanent; @@ -2922,10 +2923,10 @@ void MET_scan_relation( TDBB tdbb, REL relation) relation->rel_view_rse = (RSE) MET_get_dependencies( tdbb, relation, - NULL_PTR, - NULL_PTR, + (TEXT*)NULL_PTR, + (CSB) NULL_PTR, (SLONG*)&REL.RDB$VIEW_BLR, - NULL_PTR, + (REQ*) NULL_PTR, &csb, REL.RDB$RELATION_NAME, obj_view); @@ -2937,7 +2938,7 @@ void MET_scan_relation( TDBB tdbb, REL relation) relation, (SLONG*)&REL.RDB$VIEW_BLR, &csb, - NULL_PTR, + (REQ*) NULL_PTR, FALSE, FALSE); } @@ -3001,7 +3002,7 @@ void MET_scan_relation( TDBB tdbb, REL relation) /* The field exists. If its name hasn't changed, then there's no need to copy anything. */ - if (!strcmp(p, field->fld_name)) + if (!strcmp((char*)p, (char*)field->fld_name)) break; name = (STR) ALLOCPV(type_str, length); @@ -3016,7 +3017,7 @@ void MET_scan_relation( TDBB tdbb, REL relation) * TMN: This const_cast equivalent is safe since * we just allocated the struct. */ - strcpy((char*)field->fld_name, p); + strcpy((char*)field->fld_name, (char*)p); field->fld_length = strlen(field->fld_name); break; @@ -3026,53 +3027,53 @@ void MET_scan_relation( TDBB tdbb, REL relation) case RSR_base_field: field->fld_source = - PAR_make_field(tdbb, csb, view_context, p); + PAR_make_field(tdbb, csb, view_context, (TEXT*)p); break; case RSR_computed_blr: field->fld_computation = (dependencies) ? MET_get_dependencies(tdbb, relation, - p, + (TEXT*) p, csb, - NULL_PTR, - NULL_PTR, - NULL_PTR, + (SLONG*) NULL_PTR, + (REQ*) NULL_PTR, + (CSB*) NULL_PTR, field->fld_name, obj_computed) : - PAR_blr(tdbb, relation, p, csb, NULL_PTR, NULL_PTR, FALSE, + PAR_blr(tdbb, relation, p, csb, (CSB*) NULL_PTR, (REQ*) NULL_PTR, FALSE, 0); break; case RSR_missing_value: field->fld_missing_value = - PAR_blr(tdbb, relation, p, csb, NULL_PTR, NULL_PTR, FALSE, + PAR_blr(tdbb, relation, p, csb, (CSB*) NULL_PTR, (REQ*) NULL_PTR, FALSE, 0); break; case RSR_default_value: field->fld_default_value = - PAR_blr(tdbb, relation, p, csb, NULL_PTR, NULL_PTR, FALSE, + PAR_blr(tdbb, relation, p, csb, (CSB*) NULL_PTR, (REQ*) NULL_PTR, FALSE, 0); break; case RSR_validation_blr: field->fld_validation = - PAR_blr(tdbb, relation, p, csb, NULL_PTR, NULL_PTR, FALSE, + PAR_blr(tdbb, relation, p, csb, (CSB*) NULL_PTR, (REQ*) NULL_PTR, FALSE, csb_validation); break; case RSR_field_not_null: field->fld_not_null = - PAR_blr(tdbb, relation, p, csb, NULL_PTR, NULL_PTR, FALSE, + PAR_blr(tdbb, relation, p, csb, (CSB*) NULL_PTR, (REQ*) NULL_PTR, FALSE, csb_validation); break; case RSR_security_class: - field->fld_security_name = MET_save_name(tdbb, p); + field->fld_security_name = MET_save_name(tdbb, (TEXT*) p); break; case RSR_trigger_name: - MET_load_trigger(tdbb, relation, p, triggers); + MET_load_trigger(tdbb, relation, (TEXT*) p, triggers); break; case RSR_dimensions: @@ -3102,11 +3103,11 @@ void MET_scan_relation( TDBB tdbb, REL relation) ALL_release((FRB)csb); } -/* release any triggers in case of a rescan, but not if the rescan +/* release any triggers in case of a rescan, but not if the rescan hapenned while system triggers were being loaded. */ if (!(relation->rel_flags & REL_sys_trigs_being_loaded)) { - /* if we are scanning a system relation during loading the system + /* if we are scanning a system relation during loading the system triggers, (during parsing its blr actually), we must not release the existing system triggers; because we have already set the relation->rel_flag to not have REL_sys_trig, so these @@ -3114,7 +3115,7 @@ void MET_scan_relation( TDBB tdbb, REL relation) /* We have just loaded the triggers onto the local vector triggers. Its now time to place them at their rightful place ie the relation - block. + block. */ tmp_vector = relation->rel_pre_store; relation->rel_pre_store = triggers[TRIGGER_PRE_STORE]; @@ -3176,7 +3177,7 @@ TEXT *MET_trigger_msg(TDBB tdbb, TEXT * name, USHORT number) FOR(REQUEST_HANDLE request) MSG IN RDB$TRIGGER_MESSAGES WITH MSG.RDB$TRIGGER_NAME EQ name AND - MSG.RDB$MESSAGE_NUMBER EQ number + MSG.RDB$MESSAGE_NUMBER EQ number if (!REQUEST(irq_s_msgs)) REQUEST(irq_s_msgs) = request; @@ -3241,8 +3242,8 @@ void MET_update_transaction( TDBB tdbb, TRA transaction, USHORT flag) request = (BLK) CMP_find_request(tdbb, irq_m_trans, IRQ_REQUESTS); FOR(REQUEST_HANDLE request) - X IN RDB$TRANSACTIONS - WITH X.RDB$TRANSACTION_ID EQ transaction->tra_number + X IN RDB$TRANSACTIONS + WITH X.RDB$TRANSACTION_ID EQ transaction->tra_number if (!REQUEST(irq_m_trans)) REQUEST(irq_m_trans) = request; @@ -3380,7 +3381,7 @@ static void get_trigger( MET_parse_blob( tdbb, relation, blob_id, - NULL_PTR, + (CSB*) NULL_PTR, &request, TRUE, (BOOLEAN)((flags & TRG_ignore_perm) ? TRUE : FALSE)); @@ -3444,7 +3445,7 @@ static BOOLEAN get_type( TDBB tdbb, SSHORT * id, UCHAR * name, UCHAR * field) FOR(REQUEST_HANDLE handle) FIRST 1 T IN RDB$TYPES WITH T.RDB$FIELD_NAME EQ field AND - T.RDB$TYPE_NAME EQ buffer + T.RDB$TYPE_NAME EQ buffer found = TRUE; *id = T.RDB$TYPE; @@ -3464,9 +3465,9 @@ static void lookup_view_contexts( TDBB tdbb, REL view) ************************************** * * Functional description - * Lookup view contexts and store in a linked + * Lookup view contexts and store in a linked * list on the relation block. - * + * **************************************/ DBB dbb; BLK request; @@ -3483,7 +3484,7 @@ static void lookup_view_contexts( TDBB tdbb, REL view) FOR(REQUEST_HANDLE request) V IN RDB$VIEW_RELATIONS WITH V.RDB$VIEW_NAME EQ view->rel_name - SORTED BY V.RDB$VIEW_CONTEXT + SORTED BY V.RDB$VIEW_CONTEXT if (!REQUEST(irq_view_context)) REQUEST(irq_view_context) = request; @@ -3502,7 +3503,7 @@ static void lookup_view_contexts( TDBB tdbb, REL view) length = name_length(V.RDB$CONTEXT_NAME); alias = (STR) ALLOCDV(type_str, length + 1); V.RDB$CONTEXT_NAME[length] = 0; - strcpy(alias->str_data, V.RDB$CONTEXT_NAME); + strcpy((char*)alias->str_data, V.RDB$CONTEXT_NAME); alias->str_length = length; view_context->vcx_context_name = alias; @@ -3512,7 +3513,7 @@ static void lookup_view_contexts( TDBB tdbb, REL view) length = name_length(V.RDB$RELATION_NAME); alias = (STR) ALLOCDV(type_str, length + 1); V.RDB$RELATION_NAME[length] = 0; - strcpy(alias->str_data, V.RDB$RELATION_NAME); + strcpy((char*)alias->str_data, V.RDB$RELATION_NAME); alias->str_length = length; view_context->vcx_relation_name = alias; @@ -3604,7 +3605,7 @@ static NOD parse_procedure_blr( par_messages(tdbb, temp->str_data, (USHORT) blob->blb_length, procedure, csb_ptr); node = - PAR_blr(tdbb, NULL_PTR, temp->str_data, NULL_PTR, csb_ptr, + PAR_blr(tdbb, (REL) NULL_PTR, temp->str_data, (CSB) NULL_PTR, csb_ptr, &procedure->prc_request, FALSE, 0); ALL_release((FRB)temp); @@ -3754,7 +3755,7 @@ static BOOLEAN resolve_charset_and_collation( * NULL means use the default collation for (charset). * * Outputs: - * (*id) + * (*id) * Set to character set specified by this name. * * Return: @@ -3782,7 +3783,8 @@ static BOOLEAN resolve_charset_and_collation( charset = (UCHAR *) DEFAULT_CHARACTER_SET_NAME; charset_id = 0; - if (get_type(tdbb, &charset_id, charset, "RDB$CHARACTER_SET_NAME")) + // CONST CAST + if (get_type(tdbb, &charset_id, charset, (UCHAR*) "RDB$CHARACTER_SET_NAME")) { *id = charset_id; return TRUE; @@ -3793,7 +3795,7 @@ static BOOLEAN resolve_charset_and_collation( FOR(REQUEST_HANDLE handle) FIRST 1 CS IN RDB$CHARACTER_SETS - WITH CS.RDB$CHARACTER_SET_NAME EQ charset + WITH CS.RDB$CHARACTER_SET_NAME EQ charset found = TRUE; *id = CS.RDB$CHARACTER_SET_ID; @@ -3807,7 +3809,7 @@ static BOOLEAN resolve_charset_and_collation( { FOR(REQUEST_HANDLE handle) FIRST 1 COL IN RDB$COLLATIONS - WITH COL.RDB$COLLATION_NAME EQ collation + WITH COL.RDB$COLLATION_NAME EQ collation found = TRUE; *id = COL.RDB$CHARACTER_SET_ID; @@ -3825,7 +3827,7 @@ static BOOLEAN resolve_charset_and_collation( WITH AL1.RDB$FIELD_NAME EQ "RDB$CHARACTER_SET_NAME" AND AL1.RDB$TYPE_NAME EQ charset AND COL.RDB$COLLATION_NAME EQ collation - AND AL1.RDB$TYPE EQ CS.RDB$CHARACTER_SET_ID + AND AL1.RDB$TYPE EQ CS.RDB$CHARACTER_SET_ID found = TRUE; *id = CS.RDB$CHARACTER_SET_ID; @@ -3908,7 +3910,7 @@ static void store_dependencies(TDBB tdbb, * * Functional description * Store records in RDB$DEPENDENCIES - * corresponding to the objects found during + * corresponding to the objects found during * compilation of blr for a trigger, view, etc. * **************************************/ @@ -3948,7 +3950,7 @@ static void store_dependencies(TDBB tdbb, if (dpdo_type == obj_procedure) { procedure = (PRC) node->nod_arg[e_dep_object]; - dpdo_name = procedure->prc_name->str_data; + dpdo_name = (TEXT*) procedure->prc_name->str_data; } else { @@ -4087,9 +4089,9 @@ static BOOLEAN verify_TRG_ignore_perm(TDBB tdbb, TEXT* trig_name) * Functional description * Return TRUE if this trigger can go through without any permission * checks. Currently, the only class of triggers that can go - * through without permission checks are + * through without permission checks are * (a) two system triggers (RDB$TRIGGERS_34 and RDB$TRIGGERS_35) - * (b) those defined for referential integrity actions such as, + * (b) those defined for referential integrity actions such as, * set null, set default, and cascade. * **************************************/ @@ -4143,4 +4145,4 @@ static BOOLEAN verify_TRG_ignore_perm(TDBB tdbb, TEXT* trig_name) } return FALSE; -} \ No newline at end of file +} diff --git a/src/jrd/pcmet.e b/src/jrd/pcmet.epp similarity index 100% rename from src/jrd/pcmet.e rename to src/jrd/pcmet.epp diff --git a/src/jrd/scl.e b/src/jrd/scl.epp similarity index 97% rename from src/jrd/scl.e rename to src/jrd/scl.epp index 4daca72bfe..ae1cde3ce7 100644 --- a/src/jrd/scl.e +++ b/src/jrd/scl.epp @@ -129,7 +129,7 @@ void SCL_check_access(SCL s_class, if (s_class && (s_class->scl_flags & SCL_corrupt)) { - ERR_post(gds__no_priv, gds_arg_string, "(ACL unrecognized)", + ERR_post(gds_no_priv, gds_arg_string, "(ACL unrecognized)", gds_arg_string, "security_class", gds_arg_string, s_class->scl_name, 0); @@ -171,7 +171,7 @@ void SCL_check_access(SCL s_class, } } - ERR_post(gds__no_priv, + ERR_post(gds_no_priv, gds_arg_string, names->p_names_string, gds_arg_string, type, gds_arg_string, ERR_cstring(name), @@ -308,7 +308,7 @@ void SCL_check_procedure( DSC * dsc_name, USHORT mask) assert(dsc_name->dsc_dtype == dtype_text); for (p = name, endp = name + sizeof(name) - 1, - q = dsc_name->dsc_address, endq = q + dsc_name->dsc_length; + q = (TEXT*)dsc_name->dsc_address, endq = q + dsc_name->dsc_length; q < endq && p < endp && *q && *q != ' ';) *p++ = *q++; *p = 0; @@ -363,7 +363,7 @@ void SCL_check_relation( DSC * dsc_name, USHORT mask) assert(dsc_name->dsc_dtype == dtype_text); for (p = name, endp = name + sizeof(name) - 1, - q = dsc_name->dsc_address, endq = q + dsc_name->dsc_length; + q = (TEXT*)dsc_name->dsc_address, endq = q + dsc_name->dsc_length; q < endq && p < endp && *q && *q != ' ';) *p++ = *q++; *p = 0; @@ -450,8 +450,8 @@ SCL SCL_get_class(/* INOUT */ TEXT* string) q = s_class->scl_name; while (*q++ = *p++) ; - s_class->scl_flags = (USHORT) compute_access(tdbb, s_class, NULL_PTR, - NULL_PTR, NULL_PTR); + s_class->scl_flags = (USHORT) compute_access(tdbb, s_class, (REL)NULL_PTR, + (TEXT*)NULL_PTR, (TEXT*)NULL_PTR); if (s_class->scl_flags & SCL_exists) { @@ -585,7 +585,7 @@ void SCL_init(BOOLEAN create, { if (!user_name || (!password_enc && !password)) { - ERR_post(gds__login, 0); + ERR_post(gds_login, 0); } if (!internal) @@ -771,8 +771,8 @@ SCL SCL_recompute_class(TDBB tdbb, TEXT * string) return NULL; s_class->scl_flags = (USHORT) compute_access(tdbb, s_class, - NULL_PTR, NULL_PTR, - NULL_PTR); + (REL) NULL_PTR, (TEXT*) NULL_PTR, + (TEXT*) NULL_PTR); if (s_class->scl_flags & SCL_exists) return s_class; @@ -949,13 +949,13 @@ static BOOLEAN check_user_group(CONST TEXT* acl, else { /* processing group name */ - user_group_name = buffer->str_data; + user_group_name = (TEXT*) buffer->str_data; do { one_char = *acl++; *user_group_name++ = LOWWER(one_char); } while (--l); *user_group_name = '\0'; - user_group_name = buffer->str_data; + user_group_name = (TEXT*) buffer->str_data; /* ** convert unix group name to unix group id */ @@ -1056,7 +1056,7 @@ static SLONG compute_access(TDBB tdbb, /* Get some space that's not off the stack */ str_buffer = (STR) ALLOCPV(type_str, BLOB_BUFFER_SIZE); - buffer = str_buffer->str_data; + buffer = (TEXT*) str_buffer->str_data; request = (BLK) CMP_find_request(tdbb, irq_l_security, IRQ_REQUESTS); @@ -1072,7 +1072,7 @@ static SLONG compute_access(TDBB tdbb, acl = buffer; while (TRUE) { - acl += BLB_get_segment(tdbb, blob, acl, + acl += BLB_get_segment(tdbb, blob, (UCHAR*)acl, (USHORT) (length - ((acl - buffer) * (sizeof(buffer[0]))))); @@ -1084,7 +1084,7 @@ static SLONG compute_access(TDBB tdbb, ULONG old_offset = (ULONG) (acl - buffer); length += BLOB_BUFFER_SIZE; (void) ALL_extend((BLK *) & str_buffer, length); - buffer = str_buffer->str_data; + buffer = (TEXT*) str_buffer->str_data; acl = buffer + old_offset; } } @@ -1101,7 +1101,7 @@ static SLONG compute_access(TDBB tdbb, trg_name, prc_name, (STR*)&str_buffer, - length_ptr); + (ULONG*)length_ptr); } END_FOR; diff --git a/src/jrd/stats.e b/src/jrd/stats.epp similarity index 100% rename from src/jrd/stats.e rename to src/jrd/stats.epp diff --git a/src/jrd/status.cpp b/src/jrd/status.cpp new file mode 100644 index 0000000000..9ed05fb176 --- /dev/null +++ b/src/jrd/status.cpp @@ -0,0 +1,133 @@ +// status.cpp +// +// Copyright 2001 Mikael Nordell +// +// This file is part of the firebird RDBMS engine, and as such +// is only allowed to be used within that engine, where it may +// be used freely. Any other use is prohibited. +// + +#include +#include +#include +#include "../jrd/status.h" +#include "../jrd/gdsassert.h" +#include "../jrd/codes.h" +#include "../jrd/gds_proto.h" + + +/* The following function is used to stuff variable number of error message + arguments from stack to the status_vector. This macro should be the + first statement in a routine where it is invoked. */ + +/* Get the addresses of the argument vector and the status vector, and do + word-wise copy. */ + +void STUFF_STATUS_function(STATUS* status_vector, STATUS status, va_list args) +{ + int type, len; + + STATUS* p = status_vector; + + *p++ = gds_arg_gds; + *p++ = status; + + while ((type = va_arg(args, int)) && ((p - status_vector) < 17)) + { + switch (*p++ = type) + { + case gds_arg_gds: + *p++ = va_arg(args, STATUS); + break; + + case gds_arg_string: + { + STATUS* q = va_arg(args, STATUS*); + if (strlen((TEXT *) q) >= MAX_ERRSTR_LEN) + { + *(p - 1) = gds_arg_cstring; + *p++ = (STATUS) MAX_ERRSTR_LEN; + } + *p++ = (STATUS) q; + } + break; + + case gds_arg_interpreted: + *p++ = (STATUS) va_arg(args, TEXT *); + break; + + case gds_arg_cstring: + len = (int) va_arg(args, int); + *p++ = (STATUS) (len >= MAX_ERRSTR_LEN) ? MAX_ERRSTR_LEN : len; + *p++ = (STATUS) va_arg(args, TEXT *); + break; + + case gds_arg_number: + *p++ = (STATUS) va_arg(args, SLONG); + break; + + case gds_arg_vms: + case gds_arg_unix: + case gds_arg_domain: + case gds_arg_dos: + case gds_arg_mpexl: + case gds_arg_next_mach: + case gds_arg_netware: + case gds_arg_win32: + default: + *p++ = (STATUS) va_arg(args, int); + break; + } + } + *p = gds_arg_end; +} + + +/** Check that we never overrun the status vector. The status + * vector is 20 elements. The maximum is 3 entries for a + * type. So check for 17 or less + */ + +void PARSE_STATUS(STATUS * status_vector, int &length, int &warning) +{ + int i; + warning = 0; + length = 0; + + for (i = 0; status_vector[i] != gds_arg_end; i++, length++) + { + switch (status_vector[i]) + { + case isc_arg_warning: + if (!warning) + warning = i; // find the very first + // fallthrought intended + case gds_arg_gds: + case gds_arg_string: + case gds_arg_number: + case gds_arg_vms: + case gds_arg_unix: + case gds_arg_domain: + case gds_arg_dos: + case gds_arg_mpexl: + case gds_arg_next_mach: + case gds_arg_netware: + case gds_arg_win32: + i++; + length++; + break; + + case gds_arg_cstring: + i += 2; + length += 2; + break; + + default: + assert(FALSE); + break; + } + } + if (i) { + length++; // gds_arg_end is counted + } +} diff --git a/src/jrd/status.h b/src/jrd/status.h new file mode 100644 index 0000000000..4d7ce38e63 --- /dev/null +++ b/src/jrd/status.h @@ -0,0 +1,23 @@ +#ifndef FB_MISC_STATUS_H +#define FB_MISC_STATUS_H + +#include // size_t +#include "../jrd/common.h" // STATUS + +#ifdef HAVE_STDARG_H +#include +#endif + +#define MAX_ERRMSG_LEN 128 +#define MAX_ERRSTR_LEN 255 + +#ifdef __cplusplus +/* only allow these functions from C++ code (use of reference) */ + +//void STUFF_STATUS_function(STATUS* status_vector, STATUS status, va_list args); +void STUFF_STATUS_function(STATUS* , STATUS , va_list ); + +void PARSE_STATUS(STATUS * status_vector, int &length, int &warning); +#endif + +#endif // FB_MISC_STATUS_H diff --git a/src/makefiles/000_readme b/src/makefiles/000_readme new file mode 100644 index 0000000000..cd407db779 --- /dev/null +++ b/src/makefiles/000_readme @@ -0,0 +1,318 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +Note: This document comes from the original source distribution +from Inprise. You should be aware that it refers to some +Inprise specific things, mostly appears to be written pre-CVS +and pre interbase 5.x. It is left here for the moment, in orginal +form, because it still contains some useful information. + +Other, more current sources of information: +The Doc Manager area of the Firebird project on sourceforge.net + http://sourceforge.net/projects/firebird/ +The build_docs directory off the interbase tree in this CVS repository +The ib-build mailing list at mers.com, also available as + news://news.mers.com/mers.interbase.build + +Reed Mideke, 8/15/2000 + +Original file follows: + + Instructions for Building a Kit + + 1. Create a top level directory + 2. cd to the top level directory and copy shell script setup_dirs + into it. setup_dirs can be found in marion under the builds + component. A no more than day old copy should also be located + in /usr/gds/dev/HP700/original/setup_dirs on the HP's. + 3. Run setup_dirs (you may need to "chmod +x setup_dirs" first) + 3.a Perform steps 3.a-3.d only if you received messages indicating + that setup_dirs failed. cd to system_id/original and copy into + it, all files from the builds component in marion. No more than + day old copies should be available in /usr/gds/dev/HP700/original/* + on the HP's. + 3.b Run setup_prots (you may need to "chmod +x setup_prots" first) + 3.c Run platform + 3.d cd ../.. + 4.a Perform this step only if you are creating the master source + tree for a new kit on the Apollos. Run HP700/original/setup_gdbs. + Then create the marion database for the kit. Do not run + setup_gdbs if there is a marion.gdb present. It will delete it! + 4.b Perfom this step only if your are creating a new source tree on SCO. + Copy the file 87ftol.o and _fltused.o from the current dev tree on + SCO (goofy:/usr/gds/dev/jrd) or other SCO source tree. + 5. Copy gpre to interbase/bin + Copy isc_license.dat to interbase + Copy interbase.msg to interbase + Copy gds_pipe to interbase/bin if the machine doesn't have shared + libraries. + Copy gds.sl, gds.so.0, or whatever the shared library is called to + interbase/lib if the machine does have shared libraries. + 6. Run refresh.all + 7. Run build_kit + +****************************************************************** + +*** How to build an InterBase release kit on an UNIX platform *** + +Modified by: B.Sriram 07-Mar-1997 +Created by: B.Sriram 15-May-1996 + +Pre-requisites: +############## + - An installed interbase kit in the build machine. + ( this will allow us to use 'gpre', marion etc. ) + +Assumptions: +############ + - You are logged into the 'build' machine for the respective + platform. The build machines currently used are mentioned + at the bottom. + - Create a /usr/gds. directory structure with 100 MB + free. + a. /usr/gds./bin, tools, tmp etc. + - Populate 'bin' directory, and make sure '/usr/gds/sbin + points to /usr/gds./bin + - $BUILD_DIR_PARENT is the parent of the build directory. + - $BUILD_DIR is the build directory. + For eg. p4.0c_hp for a preproduction kit on HP platform + - $MARION_DIR is the pathname inclusive of the host which + consists of the 'marion' database. + - platform for build is HP10 + - kit is a pre-production kit + +Actions to be followed: +###################### + - cd $BUILD_DIR_PARENT + - mkdir $BUILD_DIR + - cd $BUILD_DIR + - marion -c builds -d $MARION_DIR/marion.gdb + smm> sm setup_dirs + smm> quit + - chmod +x setup_dirs + - setup_dirs HP10 PROD yoda:/usr/gds.yoda/dev [SUPER] + /* The 1st argument to 'setup_dirs' should be one of the + valid platforms supported. Just run 'setup_dirs' with no + args. to get a list of valid platforms. */ + The 'SUPER' argument is to be supplied for a SUPERSERVER build + - refresh.all /* This will get the latest version of + all the source files from the 'marion' + database. */ + - touch dsql/parse.c /* so as not to run YACC.cosmetic requirement */ + - cp /usr/interbase/bin/gpre interbase/bin + - cp /usr/interbase/lib/gds.sl interbase/lib + /* Copy 'gpre' and the shared library for + pre-processing Embedded SQL code. 'makefile' + access source/interbase/bin path */ + - cp /usr/interbase/{isc_license.dat,interbase.msg,isc4.gdb} interbase + /* Required for 'gpre' to run */ + - cp /usr/interbase/lib/bridge5 interbase/lib + /* Only on platforms that support BRIDGE */ + - cp /usr/gds/v4.0c_sc/interbase/bin/gds_pipe5 interbase/bin + /* Only on SCO */ + - cd jrd + - vi license.h /* Edit and modify version string of product + release. For eg: from V4.0B to P4.0C on + all occurences of V4.0B */ + - make codes + - codes /* This will create ibase.h and other needed + include files. */ + - cd .. + - build_kit HP10 + - /* Remove un-neccessary files */ + - rm interbase/bin/gds_wal* + rm interbase/bin/gds_cache* + - copy gds_pipe5 (bridge executable) from one of the + v4.0/interbase/bin directories. Also, copy lock_header_template + from v4.0/interbase + - Copy the appropriate README file into the interbase/README file. + - rasu set_prot /* Set protection on all to 'root' owner only */ + + *** Various forms of delivery *** + The kit can be delivered to QA/mftg in a number of different media. + + * Pre-production kit to be send as 'tar' files through our + 'FTP' site bekins.borland.com. + - maketar /* Shell script to invoke 'tar' and create a IB kit + 'tar' file. Before executing this script, edit it + and put the appropriate 'tar' filename */ + - Inform QA about the location of the 'tar' file. + + * Kit for certification to QA/Mftg. + + - maketape /* Put the files and directories under interbase/ + directory in 'tar' format in the tape. Before + executing this script, edit it and specify the + proper device for the archive. */ + + --- OR --- + - On some platforms we use 'pkg' utility. Read information about + this utility later on in this document OR view the document + /usr/gds/builder/pkg.README + +----------------------------------------------------------------------- + +Useful Utilities : +################ + - rasu unset_prot builder + /* Gives all permission to 'builder' for all files. */ + - rasu set_prot + /* Gives all permission only to 'root' for all files. */ + - maketar + /* exists on one of the kit directories. Edit and change 'tar' + filename. This command is to be executed to make a tar file + of the InterBase kit. */ + +------------------------------------------------------------- + +################################################################## + pkg.README +################################################################## + + pkgmk produces an installable package to be used as input to + the pkgadd command. The command uses the package prototype file + as input and creates a pkgmap file. The contents for each entry + in the prototype file is copied to the appropriate output location. + + + pkgproto scans the indicated paths and generates prototype + file entries that may be used as input to the pkgmk command. + + pkgtrans translates an installable package from one format + to another. It translates: + a file system format to a datastream + a datastream to a file system format + one file system format to another file system format + + + pkgparam displays the value associated with the parameter or + parameters requested on the command line. The values are + located in either the pkginfo file for pkginst or from the + specific file named with the -f option. + + pkginfo displays information about software packages which + are installed on the system (with the first synopsis) or + which reside on a particular device or directory (with the + second synopsis). Here is a sample. + +$ pkginfo -d `pwd`/pkg +application InterBase Interbase RDBMS Software +$ pkginfo -l -d `pwd`/pkg + PKGINST: InterBase + NAME: Interbase RDBMS Software + CATEGORY: application + ARCH: sparc + VERSION: InterBase Version B4.0E + BASEDIR: /usr + PSTAMP: beta + STATUS: spooled + FILES: 169 spooled pathnames + 9 directories + 18 executables + 4 setuid/setgid executables + 5 package information files + 20947 blocks used (approx) + +$ + +How to build a package: +---------------------- + +1. vi pkginfo /* change version */ +2. pkgproto `pwd`/interbase=\$IBASEDIR/interbase >> prototype + /* The $IBASEDIR in the path looks bogus. We should decide + how that should be, and fix it up for the future. --cjewell */ +3. Edit 'prototype' file and add to the beginning of the file: +i pkginfo +i request +i postinstall +i preremove +4. mkdir pkg +5. pkgmk -d `pwd`/pkg -p beta + --where beta is just any string label for the package instance? +6. pkgtrans `pwd`/pkg /dev/rmt/0m + --for tape reboot if necessary + +# Platforms currently using the 'pkg' format are: +# Solaris, DG/UX and NCR + +################################################################## + +*** Platform specific information (notes created during previous build) *** + +#AIX 3.2.4 watson + Added interbase/isc_config to 'maketar' to be included in the kit. +#Solaris 2.4 sogood + Added interbase/isc_config to 'maketar' to be included in the kit. + - make -f make_kit utilities + in order to make a new interbase/isc4.gdb +#HP-UX 10.01 molokai + .Edited build_kit locally to set CC_PATH to /opt/softbench/bin, + since 'cc' was being used from /usr/ccs/bin which is wrong. +#SCO 3.0 goofy + .In 'jrd' dir. executed the foll. steps: + - ar x /lib/libc.a _fltused.o + - ar x /lib/libc.a 87ftol.o + + .cp /usr/gds/v4.0c_sc/interbase/bin/gds_pipe5 interbase/bin + .cp /usr/gds/v4.0c_sc/interbase/lock_header_t interbase + . Modify 'maketar' to use lock_header_t instead of + lock_header_template + Added interbase/isc_config to 'maketar' to be included in the kit. + . The instructions for building a package on SCO 3.2v4.2 is in + 'goofy:/usr/gds/v4.0c_sc/sco_ship' + +#SCO 5.0 scov1 + . The instructions for building release media on SCO Open Server + Release 5 are in 'scov1:/usr/gds.scov1/V4.0M_SS/sco5_ship', + the shell script which makes the SCO-Custom-installable media + images. + +#SunOS 4.1.3 opus + .Edited build_kit locally to set CC_PATH to /bin +#HP-UX 9.05 yoda + .Edited build_kit locally to set CC_PATH to /opt/softbench/bin. + - make -f make_kit utilities + in order to make a new interbase/isc4.gdb +#AIX 4.1.2/PPC aix2 + Added interbase/isc_config to 'maketar' to be included in the kit. + - make -f make_kit utilities + in order to make a new interbase/isc4.gdb +################################################################## + + +*** Build machines *** + + Platform Build machine name + -------------------------------------------- + Solaris (IB Classic) sogood + Solaris (IB SS) sogood + SunOS opus + HP-UX 9.0 yoda + HP-UX 10.01 (IB Classic)molokai + HP-UX 10.01 (IB SS) superhp1 + IBM AIX RS6000 watson + AIX/PPC aix2 + SGI sgi1 + Digital Unix seaquest + IMP mimp + SCO 3.0 goofy + SCO 5.0 scov1 + DG/UX 88K dg1 + DG/UX Intel dgintel1 + NCR ???? + diff --git a/src/makefiles/000_readme_porting b/src/makefiles/000_readme_porting new file mode 100644 index 0000000000..d55a1b587a --- /dev/null +++ b/src/makefiles/000_readme_porting @@ -0,0 +1,60 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +1. write prefix. for builds + +2. remote/remote.h: define ARCHITECTURE macro. eg. + #ifdef IMP + #define ARCHITECTURE arch_imp + #endif + +3. remote/protocol.h: define architecture identifier. + adjusting arch_max as appropriate. eg. + arch_imp = 22, + arch_max = 23 + +4. run the align program and use its output to modify common.h + +5. set up common.h + vfork + SMALL_FILE_NAMES + SHMEM_PICKY + ATEXIT + KILLER_SIGNALS + SETPGRP + +6. jrd/pag.c: define CLASS macro. eg. + #ifdef IMP + #define CLASS 2 + #endif + +7. jrd/why.c: adjust for subsystems supported. eg. + #ifdef IMP + #undef CSI + #undef PIPE + #endif + +8. jrd/license.h: add platform identifier. eg. + #ifdef IMP + #define GDS_VERSION "IM-I3.3A" + #endif + +9. jrd/utl.c: add implementation literal. eg. + "InterBase/imp" /* 44 */ + +10. jrd/isc.c + value for MTAB + how is MTAB processed (ISC_analyse_nfs) diff --git a/src/makefiles/add_template b/src/makefiles/add_template new file mode 100644 index 0000000000..3a0150851c --- /dev/null +++ b/src/makefiles/add_template @@ -0,0 +1,26 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +UMASK=`umask` +umask 002 +TARGET=source/$2/$1 +#removed runas builder according to inprise tree +#FSG 093000 +cp $1 $TARGET +chmod 644 $TARGET +umask $UMASK + diff --git a/src/makefiles/bind_csilib.apollo b/src/makefiles/bind_csilib.apollo new file mode 100644 index 0000000000..40ac6aef59 --- /dev/null +++ b/src/makefiles/bind_csilib.apollo @@ -0,0 +1,57 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +csi.o +css.o +source/jrd/isc.o +source/remote/merge.o +-mergebss +-loadhigh +-binary csilib -exactcase +-mark CSI_attach_database +-mark CSI_blob_info +-mark CSI_cancel_blob +-mark CSI_close_blob +-MARK CSI_commit_transaction +-MARK CSI_compile_request +-mark CSI_create_blob2 +-MARK CSI_create_database +-MARK CSI_database_info +-MARK CSI_detach_database +-mark CSI_get_segment +-mark CSI_open_blob2 +-mark CSI_prepare_transaction +-mark CSI_put_segment +-MARK CSI_receive +-MARK CSI_release_request +-MARK CSI_request_info +-MARK CSI_reconnect_transaction +-MARK CSI_rollback_transaction +-MARK CSI_seek_blob +-MARK CSI_send +-MARK CSI_start_and_send +-MARK CSI_start_request +-MARK CSI_start_transaction +-MARK CSI_start_multiple +-MARK CSI_transaction_info +-MARK CSI_unwind_request +-MARK CSI_commit_retaining +-mark CSI_cancel_events +-mark CSI_que_events +-mark CSI_ddl +-mark CSI_get_slice +-mark CSI_put_slice +-end diff --git a/src/makefiles/bind_dsql.apollo b/src/makefiles/bind_dsql.apollo new file mode 100644 index 0000000000..51da6310b2 --- /dev/null +++ b/src/makefiles/bind_dsql.apollo @@ -0,0 +1,40 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +dsql.o parse.o all.o hsh.o err.o met.o mov.o ddl.o gen.o make.o pass1.o array.o +{ pretty.o } +{ the above pretty.o is based on gpre/pretty.c, but compiled into object } +{ in this directory, using the compile switches for dynamic library code } +-mergebss +-loadhigh +-bin dsqllib -exactcase +-mark isc_array_lookup_desc +-mark isc_array_lookup_bounds +-mark isc_array_set_desc +-mark isc_array_gen_sdl +-mark isc_array_get_slice +-mark isc_array_put_slice +-mark LDSQL_close +-mark LDSQL_declare +-mark LDSQL_open +-mark LDSQL_prepare +-mark LDSQL_execute +-mark LDSQL_execute_immediate +-mark LDSQL_fetch +-mark LDSQL_release +-mark LDSQL_sql_info +-end + diff --git a/src/makefiles/bind_gds.aix_ppc b/src/makefiles/bind_gds.aix_ppc new file mode 100644 index 0000000000..8e2eabbe82 --- /dev/null +++ b/src/makefiles/bind_gds.aix_ppc @@ -0,0 +1,379 @@ +* The contents of this file are subject to the Interbase Public +* License Version 1.0 (the "License"); you may not use this file +* except in compliance with the License. You may obtain a copy +* of the License at http://www.Inprise.com/IPL.html +* +* Software distributed under the License is distributed on an +* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +* or implied. See the License for the specific language governing +* rights and limitations under the License. +* +* The Original Code was created by Inprise Corporation +* and its predecessors. Portions created by Inprise Corporation are +* Copyright (C) Inprise Corporation. +* +* All Rights Reserved. +* Contributor(s): +* Tom Coleman tmcsys (AIX for C bind expects * comments) +* +* $Id: bind_gds.aix_ppc,v 1.1 2001-07-12 06:32:03 bellardo Exp $ +* +gds__alloc +gds__attach_database +gds__blob_info +gds__blob_size +gds__cancel_blob +gds__cancel_events +gds__close +gds__close_blob +gds__commit_retaining +gds__commit_transaction +gds__compile_request +gds__compile_request2 +gds__create_blob +gds__create_blob2 +gds__create_database +gds__database_cleanup +gds__database_info +gds__ddl +gds__declare +gds__decode +gds__decode_date +gds__describe +gds__describe_bind +gds__detach_database +gds__disable_subsystem +gds__dsql_finish +gds__edit +gds__enable_subsystem +gds__encode +gds__encode_date +gds__event_block +gds__event_block_a +gds__event_block_s +gds__event_counts +gds__event_wait +gds__execute +gds__execute_immediate +gds__fetch +gds__fetch_a +gds__free +gds__ftof +gds__get_prefix +gds__get_segment +gds__get_slice +gds__interprete +gds__log +gds__msg_close +gds__msg_format +gds__msg_lookup +gds__msg_open +gds__msg_put +gds__open +gds__open_blob +gds__open_blob2 +gds__parse_bpb +gds__prefix +gds__prefix_lock +gds__prefix_msg +gds__prepare +gds__prepare_transaction +gds__prepare_transaction2 +gds__print_blr +gds__print_status +gds__put_error +gds__put_segment +gds__put_slice +gds__qtoq +gds__que_events +gds__receive +gds__reconnect_transaction +gds__register_cleanup +gds__release_request +gds__request_info +gds__rollback_transaction +gds__seek_blob +gds__send +gds__set_debug +gds__sqlcode +gds__sqlcode_s +gds__start_and_send +gds__start_multiple +gds__start_request +gds__start_transaction +gds__temp_file +gds__thread_enable +gds__thread_enter +gds__thread_exit +gds__thread_start +gds__to_sqlda +gds__transaction_cleanup +gds__transaction_info +gds__unregister_cleanup +gds__unwind_request +gds__vax_integer +gds__version +gds__vtof +gds__vtov +blob__display +blob__dump +blob__edit +blob__load +BLOB_close +BLOB_display +BLOB_dump +BLOB_edit +BLOB_get +BLOB_load +BLOB_open +BLOB_put +Bopen +perf_format +perf_get_info +perf_report +pyxis__compile_map +pyxis__compile_sub_map +pyxis__create_window +pyxis__delete +pyxis__delete_window +pyxis__drive_form +pyxis__drive_menu +pyxis__fetch +pyxis__get_entree +pyxis__initialize_menu +pyxis__insert +pyxis__load_form +pyxis__menu +pyxis__pop_window +pyxis__put_entree +pyxis__reset_form +pyxis__suspend_window +PYXIS_box +PYXIS_bugcheck +PYXIS_clone +PYXIS_compute_size +PYXIS_create_entree +PYXIS_create_object +PYXIS_define_forms_relation +PYXIS_delete_attribute +PYXIS_delete_form +PYXIS_delete_named_attribute +PYXIS_delete_object +PYXIS_dump +PYXIS_dump_length +PYXIS_edit +PYXIS_error +PYXIS_find_object +PYXIS_format_form +PYXIS_format_menu +PYXIS_get_attribute +PYXIS_get_attribute_value +PYXIS_get_char +PYXIS_get_data +PYXIS_get_keyname +PYXIS_get_string +PYXIS_get_updated +PYXIS_get_value +PYXIS_load +PYXIS_menu +PYXIS_move +PYXIS_navigate +PYXIS_pop_form +PYXIS_push_form +PYXIS_push_tag +PYXIS_put_attribute +PYXIS_put_desc +PYXIS_put_segment +PYXIS_reference +PYXIS_relation_fields +PYXIS_relation_form +PYXIS_replace_attribute +PYXIS_select +PYXIS_set_display_attribute +PYXIS_set_field_options +PYXIS_store_form +PYXIS_trace_in +PYXIS_trace_out +PYXIS_update +PYXIS_find_field +PYXIS_find_index +PYXIS_position +isc_attach_database +isc_blob_info +isc_cancel_blob +isc_cancel_events +isc_close +isc_close_blob +isc_commit_retaining +isc_commit_transaction +isc_compile_map +isc_compile_menu +isc_compile_request +isc_compile_request2 +isc_compile_sub_map +isc_create_blob +isc_create_blob2 +isc_create_database +isc_create_window +isc_database_cleanup +isc_database_info +isc_ddl +isc_declare +isc_decode_date +isc_delete_window +isc_describe +isc_describe_bind +isc_detach_database +isc_drive_form +isc_drive_menu +isc_drop_database +isc_dsql_finish +isc_dsql_release +isc_encode_date +isc_event_block +isc_event_counts +isc_expand_dpb +isc_wait_for_event +isc_execute +isc_execute_immediate +isc_fetch +isc_fetch_a +isc_form_delete +isc_form_fetch +isc_form_insert +isc_free +isc_ftof +isc_get_entree +isc_get_segment +isc_get_slice +isc_initialize_menu +isc_interprete +isc_load_form +gds__log_status +isc_menu +isc_open +isc_open_blob +isc_open_blob2 +isc_pop_window +isc_prepare +isc_prepare_transaction +isc_prepare_transaction2 +isc_print_blr +isc_print_status +isc_put_entree +isc_put_segment +isc_put_slice +isc_qtoq +isc_que_events +isc_receive +isc_reconnect_transaction +isc_release_request +isc_request_info +isc_reset_form +isc_rollback_transaction +isc_seek_blob +isc_send +isc_service_attach +isc_service_detach +isc_service_query +isc_service_start +isc_set_debug +isc_sqlcode +isc_sqlcode_s +isc_start_and_send +isc_start_multiple +isc_start_request +isc_start_transaction +isc_suspend_window +isc_to_sqlda +isc_transact_request +isc_transaction_info +isc_unwind_request +isc_version +isc_vtof +isc_vtov +isc_array_lookup_desc +isc_array_lookup_bounds +isc_array_set_desc +isc_array_gen_sdl +isc_array_get_slice +isc_array_put_slice +isc_print_sqlerror +isc_sql_interprete +isc_vax_integer +isc_baddress +isc_baddress_s +isc_dsql_allocate_statement +isc_dsql_alloc_statement2 +isc_dsql_execute +isc_dsql_execute2 +isc_dsql_execute_m +isc_dsql_execute2_m +isc_dsql_execute_immediate +isc_dsql_execute_immediate_m +isc_dsql_exec_immed2 +isc_dsql_exec_immed2_m +isc_dsql_exec_immed3_m +isc_dsql_fetch +isc_dsql_fetch_a +isc_dsql_fetch_m +isc_dsql_free_statement +isc_dsql_insert +isc_dsql_insert_m +isc_dsql_prepare +isc_dsql_prepare_m +isc_dsql_set_cursor_name +isc_dsql_sql_info +isc_dsql_describe +isc_dsql_describe_bind +isc_embed_dsql_close +isc_embed_dsql_declare +isc_embed_dsql_execute +isc_embed_dsql_execute2 +isc_embed_dsql_execute_immed +isc_embed_dsql_exec_immed2 +isc_embed_dsql_fetch +isc_embed_dsql_fetch_a +isc_embed_dsql_length +isc_embed_dsql_insert +isc_embed_dsql_open +isc_embed_dsql_open2 +isc_embed_dsql_prepare +isc_embed_dsql_release +isc_embed_dsql_describe +isc_embed_dsql_describe_bind +ISC_get_host +ISC_get_user +ISC_get_prefix +ISC_prefix +ISC_prefix_lock +ISC_prefix_msg +ISC_signal +ISC_signal_cancel +isc_blob_gen_bpb +isc_blob_lookup_desc +isc_blob_set_desc +isc_blob_default_desc +gds__map_blobs +BLOB_text_dump +BLOB_text_load +isc_modify_dpb +isc_reset_fpe +gds__validate_lib_path +isc_add_user +isc_delete_user +isc_modify_user +isc_rollback_retaining +isc_decode_sql_date +isc_decode_sql_time +isc_decode_timestamp +isc_encode_sql_date +isc_encode_sql_time +isc_encode_timestamp +CVT_move +isc_portable_integer +DLS_add_dir +isc_blob_display +isc_blob_dump +isc_blob_edit +isc_blob_load diff --git a/src/makefiles/bind_gds.generic b/src/makefiles/bind_gds.generic new file mode 100644 index 0000000000..51212403e4 --- /dev/null +++ b/src/makefiles/bind_gds.generic @@ -0,0 +1,369 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +gds__alloc +gds__attach_database +gds__blob_info +gds__blob_size +gds__cancel_blob +gds__cancel_events +gds__close +gds__close_blob +gds__commit_retaining +gds__commit_transaction +gds__compile_request +gds__compile_request2 +gds__create_blob +gds__create_blob2 +gds__create_database +gds__database_cleanup +gds__database_info +gds__ddl +gds__declare +gds__decode +gds__decode_date +gds__describe +gds__describe_bind +gds__detach_database +gds__disable_subsystem +gds__dsql_finish +gds__edit +gds__enable_subsystem +gds__encode +gds__encode_date +gds__event_block +gds__event_block_a +gds__event_block_s +gds__event_counts +gds__event_wait +gds__execute +gds__execute_immediate +gds__fetch +gds__fetch_a +gds__free +gds__ftof +gds__get_prefix +gds__get_segment +gds__get_slice +gds__interprete +gds__log +gds__msg_close +gds__msg_format +gds__msg_lookup +gds__msg_open +gds__msg_put +gds__open +gds__open_blob +gds__open_blob2 +gds__parse_bpb +gds__prefix +gds__prefix_lock +gds__prefix_msg +gds__prepare +gds__prepare_transaction +gds__prepare_transaction2 +gds__print_blr +gds__print_status +gds__put_error +gds__put_segment +gds__put_slice +gds__qtoq +gds__que_events +gds__receive +gds__reconnect_transaction +gds__register_cleanup +gds__release_request +gds__request_info +gds__rollback_transaction +gds__seek_blob +gds__send +gds__set_debug +gds__sqlcode +gds__sqlcode_s +gds__start_and_send +gds__start_multiple +gds__start_request +gds__start_transaction +gds__temp_file +gds__thread_enable +gds__thread_enter +gds__thread_exit +gds__thread_start +gds__to_sqlda +gds__transaction_cleanup +gds__transaction_info +gds__unregister_cleanup +gds__unwind_request +gds__vax_integer +gds__version +gds__vtof +gds__vtov +blob__display +blob__dump +blob__edit +blob__load +BLOB_close +BLOB_display +BLOB_dump +BLOB_edit +BLOB_get +BLOB_load +BLOB_open +BLOB_put +Bopen +perf_format +perf_get_info +perf_report +pyxis__compile_map +pyxis__compile_sub_map +pyxis__create_window +pyxis__delete +pyxis__delete_window +pyxis__drive_form +pyxis__drive_menu +pyxis__fetch +pyxis__get_entree +pyxis__initialize_menu +pyxis__insert +pyxis__load_form +pyxis__menu +pyxis__pop_window +pyxis__put_entree +pyxis__reset_form +pyxis__suspend_window +PYXIS_box +PYXIS_bugcheck +PYXIS_clone +PYXIS_compute_size +PYXIS_create_entree +PYXIS_create_object +PYXIS_define_forms_relation +PYXIS_delete_attribute +PYXIS_delete_form +PYXIS_delete_named_attribute +PYXIS_delete_object +PYXIS_dump +PYXIS_dump_length +PYXIS_edit +PYXIS_error +PYXIS_find_object +PYXIS_format_form +PYXIS_format_menu +PYXIS_get_attribute +PYXIS_get_attribute_value +PYXIS_get_char +PYXIS_get_data +PYXIS_get_keyname +PYXIS_get_string +PYXIS_get_updated +PYXIS_get_value +PYXIS_load +PYXIS_menu +PYXIS_move +PYXIS_navigate +PYXIS_pop_form +PYXIS_push_form +PYXIS_push_tag +PYXIS_put_attribute +PYXIS_put_desc +PYXIS_put_segment +PYXIS_reference +PYXIS_relation_fields +PYXIS_relation_form +PYXIS_replace_attribute +PYXIS_select +PYXIS_set_display_attribute +PYXIS_set_field_options +PYXIS_store_form +PYXIS_trace_in +PYXIS_trace_out +PYXIS_update +PYXIS_find_field +PYXIS_find_index +PYXIS_position +isc_attach_database +isc_blob_info +isc_cancel_blob +isc_cancel_events +isc_close +isc_close_blob +isc_commit_retaining +isc_commit_transaction +isc_compile_map +isc_compile_menu +isc_compile_request +isc_compile_request2 +isc_compile_sub_map +isc_create_blob +isc_create_blob2 +isc_create_database +isc_create_window +isc_database_cleanup +isc_database_info +isc_ddl +isc_declare +isc_decode_date +isc_delete_window +isc_describe +isc_describe_bind +isc_detach_database +isc_drive_form +isc_drive_menu +isc_drop_database +isc_dsql_finish +isc_dsql_release +isc_encode_date +isc_event_block +isc_event_counts +isc_expand_dpb +isc_wait_for_event +isc_execute +isc_execute_immediate +isc_fetch +isc_fetch_a +isc_form_delete +isc_form_fetch +isc_form_insert +isc_free +isc_ftof +isc_get_entree +isc_get_segment +isc_get_slice +isc_initialize_menu +isc_interprete +isc_load_form +gds__log_status +isc_menu +isc_open +isc_open_blob +isc_open_blob2 +isc_pop_window +isc_prepare +isc_prepare_transaction +isc_prepare_transaction2 +isc_print_blr +isc_print_status +isc_put_entree +isc_put_segment +isc_put_slice +isc_qtoq +isc_que_events +isc_receive +isc_reconnect_transaction +isc_release_request +isc_request_info +isc_reset_form +isc_rollback_transaction +isc_seek_blob +isc_send +isc_service_attach +isc_service_detach +isc_service_query +isc_service_start +isc_set_debug +isc_sqlcode +isc_sqlcode_s +isc_start_and_send +isc_start_multiple +isc_start_request +isc_start_transaction +isc_suspend_window +isc_to_sqlda +isc_transact_request +isc_transaction_info +isc_unwind_request +isc_version +isc_vtof +isc_vtov +isc_array_lookup_desc +isc_array_lookup_bounds +isc_array_set_desc +isc_array_gen_sdl +isc_array_get_slice +isc_array_put_slice +isc_print_sqlerror +isc_sql_interprete +isc_vax_integer +isc_baddress +isc_baddress_s +isc_dsql_allocate_statement +isc_dsql_alloc_statement2 +isc_dsql_execute +isc_dsql_execute2 +isc_dsql_execute_m +isc_dsql_execute2_m +isc_dsql_execute_immediate +isc_dsql_execute_immediate_m +isc_dsql_exec_immed2 +isc_dsql_exec_immed2_m +isc_dsql_exec_immed3_m +isc_dsql_fetch +isc_dsql_fetch_a +isc_dsql_fetch_m +isc_dsql_free_statement +isc_dsql_insert +isc_dsql_insert_m +isc_dsql_prepare +isc_dsql_prepare_m +isc_dsql_set_cursor_name +isc_dsql_sql_info +isc_dsql_describe +isc_dsql_describe_bind +isc_embed_dsql_close +isc_embed_dsql_declare +isc_embed_dsql_execute +isc_embed_dsql_execute2 +isc_embed_dsql_execute_immed +isc_embed_dsql_exec_immed2 +isc_embed_dsql_fetch +isc_embed_dsql_fetch_a +isc_embed_dsql_length +isc_embed_dsql_insert +isc_embed_dsql_open +isc_embed_dsql_open2 +isc_embed_dsql_prepare +isc_embed_dsql_release +isc_embed_dsql_describe +isc_embed_dsql_describe_bind +ISC_get_host +ISC_get_user +ISC_get_prefix +ISC_prefix +ISC_prefix_lock +ISC_prefix_msg +ISC_signal +ISC_signal_cancel +isc_blob_gen_bpb +isc_blob_lookup_desc +isc_blob_set_desc +isc_blob_default_desc +gds__map_blobs +BLOB_text_dump +BLOB_text_load +isc_modify_dpb +isc_reset_fpe +gds__validate_lib_path +isc_add_user +isc_delete_user +isc_modify_user +isc_rollback_retaining +isc_decode_sql_date +isc_decode_sql_time +isc_decode_timestamp +isc_encode_sql_date +isc_encode_sql_time +isc_encode_timestamp +CVT_move diff --git a/src/makefiles/bind_gds.hp b/src/makefiles/bind_gds.hp new file mode 100644 index 0000000000..17a8905b03 --- /dev/null +++ b/src/makefiles/bind_gds.hp @@ -0,0 +1,377 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. ++e gds__alloc ++e gds__attach_database ++e gds__blob_info ++e gds__blob_size ++e gds__cancel_blob ++e gds__cancel_events ++e gds__close ++e gds__close_blob ++e gds__commit_retaining ++e gds__commit_transaction ++e gds__compile_request ++e gds__compile_request2 ++e gds__create_blob ++e gds__create_blob2 ++e gds__create_database ++e gds__database_cleanup ++e gds__database_info ++e gds__ddl ++e gds__declare ++e gds__decode ++e gds__decode_date ++e gds__describe ++e gds__describe_bind ++e gds__detach_database ++e gds__disable_subsystem ++e gds__dsql_finish ++e gds__edit ++e gds__enable_subsystem ++e gds__encode ++e gds__encode_date ++e gds__event_block ++e gds__event_block_a ++e gds__event_counts ++e gds__event_wait ++e gds__execute ++e gds__execute_immediate ++e isc_expand_dpb ++e gds__fetch ++e gds__fetch_a ++e gds__free ++e gds__ftof ++e gds__get_prefix ++e gds__get_segment ++e gds__get_slice ++e gds__interprete ++e gds__log ++e gds__msg_close ++e gds__msg_format ++e gds__msg_lookup ++e gds__msg_open ++e gds__msg_put ++e gds__open ++e gds__open_blob ++e gds__open_blob2 ++e gds__parse_bpb ++e gds__prefix ++e gds__prefix_lock ++e gds__prefix_msg ++e gds__prepare ++e gds__prepare_transaction ++e gds__prepare_transaction2 ++e gds__print_blr ++e gds__print_status ++e gds__put_error ++e gds__put_segment ++e gds__put_slice ++e gds__qtoq ++e gds__que_events ++e gds__receive ++e gds__reconnect_transaction ++e gds__register_cleanup ++e gds__release_request ++e gds__request_info ++e gds__rollback_transaction ++e gds__seek_blob ++e gds__send ++e gds__set_debug ++e gds__sqlcode ++e gds__start_and_send ++e gds__start_multiple ++e gds__start_request ++e gds__start_transaction ++e gds__temp_file ++e gds__to_sqlda ++e gds__transaction_cleanup ++e gds__transaction_info ++e gds__unregister_cleanup ++e gds__unwind_request ++e gds__vax_integer ++e gds__version ++e gds__vtof ++e gds__vtov ++e blob__display ++e blob__dump ++e blob__edit ++e blob__load ++e BLOB_close ++e BLOB_display ++e BLOB_dump ++e BLOB_edit ++e BLOB_get ++e BLOB_load ++e BLOB_open ++e BLOB_put ++e Bopen ++e perf_format ++e perf_get_info ++e perf_report ++e pyxis__compile_map ++e pyxis__compile_sub_map ++e pyxis__create_window ++e pyxis__delete ++e pyxis__delete_window ++e pyxis__drive_form ++e pyxis__drive_menu ++e pyxis__fetch ++e pyxis__get_entree ++e pyxis__initialize_menu ++e pyxis__insert ++e pyxis__load_form ++e pyxis__menu ++e pyxis__pop_window ++e pyxis__put_entree ++e pyxis__reset_form ++e pyxis__suspend_window ++e PYXIS_box ++e PYXIS_bugcheck ++e PYXIS_clone ++e PYXIS_compute_size ++e PYXIS_create_entree ++e PYXIS_create_object ++e PYXIS_define_forms_relation ++e PYXIS_delete_attribute ++e PYXIS_delete_form ++e PYXIS_delete_named_attribute ++e PYXIS_delete_object ++e PYXIS_dump ++e PYXIS_dump_length ++e PYXIS_edit ++e PYXIS_error ++e PYXIS_find_object ++e PYXIS_format_form ++e PYXIS_format_menu ++e PYXIS_get_attribute ++e PYXIS_get_attribute_value ++e PYXIS_get_char ++e PYXIS_get_data ++e PYXIS_get_keyname ++e PYXIS_get_string ++e PYXIS_get_updated ++e PYXIS_get_value ++e PYXIS_load ++e PYXIS_menu ++e PYXIS_move ++e PYXIS_navigate ++e PYXIS_pop_form ++e PYXIS_push_form ++e PYXIS_push_tag ++e PYXIS_put_attribute ++e PYXIS_put_desc ++e PYXIS_put_segment ++e PYXIS_reference ++e PYXIS_relation_fields ++e PYXIS_relation_form ++e PYXIS_replace_attribute ++e PYXIS_select ++e PYXIS_set_display_attribute ++e PYXIS_set_field_options ++e PYXIS_store_form ++e PYXIS_trace_in ++e PYXIS_trace_out ++e PYXIS_update ++e PYXIS_find_field ++e PYXIS_find_index ++e PYXIS_position ++e isc_attach_database ++e isc_baddress ++e isc_blob_info ++e isc_cancel_blob ++e isc_cancel_events ++e isc_close ++e isc_close_blob ++e isc_commit_retaining ++e isc_commit_transaction ++e isc_compile_map ++e isc_compile_menu ++e isc_compile_request ++e isc_compile_request2 ++e isc_compile_sub_map ++e isc_create_blob ++e isc_create_blob2 ++e isc_create_database ++e isc_create_window ++e isc_database_cleanup ++e isc_database_info ++e isc_ddl ++e isc_declare ++e isc_decode_date ++e isc_delete_window ++e isc_describe ++e isc_describe_bind ++e isc_detach_database ++e isc_drive_form ++e isc_drive_menu ++e isc_drop_database ++e isc_dsql_finish ++e isc_dsql_release ++e isc_encode_date ++e isc_event_block ++e isc_event_counts ++e isc_wait_for_event ++e isc_execute ++e isc_execute_immediate ++e isc_fetch ++e isc_fetch_a ++e isc_form_delete ++e isc_form_fetch ++e isc_form_insert ++e isc_free ++e isc_ftof ++e isc_get_entree ++e isc_get_segment ++e isc_get_slice ++e isc_initialize_menu ++e isc_interprete ++e isc_load_form ++e gds__log_status ++e isc_menu ++e isc_open ++e isc_open_blob ++e isc_open_blob2 ++e isc_pop_window ++e isc_prepare ++e isc_prepare_transaction ++e isc_prepare_transaction2 ++e isc_print_blr ++e isc_print_status ++e isc_put_entree ++e isc_put_segment ++e isc_put_slice ++e isc_qtoq ++e isc_que_events ++e isc_receive ++e isc_reconnect_transaction ++e isc_release_request ++e isc_request_info ++e isc_reset_form ++e isc_rollback_transaction ++e isc_seek_blob ++e isc_send ++e isc_service_attach ++e isc_service_detach ++e isc_service_query ++e isc_service_start ++e isc_set_debug ++e isc_sqlcode ++e isc_start_and_send ++e isc_start_multiple ++e isc_start_request ++e isc_start_transaction ++e isc_suspend_window ++e isc_to_sqlda ++e isc_transact_request ++e isc_transaction_info ++e isc_unwind_request ++e isc_version ++e isc_vtof ++e isc_vtov ++e isc_array_lookup_desc ++e isc_array_lookup_bounds ++e isc_array_set_desc ++e isc_array_gen_sdl ++e isc_array_get_slice ++e isc_array_put_slice ++e isc_print_sqlerror ++e isc_sql_interprete ++e isc_vax_integer ++e isc_dsql_allocate_statement ++e isc_dsql_alloc_statement2 ++e isc_dsql_execute ++e isc_dsql_execute2 ++e isc_dsql_execute_m ++e isc_dsql_execute2_m ++e isc_dsql_execute_immediate ++e isc_dsql_exec_immed2 ++e isc_dsql_execute_immediate_m ++e isc_dsql_exec_immed2_m ++e isc_dsql_exec_immed3_m ++e isc_dsql_fetch ++e isc_dsql_fetch2 ++e isc_dsql_fetch_a ++e isc_dsql_fetch_m ++e isc_dsql_free_statement ++e isc_dsql_insert ++e isc_dsql_insert_m ++e isc_dsql_prepare ++e isc_dsql_prepare_m ++e isc_dsql_set_cursor_name ++e isc_dsql_sql_info ++e isc_dsql_describe ++e isc_dsql_describe_bind ++e isc_embed_dsql_close ++e isc_embed_dsql_declare ++e isc_embed_dsql_execute ++e isc_embed_dsql_execute2 ++e isc_embed_dsql_execute_immed ++e isc_embed_dsql_exec_immed2 ++e isc_embed_dsql_fetch ++e isc_embed_dsql_fetch_a ++e isc_embed_dsql_insert ++e isc_embed_dsql_open ++e isc_embed_dsql_open2 ++e isc_embed_dsql_prepare ++e isc_embed_dsql_release ++e isc_embed_dsql_describe ++e isc_embed_dsql_describe_bind ++e errno ++e sys_errlist ++e sys_nerr ++e gds__thread_enable ++e gds__thread_enter ++e gds__thread_exit ++e gds__thread_start ++e ISC_get_host ++e ISC_get_user ++e ISC_get_prefix ++e ISC_prefix ++e ISC_prefix_lock ++e ISC_prefix_msg ++e ISC_signal ++e ISC_signal_cancel ++e isc_blob_gen_bpb ++e isc_blob_lookup_desc ++e isc_blob_set_desc ++e isc_blob_default_desc ++e gds__map_blobs ++e BLOB_text_dump ++e BLOB_text_load ++e isc_modify_dpb ++e isc_sqlcode_s ++e isc_blob_edit ++e isc_blob_display ++e isc_blob_load ++e isc_blob_dump ++e isc_embed_dsql_length ++e isc_baddress_s ++e isc_reset_fpe ++e DLS_add_dir ++e gds__validate_lib_path ++e isc_add_user ++e isc_delete_user ++e isc_modify_user ++e isc_portable_integer ++e isc_rollback_retaining ++e isc_decode_sql_date ++e isc_decode_sql_time ++e isc_decode_timestamp ++e isc_encode_sql_date ++e isc_encode_sql_time ++e isc_encode_timestamp ++e CVT_move diff --git a/src/makefiles/bind_gds.win_nt b/src/makefiles/bind_gds.win_nt new file mode 100644 index 0000000000..5e74705300 --- /dev/null +++ b/src/makefiles/bind_gds.win_nt @@ -0,0 +1,279 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +LIBRARY gds32 + +DESCRIPTION 'InterBase DLL' + +DATA READ WRITE + +EXPORTS + gds__alloc @1 + gds__attach_database @2 + gds__blob_info @3 + gds__blob_size @4 + gds__cancel_blob @5 + gds__cancel_events @6 + gds__close @7 + gds__close_blob @8 + gds__commit_retaining @9 + gds__commit_transaction @10 + gds__compile_request @11 + gds__compile_request2 @12 + gds__create_blob @13 + gds__create_blob2 @14 + gds__create_database @15 + gds__database_cleanup @16 + gds__database_info @17 + gds__ddl @18 + gds__declare @19 + gds__decode @20 + gds__decode_date @21 + gds__describe @22 + gds__describe_bind @23 + gds__detach_database @24 + gds__disable_subsystem @25 + gds__dsql_finish @26 + gds__edit @27 + gds__enable_subsystem @28 + gds__encode @29 + gds__encode_date @30 + gds__event_block @31 + gds__event_counts @32 + gds__event_wait @33 + gds__execute @34 + gds__execute_immediate @35 + gds__fetch @36 + gds__free @37 + gds__ftof @38 + gds__get_segment @39 + gds__get_slice @40 + gds__interprete @41 + gds__log @42 + gds__msg_format @43 + gds__msg_lookup @44 + gds__msg_open @45 + gds__msg_put @46 + gds__open @47 + gds__open_blob @48 + gds__open_blob2 @49 + gds__parse_bpb @50 + gds__prefix @51 + gds__prepare @52 + gds__prepare_transaction @53 + gds__prepare_transaction2 @54 + gds__print_blr @55 + gds__print_status @56 + gds__put_error @57 + gds__put_segment @58 + gds__put_slice @59 + gds__qtoq @60 + gds__que_events @61 + gds__receive @62 + gds__reconnect_transaction @63 + gds__register_cleanup @64 + gds__release_request @65 + gds__request_info @66 + gds__rollback_transaction @67 + gds__seek_blob @68 + gds__send @69 + gds__set_debug @70 + gds__sqlcode @71 + gds__start_and_send @72 + gds__start_multiple @73 + gds__start_request @74 + gds__start_transaction @75 + gds__thread_enable @76 + gds__thread_enter @77 + gds__thread_exit @78 + gds__thread_start @79 + gds__to_sqlda @80 + gds__transaction_info @81 + gds__unwind_request @82 + gds__vax_integer @83 + gds__version @84 + gds__vtof @85 + gds__vtov @86 + blob__display @87 + blob__dump @88 + blob__edit @89 + blob__load @90 + BLOB_close @91 + BLOB_display @92 + BLOB_dump @93 + BLOB_edit @94 + BLOB_get @95 + BLOB_load @96 + BLOB_open @97 + BLOB_put @98 + Bopen @99 + perf_format @100 + perf_get_info @101 + perf_report @102 + isc_attach_database @103 + isc_baddress @104 + isc_blob_display @105 + isc_blob_dump @106 + isc_blob_edit @107 + isc_blob_info @108 + isc_blob_load @109 + isc_cancel_blob @110 + isc_cancel_events @111 + isc_close @112 + isc_close_blob @113 + isc_commit_retaining @114 + isc_commit_transaction @115 + isc_compile_request @116 + isc_compile_request2 @117 + isc_create_blob @118 + isc_create_blob2 @119 + isc_create_database @120 + isc_database_cleanup @121 + isc_database_info @122 + isc_ddl @123 + isc_declare @124 + isc_decode_date @125 + isc_describe @126 + isc_describe_bind @127 + isc_detach_database @128 + isc_encode_date @129 + isc_event_block @130 + isc_event_counts @131 + isc_transact_request @132 + isc_execute @133 + isc_execute_immediate @134 + isc_expand_dpb @135 + isc_fetch @136 + isc_fetch_a @137 + isc_ftof @138 + isc_get_segment @139 + isc_get_slice @140 + isc_interprete @141 + gds__log_status @142 + isc_open @143 + isc_open_blob @144 + isc_open_blob2 @145 + isc_prepare @146 + isc_prepare_transaction @147 + isc_prepare_transaction2 @148 + isc_print_blr @149 + isc_print_sqlerror @150 + isc_print_status @151 + isc_put_segment @152 + isc_put_slice @153 + isc_qtoq @154 + isc_que_events @155 + isc_receive @156 + isc_reconnect_transaction @157 + isc_release_request @158 + isc_request_info @159 + isc_rollback_transaction @160 + isc_seek_blob @161 + isc_send @162 + isc_set_debug @163 + isc_sql_interprete @164 + isc_sqlcode @165 + isc_start_and_send @166 + isc_start_multiple @167 + isc_start_request @168 + isc_start_transaction @169 + isc_to_sqlda @170 + isc_transaction_info @171 + isc_unwind_request @172 + isc_vax_integer @173 + isc_version @174 + isc_vtof @175 + isc_vtov @176 + isc_wait_for_event @177 + isc_dsql_allocate_statement @178 + isc_dsql_alloc_statement2 @179 + isc_dsql_describe @180 + isc_dsql_describe_bind @181 + isc_dsql_execute @182 + isc_dsql_execute2 @183 + isc_dsql_execute_m @184 + isc_dsql_execute2_m @185 + isc_dsql_execute_immediate @186 + isc_dsql_exec_immed2 @187 + isc_dsql_execute_immediate_m @188 + isc_dsql_exec_immed2_m @189 + isc_dsql_fetch @190 + isc_dsql_fetch_a @191 + isc_dsql_fetch_m @192 + isc_dsql_finish @193 + isc_dsql_free_statement @194 + isc_dsql_insert @195 + isc_dsql_insert_m @196 + isc_dsql_prepare @197 + isc_dsql_prepare_m @198 + isc_dsql_release @199 + isc_dsql_set_cursor_name @200 + isc_dsql_sql_info @201 + isc_embed_dsql_close @202 + isc_embed_dsql_declare @203 + isc_embed_dsql_describe @204 + isc_embed_dsql_describe_bind @205 + isc_embed_dsql_execute @206 + isc_embed_dsql_execute2 @207 + isc_embed_dsql_execute_immed @208 + isc_embed_dsql_exec_immed2 @209 + isc_embed_dsql_fetch @210 + isc_embed_dsql_fetch_a @211 + isc_embed_dsql_insert @212 + isc_embed_dsql_open @213 + isc_embed_dsql_open2 @214 + isc_embed_dsql_prepare @215 + isc_embed_dsql_release @216 + isc_array_gen_sdl @217 + isc_array_get_slice @218 + isc_array_lookup_bounds @219 + isc_array_lookup_desc @220 + isc_array_put_slice @221 + isc_array_set_desc @222 + gds__msg_close @223 + gds__unregister_cleanup @224 + isc_attach_service @225 + isc_detach_service @226 + isc_query_service @227 + isc_drop_database @228 + isc_dsql_exec_immed3_m @229 + gds__temp_file @230 + ISC_signal @231 + ISC_signal_cancel @232 + ISC_kill @233 + gds__transaction_cleanup @234 + isc_blob_gen_bpb @235 + isc_blob_lookup_desc @236 + isc_blob_set_desc @237 + isc_blob_default_desc @238 + gds__map_blobs @239 + isc_free @240 + BLOB_text_dump @241 + BLOB_text_load @242 + isc_modify_dpb @243 + isc_dsql_fetch2 @244 + isc_reset_fpe @245 + gds__prefix_lock @246 + ISC_get_host @247 + ISC_get_user @248 + gds__prefix_msg @249 + ISC_get_prefix @250 + ISC_prefix @251 + ISC_prefix_lock @252 + ISC_prefix_msg @253 + gds__get_prefix @254 + gds__validate_lib_path @255 + diff --git a/src/makefiles/bind_gds5.apollo b/src/makefiles/bind_gds5.apollo new file mode 100644 index 0000000000..67d110034d --- /dev/null +++ b/src/makefiles/bind_gds5.apollo @@ -0,0 +1,69 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +all.o blb.o blf.o btr.o cch.o cmp.o cvt.o dpm.o enc.o err.o event.o evl.o exe.o +ext.o filters.o fun.o gds.o grant.o idx.o inf.o ini.o intl.o +isc.o isc_file.o jio.o jrd.o jrn.o lck.o log.o met.o mov.o +nav.o node.o opt.o pag.o par.o perf.o pwd.o rse.o sbm.o +scl.o sdl.o sdw.o sort.o sqz.o sym.o tra.o apollo.o val.o vio.o +dyn.o dyn_def.o dyn_del.o dyn_mod.o flu.o functions.o nodebug.o +source/dsql/all.o source/dsql/ddl.o source/dsql/err.o source/dsql/gen.o +source/dsql/hsh.o source/dsql/make.o source/dsql/met.o source/dsql/mov.o +source/dsql/parse.o source/dsql/pass1.o +-mergebss +-binary bridge5 -exactcase +-mark jrd5_attach_database +-mark jrd5_blob_info +-mark jrd5_cancel_blob +-mark jrd5_cancel_events +-mark jrd5_close_blob +-mark jrd5_commit_retaining +-mark jrd5_commit_transaction +-mark jrd5_compile_request +-mark jrd5_create_blob2 +-mark jrd5_create_database +-mark jrd5_database_info +-mark jrd5_detach_database +-mark jrd5_get_segment +-mark jrd5_get_slice +-mark jrd5_open_blob2 +-mark jrd5_prepare_transaction +-mark jrd5_put_segment +-mark jrd5_put_slice +-mark jrd5_que_events +-mark jrd5_receive +-mark jrd5_reconnect_transaction +-mark jrd5_release_request +-mark jrd5_request_info +-mark jrd5_rollback_transaction +-mark jrd5_seek_blob +-mark jrd5_send +-mark jrd5_start_and_send +-mark jrd5_start_multiple +-mark jrd5_start_request +-mark jrd5_start_transaction +-mark jrd5_transaction_info +-mark jrd5_unwind_request +-mark DYN_ddl +-mark LDSQL_allocate_statement +-mark LDSQL_execute +-mark LDSQL_execute_immediate +-mark LDSQL_fetch +-mark LDSQL_free_statement +-mark LDSQL_prepare +-mark LDSQL_set_cursor +-mark LDSQL_sql_info +-end diff --git a/src/makefiles/bind_gds5.generic b/src/makefiles/bind_gds5.generic new file mode 100644 index 0000000000..c68b7677b8 --- /dev/null +++ b/src/makefiles/bind_gds5.generic @@ -0,0 +1,57 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +jrd5_attach_database +jrd5_blob_info +jrd5_cancel_blob +jrd5_cancel_events +jrd5_close_blob +jrd5_commit_retaining +jrd5_commit_transaction +jrd5_compile_request +jrd5_create_blob2 +jrd5_create_database +jrd5_database_info +jrd5_detach_database +jrd5_get_segment +jrd5_get_slice +jrd5_open_blob2 +jrd5_prepare_transaction +jrd5_put_segment +jrd5_put_slice +jrd5_que_events +jrd5_receive +jrd5_reconnect_transaction +jrd5_release_request +jrd5_request_info +jrd5_rollback_transaction +jrd5_seek_blob +jrd5_send +jrd5_start_and_send +jrd5_start_multiple +jrd5_start_request +jrd5_start_transaction +jrd5_transaction_info +jrd5_unwind_request +DYN_ddl +LDSQL_allocate_statement +LDSQL_execute +LDSQL_execute_immediate +LDSQL_fetch +LDSQL_free_statement +LDSQL_prepare +LDSQL_set_cursor +LDSQL_sql_info diff --git a/src/makefiles/bind_gds5.hp b/src/makefiles/bind_gds5.hp new file mode 100644 index 0000000000..3a38d1b8eb --- /dev/null +++ b/src/makefiles/bind_gds5.hp @@ -0,0 +1,60 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. ++e jrd5_attach_database ++e jrd5_blob_info ++e jrd5_cancel_blob ++e jrd5_cancel_events ++e jrd5_close_blob ++e jrd5_commit_retaining ++e jrd5_commit_transaction ++e jrd5_compile_request ++e jrd5_create_blob2 ++e jrd5_create_database ++e jrd5_database_info ++e jrd5_detach_database ++e jrd5_get_segment ++e jrd5_get_slice ++e jrd5_open_blob2 ++e jrd5_prepare_transaction ++e jrd5_put_segment ++e jrd5_put_slice ++e jrd5_que_events ++e jrd5_receive ++e jrd5_reconnect_transaction ++e jrd5_release_request ++e jrd5_request_info ++e jrd5_rollback_transaction ++e jrd5_seek_blob ++e jrd5_send ++e jrd5_start_and_send ++e jrd5_start_multiple ++e jrd5_start_request ++e jrd5_start_transaction ++e jrd5_transaction_info ++e jrd5_unwind_request ++e DYN_ddl ++e LDSQL_allocate_statement ++e LDSQL_execute ++e LDSQL_execute_immediate ++e LDSQL_fetch ++e LDSQL_free_statement ++e LDSQL_prepare ++e LDSQL_set_cursor ++e LDSQL_sql_info ++e errno ++e sys_errlist ++e sys_nerr diff --git a/src/makefiles/bind_gds_rsp.os2 b/src/makefiles/bind_gds_rsp.os2 new file mode 100644 index 0000000000..1717122f9e --- /dev/null +++ b/src/makefiles/bind_gds_rsp.os2 @@ -0,0 +1,127 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +ail.obj+ +alt.obj+ +all.obj+ +bkm.obj+ +blb.obj+ +blf.obj+ +btr.obj+ +builtin.obj+ +cch.obj+ +cmp.obj+ +cvt.obj+ +cvt2.obj+ +dfw.obj+ +dpm.obj+ +dsc.obj+ +dyn.obj+ +dyn_def.obj+ +dyn_del.obj+ +dyn_mod.obj+ +enc.obj+ +err.obj+ +iberr.obj+ +event.obj+ +evl.obj+ +exe.obj+ +ext.obj+ +filters.obj+ +flu.obj+ +fun.obj+ +functions.obj+ +gds.obj+ +grant.obj+ +idx.obj+ +inf.obj+ +ini.obj+ +intl.obj+ +inuse.obj+ +isc.obj+ +isc_file.obj+ +isc_ipc.obj+ +isc_sync.obj+ +jrd.obj+ +jrn.obj+ +lck.obj+ +license.obj+ +llio.obj+ +log.obj+ +met.obj+ +misc.obj+ +mov.obj+ +nav.obj+ +node.obj+ +old.obj+ +opt.obj+ +pag.obj+ +par.obj+ +pcmet.obj+ +perf.obj+ +pwd.obj+ +os2.obj+ +rec.obj+ +rlck.obj+ +rng.obj+ +rse.obj+ +sbm.obj+ +sch.obj+ +scl.obj+ +sdl.obj+ +sdw.obj+ +shut.obj+ +sort.obj+ +sqz.obj+ +svc.obj+ +sym.obj+ +thd.obj+ +tpc.obj+ +tra.obj+ +utl.obj+ +val.obj+ +vio.obj+ +why.obj+ +nodebug.obj+ +..\dsql\alld.obj+ +..\dsql\array.obj+ +..\dsql\blob.obj+ +..\dsql\ddl.obj+ +..\dsql\dsql.obj+ +..\dsql\errd.obj+ +..\dsql\gen.obj+ +..\dsql\hsh.obj+ +..\dsql\make.obj+ +..\dsql\metd.obj+ +..\dsql\movd.obj+ +..\dsql\parse.obj+ +..\dsql\pass1.obj+ +..\dsql\preparse.obj+ +..\dsql\user_dsql.obj+ +..\dsql\utld.obj+ +..\lock\lock.obj+ +..\remote\interface.obj+ +..\remote\allr.obj+ +..\remote\inet.obj+ +..\remote\merge.obj+ +..\remote\parser.obj+ +..\remote\protocol.obj+ +..\remote\remote.obj+ +..\remote\xdr.obj+ +..\wal\wal.obj+ +..\wal\walc.obj+ +..\wal\walf.obj+ +..\wal\walr.obj diff --git a/src/makefiles/bind_gds_rsp.win_nt b/src/makefiles/bind_gds_rsp.win_nt new file mode 100644 index 0000000000..c66b74b702 --- /dev/null +++ b/src/makefiles/bind_gds_rsp.win_nt @@ -0,0 +1,128 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +ail.obj+ +alt.obj+ +all.obj+ +bkm.obj+ +blb.obj+ +blf.obj+ +btr.obj+ +builtin.obj+ +cch.obj+ +cmp.obj+ +cvt.obj+ +cvt2.obj+ +dfw.obj+ +dpm.obj+ +dsc.obj+ +dyn.obj+ +dyn_def.obj+ +dyn_del.obj+ +dyn_mod.obj+ +enc.obj+ +err.obj+ +iberr.obj+ +event.obj+ +evl.obj+ +exe.obj+ +ext.obj+ +filters.obj+ +flu.obj+ +fun.obj+ +functions.obj+ +gds.obj+ +grant.obj+ +idx.obj+ +inf.obj+ +ini.obj+ +intl.obj+ +inuse.obj+ +isc.obj+ +isc_file.obj+ +isc_ipc.obj+ +isc_sync.obj+ +jrd.obj+ +jrn.obj+ +lck.obj+ +license.obj+ +llio.obj+ +log.obj+ +met.obj+ +misc.obj+ +mov.obj+ +nav.obj+ +node.obj+ +old.obj+ +opt.obj+ +pag.obj+ +par.obj+ +pcmet.obj+ +perf.obj+ +pwd.obj+ +rec.obj+ +rlck.obj+ +rng.obj+ +rse.obj+ +sbm.obj+ +sch.obj+ +scl.obj+ +sdl.obj+ +sdw.obj+ +shut.obj+ +sort.obj+ +sqz.obj+ +svc.obj+ +sym.obj+ +thd.obj+ +tpc.obj+ +tra.obj+ +utl.obj+ +val.obj+ +vio.obj+ +why.obj+ +winnt.obj+ +nodebug.obj+ +..\dsql\alld.obj+ +..\dsql\array.obj+ +..\dsql\blob.obj+ +..\dsql\ddl.obj+ +..\dsql\dsql.obj+ +..\dsql\errd.obj+ +..\dsql\gen.obj+ +..\dsql\hsh.obj+ +..\dsql\make.obj+ +..\dsql\metd.obj+ +..\dsql\movd.obj+ +..\dsql\parse.obj+ +..\dsql\pass1.obj+ +..\dsql\preparse.obj+ +..\dsql\user_dsql.obj+ +..\dsql\utld.obj+ +..\lock\lock.obj+ +..\remote\interface.obj+ +..\remote\allr.obj+ +..\remote\inet.obj+ +..\remote\merge.obj+ +..\remote\parser.obj+ +..\remote\protocol.obj+ +..\remote\remote.obj+ +..\remote\wnet.obj+ +..\remote\xdr.obj+ +..\wal\wal.obj+ +..\wal\walc.obj+ +..\wal\walf.obj+ +..\wal\walr.obj diff --git a/src/makefiles/bind_gds_s.im b/src/makefiles/bind_gds_s.im new file mode 100644 index 0000000000..d418d510ad --- /dev/null +++ b/src/makefiles/bind_gds_s.im @@ -0,0 +1,547 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# $Id: bind_gds_s.im,v 1.1 2001-07-12 06:32:03 bellardo Exp $ +#ident "InterBase V4.0 shared library" +#address .text 0x03800000 +#address .data 0x03c00000 +#target /usr/lib/libgds_s +#branch + gds__alloc 1 + gds__attach_database 2 + gds__blob_info 3 + gds__blob_size 4 + gds__cancel_blob 5 + gds__cancel_events 6 + gds__close 7 + gds__close_blob 8 + gds__commit_retaining 9 + gds__commit_transaction 10 + gds__compile_request 11 + gds__compile_request2 12 + gds__create_blob 13 + gds__create_blob2 14 + gds__create_database 15 + gds__database_info 16 + gds__ddl 17 + gds__declare 18 + gds__decode 19 + gds__decode_date 20 + gds__describe 21 + gds__describe_bind 22 + gds__detach_database 23 + gds__dsql_finish 24 + gds__edit 25 + gds__enable_subsystem 26 + gds__encode 27 + gds__encode_date 28 + gds__event_block 29 + gds__event_counts 30 + gds__event_wait 31 + gds__execute 32 + gds__execute_immediate 33 + gds__fetch 34 + gds__free 35 + gds__ftof 36 + gds__get_segment 37 + gds__get_slice 38 + gds__interprete 39 + gds__log 40 + gds__msg_format 41 + gds__msg_lookup 42 + gds__msg_open 43 + gds__msg_put 44 + gds__open 45 + gds__open_blob 46 + gds__open_blob2 47 + gds__parse_bpb 48 + gds__prefix 49 + gds__prepare 50 + gds__prepare_transaction 51 + gds__prepare_transaction2 52 + gds__print_blr 53 + gds__print_status 54 + gds__put_error 55 + gds__put_segment 56 + gds__put_slice 57 + gds__qtoq 58 + gds__que_events 59 + gds__receive 60 + gds__reconnect_transaction 61 + gds__register_cleanup 62 + gds__release_request 63 + gds__request_info 64 + gds__rollback_transaction 65 + gds__send 66 + gds__set_debug 67 + gds__sqlcode 68 + gds__start_and_send 69 + gds__start_multiple 70 + gds__start_request 71 + gds__start_transaction 72 + gds__temp_file 73 + gds__thread_enable 74 + gds__thread_enter 75 + gds__thread_exit 76 + gds__thread_start 77 + gds__to_sqlda 78 + gds__transaction_info 79 + gds__unwind_request 80 + gds__vax_integer 81 + gds__version 82 + gds__vtof 83 + gds__vtov 84 + blob__display 85 + blob__dump 86 + blob__edit 87 + blob__load 88 + BLOB_close 89 + BLOB_display 90 + BLOB_dump 91 + BLOB_edit 92 + BLOB_get 93 + BLOB_load 94 + BLOB_open 95 + BLOB_put 96 + Bopen 97 + perf_format 98 + perf_get_info 99 + perf_report 100 + isc_attach_database 101 + isc_blob_info 102 + isc_cancel_blob 103 + isc_cancel_events 104 + isc_close 105 + isc_close_blob 106 + isc_commit_retaining 107 + isc_commit_transaction 108 + isc_compile_request 109 + isc_compile_request2 110 + isc_create_blob 111 + isc_create_blob2 112 + isc_create_database 113 + isc_database_info 114 + isc_ddl 115 + isc_declare 116 + isc_decode_date 117 + isc_describe 118 + isc_describe_bind 119 + isc_detach_database 120 + isc_dsql_finish 121 + isc_event_counts 122 + isc_wait_for_event 123 + isc_execute 124 + isc_execute_immediate 125 + isc_fetch 126 + isc_fetch_a 127 + isc_ftof 128 + isc_get_segment 129 + isc_get_slice 130 + isc_interprete 131 + isc_open 132 + isc_open_blob 133 + isc_open_blob2 134 + isc_prepare 135 + isc_prepare_transaction 136 + isc_prepare_transaction2 137 + isc_print_status 138 + isc_put_segment 139 + isc_put_slice 140 + isc_qtoq 141 + isc_que_events 142 + isc_receive 143 + isc_reconnect_transaction 144 + isc_release_request 145 + isc_request_info 146 + isc_rollback_transaction 147 + isc_send 148 + isc_sqlcode 149 + isc_start_and_send 150 + isc_start_multiple 151 + isc_start_request 152 + isc_to_sqlda 153 + isc_transaction_info 154 + isc_unwind_request 155 + isc_version 156 + isc_vtof 157 + isc_vtov 158 + isc_array_lookup_desc 159 + isc_array_lookup_bounds 160 + isc_array_set_desc 161 + isc_array_gen_sdl 162 + isc_array_get_slice 163 + isc_array_put_slice 164 + isc_event_block 165 + gds__seek_blob 166 + isc_seek_blob 167 + isc_encode_date 168 + isc_print_blr 169 + gds__database_cleanup 170 + isc_database_cleanup 171 + isc_set_debug 172 + isc_print_sqlerror 173 + isc_sql_interprete 174 + isc_dsql_release 175 + isc_start_transaction 176 + isc_vax_integer 177 + isc_dsql_execute 178 + isc_dsql_execute_m 179 + isc_dsql_execute_immediate 180 + isc_dsql_execute_immediate_m 181 + isc_dsql_fetch 182 + isc_dsql_fetch_a 183 + isc_dsql_fetch_m 184 + isc_dsql_free_statement 185 + isc_dsql_prepare 186 + isc_dsql_prepare_m 187 + isc_dsql_set_cursor_name 188 + isc_dsql_sql_info 189 + isc_dsql_allocate_statement 190 + isc_dsql_describe 191 + isc_dsql_describe_bind 192 + isc_embed_dsql_close 193 + isc_embed_dsql_declare 194 + isc_embed_dsql_execute 195 + isc_embed_dsql_execute_immed 196 + isc_embed_dsql_fetch 197 + isc_embed_dsql_fetch_a 198 + isc_embed_dsql_open 199 + isc_embed_dsql_prepare 200 + isc_embed_dsql_release 201 + isc_embed_dsql_describe 202 + isc_embed_dsql_describe_bind 203 + isc_baddress 204 + isc_blob_display 205 + isc_blob_dump 206 + isc_blob_edit 207 + isc_blob_load 208 + isc_dsql_alloc_statement2 209 + isc_expand_dpb 210 + gds__log_status 211 + isc_dsql_insert 212 + isc_dsql_insert_m 213 + isc_embed_dsql_insert 214 + isc_transact_request 215 + gds__disable_subsystem 216 + gds__msg_close 217 + isc_dsql_execute2 218 + isc_dsql_execute2_m 219 + isc_dsql_exec_immed2 220 + isc_dsql_exec_immed2_m 221 + isc_embed_dsql_execute2 222 + isc_embed_dsql_exec_immed2 223 + isc_embed_dsql_open2 224 + gds__unregister_cleanup 225 + isc_attach_service 226 + isc_detach_service 227 + isc_query_service 228 + isc_drop_database 229 + isc_dsql_exec_immed3_m 230 + gds__transaction_cleanup 231 + isc_blob_gen_bpb 232 + isc_blob_lookup_desc 233 + isc_blob_set_desc 234 + isc_blob_default_desc 235 + gds__map_blobs 236 + ISC_signal 237 + ISC_signal_cancel 238 + isc_free 239 + BLOB_text_dump 240 + BLOB_text_load 241 + isc_modify_dpb 242 + isc_dsql_fetch2 243 + isc_reset_fpe 244 +#objects + source/jrd/shrinit.bin + source/jrd/all.bin + source/jrd/alt.bin + source/jrd/blb.bin + source/jrd/blf.bin + source/jrd/btr.bin + source/jrd/cch.bin + source/jrd/cmp.bin + source/jrd/cvt.bin + source/jrd/dpm.bin + source/jrd/dyn.bin + source/jrd/dyn_def.bin + source/jrd/dyn_del.bin + source/jrd/dyn_mod.bin + source/jrd/enc.bin + source/jrd/err.bin + source/jrd/event.bin + source/jrd/evl.bin + source/jrd/exe.bin + source/jrd/ext.bin + source/jrd/filters.bin + source/jrd/flu.bin + source/jrd/fun.bin + source/jrd/gds.bin + source/jrd/iberr.bin + source/jrd/idx.bin + source/jrd/inf.bin + source/jrd/ini.bin + source/jrd/intl.bin + source/jrd/isc.bin + source/jrd/isc_file.bin + source/jrd/jrd.bin + source/jrd/jrn.bin + source/jrd/lck.bin + source/jrd/log.bin + source/jrd/met.bin + source/jrd/mov.bin + source/jrd/nav.bin + source/jrd/node.bin + source/jrd/nodebug.bin + source/jrd/opt.bin + source/jrd/pag.bin + source/jrd/par.bin + source/jrd/perf.bin + source/jrd/pwd.bin + source/jrd/rse.bin + source/jrd/sbm.bin + source/jrd/sch.bin + source/jrd/scl.bin + source/jrd/sdl.bin + source/jrd/sdw.bin + source/jrd/sort.bin + source/jrd/sqz.bin + source/jrd/sym.bin + source/jrd/tra.bin + source/jrd/utl.bin + source/jrd/val.bin + source/jrd/vio.bin + source/jrd/why.bin + source/jrd/unix.bin + source/dsql/alld.bin + source/dsql/errd.bin + source/dsql/metd.bin + source/dsql/movd.bin + source/dsql/parse.bin + source/dsql/ddl.bin + source/dsql/dsql.bin + source/dsql/gen.bin + source/dsql/hsh.bin + source/dsql/make.bin + source/dsql/pass1.bin + source/dsql/array.bin + source/dsql/user_dsql.bin + source/dsql/utld.bin + source/lock/lock.bin + source/remote/interface.bin + source/remote/allr.bin + source/remote/inet.bin + source/remote/merge.bin + source/remote/parser.bin + source/remote/protocol.bin + source/remote/remote.bin + source/jrd/grant.bin + source/jrd/head5.bin + source/jrd/allp.bin + source/jrd/misc.bin + source/jrd/builtin.bin + source/intl/ld.bin + source/intl/cv_narrow.bin + source/intl/cs_narrow.bin + source/intl/lc_ascii.bin + source/intl/lc_latin1.bin + source/intl/lc_dos.bin + source/intl/cs_unicode.bin + source/intl/lc_unicode.bin + source/intl/cs_jis.bin + source/intl/cv_jis.bin + source/intl/lc_jis.bin + source/intl/ld2.bin + source/wal/wal.bin + source/wal/walc.bin + source/wal/walf.bin + source/wal/walr.bin + source/jrd/ail.bin + source/jrd/old.bin + source/jrd/rec.bin + source/jrd/thd.bin + source/jrd/dfw.bin + source/jrd/rlck.bin + source/jrd/llio.bin + source/jrd/cvt2.bin + source/jrd/dsc.bin + source/jrd/pcmet.bin + source/jrd/rng.bin + source/jrd/tpc.bin + source/intl/cs_utffss.bin + source/dsql/preparse.bin + source/jrd/shut.bin + source/jrd/svc.bin + source/jrd/bkm.bin + source/jrd/inuse.bin + source/dsql/blob.bin + source/jrd/isc_ipc.bin + source/jrd/isc_sync.bin +# source/jrd/qatest.bin + source/intl/lc_narrow.bin +#init source/jrd/shrinit.bin + _libgds_setjmp setjmp + _libgds_sprintf sprintf + _libgds_strlen strlen + _libgds_strcmp strcmp + _libgds_strcpy strcpy + _libgds_exit exit + _libgds_longjmp longjmp + _libgds__iob _iob + _libgds_abort abort + _libgds_memset memset + _libgds_getpid getpid + _libgds_memcpy memcpy + _libgds_shmdt shmdt + _libgds_memcmp memcmp + _libgds_fprintf fprintf + _libgds_printf printf + _libgds_errno errno + _libgds_fopen fopen + _libgds_fclose fclose + _libgds__filbuf _filbuf + _libgds_rewind rewind + _libgds_fseek fseek + _libgds_ftell ftell + _libgds__flsbuf _flsbuf + _libgds_sys_errlist sys_errlist + _libgds_sys_nerr sys_nerr + _libgds_malloc malloc + _libgds_gettimeofday gettimeofday + _libgds_ctime ctime + _libgds_getenv getenv + _libgds_lseek lseek + _libgds_read read + _libgds_open open + _libgds_strcat strcat + _libgds_fputs fputs + _libgds_fputc fputc + _libgds_mktemp mktemp + _libgds_unlink unlink + _libgds_sigvec sigvec + _libgds_semctl semctl + _libgds_semop semop + _libgds_select select + _libgds_strncpy strncpy + _libgds_strchr strchr + _libgds_getpwnam getpwnam + _libgds_geteuid geteuid + _libgds_getpwuid getpwuid + _libgds_getwd getwd + _libgds_readlink readlink + _libgds_gethostname gethostname + _libgds_endpwent endpwent + _libgds_getegid getegid + _libgds_kill kill + _libgds_pipe pipe + _libgds_fork fork + _libgds_execl execl + _libgds_write write + _libgds_umask umask + _libgds_lockf lockf + _libgds_shmget shmget + _libgds_shmat shmat + _libgds_shmctl shmctl + _libgds_ftok ftok + _libgds_close close + _libgds_fscanf fscanf + _libgds_semget semget + _libgds_strncmp strncmp + _libgds_send send + _libgds_socket socket + _libgds_connect connect + _libgds_recv recv + _libgds_fflush fflush + _libgds_time time + _libgds_localtime localtime + _libgds_sleep sleep + _libgds_gethostid gethostid + _libgds_times times + _libgds_stat stat + _libgds_system system + _libgds_fgetc fgetc + _libgds_fstat fstat + _libgds_getuid getuid + _libgds_fgets fgets + _libgds_atoi atoi + _libgds_alarm alarm + _libgds_signal signal + _libgds_getservbyname getservbyname + _libgds_gethostbyname gethostbyname + _libgds_setsockopt setsockopt + _libgds_bind bind + _libgds_listen listen + _libgds_accept accept + _libgds_setreuid setreuid + _libgds_setregid setregid + _libgds_chdir chdir + _libgds_ioctl ioctl + _libgds_getsockname getsockname + _libgds_getpeername getpeername + _libgds_gethostbyaddr gethostbyaddr + _libgds_sscanf sscanf + _libgds_xdrmem_create xdrmem_create + _libgds_innetgr innetgr + _libgds_xdr_enum xdr_enum + _libgds_xdr_short xdr_short + _libgds_xdr_u_short xdr_u_short + _libgds_xdr_long xdr_long + _libgds_xdr_opaque xdr_opaque + _libgds_xdr_string xdr_string + _libgds_FUNCTIONS_entrypoint FUNCTIONS_entrypoint + _libgds_fcntl fcntl + _libgds_fwrite fwrite + _libgds_getppid getppid + _libgds_initgroups initgroups + _libgds_setitimer setitimer + _libgds_sigset sigset + _libgds_getgroups getgroups + _libgds_bzero bzero + _libgds_shutdown shutdown + _libgds_crypt crypt + _libgds_setmntent setmntent + _libgds_getmntent getmntent + _libgds_endmntent endmntent + _libgds_pause pause + _libgds_xdr_float xdr_float + _libgds_xdr_double xdr_double + _libgds_sbrk sbrk + _libgds_environ environ + _libgds_fdopen fdopen + _libgds_dup dup + _libgds_execle execle + _libgds_strrchr strrchr + _libgds_fsync fsync + _libgds_wait wait + _libgds__exit _exit + _libgds_atol atol + _libgds_execvp execvp + _libgds_nice nice + _libgds_putenv putenv +### _libgds_xdr_free xdr_free + _libgds_xdr_wrapstring xdr_wrapstring + _libgds_vsprintf vsprintf + _libgds_h_errno h_errno + _libgds_chmod chmod + _libgds_ungetc ungetc + _libgds_vfprintf vfprintf + _libgds__assert _assert + _libgds_access access +## _libgds_sigsuspend sigsuspend +## _libgds_sigprocmask sigprocmask +## _libgds_sigaddset sigaddset + _libgds_sigblock sigblock + _libgds_sigsetmask sigsetmask + _libgds_sigpause sigpause diff --git a/src/makefiles/bind_gds_s.sco b/src/makefiles/bind_gds_s.sco new file mode 100644 index 0000000000..39c61407f4 --- /dev/null +++ b/src/makefiles/bind_gds_s.sco @@ -0,0 +1,551 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# $Id: bind_gds_s.sco,v 1.1 2001-07-12 06:32:03 bellardo Exp $ +#ident "InterBase V4.0 shared library" +#address .text 0xa4800000 +#address .data 0xa4c00000 +#target /shlib/libgds_s +#branch + gds__alloc 1 + gds__attach_database 2 + gds__blob_info 3 + gds__blob_size 4 + gds__cancel_blob 5 + gds__cancel_events 6 + gds__close 7 + gds__close_blob 8 + gds__commit_retaining 9 + gds__commit_transaction 10 + gds__compile_request 11 + gds__compile_request2 12 + gds__create_blob 13 + gds__create_blob2 14 + gds__create_database 15 + gds__database_info 16 + gds__ddl 17 + gds__declare 18 + gds__decode 19 + gds__decode_date 20 + gds__describe 21 + gds__describe_bind 22 + gds__detach_database 23 + gds__dsql_finish 24 + gds__edit 25 + gds__enable_subsystem 26 + gds__encode 27 + gds__encode_date 28 + gds__event_block 29 + gds__event_counts 30 + gds__event_wait 31 + gds__execute 32 + gds__execute_immediate 33 + gds__fetch 34 + gds__free 35 + gds__ftof 36 + gds__get_segment 37 + gds__get_slice 38 + gds__interprete 39 + gds__log 40 + gds__msg_format 41 + gds__msg_lookup 42 + gds__msg_open 43 + gds__msg_put 44 + gds__open 45 + gds__open_blob 46 + gds__open_blob2 47 + gds__parse_bpb 48 + gds__prefix 49 + gds__prepare 50 + gds__prepare_transaction 51 + gds__prepare_transaction2 52 + gds__print_blr 53 + gds__print_status 54 + gds__put_error 55 + gds__put_segment 56 + gds__put_slice 57 + gds__qtoq 58 + gds__que_events 59 + gds__receive 60 + gds__reconnect_transaction 61 + gds__register_cleanup 62 + gds__release_request 63 + gds__request_info 64 + gds__rollback_transaction 65 + gds__send 66 + gds__set_debug 67 + gds__sqlcode 68 + gds__start_and_send 69 + gds__start_multiple 70 + gds__start_request 71 + gds__start_transaction 72 + gds__temp_file 73 + gds__thread_enable 74 + gds__thread_enter 75 + gds__thread_exit 76 + gds__thread_start 77 + gds__to_sqlda 78 + gds__transaction_info 79 + gds__unwind_request 80 + gds__vax_integer 81 + gds__version 82 + gds__vtof 83 + gds__vtov 84 + blob__display 85 + blob__dump 86 + blob__edit 87 + blob__load 88 + BLOB_close 89 + BLOB_display 90 + BLOB_dump 91 + BLOB_edit 92 + BLOB_get 93 + BLOB_load 94 + BLOB_open 95 + BLOB_put 96 + Bopen 97 + perf_format 98 + perf_get_info 99 + perf_report 100 + isc_attach_database 101 + isc_blob_info 102 + isc_cancel_blob 103 + isc_cancel_events 104 + isc_close 105 + isc_close_blob 106 + isc_commit_retaining 107 + isc_commit_transaction 108 + isc_compile_request 109 + isc_compile_request2 110 + isc_create_blob 111 + isc_create_blob2 112 + isc_create_database 113 + isc_database_info 114 + isc_ddl 115 + isc_declare 116 + isc_decode_date 117 + isc_describe 118 + isc_describe_bind 119 + isc_detach_database 120 + isc_dsql_finish 121 + isc_event_counts 122 + isc_wait_for_event 123 + isc_execute 124 + isc_execute_immediate 125 + isc_fetch 126 + isc_fetch_a 127 + isc_ftof 128 + isc_get_segment 129 + isc_get_slice 130 + isc_interprete 131 + isc_open 132 + isc_open_blob 133 + isc_open_blob2 134 + isc_prepare 135 + isc_prepare_transaction 136 + isc_prepare_transaction2 137 + isc_print_status 138 + isc_put_segment 139 + isc_put_slice 140 + isc_qtoq 141 + isc_que_events 142 + isc_receive 143 + isc_reconnect_transaction 144 + isc_release_request 145 + isc_request_info 146 + isc_rollback_transaction 147 + isc_send 148 + isc_sqlcode 149 + isc_start_and_send 150 + isc_start_multiple 151 + isc_start_request 152 + isc_to_sqlda 153 + isc_transaction_info 154 + isc_unwind_request 155 + isc_version 156 + isc_vtof 157 + isc_vtov 158 + isc_array_lookup_desc 159 + isc_array_lookup_bounds 160 + isc_array_set_desc 161 + isc_array_gen_sdl 162 + isc_array_get_slice 163 + isc_array_put_slice 164 + isc_event_block 165 + gds__seek_blob 166 + isc_seek_blob 167 + isc_encode_date 168 + isc_print_blr 169 + gds__database_cleanup 170 + isc_database_cleanup 171 + isc_set_debug 172 + isc_print_sqlerror 173 + isc_sql_interprete 174 + isc_dsql_release 175 + isc_start_transaction 176 + isc_vax_integer 177 + isc_dsql_execute 178 + isc_dsql_execute_m 179 + isc_dsql_execute_immediate 180 + isc_dsql_execute_immediate_m 181 + isc_dsql_fetch 182 + isc_dsql_fetch_a 183 + isc_dsql_fetch_m 184 + isc_dsql_free_statement 185 + isc_dsql_prepare 186 + isc_dsql_prepare_m 187 + isc_dsql_set_cursor_name 188 + isc_dsql_sql_info 189 + isc_dsql_allocate_statement 190 + isc_dsql_describe 191 + isc_dsql_describe_bind 192 + isc_embed_dsql_close 193 + isc_embed_dsql_declare 194 + isc_embed_dsql_execute 195 + isc_embed_dsql_execute_immed 196 + isc_embed_dsql_fetch 197 + isc_embed_dsql_fetch_a 198 + isc_embed_dsql_open 199 + isc_embed_dsql_prepare 200 + isc_embed_dsql_release 201 + isc_embed_dsql_describe 202 + isc_embed_dsql_describe_bind 203 + isc_baddress 204 + isc_blob_display 205 + isc_blob_dump 206 + isc_blob_edit 207 + isc_blob_load 208 + isc_expand_dpb 209 + gds__log_status 210 + isc_dsql_insert 211 + isc_dsql_insert_m 212 + isc_embed_dsql_insert 213 + isc_transact_request 214 + gds__disable_subsystem 215 + gds__msg_close 216 + isc_dsql_alloc_statement2 217 + isc_dsql_execute2 218 + isc_dsql_execute2_m 219 + isc_dsql_exec_immed2 220 + isc_dsql_exec_immed2_m 221 + isc_embed_dsql_execute2 222 + isc_embed_dsql_exec_immed2 223 + isc_embed_dsql_open2 224 + gds__unregister_cleanup 225 + isc_attach_service 226 + isc_detach_service 227 + isc_query_service 228 + isc_drop_database 229 + isc_dsql_exec_immed3_m 230 + gds__transaction_cleanup 231 + isc_blob_gen_bpb 232 + isc_blob_lookup_desc 233 + isc_blob_set_desc 234 + isc_blob_default_desc 235 + gds__map_blobs 236 + ISC_signal 237 + ISC_signal_cancel 238 + isc_free 239 + BLOB_text_dump 240 + BLOB_text_load 241 + isc_modify_dpb 242 + isc_dsql_fetch2 243 + isc_reset_fpe 244 +#objects + source/jrd/shrinit.bin + source/jrd/all.bin + source/jrd/alt.bin + source/jrd/blb.bin + source/jrd/blf.bin + source/jrd/btr.bin + source/jrd/cch.bin + source/jrd/cmp.bin + source/jrd/cvt.bin + source/jrd/dpm.bin + source/jrd/dyn.bin + source/jrd/dyn_def.bin + source/jrd/dyn_del.bin + source/jrd/dyn_mod.bin + source/jrd/enc.bin + source/jrd/err.bin + source/jrd/event.bin + source/jrd/evl.bin + source/jrd/exe.bin + source/jrd/ext.bin + source/jrd/filters.bin + source/jrd/flu.bin + source/jrd/fun.bin + source/jrd/gds.bin + source/jrd/iberr.bin + source/jrd/idx.bin + source/jrd/inf.bin + source/jrd/ini.bin + source/jrd/intl.bin + source/jrd/isc.bin + source/jrd/isc_file.bin + source/jrd/jrd.bin + source/jrd/jrn.bin + source/jrd/lck.bin + source/jrd/log.bin + source/jrd/met.bin + source/jrd/mov.bin + source/jrd/nav.bin + source/jrd/node.bin + source/jrd/nodebug.bin + source/jrd/opt.bin + source/jrd/pag.bin + source/jrd/par.bin + source/jrd/perf.bin + source/jrd/pwd.bin + source/jrd/rse.bin + source/jrd/sbm.bin + source/jrd/sch.bin + source/jrd/scl.bin + source/jrd/sdl.bin + source/jrd/sdw.bin + source/jrd/sort.bin + source/jrd/sqz.bin + source/jrd/sym.bin + source/jrd/tra.bin + source/jrd/utl.bin + source/jrd/val.bin + source/jrd/vio.bin + source/jrd/why.bin + source/jrd/unix.bin + source/dsql/alld.bin + source/dsql/errd.bin + source/dsql/metd.bin + source/dsql/movd.bin + source/dsql/parse.bin + source/dsql/ddl.bin + source/dsql/dsql.bin + source/dsql/gen.bin + source/dsql/hsh.bin + source/dsql/make.bin + source/dsql/pass1.bin + source/dsql/array.bin + source/dsql/user_dsql.bin + source/dsql/utld.bin + source/lock/lock.bin + source/remote/interface.bin + source/remote/allr.bin + source/remote/inet.bin + source/remote/merge.bin + source/remote/parser.bin + source/remote/protocol.bin + source/remote/remote.bin + source/jrd/grant.bin + source/jrd/head5.bin + source/jrd/allp.bin + source/jrd/misc.bin + source/jrd/builtin.bin + source/intl/ld.bin + source/intl/cv_narrow.bin + source/intl/cs_narrow.bin + source/intl/lc_ascii.bin + source/intl/lc_latin1.bin + source/intl/lc_dos.bin + source/intl/cs_unicode.bin + source/intl/lc_unicode.bin + source/intl/cs_jis.bin + source/intl/cv_jis.bin + source/intl/lc_jis.bin + source/intl/ld2.bin + source/wal/wal.bin + source/wal/walc.bin + source/wal/walf.bin + source/wal/walr.bin + source/jrd/ail.bin + source/jrd/old.bin + source/jrd/rec.bin + source/jrd/thd.bin + source/jrd/dfw.bin + source/jrd/stubs.bin + source/jrd/rlck.bin + source/jrd/llio.bin + source/jrd/cvt2.bin + source/jrd/dsc.bin + source/jrd/pcmet.bin + source/jrd/rng.bin + source/jrd/tpc.bin + source/intl/cs_utffss.bin + source/dsql/preparse.bin + source/jrd/shut.bin + source/jrd/svc.bin + source/jrd/bkm.bin + source/jrd/inuse.bin + source/dsql/blob.bin + source/jrd/isc_ipc.bin + source/jrd/isc_sync.bin +# source/jrd/qatest.bin + source/intl/lc_narrow.bin +## kludge + source/jrd/87ftol.o + source/jrd/_fltused.o +#hide linker + * +#export linker + gethostid +#init source/jrd/shrinit.bin + _libgds_setjmp setjmp + _libgds_sprintf sprintf + _libgds_strlen strlen + _libgds_strcmp strcmp + _libgds_strcpy strcpy + _libgds_exit exit + _libgds_longjmp longjmp + _libgds__iob _iob + _libgds_abort abort + _libgds_memset memset + _libgds_getpid getpid + _libgds_memcpy memcpy + _libgds_shmdt shmdt + _libgds_memcmp memcmp + _libgds_fprintf fprintf + _libgds_printf printf + _libgds_errno errno + _libgds_fopen fopen + _libgds_fclose fclose + _libgds__filbuf _filbuf + _libgds_rewind rewind + _libgds_fseek fseek + _libgds_ftell ftell + _libgds__flsbuf _flsbuf + _libgds_sys_errlist sys_errlist + _libgds_sys_nerr sys_nerr + _libgds_malloc malloc + _libgds_gettimeofday gettimeofday + _libgds_ctime ctime + _libgds_getenv getenv + _libgds_lseek lseek + _libgds_read read + _libgds_open open + _libgds_strcat strcat + _libgds_fputs fputs + _libgds_fputc fputc + _libgds_mktemp mktemp + _libgds_unlink unlink + _libgds_semctl semctl + _libgds_semop semop + _libgds_select select + _libgds_strncpy strncpy + _libgds_strchr strchr + _libgds_getpwnam getpwnam + _libgds_geteuid geteuid + _libgds_getpwuid getpwuid + _libgds_readlink readlink + _libgds_gethostname gethostname + _libgds_endpwent endpwent + _libgds_getegid getegid + _libgds_kill kill + _libgds_pipe pipe + _libgds_fork fork + _libgds_execl execl + _libgds_write write + _libgds_umask umask + _libgds_lockf lockf + _libgds_shmget shmget + _libgds_shmat shmat + _libgds_shmctl shmctl + _libgds_ftok ftok + _libgds_close close + _libgds_fscanf fscanf + _libgds_semget semget + _libgds_strncmp strncmp + _libgds_send send + _libgds_socket socket + _libgds_connect connect + _libgds_recv recv + _libgds_fflush fflush + _libgds_time time + _libgds_localtime localtime + _libgds_sleep sleep + _libgds_times times + _libgds_stat stat + _libgds_system system + _libgds_fgetc fgetc + _libgds_fstat fstat + _libgds_getuid getuid + _libgds_fgets fgets + _libgds_atoi atoi + _libgds_alarm alarm + _libgds_signal signal + _libgds_getservbyname getservbyname + _libgds_gethostbyname gethostbyname + _libgds_setsockopt setsockopt + _libgds_bind bind + _libgds_listen listen + _libgds_accept accept + _libgds_setreuid setreuid + _libgds_setregid setregid + _libgds_chdir chdir + _libgds_ioctl ioctl + _libgds_getsockname getsockname + _libgds_getpeername getpeername + _libgds_gethostbyaddr gethostbyaddr + _libgds_sscanf sscanf + _libgds_xdrmem_create xdrmem_create + _libgds_innetgr innetgr + _libgds_xdr_enum xdr_enum + _libgds_xdr_short xdr_short + _libgds_xdr_u_short xdr_u_short + _libgds_xdr_long xdr_long + _libgds_xdr_opaque xdr_opaque + _libgds_xdr_string xdr_string + _libgds_FUNCTIONS_entrypoint FUNCTIONS_entrypoint + _libgds_fcntl fcntl + _libgds_fwrite fwrite + _libgds_getppid getppid + _libgds_setitimer setitimer + _libgds_sigset sigset + _libgds_getgroups getgroups + _libgds_bzero bzero + _libgds_shutdown shutdown + _libgds_crypt crypt + _libgds_pause pause + _libgds_xdr_float xdr_float + _libgds_xdr_double xdr_double + _libgds_sbrk sbrk + _libgds_environ environ + _libgds_fdopen fdopen + _libgds_dup dup + _libgds_execle execle + _libgds_strrchr strrchr + _libgds_waitpid waitpid + _libgds__exit _exit + _libgds_popen popen + _libgds_htonl htonl + _libgds_ntohl ntohl + _libgds_getcwd getcwd + _libgds_pclose pclose + _libgds_atexit atexit + _libgds_atol atol + _libgds_execvp execvp + _libgds_nice nice + _libgds_putenv putenv + _libgds_xdr_free xdr_free + _libgds_xdr_wrapstring xdr_wrapstring + _libgds_vsprintf vsprintf + _libgds_h_errno h_errno + _libgds_chmod chmod + _libgds_ungetc ungetc + _libgds_vfprintf vfprintf + _libgds__assert _assert + _libgds_access access + _libgds_fsync fsync + _libgds_sigsuspend sigsuspend + _libgds_sigprocmask sigprocmask + _libgds_sigaddset sigaddset diff --git a/src/makefiles/bind_gdsf_s.im b/src/makefiles/bind_gdsf_s.im new file mode 100644 index 0000000000..f0c89501e9 --- /dev/null +++ b/src/makefiles/bind_gdsf_s.im @@ -0,0 +1,28 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +#ident "InterBase V3.1 shared UDF library" +#address .text 0x03000000 +#address .data 0x03400000 +#target /usr/lib/libgdsf_s +#branch + FUNCTIONS_entrypoint 1 +#objects + source/jrd/shrfinit.bin + source/jrd/functions.bin +#init source/jrd/shrfinit.bin + _libfun_strcmp strcmp + _libfun_sprintf sprintf diff --git a/src/makefiles/bind_gdsf_s.sco b/src/makefiles/bind_gdsf_s.sco new file mode 100644 index 0000000000..550d665dc7 --- /dev/null +++ b/src/makefiles/bind_gdsf_s.sco @@ -0,0 +1,28 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +#ident "InterBase V3.1 shared UDF library" +#address .text 0xa4000000 +#address .data 0xa4400000 +#target /shlib/libgdsf_s +#branch + FUNCTIONS_entrypoint 1 +#objects + source/jrd/shrfinit.bin + source/jrd/functions.bin +#init source/jrd/shrfinit.bin + _libfun_strcmp strcmp + _libfun_sprintf sprintf diff --git a/src/makefiles/bind_gdsintl.aix_ppc b/src/makefiles/bind_gdsintl.aix_ppc new file mode 100644 index 0000000000..4de1c60580 --- /dev/null +++ b/src/makefiles/bind_gdsintl.aix_ppc @@ -0,0 +1,21 @@ +* The contents of this file are subject to the Interbase Public +* License Version 1.0 (the "License"); you may not use this file +* except in compliance with the License. You may obtain a copy +* of the License at http://www.Inprise.com/IPL.html +* +* Software distributed under the License is distributed on an +* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +* or implied. See the License for the specific language governing +* rights and limitations under the License. +* +* The Original Code was created by Inprise Corporation +* and its predecessors. Portions created by Inprise Corporation are +* Copyright (C) Inprise Corporation. +* +* All Rights Reserved. +* Contributor(s): +* Tom Coleman tmcsys (AIX for C bind expects * comments) +* +* $Id: bind_gdsintl.aix_ppc,v 1.1 2001-07-12 06:32:03 bellardo Exp $ +* +LD_lookup diff --git a/src/makefiles/bind_gdsintl.win_nt b/src/makefiles/bind_gdsintl.win_nt new file mode 100644 index 0000000000..e4aad9135f --- /dev/null +++ b/src/makefiles/bind_gdsintl.win_nt @@ -0,0 +1,24 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +LIBRARY gdsintl + +DESCRIPTION 'InterBase International DLL' + +DATA READ WRITE + +EXPORTS + LD_lookup @1 diff --git a/src/makefiles/bind_gdslib.apollo b/src/makefiles/bind_gdslib.apollo new file mode 100644 index 0000000000..11f2a8fc38 --- /dev/null +++ b/src/makefiles/bind_gdslib.apollo @@ -0,0 +1,425 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +{ This is the SR10 version of the file to bind jrd. } +{ Be sure not to use the -inlib switch on the bind } +{ because there seems to be a bug in it. } +alt.o +gds.o +why.o +perf.o +jrd.o +all.o +err.o +iberr.o +cch.o +lck.o +apollo.o +pag.o +inf.o +sort.o +ini.o +intl.o +cmp.o +exe.o +met.o +dpm.o +par.o +mov.o +cvt.o +evl.o +sym.o +fun.o +tra.o +vio.o +sqz.o +opt.o +rse.o +btr.o +idx.o +sbm.o +blb.o +nodebug.o +isc.o +isc_file.o +val.o +jrn.o +scl.o +ext.o +blf.o +nav.o +sdw.o +sch.o +thd.o +node.o +dyn.o +dyn_def.o +dyn_del.o +dyn_mod.o +event.o +utl.o +sdl.o +flu.o +log.o +functions.o +filters.o +grant.o +pwd.o +enc.o +sun_ftn.o +misc.o +ail.o +old.o +rec.o +dfw.o +rlck.o +llio.o +cvt2.o +pcmet.o +rng.o +tpc.o +dsc.o +shut.o +svc.o +bkm.o +inuse.o +isc_ipc.o +isc_sync.o +source/lock/lock.o +source/remote/interface.o +source/remote/allr.o +source/remote/inet.o +source/remote/merge.o +source/remote/parser.o +source/remote/protocol.o +source/remote/remote.o +source/remote/ambx.o +source/remote/xdr.o +source/dsql/alld.o +source/dsql/array.o +source/dsql/blob.o +source/dsql/ddl.o +source/dsql/dsql.o +source/dsql/errd.o +source/dsql/gen.o +source/dsql/hsh.o +source/dsql/make.o +source/dsql/metd.o +source/dsql/movd.o +source/dsql/parse.o +source/dsql/pass1.o +source/dsql/preparse.o +source/dsql/user_dsql.o +source/dsql/utld.o +source/wal/wal.o +source/wal/walc.o +source/wal/walf.o +source/wal/walr.o +-mergebss +-loadhigh +-binary gdslib -exactcase +-mark gds__attach_database +-mark gds__blob_info +-mark gds__cancel_blob +-mark gds__close_blob +-MARK gds__commit_transaction +-MARK gds__compile_request +-MARK gds__compile_request2 +-mark gds__create_blob +-MARK gds__create_database +-MARK gds__database_cleanup +-MARK gds__database_info +-MARK gds__decode_date +-MARK gds__detach_database +-MARK gds__encode_date +-mark isc_expand_dpb +-mark isc_modify_dpb +-mark gds__get_segment +-mark gds__open_blob +-mark gds__prepare_transaction +-mark gds__prepare_transaction2 +-mark gds__put_segment +-MARK gds__receive +-MARK gds__release_request +-MARK gds__request_info +-MARK gds__reconnect_transaction +-MARK gds__rollback_transaction +-MARK gds__seek_blob +-MARK gds__send +-MARK gds__start_and_send +-MARK gds__start_request +-MARK gds__start_transaction +-MARK gds__start_multiple +-MARK gds__transaction_info +-MARK gds__unwind_request +-mark gds__open_blob2 +-mark gds__create_blob2 +-MARK gds__vtof +-MARK gds__vtov +-MARK gds__ftof +-MARK gds__qtoq +-MARK gds__print_status +-MARK gds__put_error +-MARK gds__log +-MARK gds__print_blr +-MARK gds__sqlcode +-MARK gds__alloc +-MARK gds__free +-MARK gds__temp_file +-MARK gds__vax_integer +-MARK gds__decode +-MARK gds__edit +-MARK gds__encode +-MARK gds__interprete +-MARK gds__interprete_a +-MARK gds__set_debug +-MARK gds__version +-MARK gds__blob_size +-MARK gds__termtype +-MARK NODE_license +-MARK ISC_signal +-MARK ISC_signal_cancel +-MARK perf_get_info +-MARK perf_format +-MARK perf_report +-MARK BLOB_close +-MARK BLOB_display +-MARK BLOB_dump +-MARK BLOB_edit +-MARK BLOB_get +-MARK BLOB_load +-MARK Bopen +-MARK BLOB_open +-MARK BLOB_put +-MARK blob__display +-MARK blob__dump +-MARK blob__edit +-MARK blob__load +-MARK BLOB_text_dump +-MARK BLOB_text_load +-mark gds__ddl +-mark gds__commit_retaining +-mark gds__que_events +-mark gds__cancel_events +-mark gds__event_wait +-mark gds__map_blobs +-mark gds__msg_close +-mark gds__msg_format +-mark gds__msg_lookup +-mark gds__msg_open +-mark gds__msg_put +-mark gds__enable_subsystem +-mark gds__disable_subsystem +-mark gds__register_cleanup +-mark gds__transaction_cleanup +-mark gds__unregister_cleanup +-mark gds__event_block +-mark gds__event_block_a +-mark gds__event_counts +-mark gds__get_slice +-mark gds__put_slice +-mark gds__prefix +-mark gds__log_status +-mark isc_attach_database +-mark isc_attach_service +-mark isc_blob_info +-mark isc_cancel_blob +-mark isc_cancel_events +-mark isc_close_blob +-mark isc_commit_retaining +-mark isc_commit_transaction +-mark isc_compile_request +-mark isc_compile_request2 +-mark isc_create_blob +-mark isc_create_blob2 +-mark isc_create_database +-mark isc_database_cleanup +-mark isc_database_info +-mark isc_ddl +-mark isc_decode_date +-mark isc_detach_database +-mark isc_detach_service +-mark isc_drop_database +-mark isc_encode_date +-mark isc_event_block +-mark isc_event_counts +-mark isc_free +-mark isc_ftof +-mark isc_get_segment +-mark isc_get_slice +-mark isc_interprete +-mark isc_open_blob +-mark isc_open_blob2 +-mark isc_prepare_transaction +-mark isc_prepare_transaction2 +-mark isc_print_blr +-mark isc_print_sqlerror +-mark isc_print_status +-mark isc_put_segment +-mark isc_put_slice +-mark isc_qtoq +-mark isc_que_events +-mark isc_query_service +-mark isc_receive +-mark isc_reconnect_transaction +-mark isc_release_request +-mark isc_request_info +-mark isc_rollback_transaction +-mark isc_seek_blob +-mark isc_send +-mark isc_set_debug +-mark isc_sql_interprete +-mark isc_sqlcode +-mark isc_start_and_send +-mark isc_start_multiple +-mark isc_start_request +-mark isc_start_transaction +-mark isc_transact_request +-mark isc_transaction_info +-mark isc_unwind_request +-mark isc_vax_integer +-mark isc_version +-mark isc_vtof +-mark isc_vtov +-mark isc_wait_for_event +{all of the entry points from the thread package } +-mark gds__thread_enable +-mark gds__thread_enter +-mark gds__thread_exit +-mark gds__thread_start +-mark SCH_current_thread +-mark SCH_enter +-mark SCH_exit +-mark SCH_hiber +-mark SCH_schedule +-mark SCH_wake +{all of the entry points from the lock manager } +-mark LOCK_convert +-mark LOCK_deq +-mark LOCK_downgrade +-mark LOCK_enq +-mark LOCK_fini +-mark LOCK_init +-mark LOCK_re_post +-mark LOCK_read_data +-mark LOCK_read_data2 +-mark LOCK_write_data +{all of the entry points from the old DSQL } +-mark gds__close +-mark gds__declare +-mark gds__describe +-mark gds__describe_bind +-mark gds__dsql_finish +-mark gds__execute +-mark gds__execute_immediate +-mark gds__fetch +-mark gds__fetch_a +-mark gds__open +-mark gds__prepare +-mark gds__to_sqlda +-mark isc_close +-mark isc_declare +-mark isc_describe +-mark isc_describe_bind +-mark isc_dsql_finish +-mark isc_dsql_release +-mark isc_execute +-mark isc_execute_immediate +-mark isc_fetch +-mark isc_fetch_a +-mark isc_open +-mark isc_prepare +-mark isc_to_sqlda +-mark isc_array_lookup_desc +-mark isc_array_lookup_bounds +-mark isc_array_set_desc +-mark isc_array_gen_sdl +-mark isc_array_get_slice +-mark isc_array_put_slice +-mark isc_blob_gen_bpb +-mark isc_blob_lookup_desc +-mark isc_blob_set_desc +-mark isc_blob_default_desc +{all of the entry points from the new DSQL } +-mark isc_dsql_allocate_statement +-mark isc_dsql_alloc_statement2 +-mark isc_dsql_describe +-mark isc_dsql_describe_bind +-mark isc_dsql_execute +-mark isc_dsql_execute2 +-mark isc_dsql_execute_m +-mark isc_dsql_execute2_m +-mark isc_dsql_execute_immediate +-mark isc_dsql_execute_immediate_m +-mark isc_dsql_exec_immed2 +-mark isc_dsql_exec_immed2_m +-mark isc_dsql_exec_immed3_m +-mark isc_dsql_fetch +-mark isc_dsql_fetch_a +-mark isc_dsql_fetch_m +-mark isc_dsql_free_statement +-mark isc_dsql_insert +-mark isc_dsql_insert_m +-mark isc_dsql_prepare +-mark isc_dsql_prepare_m +-mark isc_dsql_set_cursor_name +-mark isc_dsql_sql_info +-mark isc_embed_dsql_close +-mark isc_embed_dsql_declare +-mark isc_embed_dsql_describe +-mark isc_embed_dsql_describe_bind +-mark isc_embed_dsql_execute +-mark isc_embed_dsql_execute2 +-mark isc_embed_dsql_execute_immed +-mark isc_embed_dsql_exec_immed2 +-mark isc_embed_dsql_fetch +-mark isc_embed_dsql_fetch_a +-mark isc_embed_dsql_insert +-mark isc_embed_dsql_open +-mark isc_embed_dsql_open2 +-mark isc_embed_dsql_prepare +-mark isc_embed_dsql_release +{all of the entry points from the DSQL Fortran wrapper } +-mark isc_dsql_allocate_statement_ +-mark isc_dsql_describe_ +-mark isc_dsql_describe_bind_ +-mark isc_dsql_execute_ +-mark isc_dsql_execute_m_ +-mark isc_dsql_execute_immediate_ +-mark isc_dsql_execute_immediate_m_ +-mark isc_dsql_fetch_ +-mark isc_dsql_fetch_m_ +-mark isc_dsql_free_statement_ +-mark isc_dsql_prepare_ +-mark isc_dsql_prepare_m_ +-mark isc_dsql_set_cursor_name_ +-mark isc_dsql_sql_info_ +-mark isc_embed_dsql_close_ +-mark isc_embed_dsql_declare_ +-mark isc_embed_dsql_describe_ +-mark isc_embed_dsql_describe_bind_ +-mark isc_embed_dsql_execute_ +-mark isc_embed_dsql_execute_immed_ +-mark isc_embed_dsql_fetch_ +-mark isc_embed_dsql_open_ +-mark isc_embed_dsql_prepare_ +-mark isc_embed_dsql_release_ +{all of the entry points from the event Fortran wrapper } +-mark gds__event_wait_ +-mark gds__event_counts_ +-mark isc_baddress +-mark isc_reset_fpe +-end diff --git a/src/makefiles/bind_pyxis.apollo b/src/makefiles/bind_pyxis.apollo new file mode 100644 index 0000000000..44226dd6b9 --- /dev/null +++ b/src/makefiles/bind_pyxis.apollo @@ -0,0 +1,120 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +pyxis.o menu.o allp.o scr.o debug.o edit.o phase3.o +phase2.o save.o picstr.o movp.o altp.o +adm.o vt100.o +-mergebss +-binary pyxislib -exactcase +-mark PYXIS_box +-mark PYXIS_bugcheck +-mark PYXIS_clone +-mark PYXIS_compute_size +-mark PYXIS_create_entree +-mark PYXIS_create_object +-mark PYXIS_create_window +-mark PYXIS_define_forms_relation +-mark PYXIS_delete_attribute +-mark PYXIS_delete_named_attribute +-mark PYXIS_delete_window +-mark PYXIS_dump +-mark PYXIS_dump_length +-mark PYXIS_edit +-mark PYXIS_error +-mark PYXIS_find_field +-mark PYXIS_find_index +-mark PYXIS_find_object +-mark PYXIS_fini +-mark PYXIS_format_form +-mark PYXIS_format_menu +-mark PYXIS_get_attribute +-mark PYXIS_get_attribute_value +-mark PYXIS_get_char +-mark PYXIS_get_data +-mark PYXIS_get_updated +-mark PYXIS_get_value +-mark PYXIS_init +-mark PYXIS_load +-mark PYXIS_load_form +-mark PYXIS_menu +-mark PYXIS_move +-mark PYXIS_navigate +-mark PYXIS_pop_form +-mark PYXIS_position +-mark PYXIS_push_form +-mark PYXIS_push_tag +-mark PYXIS_put_desc +-mark PYXIS_put_attribute +-mark PYXIS_put_segment +-mark PYXIS_reference +-mark PYXIS_relation_fields +-mark PYXIS_relation_form +-mark PYXIS_replace_attribute +-mark PYXIS_select +-mark PYXIS_set_display_attribute +-mark PYXIS_set_field_options +-mark PYXIS_store_form +-mark PYXIS_trace_in +-mark PYXIS_trace_out +-mark PYXIS_update_window +-mark PYXIS_update +-mark pyxis__compile_map +-mark pyxis__compile_menu +-mark pyxis__compile_sub_map +-mark pyxis__create_window +-mark pyxis__delete +-mark pyxis__delete_window +-mark pyxis__drive_form +-mark pyxis__insert +-mark pyxis__fetch +-mark pyxis__insert +-mark pyxis__load_form +-mark pyxis__menu +-mark pyxis__pop_window +-mark pyxis__reset_form +-mark pyxis__suspend_window +-mark pyxis__menu +-mark pyxis__reset_form +-mark pyxis__compile_menu +-mark pyxis__delete +-mark pyxis__insert +-mark pyxis__fetch +-mark pyxis__compile_sub_map +-mark pyxis__drive_menu +-mark pyxis__get_entree +-mark pyxis__put_entree +-mark pyxis__initialize_menu +-mark PYXIS_get_keyname +-mark isc_compile_map +-mark isc_compile_menu +-mark isc_compile_sub_map +-mark isc_create_window +-mark isc_delete_window +-mark isc_drive_form +-mark isc_drive_menu +-mark isc_form_delete +-mark isc_form_fetch +-mark isc_form_insert +-mark isc_get_entree +-mark isc_initialize_menu +-mark isc_load_form +-mark isc_menu +-mark isc_pop_window +-mark isc_put_entree +-mark isc_reset_form +-mark isc_suspend_window +-end + diff --git a/src/makefiles/bind_remotelib.apollo b/src/makefiles/bind_remotelib.apollo new file mode 100644 index 0000000000..537e81b5a0 --- /dev/null +++ b/src/makefiles/bind_remotelib.apollo @@ -0,0 +1,76 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +interface.o +allr.o +inet.o +merge.o +protocol.o +parse.o +remote.o +ambx.o +xdr.o +source/jrd/node.o +source/jrd/isc.o +source/jrd/sdl.o +-loadhigh +-mergebss +-binary remotelib -exactcase +-mark AMBX_set_debug +-mark REM_attach_database +-mark REM_blob_info +-mark REM_cancel_blob +-mark REM_close_blob +-MARK REM_commit_transaction +-MARK REM_compile_request +-mark REM_create_blob2 +-MARK REM_create_database +-MARK REM_database_info +-MARK REM_detach_database +-mark REM_get_segment +-mark REM_open_blob2 +-mark REM_prepare_transaction +-mark REM_put_segment +-MARK REM_receive +-MARK REM_release_request +-MARK REM_request_info +-MARK REM_reconnect_transaction +-MARK REM_rollback_transaction +-MARK REM_seek_blob +-MARK REM_send +-MARK REM_start_and_send +-MARK REM_start_request +-MARK REM_start_transaction +-MARK REM_transaction_info +-MARK REM_unwind_request +-MARK REM_que_events +-MARK REM_cancel_events +-MARK REM_commit_retaining +-MARK REM_ddl +-mark REM_get_slice +-mark REM_put_slice +{DSQL entry points} +-mark REM_declare +-mark REM_execute +-mark REM_execute_immediate +-mark REM_fetch +-mark REM_open +-mark REM_prepare +-mark REM_release +-mark REM_close +-mark REM_describe +-mark REM_describe_bind +-end diff --git a/src/makefiles/boot.sfx.interbase b/src/makefiles/boot.sfx.interbase new file mode 100644 index 0000000000..5098b780e9 --- /dev/null +++ b/src/makefiles/boot.sfx.interbase @@ -0,0 +1,811 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# +# Tom Coleman TMC Systems +# +# $Id: boot.sfx.interbase,v 1.1 2001-07-12 06:32:03 bellardo Exp $ + + +#== WARNING ============================================================== +# +# IF YOU CHANGE THIS FILE YOU MUST REVIEW both: +# sfx.interbase and boot.sfx.interbase files +# +#========================================================================= + +REFDBPATH=source/refDatabases + +METADATA=$(REFDBPATH)/jrd/metadata.gdb +MESSAGES=$(REFDBPATH)/msgs/msg.gdb +HELP=$(REFDBPATH)/qli/help.gdb +ISC=$(REFDBPATH)/jrd/isc.gdb + +EXTERNAL_OBJECTS= $(CSI_OBJS) dsql_objects lock.o $(PYXIS_OBJECTS) rem_objects $(INTL) wal_objects +EXTERNAL_P_OBJECTS= $(CSI_P_OBJS) dsql_p_objects lock.bin $(PYXIS_P_OBJS) rem_p_objects $(INTL_P_OBJS) wal_p_objects + +INCLUDE_DEST= source/interbase/include/ + +SRC_DIRS= alice burp dudley dsql extlib gpre intl isql journal jrd lock msgs \ + pyxis qli remote super/remote utilities wal + +GPRE= source/interbase/bin/gpre +GBAK= source/interbase/bin/gbak +GDEF= source/interbase/bin/gdef +GFIX= source/interbase/bin/gfix +ISQL= source/interbase/bin/isql +HELP_GDB= source/interbase/help/help.gdb +HELP_GBAK= source/interbase/help/help.gbak +ISC_GDB= source/interbase/isc4.gdb +ISC_GBAK= source/interbase/bin/isc4.gbak +JRN_GBAK= source/interbase/bin/journal.gbak +CMP= cmp +SED= sed + +FBNewBuild = $(FBBuildRoot)/interbase +FBNewBuildBin = $(FBNewBuild)/bin + +CODES=source/jrd/codes +SCODES=super/source/jrd/codes + +# removed examples 03-Aug-00 TMC +#interbase: run_codes gds.h includes executables examples help msgs msgs_intl extlib + +#added completed according to inprise tree +#FSG 093000 + +firebird: gds.h includes fireboot run_codes executables help msgs msgs_intl extlib examples completed + +# burp wanted to build gpre +# we break this dependency +# 1) build burp (gbak) +# 2) use gbak to create the message databases +# 3) build the message files +# 4) build gpre + +fireboot: burp boot_dbs msgs gpre + +boot_dbs: $(GBAK) $(METADATA) $(MESSAGES) $(HELP) $(ISC) + +$(METADATA): misc/metadata.gbak + $(GBAK) -c misc/metadata.gbak $(METADATA) + +$(ISC): misc/isc4.gbak + $(GBAK) -c misc/isc4.gbak $(ISC) + +$(MESSAGES): misc/msg.gbak + $(GBAK) -c misc/msg.gbak $(MESSAGES) + +$(HELP): misc/help.gbak + $(GBAK) -c misc/help.gbak $(HELP) + +all_example_dbs: example_dbs v4_dbs v5_dbs + +example_dbs: + $(ECHO) "- building example dbs" + $(CD) $(REFDBPATH)/examples; \ + $(RM) *.gdb; \ + echo "$(FBNewBuildBin)"; \ + $(FBNewBuildBin)/gdef $(FBBuildRoot)/examples/atlas.gdl; \ + $(FBNewBuildBin)/gdef $(FBBuildRoot)/examples/emp.gdl; \ + $(FBNewBuildBin)/gdef $(FBBuildRoot)/examples/slides.gdl; \ + $(FBNewBuildBin)/gdef $(FBBuildRoot)/examples/nc_guide.gdl; \ + $(FBNewBuildBin)/gdef $(FBBuildRoot)/examples/c_guide.gdl; \ + $(FBNewBuildBin)/gdef $(FBBuildRoot)/examples/stocks.gdl + touch example_dbs + +v4_dbs: + $(ECHO) "- copying example files" + $(CP) example4/*.sql $(REFDBPATH)/example4 + $(CP) example4/empbuild.e $(REFDBPATH)/example4 + $(CP) example4/intlbld.e $(REFDBPATH)/example4 + $(ECHO) "- building examples4" + $(CD) $(REFDBPATH)/example4; \ + $(RM) *.gdb; \ + $(SED) -e s/employee.gdb/empbuild.gdb/g $(FBBuildRoot)/example4/empbld.sql >empbuild.sql; \ + $(SED) -e s/' year'/' proj_year'/g -e s/\(year/\(proj_year/g -e s/\(YEAR/\(PROJ_YEAR/g -e s/' DATE'/' TIMESTAMP'/g $(FBBuildRoot)/example4/empddl.sql >empddl.sql; \ + $(FBNewBuildBin)/isql -i empbuild.sql; \ + $(SED) -e s/' year'/' proj_year'/g -e s/\(year/\(proj_year/g -e s/\(YEAR/\(PROJ_YEAR/g -e s/' DATE'/' TIMESTAMP'/g $(FBBuildRoot)/example4/intlddl.sql >intlddl.sql; \ + $(FBNewBuildBin)/isql -i intlbld.sql + touch v4_dbs + +# The following were not used but the source files exist +# (cd examples; $IBBin/gdef $IBSrc/examples/cs_load.gdl) +# (cd examples; $IBBin/gdef $IBSrc/examples/sources.gdl) +# (cd examples; $IBBin/gdef $IBSrc/examples/udf_trig.gdl) + +v5_dbs: + echo "- building examples5" + $(CP) example5/*.sql $(REFDBPATH)/example5 + $(CD) $(REFDBPATH)/example5; \ + $(RM) *.gdb; \ + $(SED) -e s/employee.gdb/empbuild.gdb/g $(FBBuildRoot)/example5/empbld.sql >empbuild.sql; \ + $(SED) -e s/' year'/' proj_year'/g -e s/' YEAR'/' PROJ_YEAR'/g -e s/' DATE'/' TIMESTAMP'/g $(FBBuildRoot)/example5/empddl.sql >empddl.sql; \ + $(FBNewBuildBin)/isql -i empbuild.sql; \ + $(SED) -e s/' year'/' proj_year'/g -e s/' YEAR'/' PROJ_YEAR'/g -e s/' DATE'/' TIMESTAMP'/g $(FBBuildRoot)/example5/intlddl.sql >intlddl.sql; \ + $(FBNewBuildBin)/isql -i intlbld.sql + touch v5_dbs + + +# Run the codes program, thus generating codes.h, iberror.h, etc +# compare and copy the file only if the files are different +# the extra bit copies iberror.h if the file doesn't already exist. MOD 13-Apr-2001. + +run_codes: $(CODES) +# force $(CODES) + $(SH) '$(CD) source/jrd; $(CODES)' + $(SH) 'if [ ! -f $(INCLUDE_DEST)iberror.h ] ; then $(CP) source/jrd/iberror.h $(INCLUDE_DEST)iberror.h; fi' + $(SH) '$(CMP) source/jrd/iberror.h $(INCLUDE_DEST)iberror.h; if [ $$? != 0 ]; then $(CP) source/jrd/iberror.h $(INCLUDE_DEST)iberror.h; fi' + +$(CODES) : source/jrd/codes.e + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" codes' + +# NOTE: "journals" removed from "executables" as it currently doesn't +# build and isn't used for V4 anyway. +# 1995-June-7 David Schnepper +# removed pyxis 3-Aug-00 TMC +#executables: alice burp dudley gpre miscFiles $(INTL) isql locks \ + $(SUPER_SERVER) pyxis qli remote spit utilities \ + $(SHARED_AM) $(LINKABLE_LIBS) + +executables: alice dudley miscFiles $(INTL) isql locks \ + $(SUPER_SERVER) pyxis qli remote spit utilities \ + $(SHARED_AM) $(LINKABLE_LIBS) + +super_firebird: gds.h includes fireboot super_targets dudley superMiscFiles $(INTL) isql locks qli remote spit help msgs msgs_intl dba gfix gsec security_db extlib examples completed + +super_targets: s_run_codes s_alice s_burp s_dba s_security_c super_client super_server super_utils + + +#added completed according to inprise tree +#FSG 093000 +completed: force + $(QUIET_ECHO) "Build succeeded!" + +alice gfix: gpre force + $(QUIET_ECHO) "Building GFIX..." + $(SH) '$(CD) source/alice; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" alice' + +#burp gbak: gpre msgs force +burp gbak $(GBAK): pyxis + $(QUIET_ECHO) "Building GBAK..." + $(SH) '$(CD) source/burp; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" burp' + +burplib.a: burp + $(QUIET_ECHO) "Building interbase/lib/gbaklib.a..." + $(SH) '$(CD) source/burp; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" libgbaklib.a' + +central_server gds_cserver: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_CSERVER..." + $(SH) '$(CD) source/csv; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" central_server' + +super_client: force + $(QUIET_ECHO) "Building super/client..." + $(SH) '$(CD) source/super/client; $(MAKE) CFLAGS="$(CFLAGS) -DSUPERCLIENT" SYSTEM="$(SYSTEM)" super_client' + +csu gcsu: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GCSU..." + $(SH) '$(CD) source/csv; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" csu' + +csvs: central_server csu + +gds_archive: $(ACCESS_METHOD) gpre force + $(QUIET_ECHO) "Building GDS_ARCHIVE..." + $(SH) '$(CD) source/journal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds_archive' + +dba gstat: gpre force + $(QUIET_ECHO) "Building GSTAT..." + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" dba' + +dnet_server gds_dnet_server: $(DNET_SERVER_LIB) $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_DNET_SERVER..." + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" dnet_server' + +dnet_server.a gds_dnet_server.a: force + $(QUIET_ECHO) "Building GDS_DNET_SERVER.A..." + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" dnet_server.a' + +drop gds_drop: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_DROP..." + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" drop' + +driver: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building DRIVER..." + $(SH) '$(CD) source/wal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" driver' + +dudley gdef: gpre msgs force + $(QUIET_ECHO) "Building GDEF..." + $(SH) '$(CD) source/dudley; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" dudley' + +extlib: force + $(QUIET_ECHO) "Building EXTLIB..." + $(SH) '$(CD) source/extlib; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" ib_util' + $(SH) '$(CD) source/extlib; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" ib_udf' + +#examples: v5_examples gbak gpre force +#examples: all_example_dbs v5_examples v4_examples force +examples: all_example_dbs v5_examples force + $(QUIET_ECHO) "Building examples directory..." + $(SH) '$(CD) source/examples; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" examples' + +fred: gpre force + $(QUIET_ECHO) "Building FRED..." + $(SH) '$(CD) source/pyxis; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" fred' + +gds.h: force + $(QUIET_ECHO) "Building GDS.H..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.h' + +codes.h: force + $(QUIET_ECHO) "Building CODES.H..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" codes.h' + +gds_server: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_SERVER..." + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds_server' + +gdslib.aix gdslib.aix_ppc: $(GPRE) $(EXTERNAL_OBJECTS) force + $(QUIET_ECHO) "Building GDSSHR..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gdsshr.a' + +gdslib.apollo: $(GPRE) $(EXTERNAL_OBJECTS) pyxislib force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gdslib' + +gdslib.decosf gdslib.sgi gdslib.epson : \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.so.o' + +gdslib.linux: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.so.linux' + +gdslib.freebsd: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.so.linux' + +gdslib.netbsd: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.so.linux' + +gdslib.sco_ev: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.so.O' + +gdslib.dg gdslib.m88k gdslib.unixware gdslib.ncr3000 gdslib.dg_x86: \ + $(GPRE) $(EXTERNAL_P_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.so.0' + +gdslib.solaris: \ + $(GPRE) $(EXTERNAL_P_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.so.solaris' + +gdslib.hp: $(GPRE) $(EXTERNAL_P_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.sl' + +gdslib.imp: $(GPRE) $(EXTERNAL_P_OBJECTS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds_s.a' + +gdslib.sco: $(GPRE) $(EXTERNAL_P_OBJECTS) gds_pyxis.a force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds_s.a' + +gdslib.sunos4: $(GPRE) $(EXTERNAL_P_OBJECTS) gds_pyxis.a force + $(QUIET_ECHO) "Building GDSLIB..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gdslib.so.1.0' + +gds_pipe: $(PIPE_LIBRARY) gds_b.a $(GPRE) force + $(QUIET_ECHO) "Building GDS_PIPE..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds_pipe' + +gds_b.a: force + $(QUIET_ECHO) "Building GDS_B.A..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds_b.a' + +gds_pipe.a: force + $(QUIET_ECHO) "Building GDS_PIPE.A..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds_pipe.a' + +gds.a: force + $(QUIET_ECHO) "Building GDS.A..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.a' + +gds.a.solaris: force + $(QUIET_ECHO) "Building GDS.A.SOLARIS..." + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gds.a.solaris' + +gpre: security_c $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GPRE..." + $(SH) '$(CD) source/gpre; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gpre' + +security_c: force + $(QUIET_ECHO) "Building security.c ..." + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" security.c' + +# Run the codes program (for SUPERSERVER hierarchy), +# thus generating codes.h, iberror.h, etc +# Note the troubling, use of SCODES macro, and source/jrd/codes in the target +# it's a hack to get around the directory structure stuff. +s_run_codes: $(SCODES) + $(QUIET_ECHO) "Running codes in super ..." + $(SH) '$(CD) source/super/jrd; source/jrd/codes' + +$(SCODES) : super/source/jrd/codes.e + $(SH) '$(CD) super/source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" codes' + + +s_security_c: force + $(QUIET_ECHO) "Building security.c ..." + $(SH) '$(CD) source/super/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" security.c' + +s_alice: force + $(QUIET_ECHO) "Building met.c ..." + $(SH) '$(CD) source/super/alice; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" met.c' + +s_burp: force + $(QUIET_ECHO) "Building restore.c and backup.c ..." + $(SH) '$(CD) source/super/burp; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" restore.c' + $(SH) '$(CD) source/super/burp; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" backup.c' + +s_dba: force + $(QUIET_ECHO) "Building dba.e ..." + $(SH) '$(CD) source/super/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" dba.c' + +gsec: gpre force + $(QUIET_ECHO) "Building GSEC..." + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gsec' + +$(GPRE): + $(QUIET_ECHO) "Building bootstrap version of GPRE..." +# +# gpre_boot needs more work than I've got time for, so we'll build the big one +# +# $(SH) '$(CD) source/gpre; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="builds" gpre_boot' + $(SH) '$(CD) source/gpre; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="builds" gpre' + + +help: gbak force + $(QUIET_ECHO) "Building the QLI help database..." + $(SETUP_ISC_REMOTE) $(GBAK) $(DBALOGIN) $(HLPDIR)master_help_db $(HELP_GBAK) + -$(RM) $(HELP_GDB) + $(SETUP_ISC_LOCAL) \ + $(GBAK) $(DBALOGIN) -r $(HELP_GBAK) $(HELP_GDB) + +include_generic: force + $(QUIET_ECHO) "Building the include directory..." + $(CAT) source/jrd/ibase.h source/jrd/gdsold.h > $(INCLUDE_DEST)gds.h + $(CP) source/extlib/ib_util.h $(INCLUDE_DEST)ib_util.h + $(CP) source/jrd/gds.hxx $(INCLUDE_DEST)gds.hxx + $(CP) source/jrd/perf.h $(INCLUDE_DEST)perf.h + $(CP) source/jrd/ibase.h $(INCLUDE_DEST)ibase.h + $(CP) source/jrd/iberror.h $(INCLUDE_DEST)iberror.h +# $(SH) '$(CMP) source/jrd/iberror.h $(INCLUDE_DEST)iberror.h; if [ $$? != 0 ]; then $(CP) source/jrd/iberror.h $(INCLUDE_DEST)iberror.h; fi' + +include_apollo: include_generic + $(CP) $(INCLUDE_DEST)gds.h $(INCLUDE_DEST)gds.ins.c + $(ECHO) "sm gds_apollo.f $(INCLUDE_DEST)gds.ins.ftn" >> sm_include + $(ECHO) "sm gds.pas $(INCLUDE_DEST)gds.ins.pas" >> sm_include + $(ECHO) "sm interbase.a $(INCLUDE_DEST)interbase.a" >> sm_include + $(ECHO) "sm interbase_alsys.a $(INCLUDE_DEST)interbase.ada" >> sm_include + $(ECHO) "sm perf.pas $(INCLUDE_DEST)perf.pas" >> sm_include + + +include_aix: include_generic + $(ECHO) "sm gds_aix.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_dg: include_generic + $(ECHO) "sm gds_sun.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_dg_x86: include_generic + $(ECHO) "sm gds_sun.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_hp: include_generic + $(ECHO) "sm gds_hp.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_hp_ada: include_generic + $(ECHO) "sm interbase_hp.a $(INCLUDE_DEST)interbase.ada" >> sm_include + +include_sco: include_generic + $(ECHO) "sm interbase_sco.a $(INCLUDE_DEST)interbase.ada" >> sm_include + +include_sgi: include_generic + $(ECHO) "sm gds_sun.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_so: include_generic + $(CP) source/jrd/gds_sun.f $(INCLUDE_DEST)gds.f + +include_so_ada: include_generic +# $(ECHO) "sm interbase_sol.a $(INCLUDE_DEST)interbase.a" >> sm_include + +include_sun4: include_generic + $(ECHO) "sm gds_sun.f $(INCLUDE_DEST)gds.f" >> sm_include + $(ECHO) "sm interbase_sun.a $(INCLUDE_DEST)interbase.a" >> sm_include + +includes: include_generic $(INCLUDES) force +# $(BIN_PATH)/marion $(MARION_DB) -c jrd -x -v -z < sm_include +# -$(RM) sm_include + +inet_server gds_inet_server: $(INET_LIBRARY) $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_INET_SERVER..." + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" inet_server' + +inet_server.a gds_inet_server.a: force + $(QUIET_ECHO) "Building GDS_INET_SERVER.A..." + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" inet_server.a' + +intl: force + $(QUIET_ECHO) "Building INTL..." + $(SH) '$(CD) source/intl; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" intl' + +iscinstall: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building ISCINSTALL..." + $(SH) '$(CD) source/register; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" iscinstall' + +isql: gpre msgs force + $(QUIET_ECHO) "Building ISQL..." + $(SH) '$(CD) source/isql; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" all' + +isqllib.a: isql + $(QUIET_ECHO) "Building interbase/lib/isqllib.a..." + $(SH) '$(CD) source/isql; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" libisqllib.a' + +gjrn: $(ACCESS_METHOD) gpre force + $(QUIET_ECHO) "Building GJRN..." + $(SH) '$(CD) source/journal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" gjrn' + +journals: gjrn gds_archive gdef gfix gbak force + $(QUIET_ECHO) "Building journal database backup file..." + $(SH) '$(CD) source/journal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" journal.db' + -$(RM) $(JRN_GBAK) + $(COMPRESS_JRN) + $(SETUP_ISC_LOCAL) \ + $(GDEF) -z -r source/journal.gdl + $(GFIX) -w sync journal.gdb + $(GBAK) -z journal.gdb $(JRN_GBAK) + $(CHMOD_6) $(JRN_GBAK) + -$(RM) source/journal.gdl source/journal.gdb + +locks: lock_print $(LOCK_MANAGER) force + $(QUIET_ECHO) "Building template of IPC configuration file..." + -$(CP) source/lock/config_params source/interbase/isc_config + +lock_print gds_lock_print: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_LOCK_PRINT..." + $(SH) '$(CD) source/lock; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" lock_print' + +manager gds_lock_manager: $(ACCESS_METHOD) drop force + $(QUIET_ECHO) "Building GDS_LOCK_MANAGER..." + $(SH) '$(CD) source/lock; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" manager' + +msgs: $(ACCESS_METHOD) $(LOCK_MANAGER) force + $(QUIET_ECHO) "Building message file(s)..." + $(SH) '$(CD) source/msgs; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" check_messages' + $(SH) '$(CD) source/msgs; check_messages -d $(MSGSDIR)master_msg_db -l' + $(SH) '$(CD) source/msgs; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" interbase.msg' + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" includes.msg' + +msgs_intl: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building international message file(s)..." + $(SH) '$(CD) source/msgs; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" locales.msg' + +pipe: $(EXTERNAL_OBJECTS) $(PIPE) + +pyxis: force + $(QUIET_ECHO) "Building PYXIS..." + $(SH) '$(CD) source/pyxis; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" objects' + +qli: gpre msgs force + $(QUIET_ECHO) "Building QLI..." + $(SH) '$(CD) source/qli; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" qli' + +qlilib.a: qli + $(QUIET_ECHO) "Building interbase/lib/qlilib.a..." + $(SH) '$(CD) source/qli; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" libqlilib.a' + +register: gpre force + $(QUIET_ECHO) "Building REGISTER..." + $(SH) '$(CD) source/register; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" register' + +relay gds_relay: force + $(QUIET_ECHO) "Building GDS_RELAY..." + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" relay' + +remote: inet_server $(DNET_SERVER) $(AMBX_SERVER) + +spit: force + $(QUIET_ECHO) "Building GSPLIT..." + $(SH) '$(CD) source/burp; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" spit' + +super_server: force + $(QUIET_ECHO) "Building super_server... " + $(SH) '$(CD) source/super/remote; $(MAKE) SYSTEM="$(SYSTEM)" super_server' + +super_utils: force + $(QUIET_ECHO) "Building super server utlities... " + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" super_server_targets' + +utilities: dba relay gsec security_db $(UTILITIES) + + +security_db: force + $(QUIET_ECHO) "Building the ISC security database..." + -$(RM) $(ISC_GBAK) isc4.gdb + $(SETUP_ISC_LOCAL) \ + source/interbase/bin/isql -z -i source/utilities/isc4.sql; \ + source/interbase/bin/gdef -z source/utilities/isc4.gdl; \ + source/interbase/bin/gsec -da isc4.gdb -add sysdba -pw masterkey; \ + $(GBAK) -z isc4.gdb $(ISC_GBAK) + -$(MV) interbase/isc4.gdb interbase/isc4_tmp.gdb + -$(MV) isc4.gdb $(ISC_GDB) + $(CHMOD_6) $(ISC_GBAK) $(ISC_GDB) + -$(RM) isc4.gdb + +# +# The V4 intlbld crashes attempting to create a Dialect 3 database +# The sed hack creates it using DIALECT 1 +# + +v4_examples: v4_dbs + $(QUIET_ECHO) "Building V4 examples directory..." + $(CD) source/example4; \ + $(SED) -e s/' year'/' proj_year'/g $(REFDBPATH)/example4/empbuild.e >empbuild.e; \ + $(SED) -e s/' year'/' proj_year'/g $(REFDBPATH)/example4/intlbld.e >tmpbld.e; \ + $(ECHO) '/EXEC SQL SET SQL DIALECT 1;/d' > sedf; \ + $(ECHO) '/EXEC SQL INCLUDE SQLCA;/a\' >> sedf; \ + $(ECHO) 'EXEC SQL SET SQL DIALECT 1;' >> sedf; \ + $(SED) -f sedf tmpbld.e > intlbld.e; \ + $(CP) $(REFDBPATH)/example4/empddl.sql .; \ + $(SED) -e s/\(year/\(proj_year/g $(REFDBPATH)/example4/empdml.sql >empdml.sql; \ + $(CP) $(REFDBPATH)/example4/intlddl.sql .; \ + $(SED) -e s/\(year/\(proj_year/g $(REFDBPATH)/example4/intldml.sql >intldml.sql; \ + $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="builds" v4_examples + + +v5_examples: v5_dbs + $(QUIET_ECHO) "Building V5 examples directory..." + $(CP) $(REFDBPATH)/example5/empddl.sql example5 + $(CP) $(REFDBPATH)/example5/intlddl.sql example5 + $(CD) source/example5; \ + $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="builds" v5_examples + + +wal_print: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_WAL_PRINT..." + $(SH) '$(CD) source/wal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" wal_print' + +wal_writer: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_WAL_WRITER..." + $(SH) '$(CD) source/wal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" wal_writer' + +csi_objects: + $(QUIET_ECHO) "Building CSI OBJECTS..." + $(SH) '$(CD) source/csv; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +dsql_objects: + $(QUIET_ECHO) "Building DSQL OBJECTS..." + $(SH) '$(CD) source/dsql; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +lock.o: + $(QUIET_ECHO) "Building LOCK.O..." + $(SH) '$(CD) source/lock; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +pyxis_objects: + $(QUIET_ECHO) "Building PYXIS OBJECTS..." + $(SH) '$(CD) source/pyxis; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +pyxlib.o: + $(QUIET_ECHO) "Building PYXLIB.O..." + $(SH) '$(CD) source/pyxis; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +rem_objects: + $(QUIET_ECHO) "Building REMOTE OBJECTS..." + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +wal_objects: + $(QUIET_ECHO) "Building WAL OBJECTS..." + $(SH) '$(CD) source/wal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' + +dsqllib: + $(QUIET_ECHO) "Building DSQLLIB..." + $(SH) '$(CD) source/dsql; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +pyxislib: + $(QUIET_ECHO) "Building PYXISLIB..." + $(SH) '$(CD) source/pyxis; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' + +csi_p_objs: + $(QUIET_ECHO) "Building CSI PIC OBJECTS..." + $(SH) '$(CD) source/csv; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +dsql_p_objects: + $(QUIET_ECHO) "Building DSQL PIC OBJECTS..." + $(SH) '$(CD) source/dsql; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +gds_pyxis.a: + $(QUIET_ECHO) "Building GDS_PYXIS.A..." + $(SH) '$(CD) source/pyxis; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" libpyxis.a' +lock.bin: + $(QUIET_ECHO) "Building LOCK.BIN..." + $(SH) '$(CD) source/lock; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +pyx_p_objects: + $(QUIET_ECHO) "Building PYXIS PIC OBJECTS..." + $(SH) '$(CD) source/pyxis; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +wal_p_objects: + $(QUIET_ECHO) "Building WAL PIC OBJECTS..." + $(SH) '$(CD) source/wal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +rem_p_objects: + $(QUIET_ECHO) "Building REMOTE PIC OBJECTS..." + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' + + +# Note: So far this target is only available on Solaris +makedepend: + $(QUIET_ECHO) "Building component dependency files..." + $(RM) \ + source/alice/depends.mak \ + source/burp/depends.mak \ + source/csv/depends.mak \ + source/dsql/depends.mak \ + source/dudley/depends.mak \ + source/gpre/depends.mak \ + source/intl/depends.mak \ + source/lock/depends.mak \ + source/isql/depends.mak \ + source/journal/depends.mak \ + source/jrd/depends.mak \ + source/msgs/depends.mak \ + source/qli/depends.mak \ + source/remote/depends.mak \ + source/utilities/depends.mak \ + source/wal/depends.mak + $(SH) '$(CD) source/alice; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/burp; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/csv; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/dsql; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/dudley; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/gpre; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/intl; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/lock; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/isql; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/journal; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/msgs; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/qli; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/wal; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + +clean: clean_executables + -$(RM) \ + source/burp/gbaklib.a \ + source/super/client/gds.so.0 \ + source/examples/refresh \ + source/jrd/gdsshr.a source/jrd/gdslib source/jrd/gds.sl \ + source/jrd/gds_s.a source/jrd/gdsf_s.a \ + source/jrd/gds.so.0 \ + source/jrd/gdslib.so.1.0 source/jrd/gdslib.so.0.1 \ + source/jrd/gdsflib.so.0.0 \ + source/jrd/gds_b.a source/jrd/gds.a source/jrd/gds.a.solaris \ + source/jrd/gds_pipe.a \ + source/jrd/gdsmt.so.0 \ + source/super/jrd/gds_ss.a source/super/client/gdsmt.so.1 \ + source/super/client/gds.sl.1 \ + source/pyxis/libpyxis.a \ + source/qli/qlilib.a \ + source/remote/inet_server.a source/remote/dnet_server.a + +clean_executables: + -$(RM) \ + source/alice/alice \ + source/burp/burp \ + source/csv/central_server source/csv/csu \ + source/dudley/dudley \ + source/gpre/gpre \ + source/intl/intl \ + source/journal/gjrn source/journal/gds_archive \ + source/jrd/codes \ + source/lock/lock_print source/lock/manager \ + source/jrd/gds_pipe \ + source/msgs/build_file source/msgs/check_messages \ + source/pyxis/fred \ + source/qli/qli \ + source/register/iscinstall \ + source/remote/inet_server source/remote/dnet_server \ + source/remote/gds_server \ + source/super/remote/super_server \ + source/utilities/dba source/utilities/drop source/utilities/gsec \ + source/utilities/relay \ + source/utilities/ibmgr source/utilities/ibguard \ + source/wal/wal_writer + +realclean: clean clean_obj clean_build_gdb + $(QUIET_ECHO) "Removed compiled binaries and build files." + +clean_obj: + -for ND in ${SRC_DIRS} ; do \ + rm $${ND}/*.o ; \ + rm $${ND}/*.a ; \ + rm $${ND}/*.j ; \ + rm $${ND}/*.bin ; \ + done + +clean_build_gdb: + -$(RM) \ + source/example5/*.gdb \ + jrd/isc.gdb \ + jrd/yachts.gdb \ + msgs/msg.gdb + + +# The installations need to find a better and possibly linux +# specific home. The tar installs should probably work with +# other unix type of systems. + +# I have seperated super and classic out since I needed different +# files in each case. + + +miscFiles: force + $(QUIET_ECHO) "Building miscellaneous install files..." + $(CP) source/$(SYSTEM)/install source/interbase + -$(CP) source/$(SYSTEM)/servers.isc source/interbase + $(CP) source/$(SYSTEM)/inetd.conf.isc source/interbase + $(CP) source/$(SYSTEM)/original/services.isc source/interbase + -$(CP) source/$(SYSTEM)/sys.conf.isc source/interbase + mkdir -p source/interbase/misc + $(CP) firebird/skywalker/install/misc/README source/interbase + $(CP) firebird/skywalker/install/misc/firebird.xinetd source/interbase/misc + +superMiscFiles: force + $(QUIET_ECHO) "Building miscellaneous install files..." + $(CP) source/$(SYSTEM)/install source/interbase + -$(CP) source/$(SYSTEM)/servers.isc source/interbase + $(CP) source/$(SYSTEM)/inetd.conf.isc source/interbase + $(CP) source/$(SYSTEM)/original/services.isc source/interbase + -$(CP) source/$(SYSTEM)/sys.conf.isc source/interbase + mkdir -p source/interbase/misc + $(CP) firebird/skywalker/install/misc/README source/interbase + $(CP) firebird/skywalker/install/misc/firebird.init.d.* source/interbase/misc + +install: force + make -f firebird/skywalker/install/Makefile install + + +runclassicinstall: force + make -f firebird/skywalker/install/Makefile runclassicinstall + +classicpackages: force + make -f firebird/skywalker/install/Makefile classicpackages + +classictarfile: force + make -f firebird/skywalker/install/Makefile classictarfile + +classicrpmfile: force + make -f firebird/skywalker/install/Makefile classicrpmfile + + +superpackages: force + make -f firebird/skywalker/install/Makefile superpackages + +supertarfile: force + make -f firebird/skywalker/install/Makefile supertarfile + +superrpmfile: force + make -f firebird/skywalker/install/Makefile superrpmfile + + +force: diff --git a/src/makefiles/buildRefDatabases b/src/makefiles/buildRefDatabases new file mode 100755 index 0000000000..c2bedfbfd3 --- /dev/null +++ b/src/makefiles/buildRefDatabases @@ -0,0 +1,270 @@ +#!/bin/sh + +# $Id: buildRefDatabases,v 1.1 2001-07-12 06:32:03 bellardo Exp $ + +# This file builds the reference databases for both the boot build +# and the normal builds. + +printUsage() { + echo "usage is : 'buildRefDatabases [boot]'" + echo " or : 'buildRefDatabases [boot] '" + echo " or : 'buildRefDatabases [boot] '" + echo "" + echo "usually as:" + echo "sh builds/original/buildRefDatabases" + echo "from the main interbase source directory" + echo "where defaults are srcDir=. and destDir=./refDatabases" + echo "" +} + +checkVariables() { + + if [ "$INTERBASE" = "" ] + then + INTERBASE="/opt/interbase" + export INTERBASE + + fi + + if [ "$ISC_PASSWORD" = "" ] + then + ISC_USER="sysdba" + export ISC_USER + ISC_PASSWORD="masterkey" + export ISC_PASSWORD + fi + + IBBin=$INTERBASE/bin + export IBBin + +# This has become a more core activity of the build process and prompting +# or confirmation is not required since it is always done. + +# echo "" +# echo "" +# echo "" +# echo "- Firebird - Reference database build ------------------------" +# echo "" +# echo "Parameters :" +# echo "" +# echo "BootBuildFlg (build using boot kit ) : $BootBuildFlg " +# echo "INTERBASE (installed database root) : $INTERBASE " +# echo "Source code dir root : $IBSrc" +# echo "Dest root dir where to build ref db's : $IBRefDir" +# echo "" +# echo "ISC_USER (admin user) : $ISC_USER" +# echo "ISC_PASSWORD (admin password) : $ISC_PASSWORD" +# echo "" +# echo "If you wish to have different values please set them before running" +# echo "this script" +# echo "usage is : 'buildRefDatabases [boot]'" +# echo " or : 'buildRefDatabases [boot] '" +# echo " or : 'buildRefDatabases [boot] '" +# echo "" +# AskQuestion "Press return to continue" + + +} + + + + + +#-------------------------------------------------------------------- +# Ask the user a question. + +Answer="" + +AskQuestion() { + Test=$1 + DefaultAns=$2 + echo -n "${1}" + Answer="$DefaultAns" + read Answer +} + + +#-------------------------------------------------------------------- +# Copy a database safely, using gbak +copyDatabase() { + From=$1 + To=$2 + TmpGbk=`echo $To | sed -e 's/\.gdb$//'`".gbk" + $IBBin/gbak -b $From $TmpGbk + $IBBin/gbak -r $TmpGbk $To + rm $TmpGbk +} + +#-------------------------------------------------------------------- +# Build the databases needed for a standard interbase build + +buildStdDatabases() { + echo "- building std databases" + + copyDatabase $INTERBASE/isc4.gdb jrd/isc.gdb + + copyDatabase $INTERBASE/help/help.gdb qli/help.gdb + + (cd jrd; $IBBin/isql -i $IBSrc/builds_win32/original/metadata.sql) + + (cd pyxis; $IBBin/gbak -r $IBSrc/pyxis/forms.gbk forms.gdb) + + (cd msgs; $IBBin/gbak -R $IBSrc/msgs/msg.gbak msg.gdb) + + (cd utilities; $IBBin/gdef $IBSrc/utilities/rebuild.gdl) + +} + +#-------------------------------------------------------------------- +# Build the databases needed for a Firebird boot build + +buildBootStdDatabases() { + echo "- building boot std databases" + +# boot make will create this if it does not exist +# (cd jrd; touch metadata.gdb) + +# boot make will create this if it does not exist +# touch msgs/msg.gdb + +# boot make will create this if it does not exist +# touch qli/help.gdb + + touch pyxis/forms.gdb + + touch utilities/rebuild.gdb +} + + +#-------------------------------------------------------------------- +# Build the standard examples + +buildExampleDatabases() { + echo "- building examples" + (cd examples; $IBBin/gdef $IBSrc/examples/atlas.gdl) + (cd examples; $IBBin/gdef $IBSrc/examples/emp.gdl) + (cd examples; $IBBin/gdef $IBSrc/examples/slides.gdl) + (cd examples; $IBBin/gdef $IBSrc/examples/nc_guide.gdl) + (cd examples; $IBBin/gdef $IBSrc/examples/c_guide.gdl) + + (cd examples; $IBBin/gdef $IBSrc/examples/stocks.gdl) + + # The following were not used but the source files exist + #(cd examples; $IBBin/gdef $IBSrc/examples/cs_load.gdl) + #(cd examples; $IBBin/gdef $IBSrc/examples/sources.gdl) + #(cd examples; $IBBin/gdef $IBSrc/examples/udf_trig.gdl) +} + + + +#-------------------------------------------------------------------- +# Build the standard (4) examples + +buildExample4Databases() { + echo "- building examples4" +# Create examples4 db + + cd example4 + + cp $IBSrc/example4/*.sql . + ed empbld.sql < 0 ] + then + if [ "$1" = "boot" ] + then + BootBuildFlg="Yes" + shift + fi + if [ "$1" = "noprompt" ] + then + doNotPromptUser="Yes" + fi +fi + + +# Now check the rest of the parameters + +IBSrc=`pwd` +export IBSrc + +IBRefDir=refDatabases +export IBRefDir + +checkVariables + +createRefDir + +cd $IBRefDir + +mkdir -p msgs qli jrd utilities example4 example5 examples pyxis + +if [ $BootBuildFlg = "Yes" ] + then + buildBootStdDatabases +else + buildStdDatabases + buildExampleDatabases + #buildExample4Databases + buildExample5Databases +fi + +cd $IBSrc diff --git a/src/makefiles/build_kit b/src/makefiles/build_kit new file mode 100644 index 0000000000..5fead89b1e --- /dev/null +++ b/src/makefiles/build_kit @@ -0,0 +1,108 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to build an InterBase kit + +if [ $# -lt 2 -o $# -gt 3 ]; then + echo 'Usage: build_kit builds {SUPER | CLASSIC} [ccflags]' + exit 1 +fi + + +# set up the username and password if they have not already been +# set. + +if [ "$ISC_PASSWORD" = "" ] + then + ISC_USER="sysdba" + export ISC_USER + ISC_PASSWORD="masterkey" + export ISC_PASSWORD +fi + + +# The following no longer makes sense, since $1 is always builds, rather +# than the name of the platform. Hence it has been commented out. +# if [ $1 = 'SCO_EV' ]; then +# MAKE=gmake +# else +# MAKE=make +# fi +MAKE=make + +if [ "`uname -s`" = "SunOS" ]; then + LM_LICENSE_FILE='/etc/opt/licenses/licenses_combined' + export LM_LICENSE_FILE +fi + +CURDIR=`pwd` +HOSTNAME=`hostname | cut -d'.' -f1` +ISC_MSGS=$CURDIR/interbase/interbase.msg +INTERBASE=$CURDIR/interbase +export ISC_MSGS +export INTERBASE + +if [ "`uname -s`" = "SunOS" ] ; then + CC_PATH=/netapp/apps/lang/workshop/5.1/SUNWspro/bin +else if [ "`uname -sr`" = "HP-UX B.10.20" ]; then + CC_PATH=/opt/softbench/bin +else + CC_PATH= +fi +fi + +# + +LD_LIBRARY_PATH=$CURDIR/jrd:$CURDIR/interbase/lib +SHLIB_PATH=$CURDIR/jrd + +export LD_LIBRARY_PATH +export SHLIB_PATH + +PATH=.:/netapp/apps/isc/bin:$CURDIR/interbase/bin:/usr/interbase/bin:/usr/gds.${HOSTNAME}/bin:${CC_PATH}:/usr/ccs/bin:/bin:/usr/bin:$PATH +export PATH + + +#Build superserver if directory source/super exists +if [ $2 = SUPER ]; then + make super_firebird +else + make firebird +fi + +#if [ $2 = SUPER ]; then +# GDS_SUPER="super_targets" +# export GDS_SUPER +#fi +#if [ $# = 2 ]; then +# $MAKE -f ./make_kit interbase SYSTEM=$1 SUPER_SERVER="$GDS_SUPER" +#else +# $MAKE -f ./make_kit interbase CFLAGS="$3" SYSTEM=$1 SUPER_SERVER="$GDS_SUPER" +#fi + +STATUS=$? + +#removed rasu ./unset_prot builder according to inprise tree +# and to get rid of this annoying rasu not found message +#FSG 093000 + + +if [ $STATUS = 0 ]; then + exit 0 +else + exit 1 +fi diff --git a/src/makefiles/build_kit.bat b/src/makefiles/build_kit.bat new file mode 100644 index 0000000000..8501f06685 --- /dev/null +++ b/src/makefiles/build_kit.bat @@ -0,0 +1,164 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +set ISC_USER=builder +set ISC_PASSWORD=builder +touch dsql\parse.c +rem The above is to prevent the make from trying to yacc and sed parse.c, +rem which destroys the file on nt builds. This should be moved into the +rem make file at some point -reed + +cmd /c "cd jrd && nmake gds.h" +if errorlevel 1 goto end +cmd /c "cd dsql && nmake dsql_objects" +if errorlevel 1 goto end +cmd /c "cd lock && nmake lock.obj" +if errorlevel 1 goto end +cmd /c "cd remote && nmake rem_objects" +if errorlevel 1 goto end +cmd /c "cd intl && nmake intl_objects" +if errorlevel 1 goto end +cmd /c "cd wal && nmake wal_objects" +if errorlevel 1 goto end +cmd /c "cd jrd && nmake gdsshr.dll" +if errorlevel 1 goto end +rem cmd /c "cd jrd && nmake gdsshr_ss.dll" +rem if errorlevel 1 goto end +rem cmd /c "cd jrd && nmake gds_b.lib" +rem if errorlevel 1 goto end +rem cmd /c "cd client && nmake gdsshr.dll" +rem if errorlevel 1 goto end +cmd /c "cd gpre && nmake gpre.exe" +if errorlevel 1 goto end +cmd /c "cd msgs && nmake check_messages.exe" +if errorlevel 1 goto end +cmd /c "cd msgs && check_messages -d yoda:/usr/gds.yoda/dev/msgs/master_msg_db" +if errorlevel 1 goto end +cmd /c "cd msgs && nmake interbase.msg" +if errorlevel 1 goto end +cmd /c "cd jrd && nmake includes.msg" +if errorlevel 1 goto end +cmd /c "cd dudley && nmake dudley.exe" +if errorlevel 1 goto end +cmd /c "cd intl && nmake intl" +if errorlevel 1 goto end +cmd /c "cd isql && nmake isql.exe" +if errorlevel 1 goto end +cmd /c "cd burp && nmake burp.exe" +if errorlevel 1 goto end +cmd /c "cd qli && nmake qli.exe" +if errorlevel 1 goto end +cmd /c "cd lock && nmake lock_print.exe" +if errorlevel 1 goto end +copy lock\config_params interbase\isc_config +cmd /c "cd remote && nmake nt_server.exe" +if errorlevel 1 goto end +cmd /c "cd alice && nmake alice.exe" +if errorlevel 1 goto end +cmd /c "cd journal && nmake gjrn.exe" +if errorlevel 1 goto end +cmd /c "cd journal && nmake gds_archive.exe" +if errorlevel 1 goto end +cmd /c "cd journal && nmake journal.db" +if errorlevel 1 goto end +cmd /c "cd journal && ..\compress_dbs ..\journal.gdl" +set SAVE_USER=%ISC_USER% +set SAVE_PASSWORD=%ISC_PASSWORD% +set ISC_USER=sysdba +set ISC_PASSWORD=masterkey +interbase\bin\gdef -z -r journal.gdl +interbase\bin\gbak -z journal.gdb interbase/bin/journal.gbak +set ISC_USER=%SAVE_USER% +set ISC_PASSWORD=%SAVE_PASSWORD% +del journal.gdl journal.gdb +cmd /c "cd wal && nmake wal_writer.exe" +if errorlevel 1 goto end +cmd /c "cd wal && nmake wal_print.exe" +if errorlevel 1 goto end +cmd /c "cd wal && nmake driver.exe" +if errorlevel 1 goto end +cmd /c "cd utilities && nmake dba.exe" +if errorlevel 1 goto end +cmd /c "cd utilities && nmake gsec.exe" +if errorlevel 1 goto end +cmd /c "cd utilities && nmake install_reg.exe" +if errorlevel 1 goto end +cmd /c "cd utilities && nmake install_svc.exe" +if errorlevel 1 goto end +del isc4.gdb +set SAVE_USER=%ISC_USER% +set SAVE_PASSWORD=%ISC_PASSWORD% +set ISC_USER=sysdba +set ISC_PASSWORD=masterkey +interbase\bin\isql -z -i utilities\isc4.sql +interbase\bin\gdef -z utilities\isc4.gdl +interbase\bin\gsec -da isc4.gdb -add sysdba -pw masterkey +interbase\bin\gbak -z isc4.gdb interbase\bin\isc4.gbk +set ISC_USER=%SAVE_USER% +set ISC_PASSWORD=%SAVE_PASSWORD% +copy isc4.gdb interbase\isc4.gdb +del isc4.gdb +echo sm ibase.h interbase\include\ibase.h > sm_include +echo sm perf.h interbase\include\perf.h >> sm_include +echo sm ibase.h >> sm_include +echo sm gdsold.h >> sm_include +marion -c jrd -x -v -z -d yoda:/usr/gds.yoda/dev/marion.gdb < sm_include +copy ibase.h+gdsold.h interbase\include\gds.h +del sm_include ibase.h gdsold.h +set SAVE_USER=%ISC_USER% +set SAVE_PASSWORD=%ISC_PASSWORD% +set ISC_USER=sysdba +set ISC_PASSWORD=masterkey +cmd /c "cd examples && nmake examples" +if errorlevel 1 goto end +cmd /c "cd example4 && nmake v4_examples" +if errorlevel 1 goto end +interbase\bin\gbak yoda:/usr/gds.yoda/dev/qli/master_help_db interbase\help\help.gbk +del interbase\help\help.gdb +interbase\bin\gbak -r interbase\help\help.gbk interbase\help\help.gdb +set ISC_USER=%SAVE_USER% +set ISC_PASSWORD=%SAVE_PASSWORD% +cmd /c "cd msgs && nmake locales.msg" +if errorlevel 1 goto end + +copy interbase\isc_config interbase\ibconfig +del interbase\isc_config +copy interbase\isc_ins.hlp interbase\ib_instl.hlp +del interbase\isc_ins.hlp +copy interbase\interbase.msg interbase\interbas.msg +del interbase\interbase.msg +copy interbase\bin\journal.gbak interbase\bin\journal.gbk +del interbase\bin\journal.gbak +copy interbase\bin\gds_archive.exe interbase\bin\ibarchiv.exe +del interbase\bin\gds_archive.exe +copy interbase\bin\gds_install.exe interbase\bin\instreg.exe +del interbase\bin\gds_install.exe +copy interbase\bin\gds_install_service.exe interbase\bin\instsvc.exe +del interbase\bin\gds_install_service.exe +copy interbase\bin\gds_lock_print.exe interbase\bin\iblockpr.exe +del interbase\bin\gds_lock_print.exe +copy interbase\bin\gds_remote_server.exe interbase\bin\ibremote.exe +del interbase\bin\gds_remote_server.exe +copy interbase\bin\gds_wal_print.exe interbase\bin\ibwalpr.exe +del interbase\bin\gds_wal_print.exe +copy interbase\bin\gds_wal_writer.exe interbase\bin\ibwalwrt.exe +del interbase\bin\gds_wal_writer.exe +copy interbase\bin\iscinstall.exe interbase\bin\ibinstal.exe +del interbase\bin\iscinstall.exe +copy interbase\examples\v3\*.gbak interbase\examples\v3\*.gbk +del interbase\examples\v3\*.gbak + +:end diff --git a/src/makefiles/build_kit.cmd b/src/makefiles/build_kit.cmd new file mode 100644 index 0000000000..79a9c29aac --- /dev/null +++ b/src/makefiles/build_kit.cmd @@ -0,0 +1,154 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +set ISC_USER=builder +set ISC_PASSWORD=builder +cmd /c "cd jrd && make gds.h" +if errorlevel 1 goto end +cmd /c "cd dsql && make dsql_objects" +if errorlevel 1 goto end +cmd /c "cd lock && make lock.obj" +if errorlevel 1 goto end +cmd /c "cd remote && make rem_objects" +if errorlevel 1 goto end +cmd /c "cd intl && make intl_objects" +if errorlevel 1 goto end +cmd /c "cd wal && make wal_objects" +if errorlevel 1 goto end +cmd /c "cd jrd && make gdsshr.dll" +if errorlevel 1 goto end +rem cmd /c "cd jrd && make gds_b.lib" +rem if errorlevel 1 goto end +cmd /c "cd gpre && make gpre.exe" +if errorlevel 1 goto end +cmd /c "cd msgs && make check_messages.exe" +if errorlevel 1 goto end +cmd /c "cd msgs && check_messages -d yoda:/usr/gds/dev/msgs/master_msg_db" +if errorlevel 1 goto end +cmd /c "cd msgs && make interbase.msg" +if errorlevel 1 goto end +cmd /c "cd jrd && make includes.msg" +if errorlevel 1 goto end +cmd /c "cd dudley && make dudley.exe" +if errorlevel 1 goto end +cmd /c "cd intl && make intl" +if errorlevel 1 goto end +cmd /c "cd isql && make isql.exe" +if errorlevel 1 goto end +cmd /c "cd burp && make burp.exe" +if errorlevel 1 goto end +cmd /c "cd qli && make qli.exe" +if errorlevel 1 goto end +cmd /c "cd lock && make lock_print.exe" +if errorlevel 1 goto end +copy lock\config_params interbase\isc_config +cmd /c "cd remote && make inet_server.exe" +if errorlevel 1 goto end +cmd /c "cd alice && make alice.exe" +if errorlevel 1 goto end +cmd /c "cd journal && make gjrn.exe" +if errorlevel 1 goto end +cmd /c "cd journal && make gds_archive.exe" +if errorlevel 1 goto end +cmd /c "cd journal && make journal.db" +if errorlevel 1 goto end +cmd /c "cd journal && ..\compress_dbs ..\journal.gdl" +set SAVE_USER=%ISC_USER% +set SAVE_PASSWORD=%ISC_PASSWORD% +set ISC_USER=sysdba +set ISC_PASSWORD=masterkey +interbase\bin\gdef -z -r journal.gdl +interbase\bin\gbak -z journal.gdb interbase/bin/journal.gbak +set ISC_USER=%SAVE_USER% +set ISC_PASSWORD=%SAVE_PASSWORD% +del journal.gdl journal.gdb +cmd /c "cd wal && make wal_writer.exe" +if errorlevel 1 goto end +cmd /c "cd wal && make wal_print.exe" +if errorlevel 1 goto end +cmd /c "cd wal && make driver.exe" +if errorlevel 1 goto end +cmd /c "cd utilities && make dba.exe" +if errorlevel 1 goto end +cmd /c "cd utilities && make gsec.exe" +if errorlevel 1 goto end +rem cmd /c "cd utilities && make install_reg.exe" +rem if errorlevel 1 goto end +rem cmd /c "cd utilities && make install_svc.exe" +rem if errorlevel 1 goto end +del isc4.gdb +set SAVE_USER=%ISC_USER% +set SAVE_PASSWORD=%ISC_PASSWORD% +set ISC_USER=sysdba +set ISC_PASSWORD=masterkey +interbase\bin\isql -z -i utilities\isc4.sql +interbase\bin\gdef -z utilities\isc4.gdl +interbase\bin\gsec -da isc4.gdb -add sysdba -pw masterkey +interbase\bin\gbak -z isc4.gdb interbase\bin\isc.gbk +set ISC_USER=%SAVE_USER% +set ISC_PASSWORD=%SAVE_PASSWORD% +ren isc4.gdb interbase\isc4.gdb +echo sm ibase.h interbase\include\ibase.h > sm_include +echo sm perf.h interbase\include\perf.h >> sm_include +echo sm ibase.h >> sm_include +echo sm gdsold.h >> sm_include +marion -c jrd -x -v -z -d yoda:/usr/gds/dev/marion.gdb < sm_include +copy ibase.h+gdsold.h interbase\include\gds.h +del sm_include ibase.h gdsold.h +cmd /c "cd examples && make examples" +if errorlevel 1 goto end +set SAVE_USER=%ISC_USER% +set SAVE_PASSWORD=%ISC_PASSWORD% +set ISC_USER=sysdba +set ISC_PASSWORD=masterkey +cmd /c "cd example4 && make v4_examples" +if errorlevel 1 goto end +interbase\bin\gbak yoda:/usr/gds/dev/qli/master_help_db interbase\help\help.gbk +del interbase\help\help.gdb +interbase\bin\gbak -r interbase\help\help.gbak interbase\help\help.gdb +set ISC_USER=%SAVE_USER% +set ISC_PASSWORD=%SAVE_PASSWORD% +cmd /c "cd msgs && make locales.msg" +if errorlevel 1 goto end + +copy interbase\isc_config interbase\ibconfig +del interbase\isc_config +copy interbase\isc_ins.hlp interbase\ib_instl.hlp +del interbase\isc_ins.hlp +copy interbase\interbase.msg interbase\interbas.msg +del interbase\interbase.msg +copy interbase\bin\journal.gbak interbase\bin\journal.gbk +del interbase\bin\journal.gbak +copy interbase\bin\gds_archive.exe interbase\bin\ibarchiv.exe +del interbase\bin\gds_archive.exe +rem copy interbase\bin\gds_install.exe interbase\bin\instreg.exe +rem del interbase\bin\gds_install.exe +rem copy interbase\bin\gds_install_service.exe interbase\bin\instsvc.exe +rem del interbase\bin\gds_install_service.exe +copy interbase\bin\gds_lock_print.exe interbase\bin\iblockpr.exe +del interbase\bin\gds_lock_print.exe +copy interbase\bin\gds_inet_server.exe interbase\bin\ibremote.exe +del interbase\bin\gds_inet_server.exe +copy interbase\bin\gds_wal_print.exe interbase\bin\ibwalpr.exe +del interbase\bin\gds_wal_print.exe +copy interbase\bin\gds_wal_writer.exe interbase\bin\ibwalwrt.exe +del interbase\bin\gds_wal_writer.exe +copy interbase\bin\iscinstall.exe interbase\bin\ibinstal.exe +del interbase\bin\iscinstall.exe +copy interbase\examples\v3\*.gbak interbase\examples\v3\*.gbk +del interbase\examples\v3\*.gbak + +:end diff --git a/src/makefiles/ccs.sco b/src/makefiles/ccs.sco new file mode 100644 index 0000000000..4df3f71b27 --- /dev/null +++ b/src/makefiles/ccs.sco @@ -0,0 +1,111 @@ +#!/bin/ksh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +scriptname="$0" +step="$1" +keywords="$2" +pkglist="$3" + +# Source in the standard functions library, ccsSetup.sh +. ccsSetup.sh + +doPreLoad() { +if [ -e /usr/interbase ] +then + echo + echo + echo "----------------***** ERROR *****-----------------" + echo "/usr/interbase existing on the system. " + echo + echo "Aborting installation ...." + echo + echo "You must remove an active existing installation of Interbase" + echo "from the system before attempting to install this one." + echo "For further details, please refer to the release notes" + echo "included on the media." + echo + echo + ccs_return_value=1 +fi +} + +doPostExport() { + /usr/interbase/install + # Extract the InterBase version and save it in .version file + /usr/interbase/bin/gpre -z 2>/dev/null | head -1 | cut -d' ' -f3 > $SSO_CLIENT_ROOT/.version + # Copy .version file to /usr/interbase for cross checking during removal + cp $SSO_CLIENT_ROOT/.version /usr/interbase + echo + echo + echo "----------------***** IMPORTANT *****-----------------" + echo "Please read release notes in /usr/interbase/ReleaseNotes.txt" + echo "or /usr/interbase/ReleaseNotes.html. They contain important" + echo "information about this version of InterBase on SCO and" + echo "instructions on how to access other products and" + echo "documents on the CD-ROM" + echo + echo +} + +doPreUnexport() { + if [ -d /usr/interbase ] + then + # Check whether /usr/interbase contains exactly the + # same version that is being removed and only then remove. + if cmp /usr/interbase/.version $SSO_CLIENT_ROOT/.version + then + touch /tmp/.RMIBDIR + fi + fi +} + +doPostUnload() { + if [ -f /tmp/.RMIBDIR ] + then + rm -rf /usr/interbase + rm -f /tmp/.RMIBDIR + rm -rf /usr/include/gds.h + rm -rf /usr/include/ibase.h + rm -rf /usr/lib/libgds* + else + # Either /usr/interbase does not contain a .version + # or it contains a .version which is different from + # $SSO_CLIENT_ROOT/.version. So don't remove + # /usr/interbase + echo + echo + echo "Warning" + echo "-------" + echo "The package has been removed from the system but" + echo "/usr/interbase contains a version other than the one" + echo "you are trying to remove." + echo "Hence /usr/interbase has not been removed." + echo + echo + fi +} + +ccs_return_value=0 + +case "$step" in + PRE_LOAD) doPreLoad ;; + POST_EXPORT) doPostExport ;; + PRE_UNEXPORT) doPreUnexport ;; + POST_UNLOAD) doPostUnload ;; +esac + +exit $ccs_return_value diff --git a/src/makefiles/cdmt.config.sco b/src/makefiles/cdmt.config.sco new file mode 100644 index 0000000000..9d4888e9af --- /dev/null +++ b/src/makefiles/cdmt.config.sco @@ -0,0 +1,35 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +MACROS: + +DEFAULT_EXEC_MODE = 0755 + +DEFAULT_FILE_MODE = 0644 +DEFAULT_FILE_OWNER = bin +DEFAULT_FILE_GROUP = bin + +DEFAULT_DIR_MODE = 0755 +DEFAULT_DIR_OWNER = bin +DEFAULT_DIR_GROUP = bin + +DEFAULT_FIFO_MODE = 0644 +DEFAULT_FIFO_OWNER = bin +DEFAULT_FIFO_GROUP = bin + +DEFAULT_DISTTREEROOT = /usr/gds.sco6/custom +DEFAULT_DISTTREEROOT_SHARED = /usr/gds.sco6/custom +DEFAULT_DISTTREEROOT_CLIENT = /usr/gds.sco6/custom diff --git a/src/makefiles/compress.sed b/src/makefiles/compress.sed new file mode 100644 index 0000000000..21fb1119cd --- /dev/null +++ b/src/makefiles/compress.sed @@ -0,0 +1,30 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +s?\"$(DB_DIR)/jrd/yachts.lnk\"?\"yachts.lnk\"?g +s?\"$(DB_DIR)/journal/journal.gdb\"?\"journal.gdb\"?g +s?\"$(DB_DIR)/msgs/msg.gdb\"?\"msg.gdb\"?g +s?\"$(DB_DIR)/jrd/codes.gdb\"?\"codes.gdb\"?g +s?\"$(DB_DIR)/msgs/master_msg_db\"?\"master_msg_db\"?g +s?\"$(DB_DIR)/pyxis/forms.gdb\"?\"forms.gdb\"?g +s?\"$(DB_DIR)/qli/yachts.link\"?\"yachts.link\"?g +s?\"$(DB_DIR)/qli/master_help_db\"?\"master_help_db\"?g +s?\"$(DB_DIR)/qli/help.gdb\"?\"help.gdb\"?g +s?\"$(DB_DIR)/jrd/yachts.gdb\"?\"yachts.gdb\"?g +s?\"$(DB_DIR)/jrd/isc.gdb\"?\"isc.gdb\"?g +s?\"$(DB_DIR)/example4/empbuild.gdb\"?\"empbuild.gdb\"?g +s?\"$(DB_DIR)/example5/empbuild.gdb\"?\"empbuild.gdb\"?g +s?\"$(DB_DIR)/utilities/rebuild.gdb\"?\"rebuild.gdb\"?g diff --git a/src/makefiles/compress_dbs b/src/makefiles/compress_dbs new file mode 100644 index 0000000000..dbace69723 --- /dev/null +++ b/src/makefiles/compress_dbs @@ -0,0 +1,26 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +if [ $# != 1 ] +then + echo "Usage: compress_dbs filename" + exit 1 +fi +echo "Compressing DB in... $1" +sed -f source/$(SYSTEM)/compress.sed $1 > ./sed.TMP +mv ./sed.TMP $1 +exit 0 diff --git a/src/makefiles/compress_dbs.bat b/src/makefiles/compress_dbs.bat new file mode 100644 index 0000000000..8e1fad1cb6 --- /dev/null +++ b/src/makefiles/compress_dbs.bat @@ -0,0 +1,30 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@echo off +if "%1" == "" goto err +if not "%2" == "" goto err + +echo Compressing DB in... %1 +sed -f ..\$(SYSTEM)\compress.sed %1 > .\sed.TMP +copy .\sed.TMP %1 +del .\sed.TMP +goto end + +:err +echo "Usage: compress_dbs filename" + +:end diff --git a/src/makefiles/config/Makefile.in b/src/makefiles/config/Makefile.in new file mode 100644 index 0000000000..af233ee062 --- /dev/null +++ b/src/makefiles/config/Makefile.in @@ -0,0 +1,6 @@ +@SET_MAKE@ + +all: firebird + +firebird: + cd generated && $(MAKE) SYSTEM="builds" firebird diff --git a/src/makefiles/config/config.guess b/src/makefiles/config/config.guess new file mode 100755 index 0000000000..ba66165161 --- /dev/null +++ b/src/makefiles/config/config.guess @@ -0,0 +1,1371 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-04-20' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break + fi + done + rm -f $dummy.c $dummy.o $dummy.rel + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + cat >$dummy.c < /* for printf() prototype */ +int main (int argc, char *argv[]) { +#else +int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + ;; + ppc:Linux:*:*) + # Determine Lib Version + cat >$dummy.c < +#if defined(__GLIBC__) +extern char __libc_version[]; +extern char __libc_release[]; +#endif +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined(__GLIBC__) + printf("%s %s\n", __libc_version, __libc_release); +#else + printf("unknown\n"); +#endif + return 0; +} +EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then LIBC="libc1" ; fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 ;; + alpha:Linux:*:*) + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; + 1-0) UNAME_MACHINE="alphaev5" ;; + 1-1) UNAME_MACHINE="alphaev56" ;; + 1-101) UNAME_MACHINE="alphapca56" ;; + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) UNAME_MACHINE="alphaev67" ;; + esac + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_emulations=`cd /; ld --help 2>&1 \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i*86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + elf_i*86) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + i*86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + esac + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + case "${UNAME_MACHINE}" in + i*86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i*86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:7*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/src/makefiles/config/config.h.in b/src/makefiles/config/config.h.in new file mode 100644 index 0000000000..95eea46076 --- /dev/null +++ b/src/makefiles/config/config.h.in @@ -0,0 +1,63 @@ +#ifndef AUTOCONFIG_H +#define AUTOCONFIG_H + + +/* Headers */ +#undef HAVE_UNISTD_H +#undef HAVE_FCNTL_H +#undef HAVE_SYS_TYPES_H +#undef HAVE_TIME_H +#undef HAVE_SYS_TIME_H +#undef HAVE_SYS_STAT_H +#undef HAVE_CTYPE_H +#undef HAVE_SYS_UIO_H +#undef HAVE_SYS_WAIT_H +#undef HAVE_VARARGS_H +#undef HAVE_STDARG_H +#undef HAVE_STRING_H + + +/* Is the platform big endian? */ +#define WORDS_BIGENDIAN 0 + +/* CPU types */ +#undef PowerPC +#undef sparc +#undef i386 +#undef mips +#undef alpha + +/* various OS efforts */ +#undef DARWIN +#undef LINUX +#undef FREEBSD +#undef NETBSD +#undef apollo +#undef sun +#undef SOLARIS +#undef MAC +#undef NeXT +#undef hpux +#undef ultrix +#undef PC_PLATFORM +#undef NETWARE_386 +#undef WINDOWS_ONLY +#undef VMS +#undef AIX +#undef OS2_ONLY +#undef WIN_NT +#undef SCO_EV +#undef DGUX +#undef DECOSF +#undef sgi +#undef mpexl +#undef _CRAY +#undef DELTA +#undef M88K +#undef UNIXWARE +#undef NCR3000 +#undef IMP +#undef EPSON + + +#endif diff --git a/src/makefiles/config/config.sub b/src/makefiles/config/config.sub new file mode 100755 index 0000000000..93a3a14643 --- /dev/null +++ b/src/makefiles/config/config.sub @@ -0,0 +1,1362 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-05-11' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ + | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ + | pj | pjl | h8500 | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ + | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ + | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | [cjt]90-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [cjt]90) + basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/src/makefiles/config/configure.in b/src/makefiles/config/configure.in new file mode 100644 index 0000000000..4c07682e31 --- /dev/null +++ b/src/makefiles/config/configure.in @@ -0,0 +1,73 @@ +AC_INIT(src) +AC_CONFIG_AUX_DIR(src/makefiles/config) +AC_CACHE_VAL(ac_cv_prog_make_set, [AC_PROG_MAKE_SET]) + +AC_CONFIG_HEADER(generated/jrd/autoconfig.h:src/makefiles/config/config.h.in) + +AC_CANONICAL_SYSTEM + +AC_PROG_AWK +AC_PROG_CC +AC_PROG_CXX +AC_PROG_LEX +AC_PROG_LN_S +AC_PROG_RANLIB +AC_PROG_YACC + +AC_CHECK_HEADERS(unistd.h) +AC_CHECK_HEADERS(fcntl.h) +AC_CHECK_HEADERS(sys/types.h) +AC_CHECK_HEADERS(sys/stat.h) +AC_CHECK_HEADERS(sys/uio.h) +AC_CHECK_HEADERS(sys/wait.h) +AC_CHECK_HEADERS(varargs.h) +AC_CHECK_HEADERS(stdarg.h) +AC_CHECK_HEADERS(ctype.h) +AC_CHECK_HEADERS(time.h) +AC_CHECK_HEADERS(sys/time.h) +AC_CHECK_HEADERS(string.h) + +AC_C_BIGENDIAN + +case "$target_cpu" in +powerpc) AC_DEFINE(PowerPC) ;; +esac + +case "$target" in +*-*-darwin*) MAKEFILE_PREFIX=prefix.darwin ; PLATFORM=DARWIN ; AC_DEFINE(DARWIN);; +*-*-freebsd*) MAKEFILE_PREFIX=prefix.freebsd ; PLATFORM=FREEBSD ; AC_DEFINE(FREEBSD);; +*-*-linux*) MAKEFILE_PREFIX=prefix.linux ; PLATFORM=LINUX ; AC_DEFINE(linux) ;; +*-*-netbsd*) MAKEFILE_PREFIX=prefix.netbsd ; PLATFORM=NETBSD ; AC_DEFINE(NETBSD) ;; +*-apollo-*) MAKEFILE_PREFIX=prefix.apollo ; PLATFORM=apollo ; AC_DEFINE(apollo) ;; +*-*-hpux*) MAKEFILE_PREFIX=prefix.hpux ; PLATFORM=hpux ; AC_DEFINE(hpux) ;; +esac + +AC_SUBST(PLATFORM) + +ln -fs ../src/makefiles/${MAKEFILE_PREFIX} generated/.prefix.platform + +AC_OUTPUT( \ +generated/alice/Makefile:generated/.prefix.platform:src/makefiles/sfx.alice \ +generated/burp/Makefile:generated/.prefix.platform:src/makefiles/sfx.burp \ +generated/csv/Makefile:generated/.prefix.platform:src/makefiles/sfx.csv \ +generated/dbs/Makefile:generated/.prefix.platform:src/makefiles/sfx.dbs \ +generated/dsql/Makefile:generated/.prefix.platform:src/makefiles/sfx.dsql \ +generated/dudley/Makefile:generated/.prefix.platform:src/makefiles/sfx.dudley \ +generated/example5/Makefile:generated/.prefix.platform:src/makefiles/sfx.example5 \ +generated/extlib/Makefile:generated/.prefix.platform:src/makefiles/sfx.extlib \ +generated/gpre/Makefile:generated/.prefix.platform:src/makefiles/sfx.gpre \ +generated/intl/Makefile:generated/.prefix.platform:src/makefiles/sfx.intl \ +generated/isql/Makefile:generated/.prefix.platform:src/makefiles/sfx.isql \ +generated/journal/Makefile:generated/.prefix.platform:src/makefiles/sfx.journal \ +generated/jrd/Makefile:generated/.prefix.platform:src/makefiles/sfx.jrd \ +generated/lock/Makefile:generated/.prefix.platform:src/makefiles/sfx.lock \ +generated/msgs/Makefile:generated/.prefix.platform:src/makefiles/sfx.msgs \ +generated/pipe/Makefile:generated/.prefix.platform:src/makefiles/sfx.pipe \ +generated/pyxis/Makefile:generated/.prefix.platform:src/makefiles/sfx.pyxis \ +generated/qli/Makefile:generated/.prefix.platform:src/makefiles/sfx.qli \ +generated/remote/Makefile:generated/.prefix.platform:src/makefiles/sfx.remote \ +generated/utilities/Makefile:generated/.prefix.platform:src/makefiles/sfx.utilities \ +generated/wal/Makefile:generated/.prefix.platform:src/makefiles/sfx.wal \ +generated/Makefile:generated/.prefix.platform:src/makefiles/sfx.firebird \ +Makefile:src/makefiles/config/Makefile.in \ +) diff --git a/src/makefiles/config/install-sh b/src/makefiles/config/install-sh new file mode 100755 index 0000000000..398a88e142 --- /dev/null +++ b/src/makefiles/config/install-sh @@ -0,0 +1,251 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + : +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=$mkdirprog + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + : + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + : + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + : + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' + ' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + : + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + : + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/src/makefiles/copy_makes b/src/makefiles/copy_makes new file mode 100644 index 0000000000..fe2bb6f53e --- /dev/null +++ b/src/makefiles/copy_makes @@ -0,0 +1,130 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# This procedure refreshes the support and makefiles for non-link systems +# +SYSTEM=$(SYSTEM) +# +# Alice +cp $SYSTEM/make.alice alice/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.alice_ss $SYSTEM/super/alice/makefile +fi +# Burp +cp $SYSTEM/make.burp burp/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.burp_ss $SYSTEM/super/burp/makefile +fi +# Client +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.client client/makefile +fi +# Csv +cp $SYSTEM/make.csv csv/makefile +# Dsql +cp $SYSTEM/make.dsql dsql/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.dsql_ss $SYSTEM/super/dsql/makefile +fi +# Dudley +cp $SYSTEM/make.dudley dudley/makefile +# Examples +cp $SYSTEM/make.examples examples/makefile +# V4 Examples +cp $SYSTEM/make.example4 example4/makefile +# V5 Examples +cp $SYSTEM/make.example5 example5/makefile +# Gpre +cp $SYSTEM/make.gpre gpre/makefile +# Intl +cp $SYSTEM/make.intl intl/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.intl_ss $SYSTEM/super/intl/makefile +fi +# Isql +cp $SYSTEM/make.isql isql/makefile +# Journal +cp $SYSTEM/make.journal journal/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.journal_ss $SYSTEM/super/journal/makefile +fi +# Jrd +cp $SYSTEM/make.jrd jrd/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.jrd_ss $SYSTEM/super/jrd/makefile +fi +# Lock +cp $SYSTEM/make.lock lock/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.lock_ss $SYSTEM/super/lock/makefile +fi +# Msgs +cp $SYSTEM/make.msgs msgs/makefile +# Pipe +cp $SYSTEM/make.pipe pipe/makefile +# Pyxis +cp $SYSTEM/make.pyxis pyxis/makefile +# Qli +cp $SYSTEM/make.qli qli/makefile +# Remote +cp $SYSTEM/make.remote remote/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.remote_ss $SYSTEM/super/remote/makefile +fi +# Utilities +cp $SYSTEM/make.utilities utilities/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.utilities_ss $SYSTEM/super/utilities/makefile +fi +if [ $SYSTEM != 'WIN_NT' -a $SYSTEM != 'OS2' -a $SYSTEM != 'WIN_NTS' ]; then + SECURITY='utilities/scrty_unix.gdl' +else + SECURITY='utilities/scrty_unix.gdl' +fi +if [ -f $SECURITY ]; then + cp $SECURITY utilities/security.gdl +fi +# Wal +cp $SYSTEM/make.wal wal/makefile +if [ -d $SYSTEM/super ]; then + cp $SYSTEM/make.wal_ss $SYSTEM/super/wal/makefile +fi +# Top level +cp $SYSTEM/make.interbase make_kit +# +# miscellaneous +cp $SYSTEM/original/v3meta testing/v3meta +if [ $SYSTEM = 'WIN_NT' -o $SYSTEM = 'OS2' -o $SYSTEM = 'WIN_NTS' ]; then + cp $SYSTEM/original/bind_gds.win_nt jrd/gds.bind + if [ $SYSTEM = 'WIN_NT' -o $SYSTEM = 'WIN_NTS' ]; then + cp $SYSTEM/original/bind_gds_rsp.win_nt jrd/gds.rsp + else + cp $SYSTEM/original/bind_gds_rsp.\os2 jrd/gds.rsp + fi + cp $SYSTEM/original/bind_gdsintl.win_nt intl/gdsintl.bind +else + cp $SYSTEM/original/install.nolink $SYSTEM/install +# +# IMPORTANT!!!!!!!!!! +# +# The following should be set for... +# inetd.conf.unx = gds_inet_server +# inetd.conf.psx = gds_inet_srvr (14 character limit) +# +# cp $SYSTEM/original/inetd.conf.unx $SYSTEM/inetd.conf.isc + cp $SYSTEM/original/inetd.conf.psx $SYSTEM/inetd.conf.isc +fi diff --git a/src/makefiles/copy_set_prot b/src/makefiles/copy_set_prot new file mode 100644 index 0000000000..6b3a5892f7 --- /dev/null +++ b/src/makefiles/copy_set_prot @@ -0,0 +1,185 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to set the protections on files in +# the installation directory and copy stuff over from ../interbase +# Also deletes extra .gdb, core and .gbl files and removes the COFF comment +# section from executables. +# stripping executables is commented out. + +RUNNER=`who am i` +set $RUNNER +if [ "$1" != "root" ]; then + echo 'copy_set_prot must be run as "root" or super user' + exit 1 +fi +PATH=$PATH:/etc:/bin:. +export PATH +set -x +copy -romv ../interbase source/usr/interbase +find . \( -name \*.gbl -o -name core -o -name isc_event1 \) -print | xargs rm +rm -f interbase/install interbase/lock_header interbase/interbase.log +rm -f interbase/isc_lic.dat +mcs -d source/usr/interbase/bin/* +mcs -a "Interbase version V4.0A built `date`" source/usr/interbase/bin/* +#strip source/usr/interbase/bin/* +cd source/usr/interbase +chown root \ + . \ + bin examples help include intl lib \ + bin/* \ + examples/* \ + examples/*/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + inetd.conf.isc \ + install \ + interbase.msg \ + isc4.gdb \ + services.isc + +chgrp bin \ + . \ + bin examples help include intl lib \ + bin/* \ + examples/* \ + examples/*/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + inetd.conf.isc \ + install \ + interbase.msg \ + isc4.gdb \ + services.isc + +chmod uog=rx install bin/* + +chmod uog=r \ + examples/*/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + inetd.conf.isc \ + interbase.msg \ + services.isc + +chmod uog=rwx . help + +chmod u=rwx,go=rx bin examples examples/v3 examples/v4 include intl lib + +chmod uog=rw isc4.gdb help/help.gdb examples/*/*.gdb + +chmod u+s,g+s \ + bin/gds_relay + +if [ -f bin/gds_inet_srvr ] +then + chmod u+s,g+s \ + bin/gds_inet_srvr +else + chmod u+s,g+s \ + bin/gds_inet_server +fi + +if [ -f isc_ins.hlp ]; then + chown root \ + isc_ins.hlp + chgrp bin \ + isc_ins.hlp + chmod uog=r \ + isc_ins.hlp +else + chown root \ + isc_ins_hlp.dat + chgrp bin \ + isc_ins_hlp.dat + chmod uog=r \ + isc_ins_hlp.dat +fi + +if [ -f lock_header_t ]; then + chown root \ + lock_header_t + chgrp bin \ + lock_header_t + chmod uog=r \ + lock_header_t +else + chown root \ + lock_header_template + chgrp bin \ + lock_header_template + chmod uog=r \ + lock_header_template +fi + +if [ -f servers.isc ]; then + chown root \ + servers.isc + chgrp bin \ + servers.isc + chmod uog=r \ + servers.isc +fi + +if [ -f bin/gds_dnet_server ]; then + chmod u+s,g+s \ + bin/gds_dnet_server +fi + +if [ -f bin/gds_drop ]; then + chmod u+s,g+s \ + bin/gds_drop +fi + +if [ -f bin/gds_lock_mgr ]; then + chmod u+s,g+s \ + bin/gds_lock_mgr +fi + +if [ -f bin/gds_lock_manager ]; then + chmod u+s,g+s \ + bin/gds_lock_manager +fi + +if [ -f lib/gds_s.a ]; then + chmod uog=rx \ + lib/gds_s \ + lib/gdsf_s +fi + +if [ -f lib/gds.sl ]; then + chmod uog=rx \ + lib/gds.sl +fi + +if [ -f lib/gdslib ]; then + chmod uog=rx \ + lib/gdslib \ + lib/dsqllib \ + lib/pyxislib \ + lib/bridge +fi +rm -f isc_lic.dat interbase.log lock_header install isc_event1 +rm -f isc_lock1.gbl +cd ../../.. +docut -c -i diff --git a/src/makefiles/copyright.cl b/src/makefiles/copyright.cl new file mode 100644 index 0000000000..4666b2e7f9 --- /dev/null +++ b/src/makefiles/copyright.cl @@ -0,0 +1,18 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +Copyright (c) 1998,1999, InterBase Software Corporation +All Rights Reserved diff --git a/src/makefiles/copyright.clsr b/src/makefiles/copyright.clsr new file mode 100644 index 0000000000..674cc5f6b5 --- /dev/null +++ b/src/makefiles/copyright.clsr @@ -0,0 +1,18 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +Copyright (c) 1998, 1999, InterBase Software Corporation +All Rights Reserved diff --git a/src/makefiles/debug_entry.bind b/src/makefiles/debug_entry.bind new file mode 100644 index 0000000000..792daf4c9a --- /dev/null +++ b/src/makefiles/debug_entry.bind @@ -0,0 +1,19 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + gds__alloc_debug @900 + gds_alloc_flag_unfreed @901 + gds_alloc_report @902 diff --git a/src/makefiles/depend.cl b/src/makefiles/depend.cl new file mode 100644 index 0000000000..f4f1cffb87 --- /dev/null +++ b/src/makefiles/depend.cl @@ -0,0 +1,17 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +I IBCS60 InterBase Client and Server diff --git a/src/makefiles/depend.clnd b/src/makefiles/depend.clnd new file mode 100644 index 0000000000..78203b1875 --- /dev/null +++ b/src/makefiles/depend.clnd @@ -0,0 +1,19 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +I IBCS60 InterBase Client and Server +I IBCSN60 InterBase Client and Server with No Documentation +I IBC60 InterBase Client only diff --git a/src/makefiles/depend.clsr b/src/makefiles/depend.clsr new file mode 100644 index 0000000000..371fba1e42 --- /dev/null +++ b/src/makefiles/depend.clsr @@ -0,0 +1,17 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +I IBC60 Interbase Client only diff --git a/src/makefiles/depend.clsrnd b/src/makefiles/depend.clsrnd new file mode 100644 index 0000000000..bfd9c74ff0 --- /dev/null +++ b/src/makefiles/depend.clsrnd @@ -0,0 +1,19 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +I IBC60 Interbase Client only +I IBCN60 Interbase Client only with No Documentation +I IBCS60 Interbase Client and Server diff --git a/src/makefiles/edit_make b/src/makefiles/edit_make new file mode 100644 index 0000000000..6a80e311ed --- /dev/null +++ b/src/makefiles/edit_make @@ -0,0 +1,66 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +if [ "$SYS_TYPE" != "NOLINK_OS" -a "$1" != "WIN_NT" -a "$1" != "OS2" -a $1 != 'WIN_NTS' ]; then + if [ "$3" = "make.client" ]; then + sed -e "s/\$(SUPER_FLAG)/-DSUPERCLIENT/g" \ + -e "s/\$(SYSTEM)/$1/g" \ + -e "s/\$(VERSION)/$2/g" \ + -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4 + elif [ "$3" = "make.dsql_ss" -o "$3" = "make.intl_ss" -o "$3" = "make.journal_ss" -o "$3" = "make.jrd_ss" -o "$3" = "make.lock_ss" -o "$3" = "make.remote_ss" -o "$3" = "make.wal_ss" -o "$3" = "make.burp_ss" -o "$3" = "make.alice_ss" -o "$3" = "make.utilities_ss" ]; then + if [ "$1" = "HP10" -o "$1" = "LINUX" ]; then + sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER -D_REENTRANT/g" \ + -e "s/\$(SYSTEM)/$1/g" \ + -e "s/\$(VERSION)/$2/g" \ + -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4 + else + sed -e "s/\$(SUPER_FLAG)/-DSUPERSERVER/g" \ + -e "s/\$(SYSTEM)/$1/g" \ + -e "s/\$(VERSION)/$2/g" \ + -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4 + fi + else + sed -e "s/\$(SUPER_FLAG)//g" \ + -e "s/\$(SYSTEM)/$1/g" \ + -e "s/\$(VERSION)/$2/g" \ + -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4 + fi +elif [ "$3" != "make.interbase" -a "$3" != "build_kit" -a "$3" != "set_prot" -a "$3" != unset_prot -a "$3" != "refresh" -a "$3" != "refresh.all" ]; then + if [ "$1" != "WIN_NT" -a "$1" != "OS2" -a $1 != 'WIN_NTS' ]; then + sed -e "s/\$(SYSTEM)/$1/g" \ + -e "s/\$(VERSION)/$2/g" \ + -e "s?source/?../?g" \ + -e "s?source;?..;?g" \ + -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4 + else + sed -e "s/\$(SYSTEM)/$1/g" -e "s/\$(VERSION)/$2/g" -e "s?source/?../?g" -e "s?source;?..;?g" -e "s?source\\\\?..\\\\?g" -e "s?\$(DB_DIR)?$DB_DIR?g" -e "s?\.o?.obj?g" -e "s?/interbase/bin/?\\\\interbase\\\\bin\\\\?g" -e "s?/interbase/bin?\\\\interbase\\\\bin?g" -e "s?/interbase/lib/?\\\\interbase\\\\lib\\\\?g" -e "s?/interbase/examples/v3/?\\\\interbase\\\\examples\\\\v3^\\\\?g" -e "s?/interbase/examples/v4/?\\\\interbase\\\\examples\\\\v4^\\\\?g" -e "s?/interbase/examples/v5/?\\\\interbase\\\\examples\\\\v5^\\\\?g" -e "s?/interbase/examples/?\\\\interbase\\\\examples^\\\\?g" -e "s?\.\./examples/?..\\\\examples^\\\\?g" -e "s?\.\./example4/?..\\\\example4^\\\\?g" -e "s?\.\./example5/?..\\\\example5^\\\\?g" -e "s?/interbase/intl/?\\\\interbase\\\\intl^\\\\?g" -e "s?/interbase/?\\\\interbase^\\\\?g" -e "s/\$(COMPILER)/$COMPILER/g" $3 > $4 + fi +else + if [ "$1" != "WIN_NT" -a "$1" != "OS2" -a $1 != 'WIN_NTS' ]; then + sed -e "s/\$(SYSTEM)/$1/g" \ + -e "s/\$(VERSION)/$2/g" \ + -e "s?source/?./?g" \ + -e "s?source;?.;?g" \ + -e "s?\$(DB_DIR)?$DB_DIR?g" $3 > $4 + else + sed -e "s/\$(SYSTEM)/$1/g" \ + -e "s/\$(VERSION)/$2/g" \ + -e "s?source/?./?g" \ + -e "s?source;?.;?g" \ + -e "s?\$(DB_DIR)?$DB_DIR?g" \ + -e "s/\$(COMPILER)/$COMPILER/g" $3 > $4 + fi +fi diff --git a/src/makefiles/edit_makes b/src/makefiles/edit_makes new file mode 100644 index 0000000000..df100ac018 --- /dev/null +++ b/src/makefiles/edit_makes @@ -0,0 +1,17 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +ls make.* | awk '{print "./edit_make $(SYSTEM) $(VERSION) " $1 " ../" $1}' | sh diff --git a/src/makefiles/expand.sed b/src/makefiles/expand.sed new file mode 100644 index 0000000000..6b41082005 --- /dev/null +++ b/src/makefiles/expand.sed @@ -0,0 +1,30 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +s?\"yachts.lnk\"?\"$(DB_DIR)/jrd/yachts.lnk\"?g +s?\"journal.gdb\"?\"$(DB_DIR)/journal/journal.gdb\"?g +s?\"msg.gdb\"?\"$(DB_DIR)/msgs/msg.gdb\"?g +s?\"codes.gdb\"?\"$(DB_DIR)/jrd/codes.gdb\"?g +s?\"master_msg_db\"?\"$(DB_DIR)/msgs/master_msg_db\"?g +s?\"forms.gdb\"?\"$(DB_DIR)/pyxis/forms.gdb\"?g +s?\"yachts.link\"?\"$(DB_DIR)/qli/yachts.link\"?g +s?\"master_help_db\"?\"$(DB_DIR)/qli/master_help_db\"?g +s?\"help.gdb\"?\"$(DB_DIR)/qli/help.gdb\"?g +s?\"yachts.gdb\"?\"$(DB_DIR)/jrd/yachts.gdb\"?g +s?\"isc.gdb\"?\"$(DB_DIR)/jrd/isc.gdb\"?g +s?\"empbuild.gdb\"?\"$(DB_DIR)/example4/empbuild.gdb\"?g +s?\"empbuild.gdb\"?\"$(DB_DIR)/example5/empbuild.gdb\"?g +s?\"rebuild.gdb\"?\"$(DB_DIR)/utilities/rebuild.gdb\"?g diff --git a/src/makefiles/expand_dbs b/src/makefiles/expand_dbs new file mode 100644 index 0000000000..181db757b7 --- /dev/null +++ b/src/makefiles/expand_dbs @@ -0,0 +1,26 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +if [ $# != 1 ] +then + echo "Usage: expand_dbs filename" + exit 1 +fi +echo "Expanding DB in... $1" +sed -f source/$(SYSTEM)/expand.sed $1 > ./sed.TMP +mv ./sed.TMP $1 +exit 0 diff --git a/src/makefiles/expand_dbs.bat b/src/makefiles/expand_dbs.bat new file mode 100644 index 0000000000..1df310aeec --- /dev/null +++ b/src/makefiles/expand_dbs.bat @@ -0,0 +1,30 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@echo off +if "%1" == "" goto err +if not "%2" == "" goto err + +echo Expanding DB in... %1 +sed -f ..\$(SYSTEM)\expand.sed %1 > .\sed.TMP +copy .\sed.TMP %1 +del .\sed.TMP +goto end + +:err +echo "Usage: expand_dbs filename" + +:end diff --git a/src/makefiles/fetch_comp b/src/makefiles/fetch_comp new file mode 100644 index 0000000000..88b70194f4 --- /dev/null +++ b/src/makefiles/fetch_comp @@ -0,0 +1,59 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +if [ "$SYS_TYPE" != "NOLINK_OS" ]; then + DB="-d $1" + SINCE="$2" + COMP="$3" +else + DB="" + SINCE="$1" + COMP="$2" +fi +if [ "$SYSTEM" = "DELTA" ]; then + DB="" + SINCE="$1" + COMP="$2" +fi +if [ "$COMP" = "examples" -o "$COMP" = "EXAMPLES" ]; then + HEADER="-x" +fi +if [ "$COMP" = "example4" -o "$COMP" = "EXAMPLE4" ]; then + HEADER="-x" +fi +if [ "$COMP" = "example5" -o "$COMP" = "EXAMPLE5" ]; then + HEADER="-x" +fi +if [ "$COMP" != "builds" -a "$COMP" != "isc_lock" -a "$COMP" != "BUILDS" -a "$COMP" != "ISC_LOCK" ]; then + cd $COMP +fi +if [ "$COMP" = "isc_lock" -o "$COMP" = "ISC_LOCK" ]; then + if [ "$SYS_TYPE" != "NOLINK_OS" ]; then + cd $COMP + else + cd lock + fi +fi +if [ "$COMP" = "builds" -o "$COMP" = "BUILDS" ]; then + if [ "$SYS_TYPE" != "NOLINK_OS" ]; then + cd $COMP + else + cd $SYSTEM/original + fi +fi +set -x +marion $DB -a -s $SINCE -c $COMP -v -z $HEADER +exit diff --git a/src/makefiles/fetch_comp.bat b/src/makefiles/fetch_comp.bat new file mode 100644 index 0000000000..1757086058 --- /dev/null +++ b/src/makefiles/fetch_comp.bat @@ -0,0 +1,33 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@echo off +set HEADER= +if "%2" == "examples" set HEADER=-x +if "%2" == "EXAMPLES" set HEADER=-x +if "%2" == "example4" set HEADER=-x +if "%2" == "EXAMPLE4" set HEADER=-x +set SUBDIR=%2 +set CWD=.. +if "%2" == "builds" set SUBDIR=WIN_NT\original +if "%2" == "builds" set CWD=..\.. +if "%2" == "BUILDS" set SUBDIR=WIN_NT\original +if "%2" == "BUILDS" set CWD=..\.. +if "%2" == "isc_lock" set SUBDIR=lock +if "%2" == "ISC_LOCK" set SUBDIR=lock +cd %SUBDIR% +marion -c %2 -a -s %1 -z -v %HEADER% +cd %CWD% diff --git a/src/makefiles/gdsalias.asm b/src/makefiles/gdsalias.asm new file mode 100644 index 0000000000..bbb72a631c --- /dev/null +++ b/src/makefiles/gdsalias.asm @@ -0,0 +1,20 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +alias <_isc_start_transaction>= +alias <_isc_event_block>= +alias <_isc_expand_dpb>= +end diff --git a/src/makefiles/gsplit.h b/src/makefiles/gsplit.h new file mode 100644 index 0000000000..3417e36cfb --- /dev/null +++ b/src/makefiles/gsplit.h @@ -0,0 +1,52 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +/* + ************************************************************************** + * + * PROGRAM: JRD file split utility program + * MODULE: gsplit.h + * DESCRIPTION: file split utility program main header file + * + * copyright (c) 1996 by Borland International + * + ************************************************************************** + */ + +#include "source/jrd/common.h" + +#define BLANK ' ' +#define BURP_ALLOC_ZERO(size) MISC_alloc_burp((ULONG) size) +#define FILE_IS_FULL -9 +#define FILE_NM_ARR_LEN 20 +#define GBAK_STDIN_DESC 0 /* standart input file descriptor */ +#define GBAK_STDOUT_DESC 1 /* standart output file descriptor */ +#define GSPLIT_HDR_REC_NM "InterBase/Gsplit" + +#define IO_BUFFER_SIZE (16 * K_BYTES) + +#define K_BYTES 1024 +#define M_BYTES (K_BYTES * K_BYTES) +#define G_BYTES (K_BYTES * M_BYTES) +#define MIN_FILE_SIZE M_BYTES +#define NEW_LINE '\n' +#define NULL_B_FIL ((B_FIL) NULL_PTR) +#define TERMINAL '\0' + +typedef int FILE_DESC; diff --git a/src/makefiles/ibase.cmpnt.sco b/src/makefiles/ibase.cmpnt.sco new file mode 100644 index 0000000000..b4f9bed312 --- /dev/null +++ b/src/makefiles/ibase.cmpnt.sco @@ -0,0 +1,42 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +COMP:InterBase:ibase: +description = "ibase component" +version = SI_V5.5 +subpackages = ibase +required = ibase +dependencies = +distTreeRootSHARED = /usr/gds.sco6/custom +distTreeRootCLIENT = /usr/gds.sco6/custom +pkgFiles = ibase.pkg +defaultExportPrefix = /usr/interbase + +FILE_DEFAULT: +mode = $DEFAULT_FILE_MODE +owner = $DEFAULT_FILE_OWNER +group = $DEFAULT_FILE_GROUP + +DIR_DEFAULT: +mode = $DEFAULT_DIR_MODE +owner = $DEFAULT_DIR_OWNER +group = $DEFAULT_DIR_GROUP + +FIFO_DEFAULT: +mode = $DEFAULT_FIFO_MODE +owner = $DEFAULT_FIFO_OWNER +group = $DEFAULT_FIFO_GROUP diff --git a/src/makefiles/ibase.pkg.sco b/src/makefiles/ibase.pkg.sco new file mode 100644 index 0000000000..03f16a3f31 --- /dev/null +++ b/src/makefiles/ibase.pkg.sco @@ -0,0 +1,727 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PKG:SharedControl: +description = "ibase component description file" +distTreeRoot = /usr/gds.sco6/custom +distTreeRootSHARED = /usr/gds.sco6/custom +distTreeRootCLIENT = /usr/gds.sco6/custom + +DIR:SharedControl:SHARED:./cntl: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SharedControl:SHARED:./cntl/ccs: +mode = 0755 +owner = root +group = sys +flags = + +PKG:ibase: +description = "InterBase" +dependencies = +distTreeRootSHARED = $DEFAULT_DISTTREEROOT_SHARED +distTreeRootCLIENT = $DEFAULT_DISTTREEROOT_CLIENT + +DIR:ibase:SHARED:./bin: +mode = 0755 +owner = root +group = bin +flags = + +FILE:ibase:SHARED:./bin/gpre: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gpre + +FILE:ibase:SHARED:./bin/gds_pipe: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gds_pipe + +FILE:ibase:SHARED:./bin/gfix: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gfix + +FILE:ibase:SHARED:./bin/gds_drop: +mode = 6555 +owner = root +group = bin +flags = +exportPath = ./bin/gds_drop + +FILE:ibase:SHARED:./bin/gds_lock_mgr: +mode = 6555 +owner = root +group = bin +flags = +exportPath = ./bin/gds_lock_mgr + +FILE:ibase:SHARED:./bin/gbak: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gbak + +FILE:ibase:SHARED:./bin/gdef: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gdef + +FILE:ibase:SHARED:./bin/iblicense: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/iblicense + +FILE:ibase:SHARED:./bin/isql: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/isql + +FILE:ibase:SHARED:./bin/gds_lock_print: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gds_lock_print + +FILE:ibase:SHARED:./bin/qli: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/qli + +FILE:ibase:SHARED:./bin/gds_inet_server: +mode = 6555 +owner = root +group = bin +flags = +exportPath = ./bin/gds_inet_server + +FILE:ibase:SHARED:./bin/gsplit: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gsplit + +FILE:ibase:SHARED:./bin/gstat: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gstat + +FILE:ibase:SHARED:./bin/gds_relay: +mode = 6555 +owner = root +group = bin +flags = +exportPath = ./bin/gds_relay + +FILE:ibase:SHARED:./bin/gsec: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/gsec + +FILE:ibase:SHARED:./bin/isc4.gbak: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./bin/isc4.gbak + +DIR:ibase:SHARED:./examples: +mode = 0755 +owner = root +group = bin +flags = + +FILE:ibase:SHARED:./examples/README: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/README + +FILE:ibase:SHARED:./examples/align.h: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/align.h + +FILE:ibase:SHARED:./examples/api1.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api1.c + +FILE:ibase:SHARED:./examples/api10.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api10.c + +FILE:ibase:SHARED:./examples/api11.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api11.c + +FILE:ibase:SHARED:./examples/api12.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api12.c + +FILE:ibase:SHARED:./examples/api13.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api13.c + +FILE:ibase:SHARED:./examples/api14.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api14.e + +FILE:ibase:SHARED:./examples/api15.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api15.c + +FILE:ibase:SHARED:./examples/api16.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api16.c + +FILE:ibase:SHARED:./examples/api16t.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api16t.c + +FILE:ibase:SHARED:./examples/api2.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api2.c + +FILE:ibase:SHARED:./examples/api3.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api3.c + +FILE:ibase:SHARED:./examples/api4.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api4.c + +FILE:ibase:SHARED:./examples/api5.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api5.c + +FILE:ibase:SHARED:./examples/api6.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api6.c + +FILE:ibase:SHARED:./examples/api7.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api7.c + +FILE:ibase:SHARED:./examples/api8.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api8.c + +FILE:ibase:SHARED:./examples/api9.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api9.c + +FILE:ibase:SHARED:./examples/api9f.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api9f.c + +FILE:ibase:SHARED:./examples/api9f.sql: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/api9f.sql + +FILE:ibase:SHARED:./examples/apifull.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/apifull.c + +FILE:ibase:SHARED:./examples/dyn1.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/dyn1.e + +FILE:ibase:SHARED:./examples/dyn2.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/dyn2.e + +FILE:ibase:SHARED:./examples/dyn3.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/dyn3.e + +FILE:ibase:SHARED:./examples/dyn4.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/dyn4.e + +FILE:ibase:SHARED:./examples/dyn5.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/dyn5.e + +FILE:ibase:SHARED:./examples/dynfull.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/dynfull.e + +FILE:ibase:SHARED:./examples/employe2.sql: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/employe2.sql + +FILE:ibase:SHARED:./examples/employee.gbk: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/employee.gbk + +FILE:ibase:CLIENT:./examples/employee.gdb: +mode = 0666 +owner = root +group = bin +flags = +exportPath = ./examples/employee.gdb + +FILE:ibase:SHARED:./examples/example.h: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/example.h + +FILE:ibase:SHARED:./examples/ib_udf.sql: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/ib_udf.sql + +FILE:ibase:SHARED:./examples/intlemp.gbk: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/intlemp.gbk + +FILE:ibase:CLIENT:./examples/intlemp.gdb: +mode = 0666 +owner = root +group = bin +flags = +exportPath = ./examples/intlemp.gdb + +FILE:ibase:SHARED:./examples/makefile: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/makefile + +FILE:ibase:SHARED:./examples/stat1.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat1.e + +FILE:ibase:SHARED:./examples/stat10.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat10.e + +FILE:ibase:SHARED:./examples/stat11.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat11.e + +FILE:ibase:SHARED:./examples/stat12.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat12.e + +FILE:ibase:SHARED:./examples/stat12t.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat12t.e + +FILE:ibase:SHARED:./examples/stat2.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat2.e + +FILE:ibase:SHARED:./examples/stat3.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat3.e + +FILE:ibase:SHARED:./examples/stat4.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat4.e + +FILE:ibase:SHARED:./examples/stat5.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat5.e + +FILE:ibase:SHARED:./examples/stat6.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat6.e + +FILE:ibase:SHARED:./examples/stat7.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat7.e + +FILE:ibase:SHARED:./examples/stat8.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat8.e + +FILE:ibase:SHARED:./examples/stat9.e: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/stat9.e + +FILE:ibase:SHARED:./examples/udf.sql: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/udf.sql + +FILE:ibase:SHARED:./examples/udflib.c: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./examples/udflib.c + +DIR:ibase:SHARED:./help: +mode = 0755 +owner = root +group = bin +flags = + +FILE:ibase:SHARED:./help/help.gbak: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./help/help.gbak + +FILE:ibase:CLIENT:./help/help.gdb: +mode = 0666 +owner = root +group = bin +flags = +exportPath = ./help/help.gdb + +DIR:ibase:SHARED:./include: +mode = 0755 +owner = root +group = bin +flags = + +FILE:ibase:SHARED:./include/gds.h: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./include/gds.h + +FILE:ibase:SHARED:./include/perf.h: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./include/perf.h + +FILE:ibase:SHARED:./include/ibase.h: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./include/ibase.h + +FILE:ibase:SHARED:./include/iberror.h: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./include/iberror.h + +FILE:ibase:SHARED:./include/ib_util.h: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./include/ib_util.h + +FILE:ibase:SHARED:./include/interbase.ada: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./include/interbase.ada + +FILE:ibase:SHARED:./inetd.conf.isc: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./inetd.conf.isc + +FILE:ibase:SHARED:./install: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./install + +FILE:ibase:CLIENT:./interbase.log: +mode = 0666 +owner = root +group = sys +flags = +exportPath = ./interbase.log + +FILE:ibase:SHARED:./interbase.msg: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./interbase.msg + +FILE:ibase:SHARED:./ReleaseNotes.txt: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./ReleaseNotes.txt + +FILE:ibase:SHARED:./ReleaseNotes.html: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./ReleaseNotes.html + +DIR:ibase:SHARED:./intl: +mode = 0755 +owner = root +group = bin +flags = +exportPath = ./intl + +FILE:ibase:CLIENT:./isc4.gdb: +mode = 0666 +owner = root +group = bin +flags = +exportPath = ./isc4.gdb + +FILE:ibase:CLIENT:./isc_config: +mode = 0664 +owner = root +group = bin +flags = +exportPath = ./isc_config + +FILE:ibase:SHARED:./isc_ins_hlp.dat: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./isc_ins_hlp.dat + +DIR:ibase:SHARED:./lib: +mode = 0755 +owner = root +group = bin +flags = + +FILE:ibase:SHARED:./lib/gdsintl: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./lib/gdsintl + +FILE:ibase:SHARED:./lib/gds_pyxis.a: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./lib/gds_pyxis.a + +FILE:ibase:SHARED:./lib/gds.so.0: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./lib/gds.so.0 + +FILE:ibase:SHARED:./lib/gds.a: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./lib/gds.a + +FILE:ibase:SHARED:./lib/ib_udf: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./lib/ib_udf + +FILE:ibase:SHARED:./lib/ib_util.so: +mode = 0555 +owner = root +group = bin +flags = +exportPath = ./lib/ib_util.so + +FILE:ibase:SHARED:./services.isc: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./services.isc + +FILE:ibase:SHARED:./license.txt: +mode = 0444 +owner = root +group = bin +flags = +exportPath = ./license.txt diff --git a/src/makefiles/ibase.prd.sco b/src/makefiles/ibase.prd.sco new file mode 100644 index 0000000000..4eedb21a62 --- /dev/null +++ b/src/makefiles/ibase.prd.sco @@ -0,0 +1,22 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PROD:InterBase:ibase: +description = "InterBase(RDBMS)" +version = SI_V5.5 +packages = InterBase:ibase +required = InterBase:ibase +cmpntFiles = ibase.cmpnt diff --git a/src/makefiles/iclient.cmpnt.sco b/src/makefiles/iclient.cmpnt.sco new file mode 100644 index 0000000000..0615e4ee2c --- /dev/null +++ b/src/makefiles/iclient.cmpnt.sco @@ -0,0 +1,41 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +COMP:InterBase:iclient: +description = "iclient component" +version = SI_V1.5 +subpackages = iclient +required = iclient +dependencies = +distTreeRootSHARED = /usr/gds.sco6/custom/interclient +distTreeRootCLIENT = /usr/gds.sco6/custom/interclient +pkgFiles = iclient.pkg + +FILE_DEFAULT: +mode = $DEFAULT_FILE_MODE +owner = $DEFAULT_FILE_OWNER +group = $DEFAULT_FILE_GROUP + +DIR_DEFAULT: +mode = $DEFAULT_DIR_MODE +owner = $DEFAULT_DIR_OWNER +group = $DEFAULT_DIR_GROUP + +FIFO_DEFAULT: +mode = $DEFAULT_FIFO_MODE +owner = $DEFAULT_FIFO_OWNER +group = $DEFAULT_FIFO_GROUP diff --git a/src/makefiles/iclient.pkg.sco b/src/makefiles/iclient.pkg.sco new file mode 100644 index 0000000000..a9af1b8053 --- /dev/null +++ b/src/makefiles/iclient.pkg.sco @@ -0,0 +1,45 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PKG:SharedControl: +description = "iclient component description file" +distTreeRoot = /usr/gds.sco6/custom/interclient +distTreeRootSHARED = /usr/gds.sco6/custom/interclient +distTreeRootCLIENT = /usr/gds.sco6/custom/interclient + +DIR:SharedControl:SHARED:cntl: +mode = 0755 +owner = root +group = sys +flags = + +FILE:SharedControl:SHARED:cntl/ccs: +mode = 0755 +owner = root +group = sys +flags = + +PKG:iclient: +description = "InterClient" +dependencies = +distTreeRootSHARED = /usr/gds.sco6/custom/interclient +distTreeRootCLIENT = /usr/gds.sco6/custom/interclient + +FILE:iclient:SHARED:InterClient150_SI.tar: +mode = 0755 +owner = root +group = bin +flags = diff --git a/src/makefiles/iclient.prd.sco b/src/makefiles/iclient.prd.sco new file mode 100644 index 0000000000..d2c3263c4b --- /dev/null +++ b/src/makefiles/iclient.prd.sco @@ -0,0 +1,22 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PROD:InterBase:iclient: +description = "InterClient" +version = SI_V1.5 +packages = InterBase:iclient +required = InterBase:iclient +cmpntFiles = iclient.cmpnt diff --git a/src/makefiles/inetd.conf.apollo b/src/makefiles/inetd.conf.apollo new file mode 100644 index 0000000000..0cfaf55b45 --- /dev/null +++ b/src/makefiles/inetd.conf.apollo @@ -0,0 +1,17 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +gds_db stream tcp nowait root /interbase/com/gds_inet_server gds_inet_server -i diff --git a/src/makefiles/inetd.conf.psx b/src/makefiles/inetd.conf.psx new file mode 100644 index 0000000000..676df950f2 --- /dev/null +++ b/src/makefiles/inetd.conf.psx @@ -0,0 +1,20 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Borland International InterBase Database Server +# +gds_db stream tcp nowait root /usr/interbase/bin/gds_inet_srvr gds_inet_srvr diff --git a/src/makefiles/inetd.conf.ultrix b/src/makefiles/inetd.conf.ultrix new file mode 100644 index 0000000000..f246009bbb --- /dev/null +++ b/src/makefiles/inetd.conf.ultrix @@ -0,0 +1,20 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Borland International InterBase Database Server +# +gds_db stream tcp nowait /usr/interbase/bin/gds_inet_server gds_inet_server diff --git a/src/makefiles/inetd.conf.unx b/src/makefiles/inetd.conf.unx new file mode 100644 index 0000000000..a9f43d6969 --- /dev/null +++ b/src/makefiles/inetd.conf.unx @@ -0,0 +1,20 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Borland International InterBase Database Server +# +gds_db stream tcp nowait root /usr/interbase/bin/gds_inet_server gds_inet_server diff --git a/src/makefiles/init.intrbase b/src/makefiles/init.intrbase new file mode 100644 index 0000000000..d78bbb829f --- /dev/null +++ b/src/makefiles/init.intrbase @@ -0,0 +1,163 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +: +#! /bin/sh +#BEGIN_CM_SCRIPTLIB +# +# Standard CM script function library +# baselib v1.2 +# + +PATH=/bin:/usr/bin:/etc:. +LANG=english_us.ascii # Used when scripts are internationalized. +export PATH LANG + +TMPFILE=/tmp/tmp$$ # Define a temporary file for use if necessary. +TMPFILE1=/tmp/tmp1$$ # Define a temporary file for use if necessary. +TMPFILE2=/tmp/tmp2$$ # Define a temporary file for use if necessary. + +# Define return values. +: ${OK=0} ${FAIL=1} ${STOP=10} + +# +#query the user for a responce. +#a simpler system than prompt, use prompt for +#more sophisticated uses. +#q or Q returns fail, anything else return ok. +#ARGS: , string to print when asking for a responce +#$OK means expression has been resolved or answer is given +#$FAIL means quit has been selected +# +respond() { + while echo "\n${*}\nRespond or enter q to quit: \c" + do read answer + case $answer in + Q|q) return $FAIL ;; + "") # on a return key return $OK + answer="RETURNKEY" + return $OK ;; + *) # on anything else return $OK + return $OK ;; + esac + done + return $OK +} + +# +# Standard CM script function library +# configlib V1.0 +# Contains: baselib, specificlib +# + +# +# Standard CM script function library +# specificlib v1.4 +# contains: baselib +# + +#END_CM_SCRIPTLIB + +#MAIN + +echo "running $0 init script" + +# Save a support question or two + +if [ -f /usr/lib/libsocket.a ] +then +: # OK, we can do development with sockets +else +echo "Warning: Socket libraries are not installed. You cannot do development" +echo " with interbase without a TCP/IP development system installed." +fi + +# 3.2v4 or better install +# +# Symlink standard include file to /usr/include +# +rm -f /usr/include/gds.h /usr/include/perf.h /usr/include/ibase.h +rm -f /usr/lib/libgds.a /usr/lib/libgds_b.a /usr/lib/gds_pipe.a +rm -f /usr/lib/gds_inet_svr.a /usr/lib/libgds_s.a /usr/lib/libgdsf_s.a +rm -f /shlib/libgds_s /shlib/libgdsf_s /usr/lib/libgds_pyxis.a +rm -f /usr/lib/libgds_pipe.a + +echo "Creating symbolic links to Interbase include files in /usr/include..." + +ln -s /usr/interbase/include/gds.h /usr/include/gds.h +ln -s /usr/interbase/include/ibase.h /usr/include/ibase.h +ln -s /usr/interbase/include/perf.h /usr/include/perf.h +# +# symlink pipe and full libraries to /lib/386 and re-initialize table of contents +# +echo "Creating symbolic links to Interbase libraries in /usr/lib..." + +ln -s /usr/interbase/lib/gds.a /usr/lib/libgds.a +ln -s /usr/interbase/lib/gds_b.a /usr/lib/libgds_b.a +ln -s /usr/interbase/lib/gds_pipe.a /usr/lib/libgds_pipe.a +ln -s /usr/interbase/lib/gds_pyxis.a /usr/lib/libgds_pyxis.a +ln -s /usr/interbase/lib/gds_inet_svr.a /usr/lib/gds_inet_svr.a +ln -s /usr/interbase/lib/gds_s.a /usr/lib/libgds_s.a +ln -s /usr/interbase/lib/gdsf_s.a /usr/lib/libgdsf_s.a +# +echo "Creating symbolic links to Interbase shared libraries in /shlib..." + +ln -s /usr/interbase/lib/gds_s /shlib/libgds_s +ln -s /usr/interbase/lib/gdsf_s /shlib/libgdsf_s + +# +# License interbase +# +# Currently, we don't use iscinstall, but that may change +# /usr/interbase/bin/iscinstall + +# +# Protect examples and QLI help database +# + +cd /usr/interbase +chmod 666 isc4.gdb help/help.gdb examples/*/*.gdb + +# +# If TCP is installed, update both services and servers databases +# + +if [ -f /etc/services ] ; then + grep -s gds_db /etc/services > /dev/null 2>&1 + if test $? != 0 ; then + cat /etc/services services.isc > services + mv services /etc/services + chmod u=rw,go=r /etc/services + fi +fi +if [ -f /etc/inetd.conf ] ; then + grep -s gds_db /etc/inetd.conf > /dev/null 2>&1 + if test $? != 0 ; then + cat /etc/inetd.conf inetd.conf.isc > inetd.conf + mv inetd.conf /etc/inetd.conf + chmod u=rw,go=r /etc/inetd.conf + + # Kill -HUP inet daemon (to restart it for the new server) + # (if inetd is not running, kill -1 does nothing) + + ps -ead | grep inetd | while read pid rest + do + kill -1 $pid + done + fi +fi + +exit 0 diff --git a/src/makefiles/install.apollo b/src/makefiles/install.apollo new file mode 100644 index 0000000000..df3080b2d4 --- /dev/null +++ b/src/makefiles/install.apollo @@ -0,0 +1,228 @@ +#!/etc/sys_sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# InterBase Installation Procedure (sr10) +# +# copyright (c) 1986, 1991 Interbase Software Corporation + +echo +echo 'Installing InterBase (Version AX-V4.0A)' +echo + +if test $USER != 'root' +then + echo ' ***You must be logged on as "root" to install InterBase. ***' + echo + exit 1 +fi + +echo 'Enter target node (e.g. //UPDATE_ME): \c' +read target + +if test $target +then + echo 'Installation install_types available are:' + echo ' CTAPE Install software from cartridge tape distribution kit' + echo ' NET Install software from another network node' + echo + echo 'Enter installation install_type (e.g. CTAPE, NET): \c' + read install_type + + case $install_type in + ctape|CTAPE) device=ct ;; + net|NET) device=net ;; + *) echo $install_type not supported + exit 1 ;; + esac + + case $device in + f0|m0|ct) + + # create or recreate the interbase tree + + cd $target + /com/rbak -dev $device -f 2 -all -ms -l -force -du;; + + net) + echo 'Enter source node (e.g. //SOURCE_NODE) : \c' + read source + + if test ! -d $target/interbase + then mkdir $target/interbase + fi + if test ! -d $target/interbase/examples + then mkdir $target/interbase/examples + fi + if test ! -d $target/interbase/com + then mkdir $target/interbase/com + fi + if test ! -d $target/interbase/lib + then mkdir $target/interbase/lib + fi + if test ! -d $target/interbase/include + then mkdir $target/interbase/include + fi + if test ! -d $target/interbase/intl + then mkdir $target/interbase/intl + fi + if test ! -d $target/interbase/help + then mkdir $target/interbase/help + fi + + cp -f -o $source/interbase/install $target/interbase + cp -f -o $source/interbase/services.isc $target/interbase + cp -f -o $source/interbase/sys.conf.isc $target/interbase + + cp -f -o $source/interbase/inetd.conf.isc $target/interbase + cp -f -o $source/interbase/interbase.msg $target/interbase + cp -f -o $source/interbase/isc_ins_hlp.dat $target/interbase + + cp -f -o $source/interbase/RELNOT* $target/interbase + cp -f -o $source/interbase/READ_ME $target/interbase + + cp -f -o $source/interbase/examples/* $target/interbase/examples + cp -f -o $source/interbase/help/* $target/interbase/help + cp -f -o $source/interbase/include/* $target/interbase/include + cp -f -o $source/interbase/intl/* $target/interbase/intl + cp -f -o $source/interbase/lib/* $target/interbase/lib + + for file in fred gbak gcsu gdef gds_archive gds_cserver \ + gds_inet_server gds_lock_print gds_relay \ + gds_server gfix gjrn gpre grst gstat qli \ + iscinstall gsec isc.gbak journal.gbak \ + gds_wal_writer + do cp -f -o $source/interbase/com/$file $target/interbase/com + done;; + esac + + # Set File permissions + + cd $target/interbase + chown root \ + . \ + com examples help include intl lib \ + com/* \ + examples/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + inetd.conf.isc \ + install \ + interbase.msg \ + services.isc \ + isc_ins_hlp.dat \ + sys.conf.isc + + chgrp bin \ + . \ + com examples help include intl lib \ + com/* \ + examples/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + inetd.conf.isc \ + install \ + interbase.msg \ + services.isc \ + isc_ins_hlp.dat \ + sys.conf.isc + + chmod uog=rx install com/* + + chmod uog=r \ + examples/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + inetd.conf.isc \ + interbase.msg \ + services.isc \ + isc_ins_hlp.dat \ + sys.conf.isc + + chmod uog=rwx . help + + chmod u=rwx,go=rx com examples include intl lib + + chmod u+s,g+s \ + com/gds_relay \ + com/gds_inet_server + + if [ -f lock_header_template ]; then + chown root \ + lock_header_template + chgrp bin \ + lock_header_template + chmod uog=r \ + lock_header_template + fi + + chmod uog=rx \ + lib/gdslib \ + lib/pyxislib \ + lib/gdsintl \ + lib/bridge5 + + # Protect security database + + inlib $target/interbase/lib/gdslib + cd $target/interbase/com + chmod uog=rw ../isc.gdb + + # Protect help database + + cd $target/interbase/help + chmod uog=rw help.gdb + + # Protect sample databases + + cd $target/interbase/examples/v3 + chmod uog=rw atlas.gdb emp.gdb + cd $target/interbase/examples/v4 + chmod uog=rw employee.gdb + + if test -f $target/etc/services + then cd $target/interbase + grep -s gds_db $target/etc/services + if test $? != 0 + then cat services.isc >> $target/etc/services + fi + fi + + if test -f $target/sys/node_data/etc/sys.conf + then cd $target/interbase + grep -s gdslib $target/sys/node_data/etc/sys.conf + if test $? != 0 + then cat sys.conf.isc >> $target/sys/node_data/etc/sys.conf + fi + fi + + if test -f $target/sys/node_data/etc/inetd.conf + then cd $target/interbase + grep -s gds_db $target/sys/node_data/etc/inetd.conf + if test $? != 0 + then cat inetd.conf.isc >> $target/sys/node_data/etc/inetd.conf + fi + fi + echo + echo Installation complete +fi diff --git a/src/makefiles/install.ksh b/src/makefiles/install.ksh new file mode 100644 index 0000000000..64f0d1db54 --- /dev/null +++ b/src/makefiles/install.ksh @@ -0,0 +1,532 @@ +#!/usr/bin/ksh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Install script for UNIX InterBase software +# +# Copyright (c)1998,1999, InterBase Software Corporation +# All Rights Reserved +# +############################################################################ + +PATH=$PATH:/usr/ucb:/usr/bsd:/bin:/usr/bin +export PATH +SHLIB_PATH=/usr/lib +export SHLIB_PATH + +LogFile="ibinstall.log" +TmpLogFile="/tmp/$LogFile" + +DefaultInstDir="/opt" +IBSymLink="/usr/interbase" +SUPERSERVER="" + +#Note: TarFile must contain the absolute path name +TarFile="" + +ExitError() +{ +echo "\n*** Install completed with errors ***" | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 1 +} + +ExitSuccess() +{ +echo "\nInstall completed successfully" | tee -a $INTERBASE/$LogFile +echo "Install log can be found at $INTERBASE/$LogFile" +exit 0 +} + +Quit() +{ +echo "\nInstall is not complete." | tee -a $TmpLogFile +echo "You may run the install at a later time to complete the installation." | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 2 +} + +CheckInstallDir() +{ +if [ ! -z "$1" ]; then + if [ ! -d "$1" ]; then + while true; do + echo "\nDirectory \"$IBINSTALL\" does not exist." | tee -a $TmpLogFile + echo "Do you want to create it now? (default: y) [y, n, q] : \c" | tee -a $TmpLogFile + read response + echo "$response" >> $TmpLogFile + case $response in + y|Y|yes|Yes|YES|"" ) + mkdir -p $IBINSTALL + echo "\nmkdir -p $IBINSTALL" >> $TmpLogFile + break;; + n|N|no|NO|No ) + IBINSTALL="" + break;; + q|Q|quit|Quit|QUIT ) + Quit;; + * ) + echo "\nERROR: Invalid response, expected \"y\", \"n\" or \"q\"" | tee -a $TmpLogFile + ;; + esac + done + else + if [ -d "$1/interbase" ]; then + while true; do + echo "\nDirectory \"$IBINSTALL/interbase\" already exists." | tee -a $TmpLogFile + echo "Do you want to continue? (default: n) [y, n, q] : \c" | tee -a $TmpLogFile + read response + echo "$response" >> $TmpLogFile + case $response in + y|Y|yes|Yes|YES ) + break;; + n|N|no|NO|No|"" ) + IBINSTALL="" + break;; + q|Q|quit|Quit|QUIT ) + Quit;; + * ) + echo "\nERROR: Invalid response, expected \"y\", \"n\" or \"q\"" | tee -a $TmpLogFile + ;; + esac + done + fi + fi +fi +} + +GetInstallDir() +{ + +while [ -z "$IBINSTALL" ] ; do + echo "\nEnter the absolute path name of the install directory" | tee -a $TmpLogFile + echo "[$DefaultInstDir] : \c" | tee -a $TmpLogFile + read inst_dir + echo "$inst_dir" >> $TmpLogFile + case $inst_dir in + "" ) + IBINSTALL="$DefaultInstDir";; + /* ) + IBINSTALL="$inst_dir";; + * ) + echo "\nERROR: The specified pathname \"$inst_dir\" is not the absolute." | tee -a $TmpLogFile + echo " Please try again." | tee -a $TmpLogFile + continue;; + esac + + CheckInstallDir $IBINSTALL + if [ -z "$IBINSTALL" ]; then + continue + fi +done +} + +# +# Main entry +# + +if [ -f $TmpLogFile ]; then + mv $TmpLogFile $TmpLogFile.old + echo "Old $TmpLogFile moved to $TmpLogFile.old\n" >> $TmpLogFile +fi +echo "***********************************************" >> $TmpLogFile +echo "InterBase Install in progress" >> $TmpLogFile +echo "`date`" >> $TmpLogFile +echo "***********************************************" >> $TmpLogFile + +if [ "`whoami`" != "root" ]; then + echo "ERROR: No permissions to perform operation." | tee -a $TmpLogFile + echo " Log in as root and try again." | tee -a $TmpLogFile + ExitError +fi + +if [ -f /bin/ps ]; then + PS="/bin/ps -ef" +else + if [ -f /usr/ucb/ps ]; then + PS="/usr/ucb/ps -ax" + else + PS="ps -ef" + fi +fi + +ibserver=`$PS|grep ibserver|grep -c -v grep` +gds_inet_server=`$PS|grep gds_inet_server|grep -c -v grep` + +if [ $ibserver -ne 0 -o $gds_inet_server -ne 0 ]; then + echo "ERROR: Detected another Interbase server running on the system." | tee -a $TmpLogFile + echo " Shutdown the InterBase server and try again." | tee -a $TmpLogFile + ExitError +fi + +if [ $# -gt 2 ]; then + echo "ERROR: too many parameters." | tee -a $TmpLogFile + echo "Usage: $0 [-c | -s] AbsolutePathOfTheTarFile" | tee -a $TmpLogFile + ExitError +fi + +for i in $1 $2 ; do + case $i in + -c | -C ) + SUPERSERVER="";; + -s | -S ) + SUPERSERVER="SUPERSERVER";; + * ) + TarFile="$i";; + esac +done + +if [ -z "$TarFile" ]; then + echo "ERROR: Syntax error, expected archive file." | tee -a $TmpLogFile + echo "Usage: $0 [-c | -s] AbsolutePathOfTheTarFile" | tee -a $TmpLogFile + ExitError +fi + +if [ -z "$IBINSTALL" ]; then + GetInstallDir +else + case "$IBINSTALL" in + /* ) + CheckInstallDir $IBINSTALL + if [ -z "$IBINSTALL" ]; then + GetInstallDir + fi + ;; + * ) + echo "ERROR: The specified pathname \"$IBINSTALL\" is not the absolute." + IBINSTALL="" + GetInstallDir;; + esac +fi + +cd $IBINSTALL +if [ ! -f $TarFile ]; then + echo "ERROR: File \"$TarFile\" not found." | tee -a $TmpLogFile + ExitError +fi + +INTERBASE="$IBINSTALL/interbase" + +# +# Extract files from a tar archive +# +echo "----------------------------\n" >> $TmpLogFile +echo "\nExtracting files" >> $TmpLogFile +echo "\nExtracting files... \c" +tar vxf $TarFile >> $TmpLogFile 2>&1 +if [ $? -ne 0 ]; then + echo "ERROR: Can't extract the files from the archive." | tee -a $TmpLogFile + ExitError +fi +echo "Done" +echo "----------------------------\n" >> $TmpLogFile + +# +# If no switches were specified then set SUPERSERVER depending on the +# content of the tar file +# +if [ $# -ne 2 ]; then + if [ -f $INTERBASE/bin/ibserver ]; then + SUPERSERVER="SUPERSERVER" + else + SUPERSERVER="" + fi +fi + +# +# Make sure the top level ($INTERBASE) is 777 +# +echo "Updating access permissions... \c" +echo "Updating access permissions" >> $TmpLogFile +chmod 777 $INTERBASE +echo "chmod 777 $INTERBASE" >> $TmpLogFile + +# +# Protect security, examples and QLI help databases +# +if [ "$SUPERSERVER" ]; then + chmod uog=rw $INTERBASE/isc4.gdb + chmod uog=rw $INTERBASE/help/help.gdb + chmod uog=rw $INTERBASE/examples/employee.gdb + chmod uog=rw $INTERBASE/examples/intlemp.gdb + chmod 4755 $INTERBASE/bin/gstat + echo "chmod uog=rw $INTERBASE/isc4.gdb" >> $TmpLogFile + echo "chmod uog=rw $INTERBASE/help/help.gdb" >> $TmpLogFile + echo "chmod uog=rw $INTERBASE/examples/employee.gdb" >> $TmpLogFile + echo "chmod uog=rw $INTERBASE/examples/intlemp.gdb" >> $TmpLogFile + echo "chmod 4755 $INTERBASE/bin/gstat" >> $TmpLogFile + +fi +echo "Done" +echo "----------------------------\n" >> $TmpLogFile + + +# +# Create the symbolic links +# +echo "Creating symbolic links... \c" +echo "Creating symbolic links" >> $TmpLogFile + +if [ -f $INTERBASE/include/gds.h ]; then + rm -f /usr/include/gds.h + echo "rm -f /usr/include/gds.h" >> $TmpLogFile + ln -s $IBSymLink/include/gds.h /usr/include/gds.h + echo "ln -s $IBSymLink/include/gds.h /usr/include/gds.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/ibase.h ]; then + rm -f /usr/include/ibase.h + echo "rm -f /usr/include/ibase.h" >> $TmpLogFile + ln -s $IBSymLink/include/ibase.h /usr/include/ibase.h + echo "ln -s $IBSymLink/include/ibase.h /usr/include/ibase.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/iberror.h ]; then + rm -f /usr/include/iberror.h + echo "rm -f /usr/include/iberror.h" >> $TmpLogFile + ln -s $IBSymLink/include/iberror.h /usr/include/iberror.h + echo "ln -s $IBSymLink/include/iberror.h /usr/include/iberror.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/ib_util.h ]; then + rm -f /usr/include/ib_util.h + echo "rm -f /usr/include/ib_util.h" >> $TmpLogFile + ln -s $IBSymLink/include/ib_util.h /usr/include/ib_util.h + echo "ln -s $IBSymLink/include/ib_util.h /usr/include/ib_util.h" >> $TmpLogFile +fi + +if [ -f $INTERBASE/lib//gds_b.a ]; then + rm -f /usr/lib/libgds_b.a + echo "rm -f /usr/lib/libgds_b.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gds_b.a /usr/lib/libgds_b.a + echo "ln -s $IBSymLink/lib/gds_b.a /usr/lib/libgds_b.a" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gds.a ]; then + rm -f /usr/lib/libgds.a + echo "rm -f /usr/lib/libgds.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gds.a /usr/lib/libgds.a + echo "ln -s $IBSymLink/lib/gds.a /usr/lib/libgds.a" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gds.sl ]; then + rm -f /usr/lib/libgds.sl + echo "rm -f /usr/lib/libgds.sl" >> $TmpLogFile + ln -s $IBSymLink/lib/gds.sl /usr/lib/libgds.sl + echo "ln -s $IBSymLink/lib/gds.sl /usr/lib/libgds.sl" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gdsshr.a ]; then + rm -f /usr/lib/libgdsshr.a + echo "rm -f /usr/lib/libgdsshr.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsshr.a /usr/lib/libgdsshr.a + echo "ln -s $IBSymLink/lib/gdsshr.a /usr/lib/libgdsshr.a" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gds_s.a ]; then + rm -f /usr/lib/libgds_s + echo "rm -f /usr/lib/libgds_s" >> $TmpLogFile + rm -f /usr/lib/libgds_s.a + echo "rm -f /usr/lib/libgds_s.a" >> $TmpLogFile + rm -f /usr/lib/libgdsf_s + echo "rm -f /usr/lib/libgdsf_s" >> $TmpLogFile + rm -f /usr/lib/libgdsf_s.a + echo "rm -f /usr/lib/libgdsf_s.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gds_s /usr/lib/libgds_s + echo "ln -s $IBSymLink/lib/gds_s /usr/lib/libgds_s" >> $TmpLogFile + ln -s $IBSymLink/lib/gds_s.a /usr/lib/libgds_s.a + echo "ln -s $IBSymLink/lib/gds_s.a /usr/lib/libgds_s.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsf_s /usr/lib/libgdsf_s + echo "ln -s $IBSymLink/lib/gdsf_s /usr/lib/libgdsf_s" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsf_s.a /usr/lib/libgdsf_s.a + echo "ln -s $IBSymLink/lib/gdsf_s.a /usr/lib/libgdsf_s.a" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gds.so.0 ]; then + if [ -d /usr/shlib ]; then + rm -f /usr/shlib/libgds.so + echo "rm -f /usr/shlib/libgds.so" >> $TmpLogFile + rm -f /usr/shlib/libgds.so.0 + echo "rm -f /usr/shlib/libgds.so.0" >> $TmpLogFile + ln -s $IBSymLink/lib/gds.so.0 /usr/shlib/libgds.so.0 + echo "ln -s $IBSymLink/lib/gds.so.0 /usr/shlib/libgds.so.0" >> $TmpLogFile + ln -s /usr/shlib/libgds.so.0 /usr/shlib/libgds.so + echo "ln -s /usr/shlib/libgds.so.0 /usr/shlib/libgds.so" >> $TmpLogFile + else + rm -f /usr/lib/libgds.so + echo "rm -f /usr/lib/libgds.so" >> $TmpLogFile + rm -f /usr/lib/libgds.so.0 + echo "rm -f /usr/lib/libgds.so.0" >> $TmpLogFile + ln -s $IBSymLink/lib/gds.so.0 /usr/lib/libgds.so.0 + echo "ln -s $IBSymLink/lib/gds.so.0 /usr/lib/libgds.so.0" >> $TmpLogFile + ln -s /usr/lib/libgds.so.0 /usr/lib/libgds.so + echo "ln -s /usr/lib/libgds.so.0 /usr/lib/libgds.so" >> $TmpLogFile + fi +fi +if [ -f $INTERBASE/lib/gdsmt.so.0 ]; then + rm -f /usr/lib/libgdsmt.so + echo "rm -f /usr/lib/libgdsmt.so" >> $TmpLogFile + rm -f /usr/lib/libgdsmt.so.0 + echo "rm -f /usr/lib/libgdsmt.so.0" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsmt.so.0 /usr/lib/libgdsmt.so.0 + echo "ln -s $IBSymLink/lib/gdsmt.so.0 /usr/lib/libgdsmt.so.0" >> $TmpLogFile + ln -s /usr/lib/libgdsmt.so.0 /usr/lib/libgdsmt.so + echo "ln -s /usr/lib/libgdsmt.so.0 /usr/lib/libgdsmt.so" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gdsf.so ]; then + rm -f /usr/lib/libgdsf.so + echo "rm -f /usr/lib/libgdsf.so" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsf.so /usr/lib/libgdsf.so + echo "ln -s $IBSymLink/lib/gdsf.so /usr/lib/libgdsf.so" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gds_pyxis.a ]; then + rm -f /usr/lib/libgds_pyxis.a + echo "rm -f /usr/lib/libgds_pyxis.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gds_pyxis.a /usr/lib/libgds_pyxis.a + echo "ln -s $IBSymLink/lib/gds_pyxis.a /usr/lib/libgds_pyxis.a" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/ib_util.sl ]; then + rm -f /usr/lib/libib_util.sl + echo "rm -f /usr/lib/libib_util.sl" >> $TmpLogFile + ln -s $IBSymLink/lib/ib_util.sl /usr/lib/libib_util.sl + echo "ln -s $IBSymLink/lib/ib_util.sl /usr/lib/libib_util.sl" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/ib_util.so ]; then + rm -f /usr/lib/libib_util.so + echo "rm -f /usr/lib/libib_util.so" >> $TmpLogFile + ln -s $IBSymLink/lib/ib_util.so /usr/lib/libib_util.so + echo "ln -s $IBSymLink/lib/ib_util.so /usr/lib/libib_util.so" >> $TmpLogFile +fi + +echo "Done" +echo "----------------------------\n" >> $TmpLogFile + +# +# If TCP is installed, update both services and servers databases +# +if [ "$SUPERSERVER" ]; then + echo "Updating service name database... \c" + echo "Updating service name database" >> $TmpLogFile + if [ -f /etc/services ]; then + grep -q -s gds_db /etc/services + if test $? != 0 ; then + cat /etc/services $INTERBASE/services.isc > services + echo "cat /etc/services $INTERBASE/services.isc > services" >> $TmpLogFile + mv services /etc/services + echo "mv services /etc/services" >> $TmpLogFile + fi + fi + echo "Done" + echo "----------------------------\n" >> $TmpLogFile + echo "Updating configuration file for inetd... \c" + echo "Updating configuration file for inetd" >> $TmpLogFile + if [ -f /etc/inetd.conf ]; then + # Remove gds_db service. We do not want gds_inet_server to be invoked + cat /etc/inetd.conf | grep -v gds_db > inetd.conf + echo "cat /etc/inetd.conf | grep -v gds_db > inetd.conf" >> $TmpLogFile + mv inetd.conf /etc/inetd.conf + echo "mv inetd.conf /etc/inetd.conf" >> $TmpLogFile + fi + if [ -f /usr/etc/inetd.conf ]; then + # Remove gds_db service. We do not want gds_inet_server to be invoked + cat /usr/etc/inetd.conf | grep -v gds_db > inetd.conf + echo "cat /usr/etc/inetd.conf | grep -v gds_db > inetd.conf" >> $TmpLogFile + mv inetd.conf /usr/etc/inetd.conf + echo "mv inetd.conf /usr/etc/inetd.conf" >> $TmpLogFile + fi + echo "Done" + echo "----------------------------\n" >> $TmpLogFile +fi + +# +# create the ibmgr shell script +# +if [ "$SUPERSERVER" ]; then +echo "Creating the ibmgr shell script... \c" +echo "Creating the ibmgr shell script" >> $TmpLogFile +cat > $INTERBASE/bin/ibmgr << EOF +#!/bin/sh +INTERBASE=$INTERBASE +export INTERBASE +exec $INTERBASE/bin/ibmgr.bin \$@ +EOF + +chmod +x $INTERBASE/bin/ibmgr +echo "Done" +echo "----------------------------\n" >> $TmpLogFile +fi + +# +# Create the license file +# +if [ "$SUPERSERVER" ]; then +INTERBASE="$INTERBASE"; export INTERBASE +echo "Creating the license file" >> $TmpLogFile +echo "\nPlease enter the license certificate id: \c" | tee -a $TmpLogFile +read id +echo "$id" >> $TmpLogFile +case "$id" in + "eval" | "" ) + echo "Creating a 90-day evaluation license..." | tee -a $TmpLogFile + $INTERBASE/bin/iblicense -eval + chmod uog=r $INTERBASE/ib_license.dat + ;; + * ) + echo "Please enter the license certificate key: \c" | tee -a $TmpLogFile + read key + echo "$key" >> $TmpLogFile + if [ -z "$key" ] ; then + echo "We need the license key which matches your license id." | tee -a $TmpLogFile + echo "Please enter the license certificate key: \c" | tee -a $TmpLogFile + read key + echo "$key" >> $TmpLogFile + fi + if [ ! -z "$key" ] ; then + echo "Creating the license..." | tee -a $TmpLogFile + $INTERBASE/bin/iblicense -add -id $id -key $key + if [ $? -eq 0 ]; then + chmod uog=r $INTERBASE/ib_license.dat + else + ExitError + fi + else + echo "ERROR: No license created. Please see the release notes" | tee -a $TmpLogFile + echo " to create a license file." | tee -a $TmpLogFile + ExitError + fi + ;; +esac +fi +# +# Create /usr/interbase symbolic link +# + +if [ "$INTERBASE" != "$IBSymLink" ]; then + echo "Creating /usr/interbase symbolic link... \c" + echo "Creating /usr/interbase symbolic link" >> $TmpLogFile + + if [ -a "$IBSymLink" -o -L "$IBSymLink" ]; then + mv $IBSymLink ${IBSymLink}.$$ + echo "WARNING: Old \"$IBSymLink\" moved to \"${IBSymLink}.$$\"" | tee -a $TmpLogFile + fi + + ln -s $INTERBASE $IBSymLink + echo "ln -s $INTERBASE $IBSymLink" >> $TmpLogFile + echo "Done" + echo "----------------------------\n" >> $TmpLogFile +fi +# +# Move the log file to the $INTERBASE +# +if [ -f $INTERBASE/$LogFile ]; then + cp $INTERBASE/$LogFile $INTERBASE/$LogFile.old + echo "Old $INTERBASE/$LogFile moved to $INTERBASE/$LogFile.old" >> $TmpLogFile +fi +mv $TmpLogFile $INTERBASE/$LogFile +ExitSuccess diff --git a/src/makefiles/install.nolink b/src/makefiles/install.nolink new file mode 100644 index 0000000000..f316ef7f5d --- /dev/null +++ b/src/makefiles/install.nolink @@ -0,0 +1,140 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +#! /bin/sh +# +# /usr/interbase/install -- Install InterBase +# +cd interbase +CD=`pwd` +if [ -f /usr/interbase ]; then + echo /usr/interbase is not a directory + echo InterBase installation failed + exit 1 +fi +if [ -d /usr/interbase ] ; then + cd /usr/interbase + TARGET=`pwd` + if [ $CD != $TARGET ]; then + echo invalid installation directory $CD + echo InterBase installation failed + exit 1 + fi +fi +# +# run our set_prot script, since the +# DELTA box doesn't seem able to carry permissions +# across the tar process +# +cd .. +chmod uog=xrw interbase +chown root interbase +chgrp bin interbase +cd interbase +chown root install +chgrp bin install +chmod uog=rx install +chown root \ + bin examples help include lib \ + bin/* \ + examples/* \ + help/* \ + include/* \ + lib/* \ + services.isc \ + inetd.conf.isc \ + interbase.msg \ + isc_ins.hlp \ + isc_lic.dat \ + lock_header_t + +chgrp bin \ + bin examples help include lib \ + bin/* \ + examples/* \ + help/* \ + include/* \ + lib/* \ + services.isc \ + inetd.conf.isc \ + interbase.msg \ + isc_ins.hlp \ + isc_lic.dat \ + lock_header_t + +chmod uog=rx bin/* + +chmod uog=r \ + examples/* \ + help/help.gbak \ + help/help.gdb \ + include/* \ + lib/* \ + services.isc \ + inetd.conf.isc \ + interbase.msg \ + isc_ins.hlp \ + lock_header_t + +chmod u=rw,go=r isc_lic.dat + +chmod u=xrw,go=rx help examples bin include lib +chmod u+s,g+s bin/gds_inet_srvr \ + bin/gds_relay \ + bin/gds_drop +set -x +# +# Move standard include file to /usr/include +# +cp /usr/interbase/include/gds.h /usr/include/gds.h +cp /usr/interbase/include/perf.h /usr/include/perf.h +cp /usr/interbase/include/ibase.h /usr/include/ibase.h +# +# Move pipe and full libraries to /lib/386 and re-initialize table of contents +# +cp /usr/interbase/lib/gds.a /usr/lib/libgds.a +if [ -f /usr/interbase/lib/gds_b.a ]; then + cp /usr/interbase/lib/gds_b.a /usr/lib/libgds_b.a +fi +cp /usr/interbase/lib/gds_pipe.a /usr/lib/gds_pipe.a +cp /usr/interbase/lib/gds_inet_svr.a /usr/lib/gds_inet_svr.a +# +# Protect examples and QLI help database +# +chmod uog=rw isc.gdb +chmod uog=rw help/help.gdb +chmod uog=rw examples/v3/atlas.gdb +chmod uog=rw examples/v3/emp.gdb +chmod uog=rw examples/v4/employee.gdb +# +# If TCP is installed, update both services and servers databases +# +if [ -f /etc/services ] ; then + grep -s gds_db /etc/services + if test $? != 0 ; then + cat /etc/services services.isc > services + mv services /etc/services + chmod u=rw,go=r /etc/services + fi +fi +if [ -f /etc/inetd.conf ] ; then + grep -s gds_db /etc/inetd.conf + if test $? != 0 ; then + cat /etc/inetd.conf inetd.conf.isc > inetd.conf + mv inetd.conf /etc/inetd.conf + chmod u=rw,go=r /etc/inetd.conf + fi +fi diff --git a/src/makefiles/install.sun4 b/src/makefiles/install.sun4 new file mode 100644 index 0000000000..c459deaa2f --- /dev/null +++ b/src/makefiles/install.sun4 @@ -0,0 +1,777 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +#install script for suns + +#set variables (Make sure VERSION and TOTFLOPS (total number of floppies) is correct) +VERSION=I4.1A +TOTFLOPS=4 +CD=`pwd` +SERVER=`hostname` +INTERBASE=interbase +TAPE_PREFIX="" +PATH=/bin:/usr/bin:/usr/ucb:/etc +export PATH +ARCH=`arch` +DD="dd" +MT="mt" +TAR="tar" +BAR="bar" +MV="mv -f" +TAPE_LOC="" +REMOTE_HOST="" +REMOTE=0 +DEFAULT=0 +DEV_SPEC=0 +NEED_MEDIA=TRUE + +# +#===================Start of script============================ +# +echo -n " + + + InterBase Installation of $VERSION + +Use this script to install InterBase on either the $ARCH server $SERVER +or one of its clients. You must have superuser privileges. + +Perform the installation from: + + o the server node for all nodes + o the server node first and then for each client node + +If you install for a client node, you must: + + o know the name of the client node + o be able to execute a remote shell on the client node when + logged in on the server + +If you install InterBase on a client that differs in architecture from its +server, you must know the name of the partition on the server mounted as /usr. + +Answer each prompt with the appropriate information or press Return to use +the default values that appear in brackets [ ]. + +Continue with the installation? [y]: " +read ANSWER + +if [ "$ANSWER" = "" ] + then + ANSWER=y +fi + +if [ $ANSWER != "y" -a $ANSWER != "Y" ] + then + echo + echo "Exiting..." + echo + exit +fi + +#make sure they are really root +if [ `whoami` != "root" ] + then + echo + echo "You must be root to perform this installation." + echo "Exiting..." + echo + exit +fi + +# and that they are installing from a server machine +# note that this does not catch diskful client installations +grep -s '/dev' /etc/mtab +if [ $? != 0 ] # aha! They don't do any local mounts, so are client NOT server + then + echo + echo "You must perform this installation from the server that boots $SERVER." + echo "Exiting..." + echo + exit +fi + +# have now checked as best as possible that they are doing stuff right, so continue... + +#get client/server info, link directory info +#exit on bad server partition directory, +#exit on bad rsh-to-client communication +while : + do + echo + echo "Is this installation for the server $SERVER, or for one of its clients?" + echo -n "Enter S if for $SERVER, C if for a client [S]: " + read TYPE + case $TYPE in + C|c) + SERVER_ARCH=`arch` + echo + echo -n "Enter the node name of the client: " + read CLIENT + ARCH=`rsh $CLIENT arch` + if [ $? = 1 ] + then + echo + echo "Could not reach $CLIENT through a remote shell to verify machine type." + echo "Exiting..." + echo + exit + fi + + # Make sure server has already been installed for homogenous client + if [ $ARCH = $SERVER_ARCH ] + then + if [ ! -h /usr/interbase ] # server's /usr/interbase must be link + then + echo + echo "$SERVER does not have InterBase installed." + echo "Install $SERVER before rerunning installation for $CLIENT." + echo "Exiting..." + echo + exit + elif [ ! -f /usr/interbase/bin/gds_inet_server ] + # make sure that executables are visible + then + echo + echo "InterBase improperly installed on $SERVER." + echo "Please reinstall $SERVER." + echo "Exiting..." + echo + exit + else + joe=0 + fi # end /usr/interbase is link + fi # end if homogenous client + + + #Let user know what we are doing + echo + echo "Updating network files on $CLIENT..." + echo + + #put the network update routine on the client + echo ' + if [ -f /etc/services ] ; then + grep -s gds_db /etc/services + if [ $? != 0 ] ; then + cat /etc/services /usr/interbase/services.isc > /tmp/services + mv /tmp/services /etc/services + fi + fi + if [ -f /etc/servers ] ; then + grep -s gds_db /etc/servers + if [ $? != 0 ]; then + cat /etc/servers /usr/interbase/servers.isc > /tmp/servers + mv /tmp/servers /etc/servers + fi + fi + if [ -f /etc/inetd.conf ] ; then + grep -s gds_db /etc/inetd.conf + if [ $? != 0 ] ; then + cat /etc/inetd.conf /usr/interbase/inetd.conf.isc > /tmp/inetd.conf + mv /tmp/inetd.conf /etc/inetd.conf + fi + fi' > /tmp/rsh_srv + rcp /tmp/rsh_srv $CLIENT:/tmp/rsh_cl + + #run the network update script on the client, clean up + rsh $CLIENT chmod 777 /tmp/rsh_cl + rsh $CLIENT /tmp/rsh_cl + rm /tmp/rsh_srv + rsh $CLIENT rm /tmp/rsh_cl + + #run ldconfig so the client is all set + rsh $CLIENT ldconfig + + #if server/client are same architecture, touch the lockfiles, then + #exit since binaries already are on the server + + if [ $ARCH = $SERVER_ARCH ] + then + rsh $CLIENT touch /usr/interbase/gds.lock.$CLIENT + rsh $CLIENT chmod 777 /usr/interbase/gds.lock.$CLIENT + + # Link the old lock file name to the new one, so that + # the bridge to V2 works properly. When the lock file + # name was changed, the pipe4 was not rebuilt. + # Once the file are linked, the old lockfile must also + # be readable and writeable by everyone. + # This change is temporary, and should be removed by + # next release (when we drop V2 support) + echo " + if [ -f /usr/interbase/gds.lockfile.$CLIENT ] ; then + rm -f /usr/interbase/gds.lockfile.$CLIENT + fi + ln -s /usr/interbase/gds.lock.$CLIENT /usr/interbase/gds.lockfile.$CLIENT + chmod 777 /usr/interbase/gds.lockfile.$CLIENT" > /tmp/ln_srv + rcp /tmp/ln_srv $CLIENT:/tmp/ln_cl + rsh $CLIENT chmod 777 /tmp/ln_cl + rsh $CLIENT /tmp/ln_cl + rm /tmp/ln_srv + rsh $CLIENT rm /tmp/ln_cl + + # rsh $CLIENT touch /usr/interbase/isc_csv.$CLIENT + # rsh $CLIENT chmod 777 /usr/interbase/isc_csv.$CLIENT + rsh $CLIENT touch /usr/interbase/isc_event.gbl.$CLIENT + rsh $CLIENT chmod 777 /usr/interbase/isc_event.gbl.$CLIENT + echo + echo "Installation for $CLIENT complete. Please reboot $CLIENT" + echo "before registering it with Borland International, Inc." + exit + fi + + #non-homogenous network--get /usr partition for client + echo + echo -n "Enter the partition on $SERVER that is mounted as /usr +for $CLIENT [/export/exec/$ARCH]: " + read LINKDIR + if [ "$LINKDIR" = "" ] + then + LINKDIR=/export/exec/$ARCH + fi + + if [ ! -d $LINKDIR ] + then + echo + echo "$LINKDIR: No such directory found on $SERVER." + echo "Exiting..." + echo + exit + fi + break + ;; # END of case C|c + + S|s|"") + #Server installation, LINKDIR set to /usr + LINKDIR=/usr + TYPE=S + break + ;; # END of case S|s + + *) + echo + echo "Enter C for client installation, S for server installation." + echo + ;; + esac + done + + +# get directory of where user wants the interbase tree +echo +echo -n \ +"This installation will create the directory tree $INTERBASE/${ARCH}_$VERSION +under the root directory most appropriate for your installation. Enter the +root directory you wish to use [/home/$SERVER]: " + +read ROOT + +if [ "$ROOT" = "/usr" ] +then + echo "" + echo "Interbase cannot be installed as /usr/interbase, it can" + echo "however be installed into /usr/ibase/interbase with" + echo "/usr/interbase linked to it if it must be installed" + echo "in the /usr partition." + echo "" + echo -n "Do you wish to continue? [Y]: " + read answer + if [ "$answer" = "n" -o "$answer" = "N" ] + then + exit + fi + if [ ! -d /usr/ibase ] + then + mkdir /usr/ibase + fi + ROOT=/usr/ibase +fi + +if [ "$ROOT" = "" ] +then + ROOT=/home/$SERVER +fi + +# now know everything we need to about where to put executables +IB_PATH=$ROOT/$INTERBASE/${ARCH}_$VERSION + + +# Check to see if machine is already installed +# If server machine, find out if they want to overwrite +# Otherwise, for heterogenous client, silently use directory that is there, since +# it is probably there for another client of same type +if [ -d $IB_PATH ] + then + if [ $TYPE = s -o $TYPE = S ] + then + echo + echo "$SERVER has already had $VERSION installed." + echo "Do you want to overwrite the directory?" + echo -n "Enter Y to overwrite, N to exit [N]: " + + read ANSWER + if [ "$ANSWER" = "" ] + then + ANSWER=n + fi + if [ $ANSWER != "y" -a $ANSWER != "Y" ] + then + echo + echo "Exiting..." + echo + exit + fi + else + NEED_MEDIA=FALSE # won't need to read in the tape + fi # end if type server +fi # end if IB_PATH exists as a directory + +if [ $NEED_MEDIA = TRUE ] ; then + # Will need media, so set up name of tape, and then find out if local or remote + if [ $ARCH = "sun3" ] ; then + TAPE_PREFIX="S3-" + elif [ $ARCH = "sun4" ] ; then + TAPE_PREFIX="S4-" + else [ $ARCH = "sun386" ] + TAPE_PREFIX="SI-" + fi + + while [ "$TAPE_LOC" = "" ] + do + if [ $REMOTE -eq 0 ] + then + echo + echo "Is the media drive local or remote to $SERVER? " + echo -n "Enter L for local or R for remote [L]: " + read TAPE_LOC + else + TAPE_LOC="remote" + fi + case "$TAPE_LOC" in + R|r) if [ "$REMOTE_HOST" = "" ] + then + echo -n "Enter the hostname of the remote drive: " + read REMOTE_HOST + echo + REMOTE=1 + fi + rsh -n $REMOTE_HOST "echo 0 > /dev/null" + if [ "$?" -ne 0 ] + then + echo "$0: Problem with reaching remote host $REMOTE_HOST." + echo "Exiting..." + echo + exit 1 + fi + ;; + L|l|"") TAPE_LOC="local" + ;; + *) + echo + echo "Enter L for local media drive, R for remote media drive." + echo + TAPE_LOC="" + ;; + esac + done + + #query about media, tar in the distribution + while : + do + echo + echo "Are you installing via floppy or cartridge? " + echo -n "Enter F for Floppy, C for Cartridge [C]: " + + read MEDIA + + case $MEDIA in + C|c|"") + MEDIA=C + echo + echo -n "Enter Cartridge device name [rst0]: " + read DEVICE + if [ "$DEVICE" != "" -a ! -c /dev/$DEVICE ] + then + echo -n "/dev/$DEVICE not a device. Please try again [rst0]: " + read DEVICE + fi + if [ "$DEVICE" = "" -o ! -c /dev/$DEVICE ] + then + DEVICE=rst0 + fi + echo + echo " Using /dev/$DEVICE." + break + ;; # end of case media = cartridge + F|f) + MEDIA=F + if [ $REMOTE -eq 1 ] + then + echo "Before you continue, you must have created an on-disk bar" + echo "file containing the InterBase files." + echo "" + echo "Do you wish to continue?" + echo -n "Enter Y to continue, or N to exit [N]:" + read ANSWER + if [ "$ANSWER" = "" ] + then + ANSWER=n + fi + if [ $ANSWER != "y" -a $ANSWER != "Y" ] + then + echo + echo "Exiting..." + echo + exit + fi + + # user answered yes, so get the filename + while : + do + echo -n "Enter the name of the bar file that contains the InterBase files: " + read BARFILE + if [ ! -f $BARFILE ] # file given does not exist + then + echo + echo "$BARFILE does not exist. Do you wish to continue?" + echo -n "Enter Y to continue, or N to exit [N]:" + read ANSWER + if [ "$ANSWER" = "" ] + then + ANSWER=n + fi + if [ $ANSWER != "y" -a $ANSWER != "Y" ] + then + echo + echo "Exiting..." + echo + exit + fi + else + break # file does exist, so go on + fi # end of file given does not exist + done # end of while + else #LOCAL floppy + echo + echo -n "Enter Floppy device name [rfd0c]: " + read DEVICE + if [ "$DEVICE" != "" -a ! -c /dev/$DEVICE ] + then + echo -n "/dev/$DEVICE not a device. Please try again [rfd0c]: " + read DEVICE + fi + if [ "$DEVICE" = "" -o ! -c /dev/$DEVICE ] + then + DEVICE=rfd0c + fi + echo + echo " Using /dev/$DEVICE." + fi #end of REMOTE floppy + break + ;; + *) # user answered something other than F or C + echo + echo -n "Enter F for Floppy, C for Cartridge [C]." + echo + ;; + esac # end case of media type + done # end do loop around getting media type +fi # end if NEED_MEDIA = TRUE + +#check to see if $LINKDIR/interbase exists as a directory or file +#exit unless it is a link; if it is a link, remake it + +if [ -h $LINKDIR/interbase ] + then + rm -f $LINKDIR/interbase + else + if [ -f $LINKDIR/interbase -o -d $LINKDIR/interbase ] + then + echo + echo "$LINKDIR/interbase exists as a file or directory. Please move or +remove the file/directory, and then run the install script again." + echo "Exiting..." + echo + exit + fi +fi + +# go ahead and start setting up the disk structure +# put some spaces around this to make it more visible +echo +if [ ! -d $IB_PATH ] + then + if [ ! -d $ROOT ] + then + echo + echo "$ROOT does not exist...creating it." + mkdir $ROOT + fi + if [ ! -d $ROOT/$INTERBASE ] + then + echo "$ROOT/$INTERBASE does not exist...creating it." + mkdir $ROOT/$INTERBASE + fi + if [ ! -d $ROOT/$INTERBASE/${ARCH}_$VERSION ] + then + echo "$ROOT/$INTERBASE/${ARCH}_$VERSION does not exist...creating it." + mkdir $ROOT/$INTERBASE/${ARCH}_$VERSION + fi + cd $IB_PATH + else + cd $IB_PATH +fi +echo + +#explicitly set the permissions on the interbase directory and link it in +chmod 777 $IB_PATH +ln -s $IB_PATH $LINKDIR/interbase + +# now we are all set to go out and actually get stuff off the media (if needed) +if [ $NEED_MEDIA = TRUE ] ; then + case $MEDIA in + C) + DEVPATH=/dev/n$DEVICE + BS=126 + echo + echo "Insert the tape labeled ${TAPE_PREFIX}${VERSION} into the drive." + echo "Press Return to continue" + read ANSWER # doesn't matter what they said, as long as they typed something + echo "Reading files from media..." + echo + + if [ $REMOTE -eq 1 ] + then + rsh -n $REMOTE_HOST $MT -f $DEVPATH rew + if [ "$?" -ne 0 ] + then + echo $0 : Error rewinding tape. + echo "Exiting..." + echo + exit 1 + fi + rsh -n $REMOTE_HOST $MT -f $DEVPATH fsf 1 + if [ "$?" -ne 0 ] + then + echo $0 : Error positioning the tape. + echo "Exiting..." + echo + exit 1 + fi + rsh -n $REMOTE_HOST $DD if=$DEVPATH bs=${BS}b | $TAR xBvfb - ${BS} + if [ "$?" -ne 0 ] + then + echo $0 : This tape is missing the Interbase files. + echo "Exiting..." + echo + exit 1 + fi + rsh -n $REMOTE_HOST $MT -f $DEVPATH rew + else # media is local + BS= + $MT -f $DEVPATH rew + $MT -f $DEVPATH fsf 1 + $TAR xvf $DEVPATH $BS + if [ "$?" -ne 0 ] + then + echo + echo $0 : This tape is missing the Interbase files. + echo "Exiting..." + echo + exit 1 + fi + $MT -f $DEVPATH rew + fi #end if $REMOTE -eq 1 + break + ;; # end of case media = cartridge + F|f) + if [ $REMOTE -eq 1 ] + then + DEVPATH=$BARFILE + BS= + $BAR xvZf ${DEVPATH} ${BS} + if [ "$?" -ne 0 ] + then + echo + echo $0 : This file is missing the Interbase files. + echo "Exiting..." + echo + exit 1 + fi + else # media is local + DEVPATH=/dev/$DEVICE + BS= + echo + echo "Insert the floppy labeled:" + echo " \"${TAPE_PREFIX}${VERSION} disk 1 of $TOTFLOPS\"" + echo "into the drive." + echo "Press Return to continue" + read ANSWER # doesn't matter what they said, they typed something + echo "Reading files from media..." + $BAR xvZf ${DEVPATH} ${BS} + if [ "$?" -ne 0 ] + then + echo + echo $0 : This tape is missing the Interbase files. + echo "Exiting..." + echo + exit 1 + fi + eject ${DEVPATH} + fi # end if REMOTE -eq 1 + break + ;; # end case media = floppy + esac # end case of media type +fi # end of if NEED_MEDIA is TRUE + +# Link standard include file to $LINKDIR/include (/usr/include) +rm -f $LINKDIR/include/gds.h +rm -f $LINKDIR/include/ibase.h +ln -s /usr/interbase/include/gds.h $LINKDIR/include/gds.h +ln -s /usr/interbase/include/ibase.h $LINKDIR/include/ibase.h + +# Move pipe and full libraries to $LINKDIR/lib (/usr/lib) +# and re-initialize table of contents +rm -f $LINKDIR/lib/libgds.a $LINKDIR/lib/libgds_b.a +rm -f $LINKDIR/lib/libgds_pyxis.a $LINKDIR/lib/libgdslib.so.0.0 +rm -f $LINKDIR/lib/libgdslib.so.0.1 $LINKDIR/lib/libgdsflib.so.0.0 +rm -f $LINKDIR/lib/libgdslib.so.1.0 $LINKDIR/lib/libgdsintl.so.0.0 +ln -s /usr/interbase/lib/gds.a $LINKDIR/lib/libgds.a +if [ -f /usr/interbase/lib/gds_b.a ]; then + ln -s /usr/interbase/lib/gds_b.a $LINKDIR/lib/libgds_b.a +fi +ln -s /usr/interbase/lib/gds_pyxis.a $LINKDIR/lib/libgds_pyxis.a +ln -s /usr/interbase/lib/gdslib.so.0.1 $LINKDIR/lib/libgdslib.so.0.1 +ln -s /usr/interbase/lib/gdslib.so.1.0 $LINKDIR/lib/libgdslib.so.1.0 +ln -s /usr/interbase/lib/gdsflib.so.0.0 $LINKDIR/lib/libgdsflib.so.0.0 +ln -s /usr/interbase/lib/gdsintl $LINKDIR/lib/libgdsintl.so.0.0 + +# Create node-specific files for locking, the central server and events +if [ $TYPE = s -o $TYPE = S ] + then + touch gds.lock.$SERVER + chmod 777 gds.lock.$SERVER + + # Link the old lock file name to the new one, so that + # the bridge to V2 works properly. When the lock file + # name was changed, the pipe4 was not rebuilt. + # Once the file are linked, the old lockfile must also + # be readable and writeable by everyone. + # This change is temporary, and should be removed by + # next release (when we drop V2 support) + if [ -f gds.lockfile.$SERVER ] ; then + rm -f gds.lockfile.$SERVER + fi + ln -s gds.lock.$SERVER gds.lockfile.$SERVER + chmod 777 gds.lockfile.$SERVER + + # touch isc_csv.$SERVER + # chmod 777 isc_csv.$SERVER + touch isc_event.gbl.$SERVER + chmod 777 isc_event.gbl.$SERVER + else + rsh $CLIENT touch /usr/interbase/gds.lock.$CLIENT + rsh $CLIENT chmod 777 /usr/interbase/gds.lock.$CLIENT + + # Link the old lock file name to the new one, so that + # the bridge to V2 works properly for this config, too. + echo " + if [ -f /usr/interbase/gds.lockfile.$CLIENT ] ; then + rm -f /usr/interbase/gds.lockfile.$CLIENT + fi + ln -s /usr/interbase/gds.lock.$CLIENT /usr/interbase/gds.lockfile.$CLIENT + chmod 777 /usr/interbase/gds.lockfile.$CLIENT" > /tmp/ln_srv + rcp /tmp/ln_srv $CLIENT:/tmp/ln_cl + rsh $CLIENT chmod 777 /tmp/ln_cl + rsh $CLIENT /tmp/ln_cl + rm /tmp/ln_srv + rsh $CLIENT rm /tmp/ln_cl + + # rsh $CLIENT touch /usr/interbase/isc_csv.$CLIENT + # rsh $CLIENT chmod 777 /usr/interbase/isc_csv.$CLIENT + rsh $CLIENT touch /usr/interbase/isc_event.gbl.$CLIENT + rsh $CLIENT chmod 777 /usr/interbase/isc_event.gbl.$CLIENT +fi + +echo +echo -n "Building Interbase sample databases and checking system +network files. Depending on your machine configuration, this may take +from 2 to 10 minutes. " +echo +# protect examples and QLI help database +# +if [ $TYPE = s -o $TYPE = S ] + then + /usr/etc/ldconfig + chmod uog=rw $IB_PATH/isc4.gdb + chmod uog=rw $IB_PATH/help/help.gdb + chmod uog=rw $IB_PATH/examples/v3/atlas.gdb + chmod uog=rw $IB_PATH/examples/v3/emp.gdb + chmod uog=rw $IB_PATH/examples/v4/employee.gdb + chmod uog=rw $IB_PATH/examples/v4/intlemp.gdb + else + rsh $CLIENT /usr/etc/ldconfig + #if not installed from media dbs will already be there, so + # only do if need_media is true + if [ $NEED_MEDIA = TRUE ] + then + chmod uog=rw $IB_PATH/isc4.gdb + chmod uog=rw $IB_PATH/help/help.gdb + chmod uog=rw $IB_PATH/examples/v3/atlas.gdb + chmod uog=rw $IB_PATH/examples/v3/emp.gdb + chmod uog=rw $IB_PATH/examples/v4/employee.gdb + chmod uog=rw $IB_PATH/examples/v4/intlemp.gdb + fi #end if needed media +fi # end if type is server + +#On a server installation, run the network updates locally +if [ $TYPE = s -o $TYPE = S ] + then + # + # If TCP is installed, update both services and servers databases + # + if [ -f /etc/services ] ; then + grep -s gds_db /etc/services + if [ $? != 0 ] ; then + cat /etc/services services.isc > services + mv services /etc/services + fi + fi + if [ -f /etc/servers ] ; then + grep -s gds_db /etc/servers + if [ $? != 0 ] ; then + cat /etc/servers servers.isc > servers + mv servers /etc/servers + fi + fi + if [ -f /etc/inetd.conf ] ; then + grep -s gds_db /etc/inetd.conf + if [ $? != 0 ] ; then + cat /etc/inetd.conf inetd.conf.isc > inetd.conf + mv inetd.conf /etc/inetd.conf + fi + fi +fi # end if type is server + +echo +echo +echo "This completes the InterBase installation script. To use InterBase, +you must register each installed node with Borland International, Inc. +See the "Installing InterBase on the SUN" installation guide for complete +information on registering your installation. + +Also, please be sure to reboot the node that you have installed on." diff --git a/src/makefiles/install.unix b/src/makefiles/install.unix new file mode 100644 index 0000000000..98c2f0d188 --- /dev/null +++ b/src/makefiles/install.unix @@ -0,0 +1,244 @@ +#!/bin/ksh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# 07-Nov-2000 nmcc@users.sourceforge.net - Firebird 0.9 +# Remove creation of license file and Interclient install. +# Overwrite real services and inetd.conf files rather than +# break the links on Solaris. +# +# /usr/interbase/install -- Install InterBase +# +# The install script looks for the server +# executable and decides if the install is for superserver or classic. +# +# Make changes for allowing the install directory to be dependent on +# $INTERBASE. +# +# + +OLD_INTERBASE=$INTERBASE + +if [ "$INTERBASE" = "" ]; then + INTERBASE="/usr/interbase" +fi + +PATH=$PATH:/usr/ucb:/usr/bsd +export PATH +HOSTNAME=`hostname | cut -d. -f1` +if [ -f $INTERBASE ]; then + echo $INTERBASE is not a directory + echo InterBase installation failed + exit 1 +fi +if [ -d $INTERBASE ]; then + cd $INTERBASE + TARGET=`pwd` +else + echo invalid interbase installation directory $INTERBASE + exit 1 +fi +if [ -f $INTERBASE/bin/ibserver ]; then + SUPERSERVER="SUPERSERVER" + if [ "$OLD_INTERBASE" = "" ] ; then + ln -s $INTERBASE /usr/interbase + fi +else + SUPERSERVER="" +# need the link in classic as isc4.gdb is not moved. + if [ $INTERBASE != "/usr/interbase" ] + then + ln -s $INTERBASE /usr/interbase + fi +fi +#set -x +# +# Make sure the top level (/usr/interbase) is 777 +# +chmod 777 . +# +# Move standard include file to /usr/include +# +rm -f /usr/include/gds.h +rm -f /usr/include/ibase.h +rm -f /usr/include/iberror.h +rm -f /usr/include/ib_util.h +ln -s $INTERBASE/include/gds.h /usr/include/gds.h +ln -s $INTERBASE/include/ibase.h /usr/include/ibase.h +ln -s $INTERBASE/include/iberror.h /usr/include/iberror.h +ln -s $INTERBASE/include/ib_util.h /usr/include/ib_util.h +# +# Move pipe and full libraries to /usr/lib and re-initialize table of contents +# +rm -f /usr/lib/libgds_b.a +if [ -f lib/gds_b.a ]; then + ln -s $INTERBASE/lib/gds_b.a /usr/lib/libgds_b.a +fi +if [ -f lib/gds.a ]; then + rm -f /usr/lib/libgds.a + ln -s $INTERBASE/lib/gds.a /usr/lib/libgds.a +fi +if [ -f lib/gds.sl ]; then + rm -f /usr/lib/libgds.sl + ln -s $INTERBASE/lib/gds.sl /usr/lib/libgds.sl +fi +if [ -f lib/gdsshr.a ]; then + rm -f /usr/lib/libgdsshr.a + ln -s $INTERBASE/lib/gdsshr.a /usr/lib/libgdsshr.a +fi +if [ -f lib/gds_s.a ]; then + rm -f /usr/lib/libgds_s + rm -f /usr/lib/libgds_s.a + rm -f /usr/lib/libgdsf_s + rm -f /usr/lib/libgdsf_s.a + ln -s $INTERBASE/lib/gds_s /usr/lib/libgds_s + ln -s $INTERBASE/lib/gds_s.a /usr/lib/libgds_s.a + ln -s $INTERBASE/lib/gdsf_s /usr/lib/libgdsf_s + ln -s $INTERBASE/lib/gdsf_s.a /usr/lib/libgdsf_s.a +fi +if [ -f lib/gds.so.0 ]; then + if [ -d /usr/shlib ]; then + rm -f /usr/shlib/libgds.so + rm -f /usr/shlib/libgds.so.0 + ln -s $INTERBASE/lib/gds.so.0 /usr/shlib/libgds.so.0 + ln -s /usr/shlib/libgds.so.0 /usr/shlib/libgds.so + else + rm -f /usr/lib/libgds.so + rm -f /usr/lib/libgds.so.0 + ln -s $INTERBASE/lib/gds.so.0 /usr/lib/libgds.so.0 + ln -s /usr/lib/libgds.so.0 /usr/lib/libgds.so + fi +fi +# This is only for solaris +if [ -f lib/gdsmt.so.0 ]; then + rm -f /usr/lib/libgdsmt.so + rm -f /usr/lib/libgdsmt.so.0 + ln -s $INTERBASE/lib/gdsmt.so.0 /usr/lib/libgdsmt.so.0 + ln -s /usr/lib/libgdsmt.so.0 /usr/lib/libgdsmt.so +fi +if [ -f lib/gdsf.so ]; then + rm -f /usr/lib/libgdsf.so + ln -s $INTERBASE/lib/gdsf.so /usr/lib/libgdsf.so +fi +if [ -f lib/gds_pyxis.a ]; then + rm -f /usr/lib/libgds_pyxis.a + ln -s $INTERBASE/lib/gds_pyxis.a /usr/lib/libgds_pyxis.a +fi +if [ -f lib/ib_util.sl ]; then + rm -f /usr/lib/libib_util.sl + ln -s $INTERBASE/lib/ib_util.sl /usr/lib/libib_util.sl +fi +if [ -f lib/ib_util.so ]; then + rm -f /usr/lib/libib_util.so + ln -s $INTERBASE/lib/ib_util.so /usr/lib/libib_util.so +fi +# +# Protect security, examples and QLI help databases +# +chmod uog=rw isc4.gdb +chmod uog=rw help/help.gdb +#chmod uog=rw examples/employee.gdb +#chmod uog=rw examples/intlemp.gdb +if [ "$SUPERSERVER" = "SUPERSERVER" ]; then + chmod 4755 $INTERBASE/bin/gstat +fi +# +# If TCP is installed, update both services and servers databases +# +HUPNEEDED='n' # Relevant to Classic only +if [ -f /etc/services ]; then + grep -s gds_db /etc/services > /dev/null 2>&1 + if test $? != 0 ; then + HUPNEEDED='y' + cat /etc/services services.isc > services + if [ -f /etc/inet/services ]; then + # /etc/services will be a link on Solaris + mv services /etc/inet/services + else + mv services /etc/services + fi + fi +fi +if [ -f /etc/inetd.conf ]; then + if [ "$SUPERSERVER" = "SUPERSERVER" ]; then + # Remove gds_db service. We do not want gds_inet_server to be invoked + cat /etc/inetd.conf | grep -v gds_db > inetd.conf + if [ -f /etc/inet/inetd.conf ]; then + mv inetd.conf /etc/inet/inetd.conf + else + mv inetd.conf /etc/inetd.conf + fi + else + grep -s gds_db /etc/inetd.conf > /dev/null 2>&1 + if test $? != 0 ; then + HUPNEEDED='y' + cat /etc/inetd.conf inetd.conf.isc > inetd.conf + if [ -f /etc/inet/inetd.conf ]; then + # /etc/inetd.conf a link + mv inetd.conf /etc/inet/inetd.conf + else + mv inetd.conf /etc/inetd.conf + fi + fi + fi +fi +if [ -f /usr/etc/inetd.conf ]; then + if [ "$SUPERSERVER" = "SUPERSERVER" ]; then + # Remove gds_db service. We do not want gds_inet_server to be invoked + cat /usr/etc/inetd.conf | grep -v gds_db > inetd.conf + mv inetd.conf /usr/etc/inetd.conf + else + grep -s gds_db /usr/etc/inetd.conf > /dev/null 2>&1 + if test $? != 0 ; then + HUPNEEDED='y' + cat /usr/etc/inetd.conf inetd.conf.isc > inetd.conf + mv inetd.conf /usr/etc/inetd.conf + fi + fi +fi + +# Currently SCO is the only classic for 5.5, add other platforms +# later as required +# 07-Nov-2000 Solaris as well +OSNAME=`uname -s` +if [ "$OSNAME" = "SCO_SV" -o "$OSNAME" = "SunOS" ] +then + if [ "$HUPNEEDED" = 'y' ] + then + INETPID=`ps -e | grep inetd | awk '{print $1}'` + kill -HUP $INETPID + fi +fi + +set +x + +if [ "$SUPERSERVER" = "SUPERSERVER" ]; then +# +# create the ibmgr shell script +# +cat > $INTERBASE/bin/ibmgr << EOF +#!/bin/sh +INTERBASE=$INTERBASE +export INTERBASE +exec $INTERBASE/bin/ibmgr.bin \$@ +EOF + +chmod +x $INTERBASE/bin/ibmgr +fi + +echo "done." + diff --git a/src/makefiles/intrbase.rmv b/src/makefiles/intrbase.rmv new file mode 100644 index 0000000000..5e1d9337a6 --- /dev/null +++ b/src/makefiles/intrbase.rmv @@ -0,0 +1,49 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Library removal script 8/4/92 mtaht@cruzio.santa-cruz.ca.us +# Someday we'll have to do shared libs + +cd /usr/include +rm -f gds.h perf.h ibase.h + +cd /usr/lib +rm -f libgds_s.a libgdsf_s.a libgds.a libgds_b.a gds_pipe.a gds_inet_svr.a + +cd /shlib +rm -f libgds_s libgdsf_s + +cd /usr/interbase + +# Shut down the lock manager and clear out shared memory + +lockid=`ps -ae | grep gds_lock | awk '{print $1}'` + +if [ "$lockid" != "" ] +then + kill $lockid +fi + +bin/gds_drop -a + +# Remove any extra stuff we can find in examples (probably won't get it all) + +rm -f isc_lock1.gbl +rm -f isc_event1 interbase.log lock_header +rm -f examples/*/*.o examples/*/*.a +mv -f isc4.gdb /usr/tmp/isc4.gdb +mv -f isc_lic.dat /usr/tmp/isc_lic.dat +exit 0 diff --git a/src/makefiles/make.pipe b/src/makefiles/make.pipe new file mode 100644 index 0000000000..81f2db0a25 --- /dev/null +++ b/src/makefiles/make.pipe @@ -0,0 +1,18 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +all: + sh -c 'cd source/jrd; $(MAKE) SYSTEM="$(SYSTEM)"' diff --git a/src/makefiles/makemtar b/src/makefiles/makemtar new file mode 100644 index 0000000000..9b10190bf7 --- /dev/null +++ b/src/makefiles/makemtar @@ -0,0 +1,111 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +# This script makes and populates the mtar directory of a build tree. +# It can be used as part of the process of making either a delivery +# tar file or a package (as for use with Solaris pkgadd command). +# It should normally be run as root, so that the mtar/interbase directory +# and its contents will owned by root. + +# Derived from maketar 1997-10-31 by CJewell + +if [ -f interbase/bin/ibserver ]; then + # creating superserver tar file + echo 'Creating super server archive' + + # copy the required file to mtar directory + if [ -d mtar ]; then + # mtar exists delete and remove directory + rm -rf mtar + fi + #create mtar and copy new stuff + mkdir mtar + mkdir mtar/interbase + mkdir mtar/interbase/bin + mkdir mtar/interbase/doc + mkdir mtar/interbase/examples + mkdir mtar/interbase/help + mkdir mtar/interbase/include + mkdir mtar/interbase/intl + mkdir mtar/interbase/lib + cp interbase/bin/ibserver mtar/interbase/bin/ibserver + cp interbase/bin/fred mtar/interbase/bin/fred + cp interbase/bin/gbak mtar/interbase/bin/gbak + cp interbase/bin/gdef mtar/interbase/bin/gdef + cp interbase/bin/gds_lock_print mtar/interbase/bin/gds_lock_print + cp interbase/bin/ibguard mtar/interbase/bin/ibguard + cp interbase/bin/gfix mtar/interbase/bin/gfix + cp interbase/bin/gpre mtar/interbase/bin/gpre + cp interbase/bin/gsec mtar/interbase/bin/gsec + cp interbase/bin/gsplit mtar/interbase/bin/gsplit + cp interbase/bin/gstat mtar/interbase/bin/gstat + cp interbase/bin/ibmgr.bin mtar/interbase/bin/ibmgr.bin + cp interbase/bin/isc4.gbak mtar/interbase/bin/isc4.gbak + cp interbase/bin/iblicense mtar/interbase/bin/iblicense + cp interbase/bin/isql mtar/interbase/bin/isql + cp interbase/bin/qli mtar/interbase/bin/qli + + cp interbase/doc/* mtar/interbase/doc + + cp interbase/examples/v5/* mtar/interbase/examples + cp -r interbase/help mtar/interbase + cp -r interbase/include mtar/interbase + cp interbase/install mtar/interbase/install + cp -r interbase/intl mtar/interbase + cp interbase/interbase.msg mtar/interbase/interbase.msg + cp interbase/isc4.gdb mtar/interbase/isc4.gdb + cp interbase/isc_config mtar/interbase/isc_config + cp interbase/isc_ins_hlp.dat mtar/interbase/isc_ins_hlp.dat + + # for SOLARIS + if [ -f interbase/lib/gdsmt.so.1 ]; then + cp interbase/lib/gdsmt.so.1 mtar/interbase/lib/gdsmt.so.0 + ( cd mtar/interbase/lib; ln -s gdsmt.so.0 gds.so.0 ) + TARFLAGS_CREATE="cvpf" + TARFLAGS_VIEW="tvf" + fi + if [ -f interbase/lib/ib_util.so ]; then + cp interbase/lib/ib_util.so mtar/interbase/lib/ + fi + + # for HP-UX + if [ -f interbase/lib/gds.sl.1 ]; then + cp interbase/lib/gds.sl.1 mtar/interbase/lib/gds.sl + TARFLAGS_CREATE="cvpf" + TARFLAGS_VIEW="tvf" + fi + if [ -f interbase/lib/ib_util.sl ]; then + cp interbase/lib/ib_util.sl mtar/interbase/lib/ + fi + + cp interbase/lib/gds_pyxis.a mtar/interbase/lib/ + cp interbase/lib/gdsintl mtar/interbase/lib/ + + cp interbase/lib/ib_udf mtar/interbase/lib/ + + cp interbase/lock_header_template mtar/interbase/lock_header_template + cp interbase/services.isc mtar/interbase/services.isc +# cp interbase/README mtar/interbase/README +# cp interbase/Install_InterBase.txt mtar/interbase/Install_InterBase.txt + cp interbase/Install_UNIX.txt mtar/interbase/Install_UNIX.txt + cp interbase/Release_Notes.pdf \ + mtar/interbase/Release_Notes.pdf + +else + echo "This is not a super server kit!!" +fi diff --git a/src/makefiles/makepkg b/src/makefiles/makepkg new file mode 100644 index 0000000000..02c29b41e0 --- /dev/null +++ b/src/makefiles/makepkg @@ -0,0 +1,53 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +# makepkg: make a package for Solaris or similar systems. +# 1997-10-31 by CJewell +# Should be run as root (e.g. with rasu), so the files in the package +# will wind up being owned by root. +# Accepts one optional argument, the name of the package instance +# to be created + +makemtar + +# Packages don't use the install script, since they have postinstall instead. +rm mtar/interbase/install + +cat > prototype <> prototype + +mkdir pkg + +# if the user did not specify a name for the package instance, we +# assume that the PSTAMP field has already been edited into pkginfo + +if [ $# -eq 1 ] ; then + pkgmk -d `pwd`/pkg -p $1 +else + pkgmk -d `pwd`/pkg +fi + +rm -rf mtar + +exit diff --git a/src/makefiles/makesspkg b/src/makefiles/makesspkg new file mode 100644 index 0000000000..10f26613ec --- /dev/null +++ b/src/makefiles/makesspkg @@ -0,0 +1,119 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +# makesspkg: make a superserver package for Solaris or similar systems. +# Should be run as root (e.g. with rasu), so the files in the package +# will wind up being owned by root. +# Accepts one optional argument, the name of the package instance +# to be created, followed optionally by flags to be passed through to +# makesstar, such as -c for client without server and -n for no documentation. + +INSTANCE="" + +if [ $# -gt 0 ] ; then + case $1 in + -*) + ;; + * ) + INSTANCE=$1; + shift;; + esac +fi + +./makesstar $@ +if [ $? != 0 ] ; then + echo $0 exiting due to error in makesstar + exit 1 +fi + +INCLUDE_DOC=1 +INCLUDE_SERVER=1 +DONE_PARSING=0 + +while [ $# -gt 0 -a $DONE_PARSING -eq 0 ] ; do + case "$1" in + -c|--clientonly) + INCLUDE_SERVER=0; + shift;; + -n|--nodocs ) + INCLUDE_DOC=0; + shift;; + -nc|-cn ) + INCLUDE_SERVER=0; + INCLUDE_DOC=0; + shift;; + -* ) + echo $0 unknown option $1, terminating.; + exit 1;; + * ) + DONE_PARSING=1;; + esac +done + +if [ $INCLUDE_SERVER -eq 1 ] ; then + if [ $INCLUDE_DOC -eq 1 ] ; then + SUFFIX=clsr + else + SUFFIX=clsrnd + fi +else + if [ $INCLUDE_DOC -eq 1 ] ; then + SUFFIX=cl + else + SUFFIX=clnd + fi +fi + + +#copy Server specific info files +cp pkginfo.$SUFFIX pkginfo +cp request.$SUFFIX request +cp postinstall.$SUFFIX postinstall +cp preremove.$SUFFIX preremove +cp depend.$SUFFIX depend +cp copyright.$SUFFIX copyright + +cat > prototype <> prototype + +if [ -d sspkg ] ; then + rm -rf sspkg +fi + +mkdir sspkg + +# if the user did not specify a name for the package instance, we +# assume that the PSTAMP field has already been edited into pkginfo + +if [ "$INSTANCE" != "" ] ; then + pkgmk -d `pwd`/sspkg -p $INSTANCE +else + pkgmk -d `pwd`/sspkg +fi + +rm -rf sstar + +exit diff --git a/src/makefiles/makesstar b/src/makefiles/makesstar new file mode 100644 index 0000000000..72953bc4d8 --- /dev/null +++ b/src/makefiles/makesstar @@ -0,0 +1,141 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +# This script makes and populates the ibtar directory of a build tree. +# It can be used as part of the process of making either a delivery +# tar file or a package (as for use with Solaris pkgadd command). +# It should normally be run as root, so that the ibtar/interbase directory +# and its contents will owned by root. Note that it does not actually create +# a tar file, just a directory which is ready to be tarred, and that it is +# only applicable to SuperServer kits, not Classic. + +IB=`ckpath -aoy -p "\nEnter the absolute path name of the interbase directory\'s parent"` || exit $? + +INCLUDE_DOC=1 +INCLUDE_SERVER=1 +DONE_PARSING=0 + +while [ $# -gt 0 -a $DONE_PARSING -eq 0 ] ; do + case $1 in + -c|--clientonly) + INCLUDE_SERVER=0; + shift;; + -n|--nodocs ) + INCLUDE_DOC=0; + shift;; + -nc|-cn ) + INCLUDE_SERVER=0; + INCLUDE_DOC=0; + shift;; + -* ) + echo $0 unknown option $1, terminating.; + exit 1;; + * ) + DONE_PARSING=1;; + esac +done + +if [ -f $IB/interbase/bin/ibserver ]; then + # creating superserver tar file + echo 'Creating super server archive' + + # copy the required file to sstar directory + if [ -d sstar ]; then + # sstar exists delete and remove directory + rm -rf sstar + fi + #create sstar and copy new stuff + mkdir sstar + mkdir sstar/interbase + mkdir sstar/interbase/bin + mkdir sstar/interbase/doc + mkdir sstar/interbase/examples + mkdir sstar/interbase/include + mkdir sstar/interbase/lib + + if [ $INCLUDE_SERVER -eq 1 ]; then + mkdir sstar/interbase/UDF + mkdir sstar/interbase/help + mkdir sstar/interbase/intl + cp $IB/interbase/bin/ibserver sstar/interbase/bin/ibserver + cp $IB/interbase/bin/gds_lock_print sstar/interbase/bin/gds_lock_print + cp $IB/interbase/bin/ibguard sstar/interbase/bin/ibguard + cp $IB/interbase/bin/gsec sstar/interbase/bin/gsec + cp $IB/interbase/bin/gsplit sstar/interbase/bin/gsplit + cp $IB/interbase/bin/gstat sstar/interbase/bin/gstat + cp $IB/interbase/bin/ibmgr.bin sstar/interbase/bin/ibmgr.bin + cp $IB/interbase/bin/isc4.gbak sstar/interbase/bin/isc4.gbak + fi + + cp $IB/interbase/bin/gbak sstar/interbase/bin/gbak + cp $IB/interbase/bin/gdef sstar/interbase/bin/gdef + cp $IB/interbase/bin/gfix sstar/interbase/bin/gfix + cp $IB/interbase/bin/gpre sstar/interbase/bin/gpre + cp $IB/interbase/bin/isql sstar/interbase/bin/isql + cp $IB/interbase/bin/qli sstar/interbase/bin/qli + + if [ $INCLUDE_DOC -eq 1 ] ; then + cp -r $IB/interbase/doc/* sstar/interbase/doc + fi + + + cp $IB/interbase/examples/v5/[a-z]* sstar/interbase/examples + if [ $INCLUDE_SERVER -eq 1 ]; then + cp $IB/interbase/help/[a-z]* sstar/interbase/help + cp $IB/interbase/isc4.gdb sstar/interbase/isc4.gdb + cp $IB/interbase/isc_config sstar/interbase/isc_config + fi + cp $IB/interbase/include/[a-z]* sstar/interbase/include + cp $IB/interbase/intl/gdsintl* sstar/interbase/intl + cp $IB/interbase/interbase.msg sstar/interbase/interbase.msg + + # for SOLARIS + if [ -f $IB/interbase/lib/gdsmt.so.1 ]; then + cp $IB/interbase/lib/gdsmt.so.1 sstar/interbase/lib/gdsmt.so.0 + ( cd sstar/interbase/lib; ln -s gdsmt.so.0 gds.so.0 ) + TARFLAGS_CREATE="cvpf" + TARFLAGS_VIEW="tvf" + fi + if [ -f $IB/interbase/lib/ib_util.so ]; then + cp $IB/interbase/lib/ib_util.so sstar/interbase/lib/ + fi + + # for HP-UX + if [ -f $IB/interbase/lib/gds.sl.1 ]; then + cp $IB/interbase/lib/gds.sl.1 sstar/interbase/lib/gds.sl + TARFLAGS_CREATE="cvpf" + TARFLAGS_VIEW="tvf" + fi + if [ -f $IB/interbase/lib/ib_util.sl ]; then + cp $IB/interbase/lib/ib_util.sl sstar/interbase/lib/ + fi + + cp $IB/interbase/lib/gds_pyxis.a sstar/interbase/lib/ + cp $IB/interbase/intl/gdsintl sstar/interbase/intl/ + + cp $IB/interbase/UDF/ib_udf sstar/interbase/UDF + + cp $IB/interbase/services.isc sstar/interbase/services.isc + cp $IB/interbase/license.txt sstar/interbase/license.txt + cp $IB/interbase/ReleaseNotes.pdf \ + sstar/interbase/ReleaseNotes.pdf + +else + echo "This is not a super server kit!!" + exit 2 +fi diff --git a/src/makefiles/maketar b/src/makefiles/maketar new file mode 100644 index 0000000000..dde305b349 --- /dev/null +++ b/src/makefiles/maketar @@ -0,0 +1,264 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +# this script is to be used for creating a superserver kit. +# + +# TIMESTAMP="199712010500.00" # Dec 01 1997, 5:00AM + # Note: This date is used only for V5.0.0.627 +TIMESTAMP="" + +tarname="" # tar file flag +client_sw="" # 'client only' flag +server_sw="" # 'client and server' flag +TARFILE="interbase.tar" +SUPERSERVER="SUPERSERVER" +Msg1="Assuming Client and Server configuration." +if [ $# -eq 0 ]; then + Msg2="Default tar file name $TARFILE" +else + if [ $# -gt 2 ]; then + echo "ERROR: too many parameters." + echo "Usage: $0 [-c | -s] [TarFileName]" + exit 1 + fi + for i in $1 $2 ; do + case $i in + -c | -C ) + if [ ! -z "$server_sw" ]; then + echo "ERROR: illegal switch combination." + echo "Usage: $0 [-c | -s] [TarFileName]" + exit 1 + fi + Msg1="Client Only configuration." + SUPERSERVER="" + client_sw="Yes";; + -s | -S ) + if [ ! -z "$client_sw" ]; then + echo "ERROR: illegal switch combination." + echo "Usage: $0 [-c | -s] [TarFileName]" + exit 1 + fi + Msg1="Client and Server configuration." + SUPERSERVER="SUPERSERVER" + server_sw="Yes";; + * ) + if [ ! -z "$tarname" ]; then + echo "ERROR: tar file name is already given: $TARFILE" + exit 1 + fi + TARFILE="$i" + tarname="Yes" + Msg2="Tar file name $TARFILE";; + esac + done +fi + +# copy the required file to mtar directory +if [ -d mtar ]; then + # mtar exists delete and remove directory + rm -rf mtar +fi + +echo "$Msg1" +echo "$Msg2" + +if [ "$SUPERSERVER" ]; then + if [ -f interbase/bin/ibserver ]; then + # creating superserver tar file + echo "Creating Client and Server archive" + + #create mtar and copy new stuff + mkdir mtar + mkdir mtar/interbase + mkdir mtar/interbase/bin + mkdir mtar/interbase/examples + mkdir mtar/interbase/help + mkdir mtar/interbase/include + mkdir mtar/interbase/intl + mkdir mtar/interbase/lib + mkdir mtar/interbase/doc + mkdir mtar/interbase/UDF + + cp interbase/bin/ibserver mtar/interbase/bin/ibserver + cp interbase/bin/fred mtar/interbase/bin/fred + cp interbase/bin/gbak mtar/interbase/bin/gbak + cp interbase/bin/gdef mtar/interbase/bin/gdef + cp interbase/bin/gds_lock_print mtar/interbase/bin/gds_lock_print + cp interbase/bin/ibguard mtar/interbase/bin/ibguard + cp interbase/bin/gfix mtar/interbase/bin/gfix + cp interbase/bin/gpre mtar/interbase/bin/gpre + cp interbase/bin/gsec mtar/interbase/bin/gsec + cp interbase/bin/gsplit mtar/interbase/bin/gsplit + cp interbase/bin/gstat mtar/interbase/bin/gstat + cp interbase/bin/ibmgr.bin mtar/interbase/bin/ibmgr.bin + cp interbase/bin/isc4.gbak mtar/interbase/bin/isc4.gbak + cp interbase/bin/iblicense mtar/interbase/bin/iblicense + cp interbase/bin/isql mtar/interbase/bin/isql + cp interbase/bin/qli mtar/interbase/bin/qli + cp interbase/examples/v5/* mtar/interbase/examples + cp -r interbase/help mtar/interbase + cp -r interbase/include mtar/interbase + cp -r interbase/intl mtar/interbase + cp -r interbase/UDF mtar/interbase + cp interbase/interbase.msg mtar/interbase/interbase.msg + cp interbase/isc4.gdb mtar/interbase/isc4.gdb + cp interbase/isc_config mtar/interbase/isc_config + cp interbase/isc_ins_hlp.dat mtar/interbase/isc_ins_hlp.dat + cp interbase/license.txt mtar/interbase/license.txt + cp interbase/ib_license.dat.client mtar/interbase/ib_license.dat + cp interbase/doc/* mtar/interbase/doc + cp interbase/install.ksh mtar/interbase/install.ksh + cp interbase/install.txt mtar/interbase/install.txt + + # for SOLARIS + if [ -f interbase/lib/gdsmt.so.1 ]; then + cp interbase/lib/gdsmt.so.1 mtar/interbase/lib/gdsmt.so.0 + ( cd mtar/interbase/lib; ln -s gdsmt.so.0 gds.so.0 ) + TARFLAGS_CREATE="cvpf" + TARFLAGS_VIEW="tvf" + fi + if [ -f interbase/lib/ib_util.so ]; then + cp interbase/lib/ib_util.so mtar/interbase/lib/ + fi + + # for HP-UX + if [ -f interbase/lib/gds.sl.1 ]; then + cp interbase/lib/gds.sl.1 mtar/interbase/lib/gds.sl + TARFLAGS_CREATE="cvpf" + TARFLAGS_VIEW="tvf" + fi + if [ -f interbase/lib/ib_util.sl ]; then + cp interbase/lib/ib_util.sl mtar/interbase/lib/ + fi + + cp interbase/lib/gds_pyxis.a mtar/interbase/lib/ + + cp interbase/lock_header_template mtar/interbase/lock_header_template + cp interbase/services.isc mtar/interbase/services.isc + cp interbase/Release_Notes.pdf mtar/interbase + + + #finally cd to this directory + cd mtar + if [ "$TIMESTAMP" != "" ]; then + ch -t $TIMESTAMP `find . -print` + fi + + tar $TARFLAGS_CREATE $TARFILE \ + interbase/bin \ + interbase/doc \ + interbase/examples \ + interbase/help \ + interbase/include \ + interbase/install.ksh \ + interbase/intl \ + interbase/UDF \ + interbase/interbase.msg \ + interbase/isc4.gdb \ + interbase/isc_config \ + interbase/isc_ins_hlp.dat \ + interbase/lib \ + interbase/license.txt \ + interbase/ib_license.dat \ + interbase/lock_header_template \ + interbase/services.isc \ + interbase/Release_Notes.pdf + + tar $TARFLAGS_VIEW $TARFILE + else + echo "ERROR: This is not a super server kit!!" + exit 1 + fi +else + # creating client only tar file + echo "Creating Client Only archive" + + #create mtar and copy new stuff + mkdir mtar + mkdir mtar/interbase + mkdir mtar/interbase/bin + mkdir mtar/interbase/examples + mkdir mtar/interbase/include + mkdir mtar/interbase/lib + mkdir mtar/interbase/doc + cp interbase/bin/gbak mtar/interbase/bin/gbak + cp interbase/bin/gdef mtar/interbase/bin/gdef + cp interbase/bin/gfix mtar/interbase/bin/gfix + cp interbase/bin/gpre mtar/interbase/bin/gpre + cp interbase/bin/iblicense mtar/interbase/bin/iblicense + cp interbase/bin/isql mtar/interbase/bin/isql + cp interbase/bin/qli mtar/interbase/bin/qli + cp interbase/doc/* mtar/interbase/doc + cp interbase/examples/v5/* mtar/interbase/examples + rm -f mtar/interbase/examples/*.gdb + cp -r interbase/include mtar/interbase + cp interbase/interbase.msg mtar/interbase/interbase.msg + cp interbase/install.ksh mtar/interbase/install.ksh + + # for SOLARIS + if [ -f interbase/lib/gdsmt.so.1 ]; then + cp interbase/lib/gdsmt.so.1 mtar/interbase/lib/gdsmt.so.0 + ( cd mtar/interbase/lib; ln -s gdsmt.so.0 gds.so.0 ) + TARFLAGS_CREATE="cvpf" + TARFLAGS_VIEW="tvf" + fi + + # for HP-UX + if [ -f interbase/lib/gds.sl.1 ]; then + cp interbase/lib/gds.sl.1 mtar/interbase/lib/gds.sl + TARFLAGS_CREATE="cvpf" + TARFLAGS_VIEW="tvf" + fi + cp interbase/license.txt mtar/interbase/license.txt + cp interbase/install.txt mtar/interbase/install.txt + + #finally cd to this directory + cd mtar + if [ "$TIMESTAMP" != "" ]; then + touch -t $TIMESTAMP `find . -print` + fi + + tar $TARFLAGS_CREATE $TARFILE \ + interbase/bin \ + interbase/doc \ + interbase/examples \ + interbase/include \ + interbase/install.ksh \ + interbase/interbase.msg \ + interbase/lib \ + interbase/license.txt \ + interbase/install.txt + + tar $TARFLAGS_VIEW $TARFILE +fi + +#cd back to top level directory +cd .. + +#move tar file +mv mtar/$TARFILE $TARFILE +if [ "$TIMESTAMP" != "" ]; then + touch -t $TIMESTAMP $TARFILE +else + echo "We did NOT change the timestamp" +fi + +#remove the maketar directory. +rm -rf mtar + diff --git a/src/makefiles/mpm_template b/src/makefiles/mpm_template new file mode 100644 index 0000000000..561158a02d --- /dev/null +++ b/src/makefiles/mpm_template @@ -0,0 +1,26 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +UMASK=`umask` +umask 002 +HERE=`pwd` +#removed runas builder according to inprise tree +#FSG 093000 +cd source/$1 +make +cd $HERE +umask $UMASK diff --git a/src/makefiles/mpp_template b/src/makefiles/mpp_template new file mode 100644 index 0000000000..4b626a6d81 --- /dev/null +++ b/src/makefiles/mpp_template @@ -0,0 +1,27 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +UMASK=`umask` +umask 002 +TARGET=source/$2/$1 +#removed runas builder according to inprise tree +#FSG 093000 + +mv $TARGET $TARGET.bak +cp $1 $TARGET +chmod 644 $TARGET +umask $UMASK diff --git a/src/makefiles/pkginfo b/src/makefiles/pkginfo new file mode 100644 index 0000000000..fee97be2cc --- /dev/null +++ b/src/makefiles/pkginfo @@ -0,0 +1,23 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PKG="interbase" +NAME="InterBase RDBMS Software" +VERSION="InterBase Version 5.1.1" +ARCH="sparc" +CLASSES="none" +BASEDIR=/usr +CATEGORY=application diff --git a/src/makefiles/pkginfo.cl b/src/makefiles/pkginfo.cl new file mode 100644 index 0000000000..28443ba4e4 --- /dev/null +++ b/src/makefiles/pkginfo.cl @@ -0,0 +1,23 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PKG="IBC60" +NAME="InterBase Client only" +VERSION="InterBase Version 6.0" +ARCH="sparc" +CLASSES="none" +BASEDIR=/opt +CATEGORY=application diff --git a/src/makefiles/pkginfo.clnd b/src/makefiles/pkginfo.clnd new file mode 100644 index 0000000000..6ca7244fbb --- /dev/null +++ b/src/makefiles/pkginfo.clnd @@ -0,0 +1,23 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PKG="IBCN60" +NAME="InterBase Client only with no documentation" +VERSION="InterBase Version 6.0" +ARCH="sparc" +CLASSES="none" +BASEDIR=/opt +CATEGORY=application diff --git a/src/makefiles/pkginfo.clsr b/src/makefiles/pkginfo.clsr new file mode 100644 index 0000000000..8ff743f6af --- /dev/null +++ b/src/makefiles/pkginfo.clsr @@ -0,0 +1,23 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PKG="IBCS60" +NAME="InterBase Client and Server" +VERSION="InterBase Version 6.0" +ARCH="sparc" +CLASSES="none" +BASEDIR=/opt +CATEGORY=application diff --git a/src/makefiles/pkginfo.clsrnd b/src/makefiles/pkginfo.clsrnd new file mode 100644 index 0000000000..d434e3322b --- /dev/null +++ b/src/makefiles/pkginfo.clsrnd @@ -0,0 +1,23 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +PKG="IBCSN60" +NAME="InterBase Client and Server with no documentation" +VERSION="InterBase Version 6.0" +ARCH="sparc" +CLASSES="none" +BASEDIR=/opt +CATEGORY=application diff --git a/src/makefiles/platform b/src/makefiles/platform new file mode 100644 index 0000000000..b9eb548b64 --- /dev/null +++ b/src/makefiles/platform @@ -0,0 +1,50 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +if [ $# != 1 ]; then + echo 'Usage: platform {AIX | DELTA | HP700 | NXT | SUN3_4 }' + echo ' {AP | DG | HP800 | SCO | SUN4 }' + echo ' {AX | HM300 | IMP | SGI | UL }' + echo ' {CRAY | HP300 | MU | SOLARIS | SCO_EV }' + echo ' {LINUX }' + exit 1 +fi +# +if [ $1 = 'NOLINK_MACHINE_NAME' -o $1 = 'WIN_NT' -o $1 = 'OS2' \ + -o $1 = 'WIN_NTS' ]; then + SYS_TYPE=NOLINK_OS +else + SYS_TYPE=GENERIC +fi +export SYS_TYPE +# +if [ $1 = 'SUN3_4' -o $1 = 'SUN4' -o $1 = 'AP' -o $1 = 'AX' ]; then + TR='tr "A-Z" "a-z"' +elif [ $1 = 'HP300' -o $1 = 'HP700' -o $1 = 'HP800' -o $1 = 'HM300' -o $1 = 'LINUX' ]; then + TR='tr "[[:upper:]]" "[[:lower:]]"' +else + TR='tr "[A-Z]" "[a-z]"' +fi +BASE=`echo $1 | $TR` +if [ $1 = 'WIN_NT' -o $1 = 'OS2' -o $1 = 'WIN_NTS' ]; then + sed -e "s/\$(BASE)/$BASE/" -e "s/\$(PLATFORM)/builds/" run_edit > tmp1.ksh + tmp1 + rm tmp1.ksh +else + sed -e "s/\$(BASE)/$BASE/" -e "s/\$(PLATFORM)/builds/" run_edit | sh +fi diff --git a/src/makefiles/postinstall b/src/makefiles/postinstall new file mode 100644 index 0000000000..75435066ec --- /dev/null +++ b/src/makefiles/postinstall @@ -0,0 +1,252 @@ +#!/usr/bin/ksh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# /usr/interbase/install -- Install InterBase +# +# The install script looks for the server +# executable and decides if the install is for superserver or classic. +# + +OLD_INTERBASE=$INTERBASE + +if [ "$INTERBASE" = "" ]; then + if [ "$IBASEDIR" != "" ]; then + INTERBASE=$IBASEDIR/interbase + else + INTERBASE="/usr/interbase" + fi +fi + +PATH=$PATH:/usr/ucb:/usr/bsd +export PATH +HOSTNAME=`hostname` +if [ -f $INTERBASE ]; then + echo $INTERBASE is not a directory + echo InterBase installation failed + exit 1 +fi +if [ -d $INTERBASE ]; then + cd $INTERBASE + TARGET=`pwd` +else + echo invalid interbase installation directory $INTERBASE + exit 1 +fi +if [ -f $INTERBASE/bin/ibserver ]; then + SUPERSERVER="SUPERSERVER" + if [ "$INTERBASE" != "/usr/interbase" ] ; then + ln -s $INTERBASE /usr/interbase + fi +else + SUPERSERVER="" +# need the link in classic as isc4.gdb is not moved. + ln -s $INTERBASE /usr/interbase +fi +set -x +# +# Make sure the top level (/usr/interbase) is 777 +# +chmod 777 . +# +# Move standard include file to /usr/include +# +rm -f /usr/include/gds.h +rm -f /usr/include/ibase.h +rm -f /usr/include/iberror.h +rm -f /usr/include/ib_util.h +ln -s $INTERBASE/include/gds.h /usr/include/gds.h +ln -s $INTERBASE/include/ibase.h /usr/include/ibase.h +ln -s $INTERBASE/include/iberror.h /usr/include/iberror.h +ln -s $INTERBASE/include/ib_util.h /usr/include/ib_util.h +# +# Move pipe and full libraries to /usr/lib and re-initialize table of contents +# +rm -f /usr/lib/libgds_b.a +if [ -f lib/gds_b.a ]; then + ln -s $INTERBASE/lib/gds_b.a /usr/lib/libgds_b.a +fi +if [ -f lib/gds.a ]; then + rm -f /usr/lib/libgds.a + ln -s $INTERBASE/lib/gds.a /usr/lib/libgds.a +fi +if [ -f lib/gds.sl ]; then + rm -f /usr/lib/libgds.sl + ln -s $INTERBASE/lib/gds.sl /usr/lib/libgds.sl +fi +if [ -f lib/gdsshr.a ]; then + rm -f /usr/lib/libgdsshr.a + ln -s $INTERBASE/lib/gdsshr.a /usr/lib/libgdsshr.a +fi +if [ -f lib/gds_s.a ]; then + rm -f /usr/lib/libgds_s + rm -f /usr/lib/libgds_s.a + rm -f /usr/lib/libgdsf_s + rm -f /usr/lib/libgdsf_s.a + ln -s $INTERBASE/lib/gds_s /usr/lib/libgds_s + ln -s $INTERBASE/lib/gds_s.a /usr/lib/libgds_s.a + ln -s $INTERBASE/lib/gdsf_s /usr/lib/libgdsf_s + ln -s $INTERBASE/lib/gdsf_s.a /usr/lib/libgdsf_s.a +fi +if [ -f lib/gds.so.0 ]; then + if [ -d /usr/shlib ]; then + rm -f /usr/shlib/libgds.so + rm -f /usr/shlib/libgds.so.0 + ln -s $INTERBASE/lib/gds.so.0 /usr/shlib/libgds.so.0 + ln -s /usr/shlib/libgds.so.0 /usr/shlib/libgds.so + else + rm -f /usr/lib/libgds.so + rm -f /usr/lib/libgds.so.0 + ln -s $INTERBASE/lib/gds.so.0 /usr/lib/libgds.so.0 + ln -s /usr/lib/libgds.so.0 /usr/lib/libgds.so + fi +fi +# This is only for solaris +if [ -f lib/gdsmt.so.0 ]; then + rm -f /usr/lib/libgdsmt.so + rm -f /usr/lib/libgdsmt.so.0 + ln -s $INTERBASE/lib/gdsmt.so.0 /usr/lib/libgdsmt.so.0 + ln -s /usr/lib/libgdsmt.so.0 /usr/lib/libgdsmt.so +fi +if [ -f lib/gdsf.so ]; then + rm -f /usr/lib/libgdsf.so + ln -s $INTERBASE/lib/gdsf.so /usr/lib/libgdsf.so +fi +if [ -f lib/gds_pyxis.a ]; then + rm -f /usr/lib/libgds_pyxis.a + ln -s $INTERBASE/lib/gds_pyxis.a /usr/lib/libgds_pyxis.a +fi +if [ -f lib/ib_util.so ]; then + rm -f /usr/lib/libib_util.so + ln -s $INTERBASE/lib/ib_util.so /usr/lib/libib_util.so +fi + +# +# Protect security, examples and QLI help databases +# +chmod uog=rw isc4.gdb +chmod uog=rw help/help.gdb +chmod uog=rw examples/employee.gdb +chmod uog=rw examples/intlemp.gdb +if [ "$SUPERSERVER" = "SUPERSERVER" ]; then + chmod 4755 $INTERBASE/bin/gstat +fi +# +# If TCP is installed, update both services and servers databases +# +if [ -f /etc/services ]; then + grep -s gds_db /etc/services + if test $? != 0 ; then + cat /etc/services services.isc > services + mv services /etc/services + fi +fi +if [ -f /etc/inetd.conf ]; then + if [ "$SUPERSERVER" = "SUPERSERVER" ]; then + # Remove gds_db service. We do not want gds_inet_server to be invoked + cat /etc/inetd.conf | grep -v gds_db > inetd.conf + mv inetd.conf /etc/inetd.conf + else + grep -s gds_db /etc/inetd.conf + if test $? != 0 ; then + cat /etc/inetd.conf inetd.conf.isc > inetd.conf + mv inetd.conf /etc/inetd.conf + fi + fi +fi +if [ -f /usr/etc/inetd.conf ]; then + if [ "$SUPERSERVER" = "SUPERSERVER" ]; then + # Remove gds_db service. We do not want gds_inet_server to be invoked + cat /usr/etc/inetd.conf | grep -v gds_db > inetd.conf + mv inetd.conf /usr/etc/inetd.conf + else + grep -s gds_db /usr/etc/inetd.conf + if test $? != 0 ; then + cat /usr/etc/inetd.conf inetd.conf.isc > inetd.conf + mv inetd.conf /usr/etc/inetd.conf + fi + fi +fi + +set +x + +# +# create the ibmgr shell script +# +cat > $INTERBASE/bin/ibmgr << EOF +#!/bin/sh +INTERBASE=$INTERBASE +export INTERBASE +exec $INTERBASE/bin/ibmgr.bin \$@ +EOF + +chmod +x $INTERBASE/bin/ibmgr + +# +# Create the license file +# +echo "Please enter the license certificate id: \c" +read REPLY +case "$REPLY" in + "eval" | "" ) + echo Creating a 90-day evaluation license. + $INTERBASE/bin/iblicense -eval + chmod uog=r $INTERBASE/ib_license.dat + ;; + * ) + id=$REPLY + echo "Please enter the license certificate key: \c" + read REPLY + if [ "$REPLY" = "" ] ; then + echo "We need the license key which matches your license id." + echo "Please enter the license certificate key: \c" + read REPLY + fi + if [ "$REPLY" != "" ] ; then + echo Creating the license. + $INTERBASE/bin/iblicense -add -id $id -key $REPLY + chmod uog=r $INTERBASE/ib_license.dat + else + echo \ +"No license created. Please see the release notes to create a license file." + fi + ;; +esac + +# +# Install InterClient if the user chooses to do so. +# +if [ -r $INST_DATADIR/InterClient*.tar ] ; then + done=NO + while [ $done != YES ] ; do + echo "Do you wish to install InterClient[yn]? \c" + read REPLY + case $REPLY in + y|Y|yes|Yes|YES ) + cd /tmp; + tar xpf $INST_DATADIR/InterClient*.tar; + cd interclient_install_temp_dir; + ./install.sh; + done=YES;; + n|N|no|No|NO ) + echo We did NOT install InterClient. + done=YES;; + * ) + echo "Please reply y or n (in upper or lower case)" + esac + done +fi diff --git a/src/makefiles/postinstall.cl b/src/makefiles/postinstall.cl new file mode 100644 index 0000000000..84f6576bce --- /dev/null +++ b/src/makefiles/postinstall.cl @@ -0,0 +1,130 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +ExitError() +{ +echo "\n*** Install completed with errors ***" | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 1 +} + +ExitSuccess() +{ +echo "\nInstall completed successfully" | tee -a $INTERBASE/$LogFile +echo "Install log can be found at $INTERBASE/$LogFile" +exit 0 +} + +Quit() +{ +echo "\nInstall is not complete." | tee -a $TmpLogFile +echo "You may run the install at a later time to complete the installation." | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 2 +} + +echo TmpLogFile=$TmpLogFile +echo LogFile=$LogFile +echo INTERBASE=$INTERBASE +echo SUPERSERVER=$SUPERSERVER +echo IBSymLink=$IBSymLink +echo IBINSTALL=$IBINSTALL + +# +# Make sure the top level ($INTERBASE) is 777 +# +echo "Updating access permissions... \c" +echo "Updating access permissions" >> $TmpLogFile +chmod 777 $INTERBASE +echo "chmod 777 $INTERBASE" >> $TmpLogFile + +# +# Protect security, examples and QLI help databases +# + + +# +# Create the symbolic links +# +echo "Creating symbolic links... \c" +echo "Creating symbolic links" >> $TmpLogFile + +if [ -f $INTERBASE/include/gds.h ]; then + rm -f /usr/include/gds.h + echo "rm -f /usr/include/gds.h" >> $TmpLogFile + ln -s $IBSymLink/include/gds.h /usr/include/gds.h + echo "ln -s $IBSymLink/include/gds.h /usr/include/gds.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/ibase.h ]; then + rm -f /usr/include/ibase.h + echo "rm -f /usr/include/ibase.h" >> $TmpLogFile + ln -s $IBSymLink/include/ibase.h /usr/include/ibase.h + echo "ln -s $IBSymLink/include/ibase.h /usr/include/ibase.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/iberror.h ]; then + rm -f /usr/include/iberror.h + echo "rm -f /usr/include/iberror.h" >> $TmpLogFile + ln -s $IBSymLink/include/iberror.h /usr/include/iberror.h + echo "ln -s $IBSymLink/include/iberror.h /usr/include/iberror.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/ib_util.h ]; then + rm -f /usr/include/ib_util.h + echo "rm -f /usr/include/ib_util.h" >> $TmpLogFile + ln -s $IBSymLink/include/ib_util.h /usr/include/ib_util.h + echo "ln -s $IBSymLink/include/ib_util.h /usr/include/ib_util.h" >> $TmpLogFile +fi + +if [ -f $INTERBASE/lib/gdsmt.so.0 ]; then + rm -f /usr/lib/libgdsmt.so + echo "rm -f /usr/lib/libgdsmt.so" >> $TmpLogFile + rm -f /usr/lib/libgdsmt.so.0 + echo "rm -f /usr/lib/libgdsmt.so.0" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsmt.so.0 /usr/lib/libgdsmt.so.0 + echo "ln -s $IBSymLink/lib/gdsmt.so.0 /usr/lib/libgdsmt.so.0" >> $TmpLogFile + ln -s /usr/lib/libgdsmt.so.0 /usr/lib/libgdsmt.so + echo "ln -s /usr/lib/libgdsmt.so.0 /usr/lib/libgdsmt.so" >> $TmpLogFile +fi +echo "Done" +echo "----------------------------\n" >> $TmpLogFile + + +# +# Create /usr/interbase symbolic link +# + +if [ "$INTERBASE" != "$IBSymLink" ]; then + echo "Creating /usr/interbase symbolic link... \c" + echo "Creating /usr/interbase symbolic link" >> $TmpLogFile + + if [ -f "$IBSymLink" -o -d "$IBSymLink" -o -h "$IBSymLink" ]; then + mv $IBSymLink ${IBSymLink}.$$ + echo "WARNING: Old \"$IBSymLink\" moved to \"${IBSymLink}.$$\"" | tee -a $TmpLogFile + fi + + ln -s $INTERBASE $IBSymLink + echo "ln -s $INTERBASE $IBSymLink" >> $TmpLogFile + echo "Done" + echo "----------------------------\n" >> $TmpLogFile +fi +# +# Move the log file to the $INTERBASE +# +if [ -f $INTERBASE/$LogFile ]; then + cp $INTERBASE/$LogFile $INTERBASE/$LogFile.old + echo "Old $INTERBASE/$LogFile moved to $INTERBASE/$LogFile.old" >> $TmpLogFile +fi +mv $TmpLogFile $INTERBASE/$LogFile +ExitSuccess diff --git a/src/makefiles/postinstall.clsr b/src/makefiles/postinstall.clsr new file mode 100644 index 0000000000..c96973e8a7 --- /dev/null +++ b/src/makefiles/postinstall.clsr @@ -0,0 +1,297 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +ExitError() +{ +echo "\n*** Install completed with errors ***" | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 1 +} + +ExitSuccess() +{ +echo "\nInstall completed successfully" | tee -a $INTERBASE/$LogFile +echo "Install log can be found at $INTERBASE/$LogFile" +exit 0 +} + +Quit() +{ +echo "\nInstall is not complete." | tee -a $TmpLogFile +echo "You may run the install at a later time to complete the installation." | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 2 +} + +echo TmpLogFile=$TmpLogFile +echo LogFile=$LogFile +echo INTERBASE=$INTERBASE +echo SUPERSERVER=$SUPERSERVER +echo IBSymLink=$IBSymLink +echo IBINSTALL=$IBINSTALL +# +# Make sure the top level ($INTERBASE) is 777 +# +echo "Updating access permissions... \c" +echo "Updating access permissions" >> $TmpLogFile +chmod 777 $INTERBASE +echo "chmod 777 $INTERBASE" >> $TmpLogFile + +# +# Protect security, examples and QLI help databases +# +if [ "$SUPERSERVER" ]; then + chmod uog=rw $INTERBASE/isc4.gdb + chmod uog=rw $INTERBASE/examples/database/employee.gdb + chmod uog=rw $INTERBASE/examples/database/intlemp.gdb + chmod 4755 $INTERBASE/bin/gstat + echo "chmod uog=rw $INTERBASE/isc4.gdb" >> $TmpLogFile + echo "chmod uog=rw $INTERBASE/examples/database/employee.gdb" >> $TmpLogFile + echo "chmod uog=rw $INTERBASE/examples/database/intlemp.gdb" >> $TmpLogFile + echo "chmod 4755 $INTERBASE/bin/gstat" >> $TmpLogFile + +fi +echo "Done" +echo "----------------------------\n" >> $TmpLogFile + + +# +# Create the symbolic links +# +echo "Creating symbolic links... \c" +echo "Creating symbolic links" >> $TmpLogFile + +if [ -f $INTERBASE/include/gds.h ]; then + rm -f /usr/include/gds.h + echo "rm -f /usr/include/gds.h" >> $TmpLogFile + ln -s $IBSymLink/include/gds.h /usr/include/gds.h + echo "ln -s $IBSymLink/include/gds.h /usr/include/gds.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/ibase.h ]; then + rm -f /usr/include/ibase.h + echo "rm -f /usr/include/ibase.h" >> $TmpLogFile + ln -s $IBSymLink/include/ibase.h /usr/include/ibase.h + echo "ln -s $IBSymLink/include/ibase.h /usr/include/ibase.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/iberror.h ]; then + rm -f /usr/include/iberror.h + echo "rm -f /usr/include/iberror.h" >> $TmpLogFile + ln -s $IBSymLink/include/iberror.h /usr/include/iberror.h + echo "ln -s $IBSymLink/include/iberror.h /usr/include/iberror.h" >> $TmpLogFile +fi +if [ -f $INTERBASE/include/ib_util.h ]; then + rm -f /usr/include/ib_util.h + echo "rm -f /usr/include/ib_util.h" >> $TmpLogFile + ln -s $IBSymLink/include/ib_util.h /usr/include/ib_util.h + echo "ln -s $IBSymLink/include/ib_util.h /usr/include/ib_util.h" >> $TmpLogFile +fi + +if [ -f $INTERBASE/lib/gds_s.a ]; then + rm -f /usr/lib/libgds_s + echo "rm -f /usr/lib/libgds_s" >> $TmpLogFile + rm -f /usr/lib/libgds_s.a + echo "rm -f /usr/lib/libgds_s.a" >> $TmpLogFile + rm -f /usr/lib/libgdsf_s + echo "rm -f /usr/lib/libgdsf_s" >> $TmpLogFile + rm -f /usr/lib/libgdsf_s.a + echo "rm -f /usr/lib/libgdsf_s.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gds_s /usr/lib/libgds_s + echo "ln -s $IBSymLink/lib/gds_s /usr/lib/libgds_s" >> $TmpLogFile + ln -s $IBSymLink/lib/gds_s.a /usr/lib/libgds_s.a + echo "ln -s $IBSymLink/lib/gds_s.a /usr/lib/libgds_s.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsf_s /usr/lib/libgdsf_s + echo "ln -s $IBSymLink/lib/gdsf_s /usr/lib/libgdsf_s" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsf_s.a /usr/lib/libgdsf_s.a + echo "ln -s $IBSymLink/lib/gdsf_s.a /usr/lib/libgdsf_s.a" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gds.so.0 ]; then + if [ -d /usr/shlib ]; then + rm -f /usr/shlib/libgds.so + echo "rm -f /usr/shlib/libgds.so" >> $TmpLogFile + rm -f /usr/shlib/libgds.so.0 + echo "rm -f /usr/shlib/libgds.so.0" >> $TmpLogFile + ln -s $IBSymLink/lib/gds.so.0 /usr/shlib/libgds.so.0 + echo "ln -s $IBSymLink/lib/gds.so.0 /usr/shlib/libgds.so.0" >> $TmpLogFile + ln -s /usr/shlib/libgds.so.0 /usr/shlib/libgds.so + echo "ln -s /usr/shlib/libgds.so.0 /usr/shlib/libgds.so" >> $TmpLogFile + else + rm -f /usr/lib/libgds.so + echo "rm -f /usr/lib/libgds.so" >> $TmpLogFile + rm -f /usr/lib/libgds.so.0 + echo "rm -f /usr/lib/libgds.so.0" >> $TmpLogFile + ln -s $IBSymLink/lib/gds.so.0 /usr/lib/libgds.so.0 + echo "ln -s $IBSymLink/lib/gds.so.0 /usr/lib/libgds.so.0" >> $TmpLogFile + ln -s /usr/lib/libgds.so.0 /usr/lib/libgds.so + echo "ln -s /usr/lib/libgds.so.0 /usr/lib/libgds.so" >> $TmpLogFile + fi +fi +if [ -f $INTERBASE/lib/gdsmt.so.0 ]; then + rm -f /usr/lib/libgdsmt.so + echo "rm -f /usr/lib/libgdsmt.so" >> $TmpLogFile + rm -f /usr/lib/libgdsmt.so.0 + echo "rm -f /usr/lib/libgdsmt.so.0" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsmt.so.0 /usr/lib/libgdsmt.so.0 + echo "ln -s $IBSymLink/lib/gdsmt.so.0 /usr/lib/libgdsmt.so.0" >> $TmpLogFile + ln -s /usr/lib/libgdsmt.so.0 /usr/lib/libgdsmt.so + echo "ln -s /usr/lib/libgdsmt.so.0 /usr/lib/libgdsmt.so" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gdsf.so ]; then + rm -f /usr/lib/libgdsf.so + echo "rm -f /usr/lib/libgdsf.so" >> $TmpLogFile + ln -s $IBSymLink/lib/gdsf.so /usr/lib/libgdsf.so + echo "ln -s $IBSymLink/lib/gdsf.so /usr/lib/libgdsf.so" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/gds_pyxis.a ]; then + rm -f /usr/lib/libgds_pyxis.a + echo "rm -f /usr/lib/libgds_pyxis.a" >> $TmpLogFile + ln -s $IBSymLink/lib/gds_pyxis.a /usr/lib/libgds_pyxis.a + echo "ln -s $IBSymLink/lib/gds_pyxis.a /usr/lib/libgds_pyxis.a" >> $TmpLogFile +fi +if [ -f $INTERBASE/lib/ib_util.so ]; then + rm -f /usr/lib/libib_util.so + echo "rm -f /usr/lib/libib_util.so" >> $TmpLogFile + ln -s $IBSymLink/lib/ib_util.so /usr/lib/libib_util.so + echo "ln -s $IBSymLink/lib/ib_util.so /usr/lib/libib_util.so" >> $TmpLogFile +fi + +echo "Done" +echo "----------------------------\n" >> $TmpLogFile + +# +# If TCP is installed, update both services and servers databases +# +if [ "$SUPERSERVER" ]; then + echo "Updating service name database... \c" + echo "Updating service name database" >> $TmpLogFile + if [ -f /etc/services ]; then +# grep option -q is quiet mode +# -s Supress any output. +# These options are available only on /usr/xpg4/bin/grep which +# is available on solaris 2.5 and above. +# + /usr/xpg4/bin/grep -q -s gds_db /etc/services + if test $? != 0 ; then + cat /etc/services $INTERBASE/services.isc > /tmp/ib-services + echo "cat /etc/services $INTERBASE/services.isc > /tmp/ib-services" >> $TmpLogFile + mv /tmp/ib-services /etc/services + echo "mv /tmp/ib-services /etc/services" >> $TmpLogFile + fi + fi + echo "Done" + echo "----------------------------\n" >> $TmpLogFile + echo "Updating configuration file for inetd... \c" + echo "Updating configuration file for inetd" >> $TmpLogFile + if [ -f /etc/inetd.conf ]; then + # Remove gds_db service. We do not want gds_inet_server to be invoked + cat /etc/inetd.conf | grep -v gds_db > /tmp/ib-inetd.conf + echo "cat /etc/inetd.conf | grep -v gds_db > /tmp/ib-inetd.conf" >> $TmpLogFile + mv /tmp/ib-inetd.conf /etc/inetd.conf + echo "mv /tmp/ib-inetd.conf /etc/inetd.conf" >> $TmpLogFile + fi + if [ -f /usr/etc/inetd.conf ]; then + # Remove gds_db service. We do not want gds_inet_server to be invoked + cat /usr/etc/inetd.conf | grep -v gds_db > /tmp/ib-inetd.conf + echo "cat /usr/etc/inetd.conf | grep -v gds_db > /tmp/ib-inetd.conf" >> $TmpLogFile + mv /tmp/ib-inetd.conf /usr/etc/inetd.conf + echo "mv /tmp/ib-inetd.conf /usr/etc/inetd.conf" >> $TmpLogFile + fi + echo "Done" + echo "----------------------------\n" >> $TmpLogFile +fi + +# +# create the ibmgr shell script +# +if [ "$SUPERSERVER" ]; then +echo "Creating the ibmgr shell script... \c" +echo "Creating the ibmgr shell script" >> $TmpLogFile +cat > $INTERBASE/bin/ibmgr << EOF +#!/bin/sh +INTERBASE=$INTERBASE +export INTERBASE +exec $INTERBASE/bin/ibmgr.bin \$@ +EOF + +chmod +x $INTERBASE/bin/ibmgr +echo "Done" +echo "----------------------------\n" >> $TmpLogFile +fi + +# +# Create the license file +# +if [ "$SUPERSERVER" ]; then +INTERBASE="$INTERBASE"; export INTERBASE +echo "Creating the license file" >> $TmpLogFile +echo "\nPlease enter the license certificate id: \c" | tee -a $TmpLogFile +read id +case "$id" in + "eval" | "" ) + echo "Creating a 90-day evaluation license..." | tee -a $TmpLogFile + $INTERBASE/bin/iblicense -eval + chmod uog=r $INTERBASE/ib_license.dat + ;; + * ) + echo "Please enter the license certificate key: \c" | tee -a $TmpLogFile + read key + if [ -z "$key" ] ; then + echo "We need the license key which matches your license id." | tee -a $TmpLogFile + echo "Please enter the license certificate key: \c" | tee -a $TmpLogFile + read key + fi + if [ ! -z "$key" ] ; then + echo "Creating the license..." | tee -a $TmpLogFile + $INTERBASE/bin/iblicense -add -id $id -key $key + if [ $? -eq 0 ]; then + chmod uog=r $INTERBASE/ib_license.dat + else + ExitError + fi + else + echo "ERROR: No license created. Please see the release notes" | tee -a $TmpLogFile + echo " to create a license file." | tee -a $TmpLogFile + ExitError + fi + ;; +esac +fi +# +# Create /usr/interbase symbolic link +# + +if [ "$INTERBASE" != "$IBSymLink" ]; then + echo "Creating /usr/interbase symbolic link... \c" + echo "Creating /usr/interbase symbolic link" >> $TmpLogFile + + if [ -f "$IBSymLink" -o -d "$IBSymLink" -o -h "$IBSymLink" ]; then + mv $IBSymLink ${IBSymLink}.$$ + echo "WARNING: Old \"$IBSymLink\" moved to \"${IBSymLink}.$$\"" | tee -a $TmpLogFile + fi + + ln -s $INTERBASE $IBSymLink + echo "ln -s $INTERBASE $IBSymLink" >> $TmpLogFile + echo "Done" + echo "----------------------------\n" >> $TmpLogFile +fi +# +# Move the log file to the $INTERBASE +# +if [ -f $INTERBASE/$LogFile ]; then + cp $INTERBASE/$LogFile $INTERBASE/$LogFile.old + echo "Old $INTERBASE/$LogFile moved to $INTERBASE/$LogFile.old" >> $TmpLogFile +fi +mv $TmpLogFile $INTERBASE/$LogFile +ExitSuccess diff --git a/src/makefiles/prefix.aix b/src/makefiles/prefix.aix new file mode 100644 index 0000000000..f54e26a60a --- /dev/null +++ b/src/makefiles/prefix.aix @@ -0,0 +1,123 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES +PROD_GDSSHR_LINK= + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g +DEV_GDSSHR_LINK= $(SHRLIB_DIR) -lgdsshr + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= -qchars=signed $($(VERSION)_CFLAGS) + +ACCESS_METHOD= gdslib.aix +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/sbin +BRIDGE_MISC= head5.o allp.o +CFLAGS_JRD_INI= -qnoro +CFLAGS_PYXIS= -DNLS +CHMOD_VAL= 666 +COPT_INTL_CS_JIS= YES +COPT_JRD_JRD= NO +COPT_JRD_SDW= NO +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -lcurses +GDSSHR= source/interbase/lib/gdsshr.a +AIX_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgdsshr +HLPDIR= source/qli/ +INCLUDES= include_aix +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_PIC_FLAGS= $(INTL_CFLAGS) +INTL_LD_LINE= cc -e LD_lookup $($(VERSION)_GDSSHR_LINK) -o gdsintl +INTL_TARGET= gdsintl.sl +IO_OBJECTS= unix.o +LANG_OBJECTS= cob.o ftn.o +LANGUAGES= cc microfocus_cob cxx make5 gdl2 aix_ftn +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds/lib -lmu +PIC_FLAGS= $(CFLAGS) +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +PIPE= gds.a gds_pipe +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(SERVER_LINK) +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop + + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar rl +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.aix_ppc b/src/makefiles/prefix.aix_ppc new file mode 100644 index 0000000000..f135c3bbea --- /dev/null +++ b/src/makefiles/prefix.aix_ppc @@ -0,0 +1,123 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES +PROD_GDSSHR_LINK= + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g +DEV_GDSSHR_LINK= $(SHRLIB_DIR) -lgdsshr + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= -qchars=signed $($(VERSION)_CFLAGS) + +ACCESS_METHOD= gdslib.aix_ppc +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/sbin +BRIDGE_MISC= head5.o allp.o +CFLAGS_JRD_INI= -qnoro +CFLAGS_PYXIS= -DNLS +CHMOD_VAL= 666 +COPT_INTL_CS_JIS= YES +COPT_JRD_JRD= NO +COPT_JRD_SDW= NO +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -lcurses +GDSSHR= source/interbase/lib/gdsshr.a +AIX_PPC_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgdsshr +HLPDIR= source/qli/ +INCLUDES= include_aix +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_PIC_FLAGS= $(INTL_CFLAGS) +INTL_LD_LINE= cc -e LD_lookup $($(VERSION)_GDSSHR_LINK) -o gdsintl +INTL_TARGET= gdsintl.sl +IO_OBJECTS= unix.o +LANG_OBJECTS= cob.o ftn.o +LANGUAGES= cc microfocus_cob cxx make5 gdl2 aix_ftn +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds/lib -lmu +PIC_FLAGS= $(CFLAGS) +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +PIPE= gds.a gds_pipe +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(SERVER_LINK) +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop + + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar rl +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.ap b/src/makefiles/prefix.ap new file mode 100644 index 0000000000..34caee7cea --- /dev/null +++ b/src/makefiles/prefix.ap @@ -0,0 +1,114 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -W0,-pic -Tany -W0,-natural -W0,-nalnchk + +ACCESS_METHOD= gdslib.apollo +AMBX_SERVER= gds_server +BIN_PATH= /gds/com +BURP_REMOTE_LINK= source/remote/xdr.o +CHMOD_VAL= 777 +COPT_JRD_ISC= YES +ENTRY_LIST= entry_list +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b +GDSSHR= source/interbase/lib/gdslib +AP_GDSSHR= $(GDSSHR) +HLPDIR= source/qli/ +INCLUDES= include_apollo +INTL= intl +INTL_LD_LINE= /com/bind -mergebss -b $* +INTL_LD_TARGET= -loadhigh -exactcase -mark LD_lookup +INTL_PIC_FLAGS= $(CFLAGS) +INTL_TARGET= gdsintl.sl +IO_OBJECTS= apollo.o +JRD_MISC_OBJECTS= sun_ftn.o +LANG_OBJECTS= ada.o ftn.o pas.o +LANGUAGES= cc cxx ada apollo_ada apollo_ftn apollo_pas make1 gdl1 apollo +LINK_OPTS= -r -a +LOCK_HEADER= lock_header_template +MARION_DB= -d source/marion.gdb +NET_OBJECTS= $(REMDIR)ambx.o $(REMDIR)xdr.o +PIC_FLAGS= $(CFLAGS) +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)adm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(SERVER_LINK) +REMOTELIB= remotelib +SERVER_LINK= $(GDSSHR_LINK) +SPECIAL_OPT= source/special_opt + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar rl +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.ax b/src/makefiles/prefix.ax new file mode 100644 index 0000000000..bbe2fd1128 --- /dev/null +++ b/src/makefiles/prefix.ax @@ -0,0 +1,114 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(CFLAGS) $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -W0,-pic -Tany + +ACCESS_METHOD= gdslib.apollo +AMBX_SERVER= gds_server +BIN_PATH= /gds/com +BURP_REMOTE_LINK= source/remote/xdr.o +CFLAGS_LOCK= -W0,-natural +CHMOD_VAL= 777 +COPT_JRD_ISC= YES +ENTRY_LIST= entry_list +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b +GDSSHR= source/interbase/lib/gdslib +AX_GDSSHR= $(GDSSHR) +HLPDIR= source/qli/ +INCLUDES= include_apollo +INTL= intl +INTL_LD_LINE= /com/bind -mergebss -b $* +INTL_LD_TARGET= -loadhigh -exactcase -mark LD_lookup +INTL_PIC_FLAGS= $(CFLAGS) +INTL_TARGET= gdsintl.sl +IO_OBJECTS= apollo.o +JRD_MISC_OBJECTS= sun_ftn.o +LANG_OBJECTS= ada.o ftn.o pas.o +LANGUAGES= cc cxx ada apollo_ada apollo_ftn apollo_pas make4 gdl1 apollo +LINK_OPTS= -r -a +LOCK_HEADER= lock_header_template +MARION_DB= -d source/marion.gdb +NET_OBJECTS= $(REMDIR)ambx.o $(REMDIR)xdr.o +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)adm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(SERVER_LINK) +REMOTELIB= remotelib +SERVER_LINK= $(GDSSHR_LINK) +SPECIAL_OPT= source/special_opt + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar rl +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.cray b/src/makefiles/prefix.cray new file mode 100644 index 0000000000..7bf1d2c509 --- /dev/null +++ b/src/makefiles/prefix.cray @@ -0,0 +1,99 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(CFLAGS) $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -hnoopt + +ACCESS_METHOD= pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +CC= SCC +EXAMPLES_DBS= source/examples/ +GDS_LINK= $(GDSSHR_LINK) +GDSLIB= source/interbase/lib/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -lcurses +GDSSHR= source/interbase/lib/gds.a +GDSSHR_LINK= -L source/jrd -lgds -lcurses +HLPDIR= source/qli/ +INET_LIBRARY= inet_server.a +INTL_MISC= $(INTL_OBJECTS) +IO_OBJECTS= unix.o +LANG_OBJECTS= ftn.o +LANGUAGES= cc cxx ndl make3 gdl1 ftn +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +PIPE= gds.a gds_pipe.a gds_pipe +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSLIB) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +SERVER_LINK= $(GDSLIB_LINK) +SPECIAL_OPT= source/special_opt +UTILITIES= drop +WHYPS_O= whyps.o + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.darwin b/src/makefiles/prefix.darwin new file mode 100644 index 0000000000..461d665680 --- /dev/null +++ b/src/makefiles/prefix.darwin @@ -0,0 +1,193 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# +# Copyright (C) 2000 Inprise Corporation +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Start of file prefix.darwin: $(VERSION) @PLATFORM@ +#$Id: prefix.darwin,v 1.1 2001-07-12 06:32:04 bellardo Exp $ + +.SUFFIXES: .bin .o .cpp .c +.cpp.o: + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +.cpp.bin: + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -o $*.bin $< +.c.o: + $(CC) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O3 + + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -ggdb + +FBFW_PREFIX= Firebird2 +FW_NAME= $(FBFW_PREFIX).framework +FW_PATH= $(OBJS)/firebird +FB_FRAMEWORK= $(FW_PATH)/$(FW_NAME) +FW_VERS= 1.1.0 +FW_COMPAT_VERS= 1.0.0 +PHASE2_SHLIB_PATH= unset INTERBASE; export DYLD_FRAMEWORK_PATH=$(OBJS)/firebird; +POST_BUILD_TARGET= darwin_framework +SS_POST_BUILD_TARGET= ss_darwin_framework + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +SHRLIB_EXT= .dylib +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS_COMMON= $($(VERSION)_CFLAGS) -w -F$(FW_PATH) +#CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG) +PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -dynamic -fno-common +SPECIAL_OBJECTS= j +UDF_LINK_CMD= libtool +UDF_CFLAGS= -dynamic -fno-common +UDF_LFLAGS= -dynamic +UDF_SHRLIBS= -lcc_dynamic -framework System + +#NOTE: PIC_J_CFLAGS is special CFLAGS used to build PIPD_IS_SHRLIB modules +# to workaround the Solaris threading problems with signals + + +#NOTE: -Xt is ANSI C transition mode (default) +# -DBDS_COMP is for BSD Compatibility package and is used in + +ACCESS_METHOD= gdslib.dylib pipe +BACKEND_BRIDGE_MISC= $(OBJS)/pipe/head5.o $(OBJS)/pipe/allp.o +BIN_PATH= /usr/isc/bin +BRIDGE_MISC= $(OBJS)/pipe/head5.o $(OBJS)/pipe/allp.o +CHMOD_VAL= 666 +CURSES_LIB= +DSQL_P_OBJS= dsql_p_objects +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FUNCTIONS= functions.bin +FUNCSHR= $(OBJS)/firebird/lib/gdsf.so +DROP_LINK= $(GDS_LINK) +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= $(OBJS)/firebird/lib/gds_b.a +GDSLIB_LINK= -L$(OBJS)/jrd -lgds_b +#LINK_OPTS= -F$(FW_PATH) -framework $(FBFW_PREFIX) +#SS_LINK_OPTS= -F$(FW_PATH) +GPRE_BOOT_LINK_OPTS= +PLATFORM_INSTALLER= darwin_installer +SUPER_PLATFORM_INSTALLER= super_darwin_installer + +GDSSHR_DEST= $(OBJS)/firebird/lib/gds.dylib +GDSSHR= gds.dylib +#LINUX_GDSSHR= $(GDSSHR) +GDSSHR_LINK= -F$(FW_PATH) -framework $(FBFW_PREFIX) +#GDSSHR_LINK= $(SHRLIB_DIR) -lgds_pyxis +#PIPE_GDSSHR= $(OBJS)/firebird/lib/gds.so.0 +#PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds_pyxis +PIPE_GDSSHR_LINK= $(SHRLIB_DIR) +HLPDIR= $(SOURCE)/qli/ +HOSTNAME= `hostname | cut -d'.' -f1` +INCLUDES= include_so include_so_ada include_darwin +INTL= intl + +INTL_CFLAGS= -bundle $(CFLAGS) +INTL_LD_LINE= cc -bundle -o gdsintl -F$(OBJS)/firebird -framework $(FBFW_PREFIX) +INTL_PIC_FLAGS= -bundle $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= +JRD_J_MISC_OBJECTS= +#JRD_P_MISC_OBJECTS= $(OBJS)/jrd/nodebug.bin +JRD_P_MISC_OBJECTS= +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada microfocus_cob make16 gdl1 +LD_LIBS= -lcc_dynamic +LD_LIBS_J= +LD_OPTS= -dylib +LOCK_JRD_MISC= +LOCK_MANAGER= +MARION_DB= -d source/marion.gdb +MUISQL= muisql +#MUISQL_MU_LIB= -L /usr/gds.$(HOSTNAME)/qa_tools/lib -lmu +MUISQL_MU_LIB= -L /usr/gds.$(HOSTNAME)/qa_tools/lib -lmu +MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) +PIC_FLAGS= $(CFLAGS) -dynamic -fno-common +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +#SPECIAL_OPT= $(SOURCE)/special_opt +SPECIAL_OPT= +NETWORK_LIB= +SOCKET_LIB= +THREAD_LIB= -lpthread +SUN_FUNCSHR= $(FUNCSHR) +DARWIN_SUPER_GDSSHR= $(OBJS)/firebird/lib/gds.dylib.1 +SUPER_CLIENT_GDSSHR= $(DARWIN_SUPER_GDSSHR) +SUPER_BACKEND= $(OBJS)/jrd/gds_ss.a +SUPER_LINK= -L$(OBJS)/jrd -lgds_ss -framework System -framework Foundation +SUPER_SERVER= +UTILITIES= +WAL_P_OBJS= wal_p_objects + +SU_EXEC= $(SOURCE)/su_exec.sh + + +SUPER_SERVER_DEST= $(OBJS)/firebird/bin/ibserver +INET_SERVER_DEST= $(OBJS)/firebird/bin/gds_inet_server +DNET_SERVER_DEST= $(OBJS)/firebird/bin/gds_dnet_server +AMBX_SERVER_DEST= $(OBJS)/firebird/bin/gds_server +INET_LIB_DEST= $(OBJS)/firebird/lib/gds_inet_server.a +DNET_LIB_DEST= $(OBJS)/firebird/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= $(OBJS)/lock/printv3.o + +MSG_INSTALL_CMD= $(CP) $(OBJS)/firebird/interbase.msg $(FB_FRAMEWORK)/Resources/English.lproj +CARBONCORE_DIR_FLAG= -F/System/Library/Frameworks/CoreServices.framework/Frameworks +COREFOUNDATION_LINK= -framework CoreFoundation + +# End of file prefix.darwin: $(VERSION) $(PLATFORM) diff --git a/src/makefiles/prefix.decosf b/src/makefiles/prefix.decosf new file mode 100644 index 0000000000..ca62b6cf50 --- /dev/null +++ b/src/makefiles/prefix.decosf @@ -0,0 +1,113 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g -w + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -std + +ACCESS_METHOD= gdslib.decosf pipe +BIN_PATH= /usr/gds.seaquest/bin +CHMOD_VAL= 777 +COPT_JRD_SDW= NO +COPT_JRD_JRD= NO +DNET_SERVER= dnet_server +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= noform.o +FORM_TRN_OBJECTS= form_trn.o +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -ldnet_stub +GDSSHR= source/interbase/lib/gds.so.0 +DECOSF_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds +HLPDIR= source/qli/ +INCLUDES= +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -shared -Bsymbolic -o $* +INTL_LD_TARGET= $(LD_LIBS) +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +LANG_OBJECTS= +LANGUAGES= cc cxx +LD_LIBS= -lc -ldnet_stub +LD_OPTS= -shared -p gds.bind -soname +LIB_TYPE= -a archive +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +NET_OBJECTS= $(REMDIR)dnet.o +PIC_FLAGS= $(CFLAGS) +PIPE= gds.a gds_pipe +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(SERVER_LINK) +SERVER_LINK= $(GDSSHR_LINK) -ldnet_stub +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop + +MUISQL_MU_LIB= -L/usr/gds.seaquest/tools/mu -lmu + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar rl +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.delta b/src/makefiles/prefix.delta new file mode 100644 index 0000000000..afbb2c566b --- /dev/null +++ b/src/makefiles/prefix.delta @@ -0,0 +1,111 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(EXPAND_DBNAME) $< + $(GPRE) $(GPRE_FLAGS) $< + $(COMPRESS_DBNAME) $< + $(COMPRESS_CDBNAME) $*.c +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(CFLAGS) $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) + +ACCESS_METHOD= pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +COMPRESS_DBNAME= source/compress_dbs +COMPRESS_CDBNAME= source/compress_dbs +EXAMPLES_DBS= $(DB_DIR)/examples/ +EXPAND_DBNAME= source/expand_dbs +FORM_OBJECTS= noform.o +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= source/interbase/lib/gds_b.a +GDSSHR= source/interbase/lib/gds.a +GDSSHR_LINK= source/interbase/lib/gds.a +HLPDIR= $(DB_DIR)/qli/ +INET_LIBRARY= inet_server.a +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_TARGET= intl_objects +INTL_MISC= $(INTL_OBJECTS) +IO_OBJECTS= unix.o +JRNDIR= $(DB_DIR)/journal/ +LANG_OBJECTS= +LANGUAGES= cc cxx ndl make12 gdl1 +LOCK_MANAGER= manager +MSGSDIR= $(DB_DIR)/msgs/ +PIPE= gds.a gds_pipe.a gds_pipe +PIPE_LIBRARY= gds_pipe.a +REG_HELP= isc_ins.hlp +REMOTE_GDSSHR= $(GDSLIB) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +SERVER_LINK= $(GDSLIB_LINK) +SPECIAL_OPT= source/special_opt +TOUCH_C= touch $*.c +UTILITIES= drop +WHYPS_O= whyps.o + +INET_SERVER_DEST= source/interbase/bin/gds_inet_srvr +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_srvr +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_svr.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_svr.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= source/expand_dbs +COMPRESS_DBNAME= source/compress_dbs +COMPRESS_JRN= source/compress_dbs source/journal.gdl + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.dg b/src/makefiles/prefix.dg new file mode 100644 index 0000000000..abd5cc100e --- /dev/null +++ b/src/makefiles/prefix.dg @@ -0,0 +1,132 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -Wa,-o,$*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) + +ACCESS_METHOD= gdslib.dg pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +COPT_JRD_DYN= YES +COPT_DUDLEY_EXE= YES +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +FUNCSHR= source/interbase/lib/gdsf.so +GDS_LINK= $(GDSSHR_LINK) +DG_FUNCSHR= $(FUNCSHR) +GDS_PYXIS= gds_pyxis.a +GDSFLIB= gdsf.so +GDSF_LIB= -lgdsf +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -ldl +GDSSHR= source/interbase/lib/gds.so.0 +DG_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgdsf -lgds_pyxis +HLPDIR= source/qli/ +INCLUDES= include_dg +INTL= intl +INTL_CFLAGS= $(CFLAGS) -D$(SYSTEM) +INTL_MISC= $(INTL_OBJECTS) +INTL_P_MISC= $(INTL_P_OBJECTS) +INTL_P_OBJS= intl +INTL_PIC_FLAGS= $(PIC_FLAGS) -D$(SYSTEM) +INTL_TARGET= intl_objects intl_p_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= sun_ftn.o +JRD_P_MISC_OBJECTS= sun_ftn.bin nodebug.bin +LANG_OBJECTS= cob.o ftn.o +LANGUAGES= cc cxx microfocus_cob make10 ndl gdl1 dg_ftn +LD_LIBS= -lc -ldgc -ldl +LD_OPTS= -G -h +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +PIC_FLAGS= $(CFLAGS) -K PIC +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop +VT100_FLAGS= -D_BSD_TTY_FLAVOR +WAL_P_OBJS= wal_p_objects +ZDEFS= -z defs + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.dg_x86 b/src/makefiles/prefix.dg_x86 new file mode 100644 index 0000000000..193ea16111 --- /dev/null +++ b/src/makefiles/prefix.dg_x86 @@ -0,0 +1,136 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES -fwritable-strings + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g -fwritable-strings + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -DDG_X86 + +ACCESS_METHOD= gdslib.dg_x86 pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +HOSTNAME= .`hostname` +BIN_PATH= /usr/gds$(HOSTNAME)/bin + +CC= gcc +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +COPT_JRD_DYN= YES +COPT_DUDLEY_EXE= YES +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +FUNCSHR= source/interbase/lib/gdsf.so +GDS_LINK= $(GDSSHR_LINK) +DG_X86_FUNCSHR= $(FUNCSHR) +GDS_PYXIS= gds_pyxis.a +GDSFLIB= gdsf.so +GDSF_LIB= -lgdsf +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -ldl -lgds_pyxis -lsocket -lnsl +GDSSHR= source/interbase/lib/gds.so.0 +DG_X86_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -ldl -lgds -lgdsf -lgds_pyxis -lsocket -lnsl +HLPDIR= source/qli/ +INCLUDES= include_dg_x86 +INTL= intl +INTL_CFLAGS= $(CFLAGS) -D$(SYSTEM) +INTL_MISC= $(INTL_OBJECTS) +INTL_P_MISC= $(INTL_P_OBJECTS) +INTL_P_OBJS= intl +INTL_PIC_FLAGS= $(PIC_FLAGS) -D$(SYSTEM) +INTL_TARGET= intl_objects intl_p_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= sun_ftn.o +JRD_P_MISC_OBJECTS= sun_ftn.bin nodebug.bin +LANG_OBJECTS= cob.o ftn.o +LANGUAGES= cc cxx microfocus_cob make10 ndl gdl1 dg_x86_ftn +LD_LIBS= -ldl -lsocket -lnsl +LD_OPTS= -G -h +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +PIC_FLAGS= $(CFLAGS) -fpic +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop +VT100_FLAGS= -D_BSD_TTY_FLAVOR +WAL_P_OBJS= wal_p_objects +NSL_LIB= -lnsl +SOCKET_LIB= -lsocket -lnsl + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.epson b/src/makefiles/prefix.epson new file mode 100644 index 0000000000..e2dd81d56b --- /dev/null +++ b/src/makefiles/prefix.epson @@ -0,0 +1,107 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -Wa,-o,$*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) -K PIC + +ACCESS_METHOD= gdslib.epson pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +FORM_OBJECTS= noform.o +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -lnsl -lsocket -ldl +GDSSHR= source/interbase/lib/gds.so.0 +EPSON_GDSSHR= $(GDSSHR) +GDSSHR_LINK= -Lsource/jrd -lgds -lnsl -lsocket +HLPDIR= source/qli/ +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -Bdynamic -z text -o gdsintl +INTL_PIC_FLAGS= $(CFLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +JRD_MISC_OBJECTS= stubs.o +LANG_OBJECTS= +LANGUAGES= cc cxx gdl1 make15 +LD_LIBS= -ldl +LD_OPTS= -G -h +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +NSL_LIB= -lnsl +PIPE= gds.a gds_pipe +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SOCKET_LIB= -lnsl -lsocket +SPECIAL_OPT= sh source/special_opt +UTILITIES= drop + +INET_SERVER_DEST= source/interbase/bin/gds_inet_srvr +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_srvr +AMBX_SERVER_DEST= source/interbase/bin/gds_srvr +INET_LIB_DEST= source/interbase/lib/gds_inet_svr.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_svr.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.freebsd b/src/makefiles/prefix.freebsd new file mode 100644 index 0000000000..d2d3426ba9 --- /dev/null +++ b/src/makefiles/prefix.freebsd @@ -0,0 +1,167 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Start of file prefix.freebsd: $(VERSION) $(PLATFORM) +#$Id: prefix.freebsd,v 1.1 2001-07-12 06:32:04 bellardo Exp $ + +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= -Lsource/jrd +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -m486 -fpic -DFLINTSTONE + + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -ggdb + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS_COMMON= $($(VERSION)_CFLAGS) -Isource/interbase/include -DFREEBSD -w -fwritable-strings +CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG) +PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC +SPECIAL_OBJECTS= j +UDF_LINK_CMD= gcc +UDF_CFLAGS= -fPIC -mieee-fp +UDF_LFLAGS= -shared +UDF_SHRLIBS= $(SHRLIB_DIR) -lgds -lm -lc -mieee-fp -ldescrypt + +#NOTE: PIC_J_CFLAGS is special CFLAGS used to build PIPD_IS_SHRLIB modules +# to workaround the Solaris threading problems with signals + + +#NOTE: -Xt is ANSI C transition mode (default) +# -DBDS_COMP is for BSD Compatibility package and is used in + +ACCESS_METHOD= gdslib.freebsd pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= interbase/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +CURSES_LIB= -lncurses +DSQL_P_OBJS= dsql_p_objects +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FUNCTIONS= functions.bin +FUNCSHR= source/interbase/lib/gdsf.so +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -lc -ldescrypt + +GDSSHR= source/interbase/lib/gds.so +LINUX_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis -ldescrypt +PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis +HLPDIR= source/qli/ +HOSTNAME= `hostname | cut -d'.' -f1` +INCLUDES= include_so include_so_ada +INTL= intl + +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= source/jrd/sun_ftn.o +JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j +JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn +LD_LIBS= -lc +LD_LIBS_J= -lc +LD_OPTS= -shared +LOCK_JRD_MISC= source/jrd/thd.o +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds.$(HOSTNAME)/qa_tools/lib -lmu +MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm +PIC_FLAGS= $(CFLAGS) -fPIC +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= +#SCREEN_LIBS= -lncurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +NETWORK_LIB= +SOCKET_LIB= -lc +THREAD_LIB= -llthread +SUN_FUNCSHR= $(FUNCSHR) +LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1 +SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR) +SUPER_BACKEND= source/jrd/gds_ss.a +SUPER_LINK= -Lsource/jrd -lgds_ss -lc -ldescrypt -L/usr/local/lib -llthread +SUPER_SERVER= +UTILITIES= +WAL_P_OBJS= wal_p_objects + + +SUPER_SERVER_DEST= source/interbase/bin/ibserver +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= +SHRLIB_EXT= .so + +V3PRINTER= source/lock/printv3.o + +# Forces library build for FreeBSD +PYXIS_LIBRARY= libpyxis.a + +# End of file prefix.freebsd: $(VERSION) $(PLATFORM) diff --git a/src/makefiles/prefix.hm300 b/src/makefiles/prefix.hm300 new file mode 100644 index 0000000000..45a1239dad --- /dev/null +++ b/src/makefiles/prefix.hm300 @@ -0,0 +1,120 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) +Np400 -D$(SYSTEM) + +ACCESS_METHOD= gdslib.hp pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds.iliad/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 777 +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -ldld +GDSSHR= source/interbase/lib/gds.sl +HP_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -ldld +HM300_BRIDGE_P_MISC= $(BRIDGE_P_MISC) +HLPDIR= source/qli/ +INCLUDES= include_hp include_hp_ada +INTL= intl +INTL_LD_LINE= ld -b -o $* +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_P_MISC_OBJECTS= nodebug.bin +LANG_OBJECTS= ftn.o ada.o +LANGUAGES= cc cxx make9 hp_ftn gdl1 hp_ada other_ada +LDOPTS= -E +LIB_TYPE= -a archive +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +PIC_FLAGS= -O +z +Np400 -D$(SYSTEM) +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +PYXIS_P_OBJS= pyx_p_objects +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SPECIAL_OPT= source/special_opt +UTILITIES= drop +WAL_P_OBJS= wal_p_objects + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.hp10 b/src/makefiles/prefix.hp10 new file mode 100644 index 0000000000..4f0d543e9a --- /dev/null +++ b/src/makefiles/prefix.hp10 @@ -0,0 +1,141 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Wl,+s -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -w -Isource/interbase/include -DHPUX -D_HPUX_SOURCE -Ae -z +DA1.0 +DS1.0 -D$(SYSTEM) -DEXACT_NUMERICS $(SUPER_FLAG) +UDF_LINK_CMD= ld +UDF_CFLAGS= -O +z -Ae -D_HPUX_SOURCE +UDF_SHRLIBS= -lm +UDF_LFLAGS= -b +SHRLIB_EXT= .sl + +# Purify related flags +PFLAGS = -messages=first -leaks-at-exit=yes +PDIR = `purify -print-home-dir` +PURIFY = purify $(PFLAGS) +PSTUBS = $(PDIR)/purify_stubs.a + +ACCESS_METHOD= gdslib.hp pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/sbin +BLD_OPTS= -b -c gds5.bind +CHMOD_VAL= 777 +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -ldld +GDSSHR= source/interbase/lib/gds.sl +HP_GDSSHR= $(GDSSHR) +HP_SUPER_GDSSHR= source/interbase/lib/gds.sl.1 +GDSSHR_LINK= $(SHRLIB_DIR) -lgds_pyxis -lgds -ldld +HLPDIR= source/qli/ +INCLUDES= include_hp include_hp_ada +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -b -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= gdsintl.sl +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +LANG_OBJECTS= ftn.o cob.o ada.o +LANGUAGES= cc cxx microfocus_cob make9 hp_ftn gdl1 hp_ada other_ada +LD_OPTS= -c gds.bind +LIB_TYPE= -a archive +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds/qa_tools/lib -lmu +PIC_FLAGS= $(CFLAGS) +z +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +SUPER_CLIENT_GDSSHR= $(HP_SUPER_GDSSHR) +SUPER_BACKEND= source/jrd/gds_ss.a +SUPER_LINK= -Lsource/jrd -lgds_ss -lV3 -lcma -ldld +SUPER_SERVER= +UTILITIES= +WAL_P_OBJS= wal_p_objects +YFLAGS= -Nc10000 -Ns5000 +UDF_LINK_OPTS= -Wl,-E -Wl,+s + + +SUPER_SERVER_DEST= source/interbase/bin/ibserver +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.hp700 b/src/makefiles/prefix.hp700 new file mode 100644 index 0000000000..4676875511 --- /dev/null +++ b/src/makefiles/prefix.hp700 @@ -0,0 +1,121 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -w -DHPUX -D_HPUX_SOURCE -Aa -z +DA1.0 +DS1.0 -D$(SYSTEM) + +ACCESS_METHOD= gdslib.hp pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BLD_OPTS= -b -c gds5.bind +CHMOD_VAL= 777 +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -ldld +GDSSHR= source/interbase/lib/gds.sl +HP_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds_pyxis -lgds -ldld +HLPDIR= source/qli/ +INCLUDES= include_hp include_hp_ada +INTL= intl +INTL_LD_LINE= ld -b -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= gdsintl.sl +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +LANG_OBJECTS= ftn.o cob.o ada.o +LANGUAGES= cc cxx microfocus_cob make9 hp_ftn gdl1 hp_ada other_ada +LD_OPTS= -c gds.bind +LIB_TYPE= -a archive +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds/qa_tools/lib -lmu +PIC_FLAGS= -O -w +z -z -DHPUX -D_HPUX_SOURCE -Aa +DA1.0 +DS1.0 -D$(SYSTEM) +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop +WAL_P_OBJS= wal_p_objects +YFLAGS= -Nc10000 -Ns5000 + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.hp9.0 b/src/makefiles/prefix.hp9.0 new file mode 100644 index 0000000000..6ad5e219d4 --- /dev/null +++ b/src/makefiles/prefix.hp9.0 @@ -0,0 +1,124 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES +PROD_LINK_OPTS= + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Wl,+s -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g +DEV_LINK_OPTS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -w -DHPUX -D_HPUX_SOURCE -Aa -z +DA1.0 +DS1.0 -DHP700 +LINK_OPTS= $($(VERSION)_LINK_OPTS) + +ACCESS_METHOD= gdslib.hp pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/sbin +BLD_OPTS= -b -c gds5.bind +CHMOD_VAL= 777 +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b -ldld +GDSSHR= source/interbase/lib/gds.sl +HP_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds_pyxis -lgds -ldld +HLPDIR= source/qli/ +INCLUDES= include_hp +INTL= intl +INTL_LD_LINE= ld -b -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= gdsintl.sl +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +LANG_OBJECTS= ftn.o cob.o ada.o +LANGUAGES= cc cxx microfocus_cob make9 hp_ftn gdl1 ada +LD_OPTS= -c gds.bind +LIB_TYPE= -a archive +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds/qa_tools/lib -lmu +PIC_FLAGS= $(CFLAGS) +z +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop +WAL_P_OBJS= wal_p_objects +YFLAGS= -Nc10000 -Ns5000 + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.imp b/src/makefiles/prefix.imp new file mode 100644 index 0000000000..0ee5bad5a6 --- /dev/null +++ b/src/makefiles/prefix.imp @@ -0,0 +1,118 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -Wa,-o,$*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= nodebug.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) + +ACCESS_METHOD= gdslib.imp pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +COPT_DUDLEY_EXE= YES +COPT_GPRE_EXP= NO +COPT_JRD_DYN= YES +COPT_JRD_PAR= NO +COPT_JRD_TRA= NO +DSQL_P_OBJECTS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= noform.o +FUNCSHR= source/interbase/lib/gdsf_s +GDS_LINK= $(SHRLIB_DIR) -lgds +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= -L source/jrd -lgds_b +GDSSHR= source/interbase/lib/gds_s +GDSSHR_LINK= $(SHRLIB_DIR) -lgds_s -lgdsf_s +HLPDIR= source/qli/ +IMP_FUNCSHR= $(FUNCSHR) +IMP_GDSSHR= $(GDSSHR) +INET_LIBRARY= inet_server.a +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_MISC= $(INTL_OBJECTS) +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_P_MISC= $(INTL_P_OBJECTS) +INTL_P_OBJS= intl +INTL_TARGET= intl_objects intl_p_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_P_MISC_OBJECTS= nodebug.bin shrinit.bin +LANG_OBJECTS= +LANGUAGES= cc cxx ndl make11 gdl1 +LINKABLE_LIBS= burplib.a qlilib.a +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +PIC_FLAGS= $(CFLAGS) -DSHLIB_DEFS +PIPE= gds.a gds_pipe.a gds_pipe +PIPE_LIBRARY= gds_pipe.a +REG_HELP= isc_ins.hlp +REMOTE_GDSSHR= $(GDSLIB) +REMOTE_GDSSHR_LINK= $(GDSLIB_LINK) +SERVER_LINK= $(GDSSHR_LINK) +SPECIAL_OPT= sh source/special_opt +T_SWITCH= -t +UTILITIES= drop +WAL_P_OBJS= wal_p_objects + +INET_SERVER_DEST= source/interbase/bin/gds_inet_srvr +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_srvr +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_svr.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_svr.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.linux b/src/makefiles/prefix.linux new file mode 100644 index 0000000000..8cc5369822 --- /dev/null +++ b/src/makefiles/prefix.linux @@ -0,0 +1,179 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Start of file prefix.linux: $(VERSION) $(PLATFORM) +#$Id: prefix.linux,v 1.1 2001-07-12 06:32:04 bellardo Exp $ +#Revision 1.6 2000/12/01 11:20:31 fsg +#Added SHRLIB_EXT to prefix.linux +# + +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O3 -m486 -fpic -DFLINTSTONE + + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd -Lsource/interbase/lib +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -ggdb + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS_COMMON= $($(VERSION)_CFLAGS) -DLINUX -Wall -fwritable-strings -I$(INTERBASE)/include +CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG) +PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC +SPECIAL_OBJECTS= j +UDF_LINK_CMD= gcc +UDF_CFLAGS= -fPIC -mieee-fp +UDF_LFLAGS= -shared +UDF_SHRLIBS= -L$(INTERBASE)/lib -lgds -lm -lc -mieee-fp -ldl -lcrypt + + +#NOTE: PIC_J_CFLAGS is special CFLAGS used to build PIPD_IS_SHRLIB modules +# to workaround the Solaris threading problems with signals + + +#NOTE: -Xt is ANSI C transition mode (default) +# -DBDS_COMP is for BSD Compatibility package and is used in + +ACCESS_METHOD= gdslib.linux pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/isc/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 + +#NOTE: I removed CURSES_LIB= -lbsd because it breaks the build on SuSE systems +# and isn't necessary anymore. +#FSG 091500 + +CURSES_LIB= +DSQL_P_OBJS= dsql_p_objects +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FUNCTIONS= functions.bin +FUNCSHR= source/interbase/lib/gdsf.so +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -lc -ldl -lcrypt + +GDSSHR= source/interbase/lib/gds.so +LINUX_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -ldl -lgds_pyxis -lcrypt -lncurses +#PIPE_GDSSHR= source/interbase/lib/gds.so.0 +PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis +HLPDIR= source/qli/ +HOSTNAME= `hostname | cut -d'.' -f1` +INCLUDES= include_so include_so_ada +INTL= intl + +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= source/jrd/sun_ftn.o +JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j +JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada microfocus_cob make16 gdl1 sun_ftn +LD_LIBS= -lc +LD_LIBS_J= -lc +LD_OPTS= -shared +LOCK_JRD_MISC= source/jrd/thd.o +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds.$(HOSTNAME)/qa_tools/lib -lmu +MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm +PIC_FLAGS= $(CFLAGS) -fPIC +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lncurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +NETWORK_LIB= +SOCKET_LIB= -lc +THREAD_LIB= -lpthread +SUN_FUNCSHR= $(FUNCSHR) +LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1 +SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR) +SUPER_BACKEND= source/jrd/gds_ss.a +SUPER_LINK= -Lsource/jrd -lgds_ss -lc -ldl -lcrypt -lpthread +SUPER_SERVER= +UTILITIES= +WAL_P_OBJS= wal_p_objects + + +SUPER_SERVER_DEST= source/interbase/bin/ibserver +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= +# FSG 1.Dez.2000 +SHRLIB_EXT= .so + + +V3PRINTER= source/lock/printv3.o + +# Forces library build for linux TMC 082100 +PYXIS_LIBRARY= libpyxis.a + + +# End of file prefix.linux: $(VERSION) $(PLATFORM) diff --git a/src/makefiles/prefix.m88k b/src/makefiles/prefix.m88k new file mode 100644 index 0000000000..43c4a52607 --- /dev/null +++ b/src/makefiles/prefix.m88k @@ -0,0 +1,118 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -Wa,-o,$*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= -Lsource/jrd +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) + +ACCESS_METHOD= gdslib.m88k pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds.motor/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +COPT_JRD_SDW= NO +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= noform.o +FRED= +FUNCTIONS= functions.bin +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -lsocket -lnsl -ldl +GDSSHR= source/interbase/lib/gds.so.0 +M88K_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lsocket -lnsl +HLPDIR= source/qli/ +INTL= intl +INTL_CFLAGS= $(CFLAGS) -D$(SYSTEM) +INTL_LD_LINE= ld -G -Bdynamic -z text -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) -D$(SYSTEM) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_P_MISC_OBJECTS= nodebug.bin +LANG_OBJECTS= +LANGUAGES= cc cxx make15 gdl1 +LD_LIBS= -lc -ldl -L/usr/ccs/lib -lc +LD_OPTS= -G -h +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +NSL_LIB= -lnsl +PIC_FLAGS= $(CFLAGS) -K PIC +PIPE= gds.a gds_pipe +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SOCKET_LIB= -lsocket -lnsl +SPECIAL_OPT= source/special_opt +UTILITIES= drop +VT100_FLAGS= -DBSD_COMP +WAL_P_OBJS= wal_p_objects + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.mu b/src/makefiles/prefix.mu new file mode 100644 index 0000000000..3eba5b51bc --- /dev/null +++ b/src/makefiles/prefix.mu @@ -0,0 +1,114 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(CFLAGS) $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -Wf,-XNg1000 + +ACCESS_METHOD= pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +COPT_JRD_SDW= NO +DNET_SERVER= dnet_server +DNET_SERVER_LIB= dnet_server.a +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -ldnet +GDSSHR= source/interbase/lib/gds.a +GDSSHR_LINK= -Lsource/jrd -lgds -ldnet +HLPDIR= source/qli/ +INET_LIBRARY= inet_server.a +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_MISC= $(INTL_OBJECTS) +INTL_TARGET= intl_objects +IO_OBJECTS= unix.o +LANG_OBJECTS= +LANGUAGES= cc cxx ndl make14 gdl1 +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +NET_OBJECTS= $(REMDIR)dnet.o +PIPE= gds.a gds_pipe.a gds_pipe +PIPE_LIBRARY= gds_pipe.a +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSLIB) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +SCREEN_LIBS= -lcurses -ltermlib +SERVER_LINK= $(GDSLIB_LINK) +SPECIAL_OPT= source/special_opt +UTILITIES= drop +WHYPS_O= whyps.o + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.ncr3000 b/src/makefiles/prefix.ncr3000 new file mode 100644 index 0000000000..5100879f34 --- /dev/null +++ b/src/makefiles/prefix.ncr3000 @@ -0,0 +1,119 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= -Lsource/jrd +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) + +ACCESS_METHOD= gdslib.ncr3000 pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +HOSTNAME= .`hostname` +BIN_PATH= /usr/gds$(HOSTNAME)/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_NODE= jughead: +FORM_OBJECTS= noform.o +FUNCTIONS= functions.bin +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -lsocket -lnsl -ldl +GDSSHR= source/interbase/lib/gds.so.0 +NCR3000_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lsocket -lnsl +HLPDIR= source/qli/ +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -z text -o gdsintl +INTL_P_OBJS= intl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= stubs.o +JRD_P_MISC_OBJECTS= nodebug.bin stubs.bin +LANG_OBJECTS= +LANGUAGES= cc cxx make15 gdl1 +LD_LIBS= -ldl +LD_OPTS= -G -h +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L/usr/gds.jughead/qa_tools/lib -lmu +NSL_LIB= -lnsl +PIC_FLAGS= $(CFLAGS) -KPIC +PIPE= gds.a gds_pipe +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SPECIAL_OPT= sh source/special_opt +SOCKET_LIB= -lsocket -lnsl +UTILITIES= drop +VT100_FLAGS= -DBSD_COMP + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.netbsd b/src/makefiles/prefix.netbsd new file mode 100644 index 0000000000..b3029c045f --- /dev/null +++ b/src/makefiles/prefix.netbsd @@ -0,0 +1,173 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Start of file prefix.netbsd: $(VERSION) $(PLATFORM) +#$Id: prefix.netbsd,v 1.1 2001-07-12 06:32:04 bellardo Exp $ + +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + +LIBDIRFLAGS= -L/usr/interbase/lib -R/usr/interbase/lib -R/usr/firebird/lib + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -m486 -fpic -DFLINTSTONE + + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -ggdb + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS_COMMON= $($(VERSION)_CFLAGS) -Isource/interbase/include -DNETBSD -w -fwritable-strings +CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG) +PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC +SPECIAL_OBJECTS= j +UDF_LINK_CMD= gcc +UDF_CFLAGS= -fPIC +UDF_LFLAGS= -shared +UDF_SHRLIBS= $(LIBDIRFLAGS) -lgds -lm -lc -lcrypt + +#NOTE: PIC_J_CFLAGS is special CFLAGS used to build PIPD_IS_SHRLIB modules +# to workaround the Solaris threading problems with signals + + +#NOTE: -Xt is ANSI C transition mode (default) +# -DBDS_COMP is for BSD Compatibility package and is used in + +ACCESS_METHOD= gdslib.netbsd pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= interbase/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FUNCTIONS= functions.bin +FUNCSHR= source/interbase/lib/gdsf.so +GDS_LINK= $(GDSSHR_LINK) +#GDS_PYXIS= +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -lc -lcrypt +#GDSLIB_LINK= -Lsource/jrd -lgds_b -lc ldl -lcrypt + +GDSSHR= source/interbase/lib/gds.so +LINUX_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) $(LIBDIRFLAGS) -lgds -lgds_pyxis -lcrypt +#PIPE_GDSSHR= source/interbase/lib/gds.so.0 +PIPE_GDSSHR_LINK= $(SHRLIB_DIR) $(LIBDIRFLAGS) -lgds -lgds_pyxis +HLPDIR= source/qli/ +HOSTNAME= `hostname | cut -d'.' -f1` +INCLUDES= include_so include_so_ada +INTL= intl + +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= source/jrd/sun_ftn.o +JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j +JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn +LD_LIBS= -lc +LD_LIBS_J= -lc +LD_OPTS= -shared +LOCK_JRD_MISC= source/jrd/thd.o +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds.$(HOSTNAME)/qa_tools/lib -lmu +MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm +PIC_FLAGS= $(CFLAGS) -fPIC +PIPE= gds.a gds_pipe +#PYXIS= +#PYXIS_MISC_OBJS= +#PYXIS_P_MISC_OBJS= +#PYXIS_OBJECTS= +#PYXIS_MISC_OBJECTS= +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= +#SCREEN_LIBS= -lncurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +NETWORK_LIB= +SOCKET_LIB= -lc +THREAD_LIB= -llthread +SUN_FUNCSHR= $(FUNCSHR) +LX_SUPER_GDSSHR= source/interbase/lib/gds.so.1 +SUPER_CLIENT_GDSSHR= $(LX_SUPER_GDSSHR) +SUPER_BACKEND= source/jrd/gds_ss.a +SUPER_LINK= -Lsource/jrd -lgds_ss -lc -lcrypt -L/usr/interbase/lib -llthread +SUPER_SERVER= +UTILITIES= +WAL_P_OBJS= wal_p_objects + + +SUPER_SERVER_DEST= source/interbase/bin/ibserver +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= +SHRLIB_EXT= .so + +V3PRINTER= source/lock/printv3.o + +# End of file prefix.netbsd: $(VERSION) $(PLATFORM) diff --git a/src/makefiles/prefix.nxt b/src/makefiles/prefix.nxt new file mode 100644 index 0000000000..3a470554a3 --- /dev/null +++ b/src/makefiles/prefix.nxt @@ -0,0 +1,108 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -arch i386 -arch m68k -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g -arch i386 -arch m68k + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) + +ACCESS_METHOD= pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +CFLAGS_JRD_INI= -fwritable-strings +COPT_JRD_SDL= NO +COPT_JRD_EVENT= NO +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= noform.o +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -ltermcap +GDSSHR= source/interbase/lib/gds.a +GDSSHR_LINK= -Lsource/jrd -lgds -ltermcap +HLPDIR= source/qli/ +INET_LIBRARY= inet_server.a +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_MISC= $(INTL_OBJECTS) +INTL_TARGET= intl_objects +IO_OBJECTS= unix.o +JRD_HEAD_MISC= sch.o +LANG_OBJECTS= +LANGUAGES= cc cxx ndl make3 gdl1 +LINK_OPTS= -arch i386 -arch m68k +LOCK_HEADER= lock_header_t +LOCK_JRD_MISC= source/jrd/sch.o +MARION_DB= -d source/marion.gdb +PIC_CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) +PIPE= gds.a gds_pipe.a gds_pipe +PIPE_LIBRARY= gds_pipe.a +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSLIB) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +SERVER_LINK= $(GDSLIB_LINK) +SPECIAL_OPT= source/special_opt +WHYPS_O= whyps.o + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.os2 b/src/makefiles/prefix.os2 new file mode 100644 index 0000000000..cc5f275a1b --- /dev/null +++ b/src/makefiles/prefix.os2 @@ -0,0 +1,169 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Borland C +BC4_CC= bcc +BC4_LINK= tlink +BC4_IMPLIB= echo tlib +BC4_CFLAGS= -g0 -4 -a -pc -sm -N -Ic:\tcpip\include +BC4_DEBUG_LINK_OPTS= -v +BC4_O_OBJ_SWITCH= -o +BC4_O_EXE_SWITCH= -e +BC4_DLLENTRY= +BC4_CONLIBSDLL= +BC4_ADVAPILIB= c:\tcpip\lib\so32dll.lib c:\tcpip\lib\tcp32dll.lib +BC4_MPRLIB= +BC4_WSOCKLIB= c:\tcpip\lib\so32dll.lib c:\tcpip\lib\tcp32dll.lib +# Microsoft C +IBM_CC= icc +IBM_LINK= link386 +IBM_IMPLIB= echo lib +IBM_CFLAGS= /J- /Gm+ /G4 /Mp /Ic:\tcpip\include +IBM_DEBUG_LINK_OPTS= /debug +IBM_O_OBJ_SWITCH= /Fo +IBM_O_EXE_SWITCH= /Fe +IBM_DLLENTRY= +IBM_CONLIBSDLL= +IBM_ADVAPILIB= c:\tcpip\lib\so32dll.lib c:\tcpip\lib\tcp32dll.lib +IBM_MPRLIB= +IBM_WSOCKLIB= c:\tcpip\lib\so32dll.lib c:\tcpip\lib\tcp32dll.lib + +CC= $($(COMPILER)_CC) +LINK= $($(COMPILER)_LINK) +IMPLIB= $($(COMPILER)_IMPLIB) +O_OBJ_SWITCH= $($(COMPILER)_O_OBJ_SWITCH) +O_EXE_SWITCH= $($(COMPILER)_O_EXE_SWITCH) +DLLENTRY= $($(COMPILER)_DLLENTRY) +CONLIBSDLL= $($(COMPILER)_CONLIBSDLL) +ADVAPILIB= $($(COMPILER)_ADVAPILIB) +MPRLIB= $($(COMPILER)_MPRLIB) +WSOCKLIB= $($(COMPILER)_WSOCKLIB) + +.SUFFIXES: .c .e +.e.c: + $(EXPAND_DBNAME) $< + $(GPRE) $(GPRE_FLAGS) $< + $(COMPRESS_DBNAME) $< + $(TOUCH) $*.c +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) $(O_OBJ_SWITCH)$*.bin $< + +# Borland C +BC4_PROD_CFLAGS= ? -DHADES +BC4_PROD_LINK_OPTS= -sm +BC4_PROD_LD_OPTS= +BC4_DEV_CFLAGS= -v -Od +BC4_DEV_LINK_OPTS= $(BC4_DEBUG_LINK_OPTS) -sm +BC4_DEV_LD_OPTS= -v +BC4_GDSSHR= gds32_os2_bc4.dll +BC4_GDSINTL= gdsintl_os2_bc4.dll +# Microsoft C +IBM_PROD_CFLAGS= /O+ /DHADES +IBM_PROD_LINK_OPTS= /align:4 /noignore /exepack +IBM_PROD_LD_OPTS= /noignore +IBM_DEV_CFLAGS= /Ti+ +IBM_DEV_LINK_OPTS= $(IBM_DEBUG_LINK_OPTS) /align:4 /noignore /exepack +IBM_DEV_LD_OPTS= /debug /noignore +IBM_GDSSHR= gds32_os2_ibm.dll +IBM_GDSINTL= gdsintl_os2_ibm.dll + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_LINK= source/interbase/lib/gds32.lib +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= $($(COMPILER)_PROD_CFLAGS) $($(COMPILER)_CFLAGS) +PROD_LINK_OPTS= $($(COMPILER)_PROD_LINK_OPTS) +PROD_LD_OPTS= $($(COMPILER)_PROD_LD_OPTS) + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_DEBUG_OBJECTS= nodebug.o +DEV_SHRLIB_LINK= source/interbase/lib/gds32.lib +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= $($(COMPILER)_DEV_CFLAGS) $($(COMPILER)_CFLAGS) +DEV_LINK_OPTS= $($(COMPILER)_DEV_LINK_OPTS) +DEV_LD_OPTS= $($(COMPILER)_DEV_LD_OPTS) + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_LINK= $($(VERSION)_SHRLIB_LINK) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) +LINK_OPTS= $($(VERSION)_LINK_OPTS) +LD_OPTS= $($(VERSION)_LD_OPTS) + +ACCESS_METHOD= gdslib._os2 +BIN_PATH= +BURP_REMOTE_LINK= source/remote/xdr.o +CHMOD_VAL= 777 +COMPRESS_DBNAME= source\compress_dbs +EXAMPLES_DBS= $(DB_DIR)/examples/ +EXPAND_DBNAME= source\expand_dbs +FORM_OBJECTS= noform.o +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.lib +GDSLIB_LINK= source/jrd/gds_b.lib $(CONLIBSDLL) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) +GDSSHR= source/interbase/bin/gds32.dll +WIN_NT_GDSSHR= $($(COMPILER)_GDSSHR) +WIN_NT_GDSINTL= $($(COMPILER)_GDSINTL) +GDSSHR_LINK= $(SHRLIB_LINK) $(CONLIBSDLL) +HLPDIR= $(DB_DIR)/qli/ +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_MISC= $(INTL_OBJECTS) +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= gdsintl.dll +IO_OBJECTS= os2.o +JRNDIR= $(DB_DIR)/journal/ +LANG_OBJECTS= +LANGUAGES= cc vms_cxx make9 gdl1 +MSGSDIR= $(DB_DIR)/msgs/ +NET_OBJECTS= source/remote/xdr.o +NT_SERVER= nt_server.exe +PIC_FLAGS= $(CFLAGS) +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(JRD_LINK2) $(GDSSHR_LINK) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server.exe +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server.exe +AMBX_SERVER_DEST= source/interbase/bin/gds_server.exe +NT_SERVER_DEST= source/interbase/bin/gds_remote_server.exe +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= echo sh +RM= del +CHMOD= echo chmod +CHMOD_6= echo chmod 666 +CHMOD_7= echo chmod 777 +CHMOD_S7= echo chmod 0677 +MV= copy +TOUCH= touch +CP= copy +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= +SPECIAL_OPT= sh ../special_opt +YACC= echo + +ARCH_EXT= .lib +EXEC_EXT= .exe + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.sco b/src/makefiles/prefix.sco new file mode 100644 index 0000000000..e0520b67c1 --- /dev/null +++ b/src/makefiles/prefix.sco @@ -0,0 +1,135 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -Fo$*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= -Lsource/jrd +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -quiet -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g -quiet + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) + +ACCESS_METHOD= gdslib.sco pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +COPT_DSQL_PASS1= NO +COPT_DUDLEY_PARSE= NO +COPT_JRD_CVT= NO +COPT_QLI_HELP= NO +DSQL_P_OBJECTS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +FUNCSHR= source/interbase/lib/gdsf_s +GDS_LINK= $(SHRLIB_DIR) -lgds -lsocket +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= -link -Lsource/jrd -lgds_b -lrpc -lsocket -lcrypt_i +GDSSHR= source/interbase/lib/gds_s +GDSSHR_LINK= -link $(SHRLIB_DIR) -lgds_s -lgdsf_s -lgds_pyxis -lrpc -lyp -lrpc -lsocket -lcrypt_i +HLPDIR= source/qli/ +INCLUDES= include_sco +INET_LIBRARY= inet_server.a +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_MISC= $(INTL_OBJECTS) +INTL_P_OBJS= intl +INTL_P_MISC= $(INTL_P_OBJECTS) +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_objects intl_p_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= stubs.o +JRD_P_MISC_OBJECTS= nodebug.bin shrinit.bin stubs.bin +LANG_OBJECTS= ada.o +LANGUAGES= cc cxx ndl make8 gdl1 ada sco_ada +LINKABLE_LIBS= burplib.a isqllib.a qlilib.a +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L/usr/gds/qa_tools/lib -lmu +PIC_FLAGS= $(CFLAGS) -DSHLIB_DEFS +PIPE= gds.a gds_pipe.a gds_pipe +PIPE_LIBRARY= gds_pipe.a +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins.hlp +REMOTE_GDSSHR= $(GDSLIB) +REMOTE_GDSSHR_LINK= $(GDSLIB_LINK) +REMOTE_P_OBJS= rem_p_objects +SCO_FUNCSHR= $(FUNCSHR) +SCO_GDSSHR= $(GDSSHR) +SCO_OBJS_BURPLIB= $(JRD_LINK) +SCO_OBJS_ISQLLIB= $(JRD_LINK) +SCO_OBJS_QLILIB= $(JRD_LINK_OBJECTS) +SCO_OBJS_REMLIB= $(REMOTE_OBJECTS) $(JRD_LINK) +SCO_SOCKET_LIB= -lsocket +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop +WAL_P_OBJS= wal_p_objects + +INET_SERVER_DEST= source/interbase/bin/gds_inet_srvr +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_srvr +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_svr.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_svr.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.sco_ev b/src/makefiles/prefix.sco_ev new file mode 100644 index 0000000000..ca485654b4 --- /dev/null +++ b/src/makefiles/prefix.sco_ev @@ -0,0 +1,127 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +CC= gcc +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O3 -m486 -fwritable-strings -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -ggdb -fwritable-strings -DHADES + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) -w -fPIC -melf +PIC_FLAGS= $(CFLAGS) + +ACCESS_METHOD= gdslib.sco_ev pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +B_ELF= -melf +BIN_PATH= /usr/gds/sbin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +COPT_JRD_SQZ= NO +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FUNCTIONS= functions.bin +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -$(B_ELF) -Lsource/jrd -lgds_b -lsocket -lgds_pyxis +GDSSHR= source/interbase/lib/gds.so.0 +SCO_EV_GDSSHR= $(GDSSHR) +GDSSHR_LINK= -$(B_ELF) -Lsource/jrd -lgds -lsocket -lgds_pyxis +HLPDIR= source/qli/ +INCLUDES= include_sco +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -Bdynamic -z text -o gdsintl +INTL_PIC_FLAGS= $(CFLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= stubs.o +JRD_P_MISC_OBJECTS= source/jrd/nodebug.bin +LANG_OBJECTS= ada.o +LANGUAGES= cc cxx gdl1 make15 ada sco_ada +LD_LIBS= +LD_OPTS= -G -h +LINK_OPTS= $(B_ELF) +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MATHLIB= -lm +MUISQL= muisql +MUISQL_MU_LIB= -L/usr/gds/lib -lmu $(GDSSHR_LINK) +PIPE= gds.a gds_pipe +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SCO_SOCKET_LIB= -$(B_ELF) -lsocket +SPECIAL_OPT= sh source/special_opt +UTILITIES= drop + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + + +V3PRINTER= source/lock/printv3.o +UDF_LINK_CMD= ld +UDF_CFLAGS= -O -mieee-fp -melf -fPIC +UDF_LFLAGS= -G +UDF_SHRLIBS= -lgds -lsocket -lgds_pyxis -lm -lc +SHRLIB_EXT= .so +UDF_UTIL_RESOLV= -h ib_util.so diff --git a/src/makefiles/prefix.sgi b/src/makefiles/prefix.sgi new file mode 100644 index 0000000000..7d3435deb7 --- /dev/null +++ b/src/makefiles/prefix.sgi @@ -0,0 +1,117 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= -cckr -signed $($(VERSION)_CFLAGS) + +ACCESS_METHOD= gdslib.sgi pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BLD_OPTS= -shared -p gds5.bind -B symbolic +CHMOD_VAL= 666 +COPT_JRD_SDW= NO +COPT_JRD_JRD= NO +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -lsun -ldl +GDSSHR= source/interbase/lib/gds.so.0 +SGI_GDSSHR= $(GDSSHR) +GDSSHR_LINK= -Lsource/jrd -lgds -lsun -lgds_pyxis +HLPDIR= source/qli/ +INCLUDES= include_sgi +INTL= intl +INTL_CFLAGS= $(CFLAGS) -D$(SYSTEM) +INTL_LD_LINE= ld -shared -Bsymbolic -o $* +INTL_TARGET= intl_shr_objs +INTL_PIC_FLAGS= $(PIC_FLAGS) -D$(SYSTEM) +IO_OBJECTS= unix.o +JRD_MISC_OBJECTS= sun_ftn.o +LANG_OBJECTS= ftn.o +LANGUAGES= cc cxx ndl make7 gdl1 sun_ftn +LD_LIBS= -ldl +LD_OPTS= -shared -p gds.bind -soname +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +PIC_FLAGS= $(CFLAGS) +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +SCREEN_LIBS= -L/usr/lib -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +UTILITIES= drop + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.solaris b/src/makefiles/prefix.solaris new file mode 100644 index 0000000000..466c4f308c --- /dev/null +++ b/src/makefiles/prefix.solaris @@ -0,0 +1,185 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Start of file prefix.solaris: $(VERSION) $(PLATFORM) +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .j .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.j: + $(CC) -c $(PIC_J_CFLAGS) $(VERSION_FLAG) -o $*_j.o $< + mv $*_j.o $*.j +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -xO1 -DHADES + +#NOTE: -O is equivilant to -O2 +# Level 2 optimization resulted in isql dropping core during SELECT when +# SET TIME option was on. This was with 4.2 compilier built on so-build2 +# running solaris 2.6. As a quick-fix the level was changed from -O to -xO1 + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g -xstrconst + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS_COMMON= $($(VERSION)_CFLAGS) -DSOLARIS -DSOLARIS26 -DBSD_COMP -DEXACT_NUMERICS -Isource/interbase/include -Xt -w +CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG) -mt +PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -K PIC +SPECIAL_OBJECTS= j +UDF_LINK_CMD= cc +UDF_CFLAGS= -xO1 -K PIC -mt -xlibmieee +UDF_LFLAGS= -G -Bsymbolic +UDF_SHRLIBS= -lm -lc -xlibmieee +SHRLIB_EXT= .so + +# Purify related flags +PFLAGS = -messages=first -leaks-at-exit=yes +PDIR = `purify -print-home-dir` +PURIFY = purify $(PFLAGS) +PSTUBS = $(PDIR)/purify_stubs.a + +# Quantify related flags +QFLAGS = +QDIR = `quantify -print-home-dir` +QUANTIFY = quantify $(QFLAGS) +QSTUBS = $(QDIR)/quantify_stubs.a + +#NOTE: PIC_J_CFLAGS is special CFLAGS used to build PIPD_IS_SHRLIB modules +# to workaround the Solaris threading problems with signals + + +#NOTE: -Xt is ANSI C transition mode (default) +# -DBDS_COMP is for BSD Compatibility package and is used in + +ACCESS_METHOD= gdslib.solaris pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /netapp/apps/isc/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +DSQL_P_OBJS= dsql_p_objects +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +FUNCTIONS= functions.bin +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/jrd/gds_b.a +# add -lgen to build on solaris before 2.6 +GDSLIB_LINK= -Lsource/jrd -lgds_b -lsocket -lnsl -lthread -ldl +GDSSHR= source/interbase/lib/gdsmt.so.0 +SOL_GDSSHR= $(GDSSHR) +# add -lgen to build on solaris before 2.6 +GDSSHR_LINK= $(SHRLIB_DIR) -lgdsmt -lgds_pyxis -lthread +PIPE_GDSSHR= source/interbase/lib/gds.so.0 +# add -lgen to build on solaris before 2.6 +PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis +HLPDIR= source/qli/ +HOSTNAME= .`uname -n` +INCLUDES= include_so include_so_ada +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o $(STDIO) +IO_P_OBJECTS= unix.bin $(STDIO_P_OBJ) +JRD_MISC_OBJECTS= source/jrd/sun_ftn.o +JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j +JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn +LD_LIBS= -lsocket -lnsl -lthread -ldl -lm +LD_LIBS_J= -lsocket -lnsl -ldl +LD_OPTS= -G -h +LOCK_JRD_MISC= source/jrd/thd.o +LOCK_MANAGER= +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds.sogood/qa_tools/lib -lmu +MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm +PIC_FLAGS= $(CFLAGS) -K PIC +PIPE= gds.a.solaris gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses -ltermlib +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC_LOCAL= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SETUP_ISC_REMOTE= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +SO_NETWORK_LIB= -lnsl +SO_SOCKET_LIB= -lsocket +SO_THREAD_LIB= -lthread +SO_SUPER_GDSSHR= source/interbase/lib/gdsmt.so.1 +STDIO= source/jrd/ib_stdio.o +STDIO_P_OBJ= source/jrd/ib_stdio.bin +SUPER_CLIENT_GDSSHR= $(SO_SUPER_GDSSHR) +SUPER_BACKEND= source/jrd/gds_ss.a +# add -lgen to build on solaris before 2.6 +SUPER_LINK= -Lsource/jrd -lgds_ss -lsocket -lnsl -lthread -ldl +SUPER_SERVER= +UTILITIES= +WAL_P_OBJS= wal_p_objects + + +SUPER_SERVER_DEST= source/interbase/bin/ibserver +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + +# End of file prefix.solaris: $(VERSION) $(PLATFORM) diff --git a/src/makefiles/prefix.solaris_mt b/src/makefiles/prefix.solaris_mt new file mode 100644 index 0000000000..ed4d6b2a7f --- /dev/null +++ b/src/makefiles/prefix.solaris_mt @@ -0,0 +1,122 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -DSOLARIS -DSOLARIS_MT -DBSD_COMP + +ACCESS_METHOD= gdslib.solaris pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/sbin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +DSQL_P_OBJS= dsql_p_objects +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +FUNCTIONS= functions.bin +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -ldl -lthread +GDSSHR= source/interbase/lib/gds.so.0 +SOL_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis -lthread +HLPDIR= source/qli/ +INCLUDES= include_sun4 +INTL= intl +INTL_LD_LINE= ld -G -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= sun_ftn.o +JRD_P_MISC_OBJECTS= sun_ftn.bin nodebug.bin +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn +LD_LIBS= -lsocket -lnsl -ldl +LD_OPTS= -G -h +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +PIC_FLAGS= $(CFLAGS) -K PIC +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses -ltermlib +SERVER_LINK= $(GDSSHR_LINK) +SPECIAL_OPT= source/special_opt +SO_SOCKET_LIB= -lsocket +SO_NETWORK_LIB= -lnsl +UTILITIES= drop +WAL_P_OBJS= wal_p_objects + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.solx86 b/src/makefiles/prefix.solx86 new file mode 100644 index 0000000000..efb5986cfc --- /dev/null +++ b/src/makefiles/prefix.solx86 @@ -0,0 +1,193 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): __Konstantin Kuznetsov___________________________________. +# This file can be used to build FB on Solaris 8 x 86 with gcc 2.95 and bash +# +# Use SOLX86 to identify x86 version of Solaris. Neil McCalden +# +# $Id: prefix.solx86,v 1.1 2001-07-12 06:32:04 bellardo Exp $ +# +# Start of file prefix.solaris X 86 : $(VERSION) $(PLATFORM) +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .j .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.j: + $(CC) -c $(PIC_J_CFLAGS) $(VERSION_FLAG) -o $*_j.o $< + mv $*_j.o $*.j +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= -L source/jrd -L source/interbase/lib +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O1 -mpentium + +#NOTE: -O is equivilant to -O2 +# Level 2 optimization resulted in isql dropping core during SELECT when +# SET TIME option was on. This was with 4.2 compilier built on so-build2 +# running solaris 2.6. As a quick-fix the level was changed from -O to -xO1 + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd -L source/interbase/lib +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS_COMMON= $($(VERSION)_CFLAGS) -DSOLARIS -DSOLARIS26 -DSOLARIS_MT -DSOLX86 -DBSD_COMP -DEXACT_NUMERICS -Isource/interbase/include -w +CFLAGS= $(CFLAGS_COMMON) $(SUPER_FLAG) +PIC_J_CFLAGS= $(CFLAGS_COMMON) -DPIPE_IS_SHRLIB -fPIC +SPECIAL_OBJECTS= j +UDF_LINK_CMD= cc +UDF_CFLAGS= -fPIC +UDF_LFLAGS= -G -Bsymbolic +UDF_SHRLIBS= -lm -lc +SHRLIB_EXT= .so + +# Purify related flags +PFLAGS = -messages=first -leaks-at-exit=yes +PDIR = `purify -print-home-dir` +PURIFY = purify $(PFLAGS) +PSTUBS = $(PDIR)/purify_stubs.a + +# Quantify related flags +QFLAGS = +QDIR = `quantify -print-home-dir` +QUANTIFY = quantify $(QFLAGS) +QSTUBS = $(QDIR)/quantify_stubs.a + +#NOTE: PIC_J_CFLAGS is special CFLAGS used to build PIPD_IS_SHRLIB modules +# to workaround the Solaris threading problems with signals + + +#NOTE: -Xt is ANSI C transition mode (default) +# -DBDS_COMP is for BSD Compatibility package and is used in + +ACCESS_METHOD= gdslib.solaris pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /netapp/apps/isc/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +DSQL_P_OBJS= dsql_p_objects +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +FUNCTIONS= functions.bin +GDS_LINK= $(GDSSHR_LINK) +GDS_PYXIS= gds_pyxis.a +GDSLIB_BACKEND= source/jrd/gds_b.a +# add -lgen to build on solaris before 2.6 +GDSLIB_LINK= -Lsource/jrd -lgds_b -lsocket -lnsl -lthread -ldl +GDSSHR= source/interbase/lib/gdsmt.so.0 +SOL_GDSSHR= $(GDSSHR) +# add -lgen to build on solaris before 2.6 +GDSSHR_LINK= $(SHRLIB_DIR) -lgdsmt -lgds_pyxis -lthread +PIPE_GDSSHR= source/interbase/lib/gds.so.0 +# add -lgen to build on solaris before 2.6 +PIPE_GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis +HLPDIR= source/qli/ +HOSTNAME= .`uname -n` +INCLUDES= include_so include_so_ada +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -o gdsintl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o $(STDIO) +IO_P_OBJECTS= unix.bin $(STDIO_P_OBJ) +JRD_MISC_OBJECTS= source/jrd/sun_ftn.o +JRD_J_MISC_OBJECTS= source/jrd/sun_ftn.j +JRD_P_MISC_OBJECTS= source/jrd/sun_ftn.bin source/jrd/nodebug.bin +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada sun_ada microfocus_cob make16 gdl1 sun_ftn +LD_LIBS= -lsocket -lnsl -lthread -ldl -lm +LD_LIBS_J= -lsocket -lnsl -ldl +LD_OPTS= -G -h +LOCK_JRD_MISC= source/jrd/thd.o +LOCK_MANAGER= ## no manager KLK +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds.sogood/qa_tools/lib -lmu +MUISQL_LINK_OPTS= $(MUISQL_MU_LIB) $(PIPE_GDSSHR_LINK) -lm +PIC_FLAGS= $(CFLAGS) -fPIC +PIPE= gds.a.solaris gds_pipe +SCREEN_LIBS= -lcurses -ltermlib +CURSES_LIB= $(SCREEN_LIBS) +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects + +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC_LOCAL= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SETUP_ISC_REMOTE= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +SO_NETWORK_LIB= -lnsl +SO_SOCKET_LIB= -lsocket +SO_THREAD_LIB= -lthread +SO_SUPER_GDSSHR= source/interbase/lib/gdsmt.so.1 +STDIO= source/jrd/ib_stdio.o +STDIO_P_OBJ= source/jrd/ib_stdio.bin +SUPER_CLIENT_GDSSHR= $(SO_SUPER_GDSSHR) +SUPER_BACKEND= source/jrd/gds_ss.a +# add -lgen to build on solaris before 2.6 +SUPER_LINK= -Lsource/jrd -lgds_ss -lsocket -lnsl -lthread -ldl +SUPER_SERVER= +UTILITIES= +WAL_P_OBJS= wal_p_objects + + +SUPER_SERVER_DEST= source/interbase/bin/ibserver +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + +# End of file prefix.solaris: $(VERSION) $(PLATFORM) diff --git a/src/makefiles/prefix.sun4 b/src/makefiles/prefix.sun4 new file mode 100644 index 0000000000..40d204fb49 --- /dev/null +++ b/src/makefiles/prefix.sun4 @@ -0,0 +1,123 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) + +ACCESS_METHOD= gdslib.sunos4 pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +FUNCSHR= source/interbase/lib/gdsflib.so.0.0 +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -ldl +GDSSHR= source/interbase/lib/gdslib.so.1.0 +SUN_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgdslib -lgds_pyxis -ldl +HLPDIR= source/qli/ +INCLUDES= include_sun4 +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -assert pure-text -o $* +INTL_PIC_FLAGS= -O -pic -R -D$(SYSTEM) +INTL_TARGET= gdsintl.so.0.0 +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= sun_ftn.o +JRD_P_MISC_OBJECTS= sun_ftn.bin nodebug.bin +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada sun_ada microfocus_cob make13 gdl1 sun_ftn +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds/qa_tools/lib -lmu +PIC_FLAGS= $(CFLAGS) -PIC +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses -ltermlib +SERVER_LINK= $(GDSSHR_LINK) +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +SUN_FUNCSHR= $(FUNCSHR) +UTILITIES= drop +WAL_P_OBJS= wal_p_objects + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar rl +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3s4.o + diff --git a/src/makefiles/prefix.sun4_acc b/src/makefiles/prefix.sun4_acc new file mode 100644 index 0000000000..5e2dd96015 --- /dev/null +++ b/src/makefiles/prefix.sun4_acc @@ -0,0 +1,151 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# InterBase makefile Prefix file: prefix.sun4_acc +# For use on SUN4 using ACC Ansi compiler + +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(SWB) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +CC= /apps/lang/sunos/acc + +# Note: Compile switches are -Xt (ANSI transition mode) +# and -w (No warnings) +# The usual warning is "Warning: $ used in argument name" + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD -DDEBUG_GDS_ALLOC +PROD_CFLAGS= -O -Xt -w -DHADES +#PROD_SWB= + +# Turn DEV_REDUCTION on in order to test PC/WIN memory +# handling code on Unix machines. +#DEV_REDUCTION= -DSTACK_EFFICIENT -DSTACK_REDUCTION +DEV_REDUCTION= + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD -DDEBUG_GDS_ALLOC $(DEV_REDUCTION) +DEV_CFLAGS= -g -Xt -w +#DEV_SWB= -sb + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) +#SWB= $($(VERSION)_SWB) + +ACCESS_METHOD= gdslib.sunos4 pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +FUNCSHR= source/interbase/lib/gdsflib.so.0.0 +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -ldl +GDSSHR= source/interbase/lib/gdslib.so.1.0 +SUN_GDSSHR= $(GDSSHR) + +# For testing of pipe server - all utilities are now compiled +# using it instead of the shared library. +#GDSSHR_LINK= $(SHRLIB_DIR) -lgdslib -lgds_pyxis -ldl +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lgds_pyxis -ldl + +HLPDIR= source/qli/ +INCLUDES= include_sun4 +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -assert pure-text -o $* +INTL_PIC_FLAGS= -O -pic -R -D$(SYSTEM) +INTL_TARGET= gdsintl.so.0.0 +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= sun_ftn.o +JRD_P_MISC_OBJECTS= sun_ftn.bin nodebug.bin +LANG_OBJECTS= ada.o ftn.o cob.o +LANGUAGES= cc cxx ada sun_ada microfocus_cob make13 gdl1 sun_ftn +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +MUISQL= muisql +MUISQL_MU_LIB= -L /usr/gds/qa_tools/lib -lmu +PIC_FLAGS= $(CFLAGS) -PIC +PIPE= gds.a gds_pipe +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o $(PYXDIR)sun_ftn_pyxis.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses -ltermlib + +# For debugging of core drops in pipe server we link with the backend +#SERVER_LINK= $(GDSSHR_LINK) +SERVER_LINK= $(SHRLIB_DIR) -lgds_b -lgds_pyxis -ldl + +SETUP_ISC= ISC_USER=sysdba; ISC_PASSWORD=masterkey; export ISC_USER ISC_PASSWORD; +SPECIAL_OPT= source/special_opt +SUN_FUNCSHR= $(FUNCSHR) +UTILITIES= drop +WAL_P_OBJS= wal_p_objects + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar rl +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3s4.o + +# End of prefix file : prefix.sun4_acc + diff --git a/src/makefiles/prefix.ul b/src/makefiles/prefix.ul new file mode 100644 index 0000000000..26752a13c8 --- /dev/null +++ b/src/makefiles/prefix.ul @@ -0,0 +1,112 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(CFLAGS) $(PIC_FLAGS) $(VERSION_FLAG) -o $*_temp.o $< + mv $*_temp.o $*.bin + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -L source/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) + +ACCESS_METHOD= pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +DNET_SERVER= dnet_server +DNET_SERVER_LIB= dnet_server.a +EXAMPLES_DBS= source/examples/ +FORM_OBJECTS= form.o +FORM_TRN_OBJECTS= form_trn.o +FRED= fred +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/interbase/lib/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -ldnet +GDSSHR= source/interbase/lib/gds.a +GDSSHR_LINK= -Lsource/jrd -lgds -ldnet +HLPDIR= source/qli/ +INET_LIBRARY= inet_server.a +INTL= intl +INTL_TARGET= nointl_objs +INTL_MISC= $(INTL_OBJECTS) +IO_OBJECTS= unix.o +LANG_OBJECTS= +LANGUAGES= cc cxx ndl make6 gdl1 +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +NET_OBJECTS= $(REMDIR)dnet.o +PIPE= gds.a gds_pipe.a gds_pipe +PIPE_LIBRARY= gds_pipe.a +PYXIS= pyxis +PYXIS_MISC_OBJS= $(PYXIS_MISC) +PYXIS_P_MISC_OBJS= $(PYXIS_P_MISC) +PYXIS_OBJECTS= pyxis_objects +PYXIS_MISC_OBJECTS= $(PYXDIR)cdm.o $(PYXDIR)vt100.o +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSLIB) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +SCREEN_LIBS= -lcurses -ltermlib +SERVER_LINK= $(GDSLIB_LINK) +SPECIAL_OPT= source/special_opt +UTILITIES= drop +WHYPS_O= whyps.o + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.unixware b/src/makefiles/prefix.unixware new file mode 100644 index 0000000000..31ee3eaf33 --- /dev/null +++ b/src/makefiles/prefix.unixware @@ -0,0 +1,116 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +.SUFFIXES: .c .e +.e.c: + $(GPRE) $(GPRE_FLAGS) $< +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) -Wa,-o,$*.bin $< + + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_DIR= -Lsource/jrd +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= -O -DHADES + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_SHRLIB_DIR= -Lsource/jrd +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= -g + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_DIR= $($(VERSION)_SHRLIB_DIR) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -D$(SYSTEM) + +ACCESS_METHOD= gdslib.unixware pipe +BACKEND_BRIDGE_MISC= head5.o allp.o +BIN_PATH= /usr/gds/bin +BRIDGE_MISC= head5.o allp.o +CHMOD_VAL= 666 +CURSES_LIB= -lcurses +DSQL_P_OBJS= dsql_p_objects +EXAMPLES_NODE= jeeves2: +FORM_OBJECTS= noform.o +FUNCTIONS= functions.bin +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.a +GDSLIB_LINK= -Lsource/jrd -lgds_b -lsocket -lnsl -ldl +GDSSHR= source/interbase/lib/gds.so.0 +UNIXWARE_GDSSHR= $(GDSSHR) +GDSSHR_LINK= $(SHRLIB_DIR) -lgds -lsocket -lnsl +HLPDIR= source/qli/ +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_LD_LINE= ld -G -z text -o gdsintl +INTL_P_OBJS= intl +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= intl_shr_objs +IO_OBJECTS= unix.o +IO_P_OBJECTS= unix.bin +JRD_MISC_OBJECTS= stubs.o +JRD_P_MISC_OBJECTS= nodebug.bin stubs.bin +LANG_OBJECTS= cob.o +LANGUAGES= cc cxx microfocus_cob make15 gdl1 +LD_LIBS= -ldl +LD_OPTS= -G -h +LOCK_MANAGER= manager +MARION_DB= -d source/marion.gdb +NSL_LIB= -lnsl +PIC_FLAGS= $(CFLAGS) -K PIC +PIPE= gds.a gds_pipe +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(SERVER_LINK) +REMOTE_P_OBJS= rem_p_objects +SCREEN_LIBS= -lcurses +SERVER_LINK= $(GDSSHR_LINK) +SPECIAL_OPT= sh source/special_opt +SOCKET_LIB= -lsocket -lnsl +UTILITIES= drop +VT100_FLAGS= -DBSD_COMP + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server +AMBX_SERVER_DEST= source/interbase/bin/gds_server +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= sh -c +RM= rm -f +CHMOD= chmod +CHMOD_6= chmod 666 +CHMOD_7= chmod 777 +CHMOD_S7= chmod 06777 +MV= mv -f +TOUCH= touch +CP= cp +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= ar r +EXPAND_DBNAME= @echo No need to expand... +COMPRESS_DBNAME= @echo No need to compress... + +ARCH_EXT= .a +EXEC_EXT= + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.win_nt b/src/makefiles/prefix.win_nt new file mode 100644 index 0000000000..f455ec315f --- /dev/null +++ b/src/makefiles/prefix.win_nt @@ -0,0 +1,172 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Borland C +BC4_CC= bcc32 +BC4_LINK= tlink32 +BC4_IMPLIB= echo tlib +BC4_CFLAGS= -g0 -4 -pc -N -a -WM -WD +BC4_DEBUG_LINK_OPTS= -v +BC4_O_OBJ_SWITCH= -o +BC4_O_EXE_SWITCH= -e +BC4_DLLENTRY= +BC4_CONLIBSDLL= +BC4_ADVAPILIB= +BC4_MPRLIB= +BC4_WSOCKLIB= +# Microsoft C +MS_CC= cl +MS_LINK= link -machine:i386 +MS_IMPLIB= lib -machine:i386 +MS_CFLAGS= -W3 -G4 -Gd -D_MT -D_DLL -DWIN32 -DWIN32_LEAN_AND_MEAN +MS_DEBUG_LINK_OPTS= -Zi +MS_O_OBJ_SWITCH= -Fo +MS_O_EXE_SWITCH= -o +MS_DLLENTRY= @12 +MS_CONLIBSDLL= msvcrt.lib kernel32.lib +MS_ADVAPILIB= advapi32.lib +MS_MPRLIB= mpr.lib +MS_WSOCKLIB= wsock32.lib + +CC= $($(COMPILER)_CC) +LINK= $($(COMPILER)_LINK) +IMPLIB= $($(COMPILER)_IMPLIB) +O_OBJ_SWITCH= $($(COMPILER)_O_OBJ_SWITCH) +O_EXE_SWITCH= $($(COMPILER)_O_EXE_SWITCH) +DLLENTRY= $($(COMPILER)_DLLENTRY) +CONLIBSDLL= $($(COMPILER)_CONLIBSDLL) +ADVAPILIB= $($(COMPILER)_ADVAPILIB) +MPRLIB= $($(COMPILER)_MPRLIB) +WSOCKLIB= $($(COMPILER)_WSOCKLIB) + +.SUFFIXES: .c .e +.e.c: + $(EXPAND_DBNAME) $< + $(GPRE) $(GPRE_FLAGS) $< + $(COMPRESS_DBNAME) $< + $(TOUCH) $*.c +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) $(O_OBJ_SWITCH)$*.bin $< + +# Borland C +BC4_PROD_CFLAGS= ? -DHADES +BC4_PROD_LINK_OPTS= -WM +BC4_PROD_LD_OPTS= +BC4_DEV_CFLAGS= -v +BC4_DEV_LINK_OPTS= $(BC4_DEBUG_LINK_OPTS) -WM +BC4_DEV_LD_OPTS= -v +BC4_GDSSHR= gds32_nt_bc4.dll +BC4_GDSSHR_LINK= source/interbase/lib/gds32.lib +BC4_GDSINTL= gdsintl_nt_bc4.dll +# Microsoft C +MS_PROD_CFLAGS= -Ob2gtp -DHADES +MS_PROD_LINK_OPTS= +MS_PROD_LD_OPTS= +MS_DEV_CFLAGS= -Op -Zi +MS_DEV_LINK_OPTS= $(MS_DEBUG_LINK_OPTS) +MS_DEV_LD_OPTS= -debug:full -debugtype:cv +MS_GDSSHR= gds32_nt_ms.dll +MS_GDSSHR_LINK= source/interbase/lib/gds32_ms.lib +MS_GDSINTL= gdsintl_nt_ms.dll + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_LINK= $($(COMPILER)_GDSSHR_LINK) +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= $($(COMPILER)_PROD_CFLAGS) $($(COMPILER)_CFLAGS) +PROD_LINK_OPTS= $($(COMPILER)_PROD_LINK_OPTS) +PROD_LD_OPTS= $($(COMPILER)_PROD_LD_OPTS) + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_DEBUG_OBJECTS= nodebug.o +DEV_SHRLIB_LINK= $($(COMPILER)_GDSSHR_LINK) +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= $($(COMPILER)_DEV_CFLAGS) $($(COMPILER)_CFLAGS) +DEV_LINK_OPTS= $($(COMPILER)_DEV_LINK_OPTS) +DEV_LD_OPTS= $($(COMPILER)_DEV_LD_OPTS) + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_LINK= $($(VERSION)_SHRLIB_LINK) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -DNOMSG -D_X86_=1 +LINK_OPTS= $($(VERSION)_LINK_OPTS) +LD_OPTS= $($(VERSION)_LD_OPTS) + +ACCESS_METHOD= gdslib.win_nt +BIN_PATH= +BURP_REMOTE_LINK= source/remote/xdr.o +CHMOD_VAL= 777 +COMPRESS_DBNAME= source\compress_dbs +EXAMPLES_DBS= $(DB_DIR)/examples/ +EXPAND_DBNAME= source\expand_dbs +FORM_OBJECTS= noform.o +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.lib +GDSLIB_LINK= source/jrd/gds_b.lib $(CONLIBSDLL) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) +GDSSHR= source/interbase/bin/gds32.dll +WIN_NT_GDSSHR= $($(COMPILER)_GDSSHR) +WIN_NT_GDSINTL= $($(COMPILER)_GDSINTL) +GDSSHR_LINK= $(SHRLIB_LINK) $(CONLIBSDLL) +HLPDIR= $(DB_DIR)/qli/ +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_MISC= $(INTL_OBJECTS) +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= gdsintl.dll +IO_OBJECTS= winnt.o +JRNDIR= $(DB_DIR)/journal/ +LANG_OBJECTS= +LANGUAGES= cc vms_cxx make9 gdl1 +MSGSDIR= $(DB_DIR)/msgs/ +NET_OBJECTS= source/remote/wnet.o source/remote/xdr.o +NT_EXAMPLES= nt_examples +NT_SERVER= nt_server.exe +PIC_FLAGS= $(CFLAGS) +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(JRD_LINK2) $(GDSSHR_LINK) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server.exe +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server.exe +AMBX_SERVER_DEST= source/interbase/bin/gds_server.exe +NT_SERVER_DEST= source/interbase/bin/gds_remote_server.exe +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= echo sh +RM= del +CHMOD= echo chmod +CHMOD_6= echo chmod 666 +CHMOD_7= echo chmod 777 +CHMOD_S7= echo chmod 0677 +MV= copy +TOUCH= touch +CP= copy +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= +SPECIAL_OPT= sh ../special_opt +YACC= echo + +ARCH_EXT= .lib +EXEC_EXT= .exe + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prefix.win_nts b/src/makefiles/prefix.win_nts new file mode 100644 index 0000000000..26f79a2978 --- /dev/null +++ b/src/makefiles/prefix.win_nts @@ -0,0 +1,182 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Borland C +BC4_CC= bcc32 +BC4_LINK= tlink32 +BC4_IMPLIB= echo tlib +BC4_CFLAGS= -g0 -4 -pc -N -a -WM -WD $(SERVER_MODEL) +BC4_DEBUG_LINK_OPTS= -v +BC4_O_OBJ_SWITCH= -o +BC4_O_EXE_SWITCH= -e +BC4_DLLENTRY= +BC4_CONLIBSDLL= +BC4_ADVAPILIB= +BC4_MPRLIB= +BC4_WSOCKLIB= +# Microsoft C +MS_CC= cl +MS_LINK= link -machine:i386 +MS_IMPLIB= lib -machine:i386 +MS_CFLAGS= -W3 -G4 -Gd -D_MT -D_DLL -DWIN32 $(SERVER_MODEL) -DWIN32_LEAN_AND_MEAN +MS_DEBUG_LINK_OPTS= -Zi +MS_O_OBJ_SWITCH= -Fo +MS_O_EXE_SWITCH= -o +MS_DLLENTRY= @12 +MS_CONLIBSDLL= msvcrt.lib kernel32.lib +MS_ADVAPILIB= advapi32.lib +MS_MPRLIB= mpr.lib +MS_WSOCKLIB= wsock32.lib + +CC= $($(COMPILER)_CC) +LINK= $($(COMPILER)_LINK) +IMPLIB= $($(COMPILER)_IMPLIB) +O_OBJ_SWITCH= $($(COMPILER)_O_OBJ_SWITCH) +O_EXE_SWITCH= $($(COMPILER)_O_EXE_SWITCH) +DLLENTRY= $($(COMPILER)_DLLENTRY) +CONLIBSDLL= $($(COMPILER)_CONLIBSDLL) +ADVAPILIB= $($(COMPILER)_ADVAPILIB) +MPRLIB= $($(COMPILER)_MPRLIB) +WSOCKLIB= $($(COMPILER)_WSOCKLIB) + +.SUFFIXES: .c .e +.e.c: + $(EXPAND_DBNAME) $< + $(GPRE) $(GPRE_FLAGS) $< + $(COMPRESS_DBNAME) $< + $(TOUCH) $*.c +.SUFFIXES: .bin .o .c +.c.o: + $(CC) -c $(CFLAGS) $(VERSION_FLAG) $< +.c.bin: + $(CC) -c $(PIC_FLAGS) $(VERSION_FLAG) $(O_OBJ_SWITCH)$*.bin $< + +# Borland C +BC4_PROD_CFLAGS= ? -DFLINTSTONE +BC4_PROD_LINK_OPTS= -WM +BC4_PROD_LD_OPTS= +BC4_DEV_CFLAGS= -v +BC4_DEV_LINK_OPTS= $(BC4_DEBUG_LINK_OPTS) -WM +BC4_DEV_LD_OPTS= -v +BC4_GDSSHR= gds32_nt_bc4.dll +BC4_SS_GDSSHR= gds32_nt_bc4_ss.dll +BC4_GDSSHR_LINK= source/interbase/lib/gds32.lib +BC4_GDSSHR_SS_LINK= source/interbase/lib/gds32_ss.lib +BC4_GDSINTL= gdsintl_nt_bc4.dll +# Microsoft C +MS_PROD_CFLAGS= -Ob2gtp -DFLINTSTONE +MS_PROD_LINK_OPTS= +MS_PROD_LD_OPTS= +MS_DEV_CFLAGS= -Op -Zi +MS_DEV_LINK_OPTS= $(MS_DEBUG_LINK_OPTS) +MS_DEV_LD_OPTS= -debug:full -debugtype:cv +MS_GDSSHR= gds32_nt_ms.dll +MS_SS_GDSSHR= gds32_nt_ms_ss.dll +MS_GDSSHR_LINK= source/interbase/lib/gds32_ms.lib +MS_GDSSHR_SS_LINK= source/interbase/lib/gds32mss.lib +MS_GDSINTL= gdsintl_nt_ms.dll + +PROD_DEBUG_OBJECTS= nodebug.o +PROD_SHRLIB_LINK= $($(COMPILER)_GDSSHR_LINK) +PROD_SHRLIB_SS_LINK= $($(COMPILER)_GDSSHR_SS_LINK) +PROD_VERSION_FLAG= -DPROD_BUILD +PROD_CFLAGS= $($(COMPILER)_PROD_CFLAGS) $($(COMPILER)_CFLAGS) +PROD_LINK_OPTS= $($(COMPILER)_PROD_LINK_OPTS) +PROD_LD_OPTS= $($(COMPILER)_PROD_LD_OPTS) + +DEV_DEBUG_OBJECTS= grammar.o dbg.o dbt.o dmp.o +DEV_DEBUG_OBJECTS= nodebug.o +DEV_SHRLIB_LINK= $($(COMPILER)_GDSSHR_LINK) +DEV_SHRLIB_SS_LINK= $($(COMPILER)_GDSSHR_SS_LINK) +DEV_VERSION_FLAG= -DDEV_BUILD +DEV_CFLAGS= $($(COMPILER)_DEV_CFLAGS) $($(COMPILER)_CFLAGS) +DEV_LINK_OPTS= $($(COMPILER)_DEV_LINK_OPTS) +DEV_LD_OPTS= $($(COMPILER)_DEV_LD_OPTS) + +DEBUG_OBJECTS= $($(VERSION)_DEBUG_OBJECTS) +SHRLIB_LINK= $($(VERSION)_SHRLIB_LINK) +SHRLIB_SS_LINK= $($(VERSION)_SHRLIB_SS_LINK) +VERSION_FLAG= $($(VERSION)_VERSION_FLAG) +CFLAGS= $($(VERSION)_CFLAGS) -DNOMSG -D_X86_=1 +LINK_OPTS= $($(VERSION)_LINK_OPTS) +LD_OPTS= $($(VERSION)_LD_OPTS) + +ACCESS_METHOD= gdslib.win_nt +BIN_PATH= +BURP_REMOTE_LINK= source/remote/xdr.o +CHMOD_VAL= 777 +COMPRESS_DBNAME= source\compress_dbs +EXAMPLES_DBS= $(DB_DIR)/examples/ +EXPAND_DBNAME= source\expand_dbs +FORM_OBJECTS= noform.o +GDS_LINK= $(GDSSHR_LINK) +GDSLIB_BACKEND= source/jrd/gds_b.lib +GDSLIB_LINK= source/jrd/gds_b.lib $(CONLIBSDLL) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) +GDSSHR= source/interbase/bin/gds32.dll +WIN_NT_GDSSHR= $($(COMPILER)_GDSSHR) +WIN_NT_GDSINTL= $($(COMPILER)_GDSINTL) +WIN_NT_SS_GDSSHR= $($(COMPILER)_SS_GDSSHR) +GDSSHR_LINK= $(SHRLIB_LINK) $(CONLIBSDLL) +GDSSHR_SS_LINK= $(SHRLIB_SS_LINK) $(CONLIBSDLL) +HLPDIR= $(DB_DIR)/qli/ +INTL= intl +INTL_CFLAGS= $(CFLAGS) +INTL_MISC= $(INTL_OBJECTS) +INTL_PIC_FLAGS= $(PIC_FLAGS) +INTL_TARGET= gdsintl.dll +IO_OBJECTS= winnt.o +JRNDIR= $(DB_DIR)/journal/ +LANG_OBJECTS= +LANGUAGES= cc vms_cxx make9 gdl1 +MSGSDIR= $(DB_DIR)/msgs/ +NET_OBJECTS= source/remote/wnet.o source/remote/xdr.o +NT_EXAMPLES= nt_examples +NT_SERVER= nt_server.exe +PIC_FLAGS= $(CFLAGS) +REG_HELP= isc_ins_hlp.dat +REMOTE_GDSSHR= $(GDSSHR) +REMOTE_GDSSHR_LINK= $(REMOTE_OBJECTS) $(JRD_LINK) $(JRD_LINK2) $(GDSSHR_SS_LINK) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) +SERVER_MODEL= -DSUPERSERVER + +INET_SERVER_DEST= source/interbase/bin/gds_inet_server.exe +DNET_SERVER_DEST= source/interbase/bin/gds_dnet_server.exe +AMBX_SERVER_DEST= source/interbase/bin/gds_server.exe +NT_SERVER_DEST= source/interbase/bin/gds_remote_server.exe +INET_LIB_DEST= source/interbase/lib/gds_inet_server.a +DNET_LIB_DEST= source/interbase/lib/gds_dnet_server.a + +SH= echo sh +RM= del +CHMOD= echo chmod +CHMOD_6= echo chmod 666 +CHMOD_7= echo chmod 777 +CHMOD_S7= echo chmod 0677 +MV= copy +TOUCH= touch +CP= copy +ECHO= echo +QUIET_ECHO= @echo +CD= cd +CAT= cat +AR= +SPECIAL_OPT= sh ../special_opt +YACC= echo + +ARCH_EXT= .lib +EXEC_EXT= .exe + +V3PRINTER= source/lock/printv3.o + diff --git a/src/makefiles/prep.intrbase b/src/makefiles/prep.intrbase new file mode 100644 index 0000000000..ad58fbd38a --- /dev/null +++ b/src/makefiles/prep.intrbase @@ -0,0 +1,428 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +: +# +# Copyright (C) 1989 The Santa Cruz Operation Inc. All Rights Reserved +# This Module contains Proprietary Information of +# The Santa Cruz Operation Inc, and should be treated as Confidential. +# + +#BEGIN_CM_SCRIPTLIB +# +# Standard CM script function library +# baselib v1.2 +# + +PATH=/bin:/usr/bin:/etc:. +LANG=english_us.ascii # Used when scripts are internationalized. +export PATH LANG + +TMPFILE=/tmp/tmp$$ # Define a temporary file for use if necessary. +TMPFILE1=/tmp/tmp1$$ # Define a temporary file for use if necessary. +TMPFILE2=/tmp/tmp2$$ # Define a temporary file for use if necessary. + +# Define return values. +: ${OK=0} ${FAIL=1} ${STOP=10} + +# +# Print an error message. +# +error() { + echo "\nError: $*" >&2 + return 0 +} + +# +# Prompt for yes or no answer - returns non-zero for no. +# +getyn() { + while echo "$* (y/n) \c" + do read yn rest + case $yn in + [yY]) return $OK ;; + [nN]) return $FAIL ;; + *) error "Please answer y or n" ;; + esac + done + return 0 +} + +# +# prdrel: given a prd value, return the release number of that +# product in the variable PRDREL. +# Return 0 if release is sucessfully gotten, return 1 if +# the release cannot be gotten. +# +PRDREL1="Checking for requested release information..." +prdrel() { + + _pd="$1" + [ -n "${_pd}" ] || return 1 + PRDREL="" + # tmp file name + _prtmp=/tmp/pr$$ + + if [ -f /etc/perms/${_pd} ] + then + PRDREL=`sed -n '/^#rel=/s///p' /etc/perms/${_pd}` || return 1 + else + # There is no permlist with as its name, so search for + # permlists looking for appropriate #prd=... entry. + # Ignore update p'lists here. This code handles products + # with several p'lists, primarily the OS and DS. + # Pipe thru sort -r to get the highest rel first, and + # put results into temporary file. (Ideally would pipe + # them into 'read PRDREL', but this doesn't work under sh.) + echo "$PRDREL1" + : >${_prtmp} # Clear temporary file. + for _ff in /etc/perms/* + do + [ -f ${_ff} ] || continue # Process regular files only + _p= + _u= + _r= + eval `sed -n '/^#rel=/s//_r=/p + /^#upd=/s//_u=/p + /^#prd=/s//_p=/p + /^[A-Z]/q + ' ${_ff} ` 2>/dev/null + # If permlist prd matches wanted one, and it is not an upd, + # use rel= value. + [ -z "${_u}" -a "${_p}" = "${_pd}" ] && { + echo ${_r} + } + done | sort -r > ${_prtmp} 2>/dev/null + + [ -s ${_prtmp} ] && PRDREL=`sed 1q ${_prtmp}` + rm -f ${_prtmp} 2>/dev/null # Clean up tmp file. + fi + + # Check if PRDREL has been set, return 1 if not. + [ -z "$PRDREL" ] && return 1 + return 0 +} + +# +#query the user for a responce. +#a simpler system than prompt, use prompt for +#more sophisticated uses. +#q or Q returns fail, anything else return ok. +#ARGS: , string to print when asking for a responce +#$OK means expression has been resolved or answer is given +#$FAIL means quit has been selected +# +respond() { + while echo "\n${*}\nRespond or enter q to quit: \c" + do read answer + case $answer in + Q|q) return $FAIL ;; + "") # on a return key return $OK + answer="RETURNKEY" + return $OK ;; + *) # on anything else return $OK + return $OK ;; + esac + done + return $OK +} + +# +# SHOULD BE USED WITH EVERY INSTALLATION SCRIPT +# +# Set the variable $prdperm to /etc/perms/$PRDVALUE or ./tmp/perms/$PRDVALUE +# If the permlist is found, the values for set, prd, ver, typ, rel, +# and upd are set from the permlist. +# Also determine the OS type, xenix or unix, and set systype accordingly. +# +# sets following information in exported variables +# OSREL: x.x.xy OSTYPE: unix|xenix OSBUS: isa|mc +# OSPRD: OSMCH: +# echo "OS Release: $OSREL OS Type: $OSTYPE OS Bus: $OSBUS" +# echo "OS PRD Value: $OSPRD OS Machine Type: $OSMCH" +# +SETVARS1="Permlist not found" +SETVARS2="Failed to set values from" +SETVARS3="Incorrect prd value in" + +# Variables set by setvars. +prdperm= +fixperm=fixperm +brand=brand +set= +prd= +typ= +rel= +ser= +upd= +systype=unknown + +setvars() { + +# Locate fixperm, brand, and the permlist. + for _i in /etc ./tmp + do + [ -f "$_i/fixperm" ] && fixperm=$_i/fixperm + [ -f "$_i/brand" ] && brand=$_i/brand + [ -f "$_i/perms/$PRDVALUE" ] && prdperm=$_i/perms/$PRDVALUE + done + + [ "$prdperm" ] || { + echo "Warning: $PRDVALUE $SETVARS1" >&2 + return 1 + } + +# Get the operating system type: + case `uname -r` in + 2.*) systype=xenix + ;; + 3.*) systype=unix + ;; + *) systype=unknown + ;; + esac + +# +# OS variables setting +# OSREL: x.x.xy OSTYPE: unix|xenix OSBUS: isa|mc +# OSPRD: OSMCH: os mch type +# + OSTYPE=$systype + case "$OSTYPE" in + unix) + eval `sed -n '/^#prd=/s/#//p + /^#typ=/s/#//p + /^#rel=/s/#//p' /etc/perms/rtsmd` > /dev/null 2>&1 + OSREL=$rel + OSPRD=$prd + OSMCH=$typ + if [ -r /dev/mcapos ] + then + if grep mcapos /etc/perms/rtsmd > /dev/null 2>&1 + then + OSBUS=mc + fi + else + OSBUS=isa + fi + ;; + xenix) + eval `sed -n '/^#prd=/s/#//p + /^#typ=/s/#//p + /^#rel=/s/#//p' /etc/perms/inst` > /dev/null 2>&1 + OSREL=$rel + OSPRD=$prd + OSMCH=$typ + var=`expr $OSMCH : '.*\(..\)$'` + if [ "$var" = "MC" -o "$var" = "PS" ] + then + OSBUS=mc + else + OSBUS=isa + fi + ;; + *) + OSREL=unknown + OSTYPE=unknown + OSBUS=unknown + OSPRD=unknown + OSMCH=unknown + ;; + esac + + export OSREL OSTYPE OSBUS OSPRD OSMCH + # Clear these vars before they are used below. + prd= + rel= + typ= + +# Extract product info from the permlist. + eval `sed -n '/^#set=/s/#//p + /^#prd=/s/#//p + /^#typ=/s/#//p + /^#rel=/s/#//p + /^#ser=/s/#//p + /^#upd=/s/#//p' $prdperm` || echo "\n$SETVARS2 $prdperm" >&2 + +# Check the prd value read from the permlist for correctness. + + case "$prd" in + "$PRDVALUE") return 0 + ;; + *) echo "\n$SETVARS3 $prdperm" >&2 + return 1 + ;; + esac + + return 0 +} + +# +# tarcomp: Determines whether the system 'tar' is capable of decompressing. +# files automatically. The command tar is used unless another is +# specified in the variable TARPROG. +# Returns 'true' (0) if the tar program can decompress, 'fail' if it cannot. +# +tarcomp() { + + # Set TARPROG to default of tar if not set. + : ${TARPROG:=tar} + tctmp=/tmp/tc$$ # Name for tmp files. + + # Eminently compressible data to go into file. (60 'a's) + _ptrn="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + echo ${_ptrn} | compress -F > $tctmp.A # Compress data. + + # Tar to an archive file, with headers set to indicate compression. + ${TARPROG} Cf $tctmp.T $tctmp.A 2>/dev/null || { + rm -rf $tctmp.* + return 1 + } + + # Now restore original file from archive - it should automagically + # be decompressed. + rm -f $tctmp.A + ${TARPROG} xf $tctmp.T 2>/dev/null || { + rm -rf $tctmp.* + return 1 + } + + # Compare it to the original data. + echo ${_ptrn} | cmp -s - $tctmp.A 2>/dev/null || { + rm -rf $tctmp.* + return 1 + } + + # If we got here, the two compared equal, which + # implies that the compress/decompress cycle worked. + rm -rf $tctmp.* + return 0 +} + +# +# Standard CM script function library +# configlib V1.0 +# Contains: baselib, specificlib +# + +# +# Standard CM script function library +# specificlib v1.4 +# contains: baselib +# + +#END_CM_SCRIPTLIB + +# Check the installation status of the product with prd=$PRDVALUE +preinst_check() { + echo " " + fixperm -i /etc/perms/$PRDVALUE >/dev/null 2>&1 + case $? in + 0) #Product/Package is fully installed + echo "The Product $PRDVALUE is fully installed." + echo "Reinstallation is not supported." + echo "Suggest you remove the product before continuing." + getyn "Abort the installation at this time ?" && { + exit 1 + } + break + ;; + 3) #Product/Package does not exist + break + ;; + 4) #Product/Package is not installed + break + ;; + 5) #Product/Package is partially installed + echo "The Product $PRDVALUE is partially installed." + echo "Reinstallation is not supported." + echo "Suggest you remove the product before continuing." + getyn "Abort the installation at this time ?" && { + exit 1 + } + break + ;; + *) error "$PRDVALUE : Unknown installation state" + return 1 + ;; + esac + + return 0 +} + +#MAIN + +PRDVALUE=intrbase +export PRDVALUE + +# get permlist information +setvars + +# print special info from setvars +echo " " +echo "OS PRD Value: $OSPRD OS Release: $OSREL" +echo "OS System Type: $OSTYPE OS Bus: $OSBUS OS Machine Type: $OSMCH" + +# get info using prdrel +echo " " +case $OSTYPE in + xenix) + prdrel xos || error "Unable to get prd info on xos" + echo "For prd value: xos, release level is: $PRDREL" + ;; + unix) + prdrel unixos || error "Unable to get prd info on unixos" + echo "For prd value: unixos, release level is: $PRDREL" + ;; + *) + error "Unknown OS Type, unable to use prdrel" + ;; +esac + +case $OSREL in + + 3.2.1*|3.2.0*|3.2.2*|3.2.3*) + echo "ERROR: This version of the operating"; + echo " system does NOT support symbolic"; + echo " links."; + echo " Aborting installation..."; + exit 1;; + *) :;; # Assume any other release has symlinks + +esac + + + +# check if tar compression is supported +echo " " +if tarcomp +then + : # echo "This system supports products that use tar compression." +else + echo "ERROR: This system does not support software" + echo " that has been cut using tar compression." + echo " Aborting installation..." + exit 1 +fi + +# Check installation status of product $PRDVALUE +preinst_check || { + echo "There has been an error in the prep script." + echo "Aborting installation..." + exit 1 +} +exit 0 diff --git a/src/makefiles/preremove b/src/makefiles/preremove new file mode 100644 index 0000000000..ac282d30b6 --- /dev/null +++ b/src/makefiles/preremove @@ -0,0 +1,32 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +HOSTNAME=`uname -n` + +mv -f /usr/interbase/isc4.gdb /usr/tmp +mv -f /usr/interbase/ib_license.dat /usr/tmp +mv -f /usr/interbase/isc_config /usr/tmp + +rm -f /usr/interbase/*.${HOSTNAME} +rm -f /usr/interbase/interbase.log +rm -f /usr/interbase/bin/ibmgr + +if [ -h /usr/interbase ]; then + rm /usr/interbase +fi +exit 0 diff --git a/src/makefiles/preremove.cl b/src/makefiles/preremove.cl new file mode 100644 index 0000000000..5f3c02536d --- /dev/null +++ b/src/makefiles/preremove.cl @@ -0,0 +1,61 @@ +#!/usr/bin/ksh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Uninstall script for UNIX InterBase software +# +# *** FOR INTERNAL USE ONLY *** +# +# Copyright (c)1998,1999, InterBase Software Corporation +# All Rights Reserved +# +############################################################################ + +SHLIB_PATH=/usr/lib +export SHLIB_PATH + +PATH=$PATH:/usr/ucb:/usr/bsd:/bin:/usr/bin +export PATH + +DeleteSymLinks() +{ +if [ -f $INTERBASE/lib/gdsmt.so.0 ]; then + rm -f /usr/lib/libgdsmt.so + rm -f /usr/lib/libgdsmt.so.0 +fi +} +# +# +echo "\nThe InterBase Client software will be removed from your computer." +count=0 +while true; do + echo "\nDo you want to continue? (default: n) [y, n] : \c" + read response + case $response in + y|Y|yes|Yes|YES ) + echo "\nAll the files from \"$INTERBASE\" directory will be lost." + break + ;; + n|N|no|NO|No|"" ) exit 1;; + * ) + echo "\nERROR: Invalid response, expected \"y\" or \"n\"" + esac +done + +DeleteSymLinks + +exit 0 diff --git a/src/makefiles/preremove.clsr b/src/makefiles/preremove.clsr new file mode 100644 index 0000000000..8826ee5477 --- /dev/null +++ b/src/makefiles/preremove.clsr @@ -0,0 +1,90 @@ +#!/usr/bin/ksh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Uninstall script for UNIX InterBase software +# +# *** FOR INTERNAL USE ONLY *** +# +# Copyright (c)1998,1999, InterBase Software Corporation +# All Rights Reserved +# +############################################################################ + +SHLIB_PATH=/usr/lib +export SHLIB_PATH + +PATH=$PATH:/usr/ucb:/usr/bsd:/bin:/usr/bin +export PATH + +DeleteSymLinks() +{ +if [ -f $INTERBASE/lib/gds.so.0 ]; then + rm -f /usr/lib/libgds.so + rm -f /usr/lib/libgds.so.0 +fi +if [ -f $INTERBASE/lib/gdsmt.so.0 ]; then + rm -f /usr/lib/libgdsmt.so + rm -f /usr/lib/libgdsmt.so.0 +fi +if [ -f $INTERBASE/lib/gdsf.so ]; then + rm -f /usr/lib/libgdsf.so +fi +if [ -f $INTERBASE/lib/gds_pyxis.a ]; then + rm -f /usr/lib/libgds_pyxis.a +fi +if [ -f $INTERBASE/lib/ib_util.so ]; then + rm -f /usr/lib/libib_util.so +fi +} +# +# ibserver must be stopped +# +ibserver=`ps -ef|grep ibserver|grep -c -v grep` +if [ $ibserver -ne 0 ]; then + echo "ERROR: InterBase server is detected as currently running." + echo " Shutdown the InterBase server and try again." + exit 1 +fi + +# +# Save isc4.gdb and ib_license.dat files +# +HOSTNAME=`uname -n` +mv -f /usr/interbase/isc4.gdb /usr/tmp +mv -f /usr/interbase/ib_license.dat /usr/tmp +mv -f /usr/interbase/isc_config /usr/tmp +rm -f /usr/interbase/*.${HOSTNAME} +rm -f /usr/interbase/interbase.log +rm -f /usr/interbase/bin/ibmgr +if [ -h /usr/interbase ]; then + rm /usr/interbase +fi +echo "Saved isc4.gdb, isc_config and ib_license.dat files in /usr/tmp" +DeleteSymLinks + +# +# remove service entry +# +if [ -f /etc/services ]; then + /usr/xpg4/bin/grep -q -s gds_db /etc/services + if test $? = 0 ; then + cat /etc/services | grep -v gds_db > services + mv services /etc/services + fi +fi +exit 0 diff --git a/src/makefiles/put_template b/src/makefiles/put_template new file mode 100644 index 0000000000..22e7900edf --- /dev/null +++ b/src/makefiles/put_template @@ -0,0 +1,30 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +UMASK=`umask` +umask 002 +TARGET=source/$2/$1 +#removed runas builder according to inprise tree +#FSG 093000 +mv $TARGET $TARGET.bak +cp $1 $TARGET +chmod 644 $TARGET +HERE=`pwd` +cd source/$2 +make +cd $HERE +umask $UMASK diff --git a/src/makefiles/readme.sco b/src/makefiles/readme.sco new file mode 100644 index 0000000000..b9444f57b2 --- /dev/null +++ b/src/makefiles/readme.sco @@ -0,0 +1,99 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +This file contains some basic information about the input files used +to create the 'custom' installable InterBase product on SCO. +For detailed instructions on creating 'custom' installable products +please refer to chapter 12 "Custom Distribution Mastering Toolkit" in +the SCO manual "Developer's Topics". + +The following files are required to create the SCO custom package +for InterBase + +cdmt.config +ccs +ibase.prd +ibase.cmpnt +ibase.pkg +iclient.prd +iclient.cmpnt +iclient.pkg + +All are ascii files. +IMPORTANT : Since they are being checked into the common builds +component of marion, they are being suffixed with a .sco to +uniquely identify them as SCO specific files. However once they +are checked out to use them you SHOULD rename them without the +.sco extension. + +How to create the package +1. Login as root since all the subsequent steps will be done +as root. +2. Create an empty directory say /usr/gds.mymachine/custom +3. Copy cdmt.config to that directory. +4. Create a directory under custom called cntl. Copy file ccs +to that directory. +5. Create a directory under custom called input. Copy files +ibase.prd +ibase.cmpnt +ibase.pkg +iclient.prd +iclient.cmpnt +iclient.pkg +into that directory +6. Go to the interbase directory in your build area which +contains the latest built InterBase product which you want +to package. Copy the product to the custom directory using +the following command +tar cvf - . | ( cd /usr/gds.mymachine/custom; tar xf - ) +6. cd to the custom directory and run the following commands +to create the InterBase custom package +a. cdmtParse +b. cdmtCompress +c. cdmtArchive +7. After the last command you will find that two new directories +would have been created under custom, sso and archives. These +are created by the custom executables. What you are interested +in is the directory archives/TAPE. This directory will contain +InterBase & InterClient packaged in the custom format. You will +see files with names like VOL.000.000, VOL.000.000.files, +VOL.000.000.sum etc. +8. To install InterBase from this package you need to do the +following: +In custom select option "Install from media image" and then +supply the full path of the directory containing the above +files, namely /usr/gds.mymachine/custom/archives/TAPE. custom +should show you two installable products, InterBase and +InterClient. Selecting either and continuing should install +the product on the system. +9. On the CD, the packaged files should go in the directory +/opt/archives if custom has to automatically recognize them +off the CD. + +NOTE : The above input files to the custom creation utilities +were created for InterBase 5.5. For future ports they need to +be reviewed and modified appropriately to ensure that the +product is packaged correctly. For instance the file ibase.pkg +contains a block for each file which goes into the package. +So if 6.0 introduces any new files, the port engineer needs to +add a block for each file so that those files will get included +in the package. Also cdmt.config and the .pkg and .cmpnt files +contain hardcoded references to directories on the machine on +which they were originally created. These need to be changed +to the appropriate directories on the new build machine. + + +-- Shailesh Prabhu 1/26/99 diff --git a/src/makefiles/refresh b/src/makefiles/refresh new file mode 100644 index 0000000000..8a43a10566 --- /dev/null +++ b/src/makefiles/refresh @@ -0,0 +1,32 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to refresh a tree's sources from CVS and run a build. +# +# This script is intended to run by builder (or the other owner of +# the tree being built. CVSROOT must have been set, and if using the +# "pserver" method of access to cvs, then "cvs login" must have been +# done. +# +cvs update +# +build_kit $(SYSTEM) $(VERSION) +if [ $? = 0 ]; then + exit 0 +else + exit 1 +fi diff --git a/src/makefiles/refresh.all b/src/makefiles/refresh.all new file mode 100644 index 0000000000..d480e7a376 --- /dev/null +++ b/src/makefiles/refresh.all @@ -0,0 +1,135 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +set -x +SYSTEM=$(SYSTEM) +export SYSTEM +if [ $SYSTEM != 'WIN_NT' -a $SYSTEM != 'OS2' -a $SYSTEM != 'WIN_NTS' ]; then + PATH=$PATH:/usr/ucb:/usr/bsd +else + PATH="$PATH;$Path" +fi +export PATH +HOSTNAME=`hostname` +# +SYS_TYPE=GENERIC +if [ $SYSTEM = 'SUN4' -o $SYSTEM = 'SUN3_4' -o $SYSTEM = 'SUN386I' ]; then + SYS_TYPE=SUNOS4 +fi +if [ $SYSTEM = 'AX' -o $SYSTEM = 'AP' ]; then + SYS_TYPE=APOLLO + PATH=.:source/interbase/com:/gds/com:/usr/ucb:/bin:/usr/bin:/com: +else + if [ $SYSTEM = 'WIN_NT' -o $SYSTEM = 'OS2' -o $SYSTEM = 'WIN_NTS' ]; then + CURDIR=`pwd` + SYS_TYPE=NOLINK_OS + PATH=".;$CURDIR/interbase/bin;/gds.${HOSTNAME}/bin;/gds/bin;$PATH" + else + PATH=.:source/interbase/bin:/usr/gds.${HOSTNAME}/bin:/netapp/apps/isc/bin:/usr/ucb:/bin:/usr/bin:/u/gds/bin: + fi +fi +export PATH +# +cd alice +marion -z -v -a -c alice +cd ../burp +marion -v -a -c burp +cd ../csv +marion -v -a -c csv +cd ../dsql +marion -v -a -c dsql +cd ../dudley +marion -v -a -c dudley +cd ../extlib +marion -v -a -c extlib +cd ../gpre +marion -v -a -c gpre +cd ../intl +marion -v -a -c intl +cd ../isql +marion -v -a -c isql +cd ../journal +marion -v -a -c journal +cd ../jrd +marion -v -a -c jrd +cd ../msgs +marion -v -a -c msgs +cd ../pipe +marion -v -a -c pipe +if [ $SYSTEM = 'DELTA' ]; then + ln -s source/pipe/allp.c jrd/allp.c + ln -s source/pipe/foot.c jrd/foot.c + ln -s source/pipe/head.c jrd/head.c +fi +cd ../pyxis +marion -v -a -c pyxis +cd ../qli +marion -v -a -c qli +cd ../remote +marion -v -a -c remote +cd ../lock +if [ $SYS_TYPE = 'APOLLO' ]; then + marion -v -a -c lock + cd ../isc_lock +fi +marion -v -a -c isc_lock +cd ../utilities +marion -v -a -c utilities +if [ $SYSTEM = 'DELTA' ]; then + ln -s source/utilities/scrty_unix.gdl utilities/security.gdl +fi +if [ $SYSTEM = 'WIN_NT' -o $SYSTEM = 'OS2' -o $SYSTEM = 'WIN_NTS' ]; then + cp scrty_unix.gdl security.gdl +fi +cd ../wal +marion -v -a -c wal +cd ../examples +marion -v -a -c examples -x +cd ../example4 +marion -v -a -c example4 -x +cd ../example5 +marion -v -a -c example5 -x +cd .. +if [ -d super ]; then + cd super/alice + marion -v -a -c alice + cd ../burp + marion -v -a -c burp + cd ../dsql + marion -v -a -c dsql + cd ../intl + marion -v -a -c intl + cd ../isc_lock + marion -v -a -c isc_lock + cd ../journal + marion -v -a -c journal + cd ../jrd + marion -v -a -c jrd + cd ../remote + marion -v -a -c remote + cd ../utilities + marion -v -a -c utilities + cd ../wal + marion -v -a -c wal + cd ../.. +fi + +if [ $SYS_TYPE = 'APOLLO' -o $SYSTEM = 'NXT' ]; then + date | awk '{print $3 "-" $2 "-" $6}' >last_fetch +else + date +"%d-%h-%Y" >last_fetch +fi diff --git a/src/makefiles/refresh.bat b/src/makefiles/refresh.bat new file mode 100644 index 0000000000..c18ad68806 --- /dev/null +++ b/src/makefiles/refresh.bat @@ -0,0 +1,80 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +rem set LAST_BUILD=`cat last_fetch` +set LAST_BUILD=%1 + +set STATUS=OK + +rem if %SYS_TYPE = 'APOLLO' -o %SYSTEM = 'NXT' +rem DATESTAMP=`date | awk '{print %3 "-" %2 "-" %6}'` +rem else +rem DATESTAMP=`date +"%d-%h-19%y"` +rem fi + +cmd /c fetch_comp %LAST_BUILD% alice +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% burp +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% csv +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% dsql +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% dudley +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% gpre +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% intl +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% isql +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% journal +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% jrd +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% msgs +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% pipe +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% pyxis +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% qli +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% register +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% remote +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% isc_lock +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% utilities +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% wal +if errorlevel 1 set STATUS=FAIL +cmd /c fetch_comp %LAST_BUILD% examples +if errorlevel 1 set STATUS=FAIL + +cmd /c fetch_comp %LAST_BUILD% builds +if errorlevel 1 set STATUS=FAIL +cd WIN_NT\original +rem platform WIN_NT +cd ..\.. + +if "%STATUS%" == "FAIL" goto err +rem copy last_fetch prior_fetch +rem echo %DATESTAMP > last_fetch + +:err +rem build_kit WIN_NT diff --git a/src/makefiles/request b/src/makefiles/request new file mode 100644 index 0000000000..5e6ecaf28b --- /dev/null +++ b/src/makefiles/request @@ -0,0 +1,28 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +trap 'exit 3' 15 +# +# determine where to install the package +# +IBASEDIR=`ckpath -d /usr -aoy \ +-p "Enter the absolute pathname of the install directory (default /usr)" +` || exit $? +cat >$1 << ! +IBASEDIR='$IBASEDIR' +! +exit 0 diff --git a/src/makefiles/request.cl b/src/makefiles/request.cl new file mode 100644 index 0000000000..718e7d78fe --- /dev/null +++ b/src/makefiles/request.cl @@ -0,0 +1,112 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Install script for UNIX InterBase software +# +# Copyright (c)1998,1999, InterBase Software Corporation +# All Rights Reserved +# +############################################################################ + +PATH=$PATH:/usr/ucb:/usr/bsd:/bin:/usr/bin +export PATH +SHLIB_PATH=/usr/lib +export SHLIB_PATH + +LogFile="ibinstall.log" +TmpLogFile="/tmp/$LogFile" + +DefaultInstDir="/opt" +IBSymLink="/usr/interbase" +SUPERSERVER="" + +#Note: TarFile must contain the absolute path name +TarFile="" + +ExitError() +{ +echo "\n*** Install completed with errors ***" | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 1 +} + +ExitSuccess() +{ +echo "\nInstall completed successfully" | tee -a $INTERBASE/$LogFile +echo "Install log can be found at $INTERBASE/$LogFile" +exit 0 +} + +Quit() +{ +echo "\nInstall is not complete." | tee -a $TmpLogFile +echo "You may run the install at a later time to complete the installation." | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 2 +} + + + +# +# Main entry +# + +echo "***********************************************" >> $TmpLogFile +echo "InterBase Client Install in progress" >> $TmpLogFile +echo "`date`" >> $TmpLogFile +echo "***********************************************" >> $TmpLogFile + +if [ -f /bin/ps ]; then + PS="/bin/ps -ef" +else + if [ -f /usr/ucb/ps ]; then + PS="/usr/ucb/ps -ax" + else + PS="ps -ef" + fi +fi + +ibserver=`$PS|grep ibserver|grep -c -v grep` +gds_inet_server=`$PS|grep gds_inet_server|grep -c -v grep` + +if [ $ibserver -ne 0 -o $gds_inet_server -ne 0 ]; then + echo "ERROR: Detected Interbase server running on the system." | tee -a $TmpLogFile + echo " Shutdown/Uninstall the InterBase server and try again." | tee -a $TmpLogFile + ExitError +fi + +SUPERSERVER="" + +if [ ! -z "$IBINSTALL" ]; then + IDirName=$IBINSTALL +else + IDirName=$DefaultInstDir +fi +IBINSTALL=`ckpath -d $IDirName -aoy -p "\nEnter the absolute path name of the install directory"` || exit $? + +INTERBASE="$IBINSTALL/interbase" + +cat >$1 << ! +TmpLogFile='$TmpLogFile' +LogFile='$LogFile' +INTERBASE='$INTERBASE' +SUPERSERVER='$SUPERSERVER' +IBSymLink='$IBSymLink' +IBINSTALL='$IBINSTALL' +! +exit 0 diff --git a/src/makefiles/request.clsr b/src/makefiles/request.clsr new file mode 100644 index 0000000000..a7f3ae00bc --- /dev/null +++ b/src/makefiles/request.clsr @@ -0,0 +1,112 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Install script for UNIX InterBase software +# +# Copyright (c)1998,1999, InterBase Software Corporation +# All Rights Reserved +# +############################################################################ + +PATH=$PATH:/usr/ucb:/usr/bsd:/bin:/usr/bin +export PATH +SHLIB_PATH=/usr/lib +export SHLIB_PATH + +LogFile="ibinstall.log" +TmpLogFile="/tmp/$LogFile" + +DefaultInstDir="/opt" +IBSymLink="/usr/interbase" +SUPERSERVER="" + +#Note: TarFile must contain the absolute path name +TarFile="" + +ExitError() +{ +echo "\n*** Install completed with errors ***" | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 1 +} + +ExitSuccess() +{ +echo "\nInstall completed successfully" | tee -a $INTERBASE/$LogFile +echo "Install log can be found at $INTERBASE/$LogFile" +exit 0 +} + +Quit() +{ +echo "\nInstall is not complete." | tee -a $TmpLogFile +echo "You may run the install at a later time to complete the installation." | tee -a $TmpLogFile +echo "Install log can be found at $TmpLogFile" +exit 2 +} + + + +# +# Main entry +# + +echo "***********************************************" >> $TmpLogFile +echo "InterBase Install in progress" >> $TmpLogFile +echo "`date`" >> $TmpLogFile +echo "***********************************************" >> $TmpLogFile + +if [ -f /bin/ps ]; then + PS="/bin/ps -ef" +else + if [ -f /usr/ucb/ps ]; then + PS="/usr/ucb/ps -ax" + else + PS="ps -ef" + fi +fi + +ibserver=`$PS|grep ibserver|grep -c -v grep` +gds_inet_server=`$PS|grep gds_inet_server|grep -c -v grep` + +if [ $ibserver -ne 0 -o $gds_inet_server -ne 0 ]; then + echo "ERROR: Detected another Interbase server running on the system." | tee -a $TmpLogFile + echo " Shutdown the InterBase server and try again." | tee -a $TmpLogFile + ExitError +fi + +SUPERSERVER="SUPERSERVER" + +if [ ! -z "$IBINSTALL" ]; then + IDirName=$IBINSTALL +else + IDirName=$DefaultInstDir +fi +IBINSTALL=`ckpath -d $IDirName -aoy -p "\nEnter the absolute path name of the install directory"` || exit $? + +INTERBASE="$IBINSTALL/interbase" + +cat >$1 << ! +TmpLogFile='$TmpLogFile' +LogFile='$LogFile' +INTERBASE='$INTERBASE' +SUPERSERVER='$SUPERSERVER' +IBSymLink='$IBSymLink' +IBINSTALL='$IBINSTALL' +! +exit 0 diff --git a/src/makefiles/run_edit b/src/makefiles/run_edit new file mode 100644 index 0000000000..a8a22ece11 --- /dev/null +++ b/src/makefiles/run_edit @@ -0,0 +1,132 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to modify the InterBase makefiles by +# substituting a system name for the symbol $(SYSTEM) +# and the build version for the symbol $(VERSION) +# +SYSTEM=$(PLATFORM) +# +if [ $SYS_TYPE != 'NOLINK_OS' ]; then + VERSION=`cat source/$SYSTEM/original/.version_flag` +else + if [ $SYSTEM != 'OS2' ]; then + VERSION=`cat .version_flag` + DB_DIR=`cat .db_dir` + COMPILER=`cat .compiler_type` + else + VERSION=`cat version_flag` + DB_DIR=`cat db_dir` + COMPILER=`cat compiler_type` + fi + export COMPILER + export DB_DIR +fi +if [ $SYSTEM = 'DELTA' ]; then + DB_DIR=`cat source/$SYSTEM/original/.db_dir` + export DB_DIR +fi +# +if [ $SYSTEM = 'WIN_NT' -o $SYSTEM = 'OS2' -o $SYSTEM = 'WIN_NTS' ]; then + ls sfx.* | awk '{split( $1, f, "."); print "cat prefix.$(BASE) " $1 " >make." f [2]}' > tmp2.ksh + tmp2 + rm tmp2.ksh + sed -e "s/\$(SYSTEM)/$SYSTEM/g" -e "s/\$(VERSION)/$VERSION/g" edit_makes > tmp3.ksh + tmp3 + rm tmp3.ksh +else + ls sfx.* | awk '{split( $1, f, "."); print "cat prefix.$(BASE) " $1 " >make." f [2]}' | sh + if [ -d source/super ]; then + cp make.alice make.alice_ss + cp make.burp make.burp_ss + cp make.dsql make.dsql_ss + cp make.intl make.intl_ss + cp make.journal make.journal_ss + cp make.jrd make.jrd_ss + cp make.lock make.lock_ss + cp make.remote make.remote_ss + cp make.utilities make.utilities_ss + cp make.wal make.wal_ss + fi + sed -e "s/\$(SYSTEM)/$SYSTEM/g" -e "s/\$(VERSION)/$VERSION/g" edit_makes | sh +fi +if [ $SYS_TYPE != 'NOLINK_OS' ]; then + ./edit_make $SYSTEM $VERSION refresh ../refresh + ./edit_make $SYSTEM $VERSION refresh.all ../refresh.all + chmod +x ../refresh* + ./edit_make $SYSTEM $VERSION special_opt ../special_opt + chmod +x ../special_opt + if [ $SYSTEM = 'DELTA' ]; then + ./edit_make $SYSTEM $VERSION expand_dbs ../expand_dbs + ./edit_make $SYSTEM $VERSION compress_dbs ../compress_dbs + ./edit_make $SYSTEM $VERSION expand.sed ../expand.sed + ./edit_make $SYSTEM $VERSION compress.sed ../compress.sed + chmod +x ../expand_dbs + chmod +x ../compress_dbs + fi +else + if [ $SYSTEM = 'WIN_NT' -o $SYSTEM = 'OS2' -o $SYSTEM = 'WIN_NTS' ]; then + if [ $SYSTEM = 'WIN_NT' -o $SYSTEM = 'WIN_NTS' ]; then + edit_make $SYSTEM $VERSION expand_dbs.bat ../../expand_dbs.bat + edit_make $SYSTEM $VERSION compress_dbs.bat ../../compress_dbs.bat + cp build_kit.bat ../../build_kit.bat + cp gdsalias.asm ../../jrd/gdsalias.asm + else + edit_make $SYSTEM $VERSION expand_dbs.bat ../../expand_dbs.cmd + edit_make $SYSTEM $VERSION compress_dbs.bat ../../compress_dbs.cmd + cp build_kit.cmd ../../build_kit.cmd + fi + edit_make $SYSTEM $VERSION refresh ../../refresh.ksh + edit_make $SYSTEM $VERSION refresh.all ../../refresh.all.ksh + edit_make $SYSTEM $VERSION copy_makes ../../copy_makes.ksh + edit_make $SYSTEM $VERSION fetch_comp ../../fetch_comp.ksh + edit_make $SYSTEM $VERSION special_opt ../../special_opt.ksh + else + ./edit_make $SYSTEM $VERSION refresh ../../refresh + ./edit_make $SYSTEM $VERSION refresh.all ../../refresh.all + chmod +x ../../refresh* + ./edit_make $SYSTEM $VERSION expand_dbs ../../expand_dbs + ./edit_make $SYSTEM $VERSION compress_dbs ../../compress_dbs + chmod +x ../../expand_dbs + chmod +x ../../compress_dbs + ./edit_make $SYSTEM $VERSION copy_makes ../../copy_makes + chmod +x ../../copy_makes + ./edit_make $SYSTEM $VERSION fetch_comp ../../fetch_comp + chmod +x ../../fetch_comp + ./edit_make $SYSTEM $VERSION build_kit ../../build_kit + chmod +x ../../build_kit + ./edit_make $SYSTEM $VERSION special_opt ../../special_opt + chmod +x ../../special_opt + ./edit_make $SYSTEM $VERSION set_prot ../../set_prot + chmod +x ../../set_prot + ./edit_make $SYSTEM $VERSION unset_prot ../../unset_prot + chmod +x ../../unset_prot + fi + ./edit_make $SYSTEM $VERSION expand.sed ../expand.sed + ./edit_make $SYSTEM $VERSION compress.sed ../compress.sed + ./edit_make $SYSTEM $VERSION add_template ../../add_template + ./edit_make $SYSTEM $VERSION mpm_template ../../mpm_template + ./edit_make $SYSTEM $VERSION mpp_template ../../mpp_template + ./edit_make $SYSTEM $VERSION put_template ../../put_template + chmod +x ../../add_template + chmod +x ../../mpm_template + chmod +x ../../mpp_template + chmod +x ../../put_template + cd ../.. + copy_makes + rm copy_makes* + cd $SYSTEM/original +fi diff --git a/src/makefiles/sco_ship b/src/makefiles/sco_ship new file mode 100644 index 0000000000..54c494addb --- /dev/null +++ b/src/makefiles/sco_ship @@ -0,0 +1,71 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +# +# This script creates the shipping directories for SCO UNIX +# It must be run from the top level directory of the kit as +# root. +# +# cd to the kit directory SCO_custom and edit copy_set_prot +# and site_variables and set them to the correct version. +# i.e. the PRODREL variable in site_variables and in the line +# containing the second mcs command in copy_set_prot. If +# you are just creating a kit for 3 1/2" floppies, you +# must also comment out the DEVICE variable and uncomment +# the correct floppy drive rfd0135ds18 (floppy 0) or +# rfd1135ds18 (floppy 1). +# +# Run copy_set_prot. Once the kit is made, +# cd Images/"version" ("version" will be something like V.4.0A) +# ln -s 96ds15 135ds18 (96ds15 = 5 1/4 hd , 135ds18 = 3 1/2 hd) +# cd ../.. +# +# run mkflops or mkflops -o (-o invokes floppy drive #1) +# +# Make sure you select the format option in mkflops if the +# floppies have not already been formatted on a SCO box! +# +here=`pwd` +mkdir SCO_custom +chmod 700 SCO_custom +cd SCO_custom +mkdir source +chmod 700 source +cp $here/SCO/original/site_variables . +cp $here/SCO/original/copy_set_prot . +chmod 700 site_variables copy_set_prot +cd source +mkdir tmp usr +chmod 700 tmp usr +cd tmp +cp $here/SCO/original/init.intrbase . +chmod 700 init.intrbase +mkdir perms +chmod 700 perms +cd perms +cp $here/SCO/original/prep.intrbase . +chmod 700 prep.intrbase +cd ../../usr +mkdir lib +chmod 700 lib +cd lib +mkdir custom +chmod 700 custom +cd custom +cp $here/SCO/original/intrbase.rmv . +chmod 700 intrbase.rmv diff --git a/src/makefiles/servers.isc b/src/makefiles/servers.isc new file mode 100644 index 0000000000..d9222878e2 --- /dev/null +++ b/src/makefiles/servers.isc @@ -0,0 +1,17 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +gds_db tcp /usr/interbase/bin/gds_inet_server diff --git a/src/makefiles/services.isc b/src/makefiles/services.isc new file mode 100644 index 0000000000..5bedba39bb --- /dev/null +++ b/src/makefiles/services.isc @@ -0,0 +1,17 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +gds_db 3050/tcp # InterBase Database Remote Protocol diff --git a/src/makefiles/set_prot b/src/makefiles/set_prot new file mode 100644 index 0000000000..8accbecd59 --- /dev/null +++ b/src/makefiles/set_prot @@ -0,0 +1,193 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to set the protections on files in +# the installation directory +PATH=$PATH:/etc:/bin:/usr/ucb +export PATH +if [ ! -d SCO -a ! -d DELTA -a ! -d DG -a ! -d SCO_EV ]; then + RUNNER=`whoami` + if [ ! -z "$RUNNER" ]; then + if [ "$RUNNER" != "root" ]; then + echo 'set_prot must be run as "root" or super user' + exit 1 + fi + else + echo 'set_prot must be run as "root" or super user' + exit 1 + fi +fi +set -x +cd source/interbase +chown root \ + . \ + bin examples examples/v3 examples/v4 examples/v5 help include intl lib \ + bin/* \ + examples/v3/* \ + examples/v4/* \ + examples/v5/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + UDF \ + UDF/* \ + inetd.conf.isc \ + install \ + interbase.msg \ + isc4.gdb \ + services.isc + +chgrp bin \ + . \ + bin examples examples/v3 examples/v4 examples/v5 help include intl lib \ + bin/* \ + examples/v3/* \ + examples/v4/* \ + examples/v5/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + UDF \ + UDF/* \ + inetd.conf.isc \ + install \ + interbase.msg \ + isc4.gdb \ + services.isc + +chmod uog=rx install bin/* + +chmod uog=r \ + examples/v3/* \ + examples/v4/* \ + examples/v5/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + UDF/* \ + inetd.conf.isc \ + interbase.msg \ + services.isc + +chmod uog=rwx . help + +chmod u=rwx,go=rx bin examples examples/v3 examples/v4 examples/v5 \ + include intl lib + +chmod uog=rw isc4.gdb help/help.gdb examples/*/*.gdb + +chmod u+s,g+s bin/gds_relay + +chmod u+s,g+s bin/gds_wal_writer + +if [ -f bin/gds_inet_srvr ]; then + chmod u+s,g+s bin/gds_inet_srvr +else + chmod u+s,g+s bin/gds_inet_server +fi + +if [ -f isc_ins.hlp ]; then + chown root isc_ins.hlp + chgrp bin isc_ins.hlp + chmod uog=r isc_ins.hlp +else + chown root isc_ins_hlp.dat + chgrp bin isc_ins_hlp.dat + chmod uog=r isc_ins_hlp.dat +fi + +if [ -f isc_config ]; then + chown root isc_config + chgrp bin isc_config + chmod uog=r isc_config +fi + +if [ -f lock_header_t ]; then + chown root lock_header_t + chgrp bin lock_header_t + chmod uog=r lock_header_t +else + chown root lock_header_template + chgrp bin lock_header_template + chmod uog=r lock_header_template +fi + +if [ -f servers.isc ]; then + chown root servers.isc + chgrp bin servers.isc + chmod uog=r servers.isc +fi + +if [ -f README ]; then + chown root README + chgrp bin README + chmod uog=r README +fi + +if [ -f bin/gds_dnet_server ]; then + chmod u+s,g+s bin/gds_dnet_server +fi + +if [ -f bin/gds_lock_mgr ]; then + chmod u+s,g+s bin/gds_lock_mgr +fi + +if [ -f bin/gds_lock_manager ]; then + chmod u+s,g+s bin/gds_lock_manager +fi + +if [ -f bin/gds_drop ]; then + chmod u+s,g+s bin/gds_drop +fi + +if [ -f bin/gds_drop5 ]; then + chmod u+s,g+s bin/gds_drop5 +fi + +if [ -f lib/gds_s.a ]; then + chmod uog=rx \ + lib/gds_s* \ + lib/gdsf_s* +fi + +if [ -f lib/gds.sl ]; then + chmod uog=rx \ + lib/gds.sl \ + lib/gds.sl.0 \ + lib/gds.sl.1 \ + lib/gdsintl \ + intl/gdsintl \ + lib/bridge5 +fi + +if [ -f lib/gdslib ]; then + chmod uog=rx \ + lib/gdslib \ + lib/pyxislib \ + lib/gdsintl \ + lib/bridge5 +fi + +if [ -f lib/ib_udf ]; then + chmod uog=rx \ + lib/ib_udf \ + lib/ib_util.s* +fi + diff --git a/src/makefiles/setup.ksh b/src/makefiles/setup.ksh new file mode 100644 index 0000000000..d02dec4993 --- /dev/null +++ b/src/makefiles/setup.ksh @@ -0,0 +1,191 @@ +#!/usr/bin/ksh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# Setup script +# +# Copyright (c)1998,1999, InterBase Software Corporation +# All Rights Reserved +# +############################################################################ + +PATH=$PATH:/usr/ucb:/usr/bsd:/bin:/usr/bin +export PATH + +CheckStatus() +{ +case $1 in + 0 ) + echo "The installation completed successfully" + ;; + 1 ) + echo "*** The installation failed" + ;; + 2 ) + echo "*** The installation is not complete" + ;; +esac +} + +if [ "`whoami`" != "root" ]; then + echo "ERROR: No permissions to perform operation." + echo " Log in as root and try again." + exit 1 +fi + +ibserver=`ps -ef|grep ibserver|grep -c -v grep` +if [ $ibserver -ne 0 ]; then + echo "ERROR: Detected another Interbase server running on the system." + echo " Shutdown the InterBase server and try again." + exit 1 +fi + +CurrentDir=`pwd` +FilesDir=`dirname $0` + +case "${FilesDir}" in + /* ) ;; + . ) FilesDir="$CurrentDir" ;; + * ) FilesDir="$CurrentDir"/"$FilesDir" ;; +esac + +CurrentOS=`uname -s` +IC="InterClient*.tar" +case $CurrentOS in + HP-UX ) + IBCS="InterBase60_ClientServer_HUS.tar" + IBC="InterBase60_Client_HUS.tar" + ib_install="interbase/install.ksh" + ;; + SunOS ) + IBCS="IBCSpkg" + IBC="IBCOpkg" + NONABI_SCRIPTS=TRUE + export NONABI_SCRIPTS + ;; +esac +Acrobat="Adobe/INSTALL" +inst=YES + +while [ $inst = YES ] ; do + echo "\n\t1. Install InterBase Client and Server software" + echo "\t2. Install InterBase Client Only software" + echo "\t3. Install InterClient JDBC software" + echo "\t4. Install Adobe Acrobat(R) Reader software" + echo "\t5. Exit\n" + echo "Enter selection. (default 1) [1-5] : \c" + read selection + case $selection in + 1 | "" ) + case $CurrentOS in + HP-UX ) + if [ -f $FilesDir/$IBCS ]; then + echo "\nStarting InterBase Client and Server Install, please wait..." + cd /tmp; + tar xfp $FilesDir/$IBCS $ib_install; + ./$ib_install -s $FilesDir/$IBCS; + status=$? + CheckStatus $status + else + echo "\nERROR: $FilesDir/$IBCS not found"; + echo "*** The installation failed ***"; + fi + ;; + SunOS ) + if [ -d $FilesDir/$IBCS ]; then + pkgadd -d $FilesDir/$IBCS; + status=$? + CheckStatus $status + else + echo "\nERROR: $FilesDir/$IBCS not found"; + echo "*** The installation failed ***"; + fi + ;; + * ) + echo "ERROR: install script does not support \"$CurrentOS\""; + echo "*** The installation failed ***";; + esac + ;; + 2 ) + case $CurrentOS in + HP-UX ) + if [ -f $FilesDir/$IBC ]; then + echo "\nStarting InterBase Client Install, please wait..." + cd /tmp; + tar xfp $FilesDir/$IBC $ib_install; + ./$ib_install -c $FilesDir/$IBC; + status=$? + CheckStatus $status + else + echo "\nERROR: $FilesDir/$IBC not found"; + echo "*** The installation failed ***"; + fi + ;; + SunOS ) + if [ -d $FilesDir/$IBC ]; then + pkgadd -d $FilesDir/$IBC; + status=$? + CheckStatus $status + else + echo "\nERROR: $FilesDir/$IBC not found"; + echo "*** The installation failed ***"; + fi + ;; + * ) + echo "ERROR: install script does not support \"$CurrentOS\""; + echo "*** The installation failed ***";; + esac + ;; + 3 ) + echo "\nStarting InterClient JDBC Install, please wait..."; + case $CurrentOS in + HP-UX ) + if [ -f $FilesDir/$IC ]; then + cd /tmp; + tar xpf $FilesDir/InterClient*.tar; + cd interclient_install_temp_dir; + ./install.sh; + status=$? + CheckStatus $status + else + echo "\nERROR: $FilesDir/$IC not found"; + echo "*** The installation failed ***"; + fi + ;; + * ) + echo "ERROR: install script does not support \"$CurrentOS\""; + echo "*** The installation failed ***";; + esac + ;; + 4) + echo "\nStarting Adobe Acrobat(R) Reader Install, please wait..."; + if [ -f $FilesDir/$Acrobat ]; then + $FilesDir/$Acrobat; + status=$? + CheckStatus $status + else + echo "\nERROR: $FilesDir/$Acrobat not found"; + echo "*** The installation failed ***"; + fi + ;; + 5 ) + inst=DONE;; + * ) + echo "\nERROR: Invalid selection, expected 1 thru 5\n";; + esac +done +exit 0 diff --git a/src/makefiles/setup_gdbs b/src/makefiles/setup_gdbs new file mode 100644 index 0000000000..7359db5614 --- /dev/null +++ b/src/makefiles/setup_gdbs @@ -0,0 +1,102 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to copy physical databases into directories +# instead of having links to the databases +# +cp journal/journal.gdb temporary.gdb +rm journal/journal.gdb +mv temporary.gdb journal/journal.gdb +chmod 666 journal/journal.gdb +# +cp journal/journal_vms.gdb temporary.gdb +rm journal/journal_vms.gdb +mv temporary.gdb journal/journal_vms.gdb +chmod 666 journal/journal_vms.gdb +# +cp jrd/yachts.gdb temporary.gdb +rm jrd/yachts.gdb +mv temporary.gdb jrd/yachts.gdb +chmod 666 jrd/yachts.gdb +# +cp jrd/isc.gdb temporary.gdb +rm jrd/isc.gdb +mv temporary.gdb jrd/isc.gdb +chmod 666 jrd/isc.gdb +# +cp msgs/master_msg_db temporary.gdb +rm msgs/master_msg_db +mv temporary.gdb msgs/master_msg_db +chmod 666 msgs/master_msg_db +# +cp pyxis/forms.gdb temporary.gdb +rm pyxis/forms.gdb +mv temporary.gdb pyxis/forms.gdb +chmod 666 pyxis/forms.gdb +# +cp qli/help.gdb temporary.gdb +rm qli/help.gdb +mv temporary.gdb qli/help.gdb +chmod 666 qli/help.gdb +# +cp utilities/rebuild.gdb temporary.gdb +rm utilities/rebuild.gdb +mv temporary.gdb utilities/rebuild.gdb +chmod 666 utilities/rebuild.gdb +# +cp example4/empbuild.gdb temporary.gdb +rm example4/empbuild.gdb +mv temporary.gdb example4/empbuild.gdb +chmod 666 example4/empbuild.gdb +# +cp example5/empbuild.gdb temporary.gdb +rm example5/empbuild.gdb +mv temporary.gdb example5/empbuild.gdb +chmod 666 example5/empbuild.gdb +# +cp examples/atlas.gdb temporary.gdb +rm examples/atlas.gdb +mv temporary.gdb examples/atlas.gdb +chmod 666 examples/atlas.gdb +# +cp examples/c_guide.gdb temporary.gdb +rm examples/c_guide.gdb +mv temporary.gdb examples/c_guide.gdb +chmod 666 examples/c_guide.gdb +# +cp examples/emp.gdb temporary.gdb +rm examples/emp.gdb +mv temporary.gdb examples/emp.gdb +chmod 666 examples/emp.gdb +# +cp examples/nc_guide.gdb temporary.gdb +rm examples/nc_guide.gdb +mv temporary.gdb examples/nc_guide.gdb +chmod 666 examples/nc_guide.gdb +# +cp examples/slides.gdb temporary.gdb +rm examples/slides.gdb +mv temporary.gdb examples/slides.gdb +chmod 666 examples/slides.gdb +# +cp examples/stocks.gdb temporary.gdb +rm examples/stocks.gdb +mv temporary.gdb examples/stocks.gdb +chmod 666 examples/stocks.gdb +# +echo 'Removing marion.gdb. Use gbak to create a new one.' +rm marion.gdb diff --git a/src/makefiles/setup_prots b/src/makefiles/setup_prots new file mode 100644 index 0000000000..d6764c34b4 --- /dev/null +++ b/src/makefiles/setup_prots @@ -0,0 +1,21 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to change the protections of shell scripts +chmod +x *_template fetch_comp refresh* +chmod +x build_kit edit_make maketar run_edit set_prot unset_prot platform special_opt +chmod +x setup_gdbs sco_ship v3compat diff --git a/src/makefiles/sfx.alice b/src/makefiles/sfx.alice new file mode 100644 index 0000000000..5d247e1b9b --- /dev/null +++ b/src/makefiles/sfx.alice @@ -0,0 +1,126 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/alice +VPATH= $(SOURCE)/alice +CXX= @CXX@ + +unexport ISC_USER +unexport ISC_PASSWORD + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_STATIC) $(GPRE_FLAGS) $< $@ + + +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT) +ALICE= $(OBJS)/firebird/bin/gfix$(EXEC_EXT) +GPRE_FLAGS= -r -m -z -n +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + +JRD_LINK= $(OBJS)/jrd/isc.o + +ALICE_HEADERS= alice.h all.h alloc.h +ALICE_OBJECTS= alice.o all.o exe.o alice_meta.o tdr.o + +all: alice$(EXEC_EXT) + +# JMB $(JRD_LINK) (source/jrd/isc.o) is already in the shared library (isc.bin) +# so I removed it from the link line on the executable. +alice: $(ALICE_OBJECTS) $(JRD_LINK) $(GDSSHR) + -$(RM) alice + $(CXX) $(LINK_OPTS) $(ALICE_OBJECTS) $(T_SWITCH) -o alice \ + $(GDSSHR_LINK) + $(CHMOD_7) alice + $(MV) alice $(ALICE) + $(TOUCH) alice + $(CHMOD_6) alice + +alice.exe: $(ALICE_OBJECTS) $(JRD_LINK) + -$(RM) alice.exe + $(CXX) $(O_EXE_SWITCH)alice $(LINK_OPTS) \ + $(ALICE_OBJECTS) $(GDSSHR_LINK) $(ADVAPILIB) + $(MV) alice.exe $(ALICE) + $(RM) alice.exe + $(TOUCH) alice.exe + +debug: $(ALICE_OBJECTS) $(GDSLIB) + $(CXX) $(LINK_OPTS) -g $(ALICE_OBJECTS) -o alice_dbg $(GDSLIB_LINK) + +debug_nt: $(ALICE_OBJECTS) + $(CXX) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)alice_dbg $(ALICE_OBJECTS) $(GDSLIB_LINK) + +alice.h: blk.h + $(TOUCH) alice.h +alice.o: alice.cpp $(ALICE_HEADERS) alice_proto.h exe_proto.h \ + $(SOURCE)/jrd/license.h +all.o: all.cpp $(ALICE_HEADERS) lls.h blk.h all_proto.h \ + $(SOURCE)/jrd/gds_proto.h +exe.o: exe.cpp $(ALICE_HEADERS) all_proto.h tdr_proto.h \ + $(SOURCE)/jrd/gds_proto.h +alice_meta.cpp: yachts.lnk alice_meta.epp +alice_meta.o: alice_meta.cpp $(ALICE_HEADERS) all_proto.h alice_meta.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/gds_proto.h +tdr.o: tdr.cpp $(ALICE_HEADERS) info.h \ + alice_proto.h all_proto.h alice_meta.h tdr_proto.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_proto.h + +yachts.lnk: $(OBJS)/dbs/empty.gdb.dummy + ln -fs $(OBJS)/dbs/empty.gdb yachts.lnk + +$(OBJS)/dbs/empty.gdb.dummy: force + $(CD) $(OBJS)/dbs && $(MAKE) empty.gdb.dummy + +$(GDSSHR) $(GDSLIB) $(JRD_LINK): + $(CD) $(OBJS)/jrd && $(MAKE) ALT_O="alt.o.ps1" ALT_BIN="alt.bin.ps1" SECURITY_MISC="" SECURITY_P_MISC="" $(@F) + + +force: + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - alice" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/alice/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.burp b/src/makefiles/sfx.burp new file mode 100644 index 0000000000..a543a93a10 --- /dev/null +++ b/src/makefiles/sfx.burp @@ -0,0 +1,181 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/burp +VPATH= $(SOURCE)/burp +CXX= @CXX@ + +unexport ISC_USER +unexport ISC_PASSWORD + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_STATIC) $(GPRE_FLAGS) $< $@ + +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT) +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT) +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- +BURP= $(OBJS)/firebird/bin/gbak$(EXEC_EXT) +SPIT= $(OBJS)/firebird/bin/gsplit$(EXEC_EXT) +GPRE_FLAGS= -r -m -z -n + +JRD_LINK= $(OBJS)/jrd/sdl.o + +BURP_OBJECTS= backup.o burp.o canonical.o misc.o mvol.o restore.o +SPIT_OBJECTS= spit.o + +all: burp$(EXEC_EXT) spit$(EXEC_EXT) + +# JMB $(JRD_LINK) already in shared library +burp: burplib.a $(BURP_REMOTE_LINK) $(GDSSHR) + -$(RM) burp + $(CXX) $(LINK_OPTS) $(BURP_OBJECTS) $(T_SWITCH) \ + $(BURP_REMOTE_LINK) -o burp $(GDSSHR_LINK) $(SO_NETWORK_LIB) + $(CHMOD_7) burp + $(MV) burp $(BURP) + $(TOUCH) burp + $(CHMOD_6) burp + +burp/gbak_static gbak_static $(OBJS)/firebird/bin/gbak_static: \ + $(OBJS)/jrd/jrd_static.a burplib.a + $(CXX) burplib.a $(OBJS)/jrd/jrd_static.a -o gbak_static \ + $(COREFOUNDATION_LINK) $(DROP_LINK) + $(MV) gbak_static $(OBJS)/firebird/bin/gbak_static + +burp.exe: burplib.lib $(JRD_LINK) $(BURP_REMOTE_LINK) + -$(RM) burp.exe + $(CC) $(LINK_OPTS) $(O_EXE_SWITCH)burp \ + $(BURP_OBJECTS) $(JRD_LINK) $(BURP_REMOTE_LINK) $(GDSSHR_LINK) $(WSOCKLIB) + $(MV) burp.exe $(BURP) + $(RM) burp.exe + $(TOUCH) burp.exe + +burplib.a: $(BURP_OBJECTS) $(JRD_LINK) + -$(RM) burplib.a + $(AR) burplib.a $(BURP_OBJECTS) $(SCO_OBJS_BURPLIB) + -ranlib burplib.a + $(CHMOD_6) burplib.a + +libgbaklib.a: burplib.a + -$(RM) libgbaklib.a + $(CP) burplib.a $(OBJS)/firebird/lib/gbaklib.a + $(TOUCH) libgbaklib.a + $(CHMOD_6) libgbaklib.a + +burplib.lib: $(BURP_OBJECTS) + -$(RM) burplib.lib + $(IMPLIB) -out:burplib.lib $(BURP_OBJECTS) + $(TOUCH) burplib.lib + +spit: $(SPIT_OBJECTS) + -$(RM) spit + $(CC) $(LINK_OPTS) $(SPIT_OBJECTS) $(STDIO) -o spit + $(CHMOD_7) spit + $(MV) spit $(SPIT) + $(TOUCH) spit + $(CHMOD_6) spit + +spit.exe: $(SPIT_OBJECTS) + -$(RM) spit.exe + $(CC) $(LINK_OPTS) $(O_EXE_SWITCH)spit \ + $(SPIT_OBJECTS) $(GDSSHR_LINK) + $(MV) spit.exe $(SPIT) + $(RM) spit.exe + $(TOUCH) spit.exe + +yachts.lnk: $(OBJS)/dbs/empty.gdb.dummy + ln -fs $(OBJS)/dbs/empty.gdb yachts.lnk + +$(OBJS)/dbs/empty.gdb.dummy: force + $(CD) $(OBJS)/dbs && $(MAKE) empty.gdb.dummy + +debug: $(BURP_OBJECTS) $(GDSLIB_BACKEND) + $(CXX) $(LINK_OPTS) $(CXX_INCLUDE_DIRS) -g $(BURP_OBJECTS) -o burp_dbg $(GDSLIB_LINK) + +debug_nt: $(BURP_OBJECTS) + $(CXX) $(DEBUG_LINK_OPTS) $(CXX_INCLUDE_DIRS) $(O_EXE_SWITCH)burp_dbg $(BURP_OBJECTS) $(GDSLIB_LINK) + +$(OBJS)/jrd/jrd_static.a: + $(CD) $(OBJS)/jrd && $(MAKE) $@ + +all.o: all.cpp $(QLI_HEADERS) +backup.cpp: yachts.lnk backup.epp +backup.o: backup.cpp burp.h \ + backu_proto.h burp_proto.h canon_proto.h mvol_proto.h \ + $(SOURCE)/remote/protocol.h \ + $(SOURCE)/jrd/align.h +burp.h: $(SOURCE)/jrd/dsc.h +# $(TOUCH) burp.h +burp.o: burp.cpp burp.h \ + burp_proto.h backu_proto.h mvol_proto.h resto_proto.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/why_proto.h +canonical.o: canonical.cpp burp.h \ + canon_proto.h \ + $(SOURCE)/remote/remote.h $(SOURCE)/jrd/sdl.h $(SOURCE)/jrd/align.h +spit.o: spit.cpp spit.h +misc.o: misc.cpp burp.h \ + burp_proto.h misc_proto.h +mvol.o: mvol.cpp burp.h \ + burp_proto.h mvol_proto.h \ + $(SOURCE)/jrd/gds_proto.h +restore.cpp: yachts.lnk restore.epp +restore.o: restore.cpp burp.h \ + burp_proto.h canon_proto.h misc_proto.h mvol_proto.h \ + resto_proto.h \ + $(SOURCE)/jrd/align.h $(SOURCE)/jrd/flags.h \ + $(SOURCE)/jrd/obj.h $(SOURCE)/remote/protocol.h + +$(GDSSHR) $(GDSLIB_BACKEND) $(JRD_LINK): + $(CD) $(OBJS)/jrd && $(MAKE) ALT_O="alt.o.ps1" ALT_BIN="alt.bin.ps1" SECURITY_MISC="" SECURITY_P_MISC="" CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(REMOTE_LINK) remote_dummy: + $(CD) $(OBJS)/remote && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) + +force: + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - burp" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/burp/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.client b/src/makefiles/sfx.client new file mode 100644 index 0000000000..12685463d6 --- /dev/null +++ b/src/makefiles/sfx.client @@ -0,0 +1,207 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +GPRE= source/interbase/bin/gpre$(EXEC_EXT) +GPRE_FLAGS= -r -m -z -n + +DSQL_MISC= source/dsql/array.o source/dsql/blob.o source/dsql/preparse.o \ + source/dsql/user_dsql.o source/dsql/utld.o + +DSQL_P_MISC= source/dsql/array.bin source/dsql/blob.bin source/dsql/preparse.bin \ + source/dsql/user_dsql.bin source/dsql/utld.bin + + +REMOTE_MISC= source/remote/allr.o source/remote/inet.o \ + source/remote/interface.o source/remote/merge.o \ + source/remote/parser.o source/remote/protocol.o \ + source/remote/remote.o $(NET_OBJECTS) + +REMOTE_P_MISC= source/remote/allr.bin source/remote/inet.bin \ + source/remote/interface.bin source/remote/merge.bin \ + source/remote/parser.bin source/remote/protocol.bin \ + source/remote/remote.bin $(NET_P_OBJECTS) + +JRD_GDS_H= source/jrd/gds.h + +JRD_MISC= source/jrd/alt.o source/jrd/cvt.o \ + source/jrd/dsc.o source/jrd/dls.o \ + source/jrd/enc.o source/jrd/gds.o source/jrd/isc.o \ + source/jrd/isc_file.o source/jrd/isc_ipc.o \ + source/jrd/isc_sync.o \ + source/jrd/perf.o source/jrd/sch.o source/jrd/sdl.o \ + source/jrd/thd.o source/jrd/utl.o source/jrd/why.o \ + $(JRD_MISC_OBJECTS) + +JRD_P_MISC= source/jrd/alt.bin source/jrd/cvt.bin \ + source/jrd/dsc.bin source/jrd/dls.bin \ + source/jrd/enc.bin source/jrd/gds.bin source/jrd/isc.bin \ + source/jrd/isc_file.bin source/jrd/isc_ipc.bin \ + source/jrd/isc_sync.bin \ + source/jrd/perf.bin source/jrd/sch.bin source/jrd/sdl.bin \ + source/jrd/thd.bin source/jrd/utl.bin source/jrd/why.bin \ + $(STDIO_P_OBJ) $(JRD_P_MISC_OBJECTS) + +SECURITY_MISC= source/utilities/security.o + +SECURITY_P_MISC= source/utilities/security.bin + +CLIENT_OBJECTS= $(JRD_MISC) $(DSQL_MISC) $(REMOTE_MISC) $(SECURITY_MISC) + +# If you add any more Objects to the CLIENT_P_OBJECTS definition, +# please create an action rule for the object below. +# For eg: see the rule for $(JRD_P_MISC). +# This is required for super_client to be built properly with the +# objects having -DSUPERCLIENT in them turned on from this dir. +CLIENT_P_OBJECTS= $(JRD_P_MISC) $(DSQL_P_MISC) $(REMOTE_P_MISC) \ + $(SECURITY_P_MISC) + +all: super_client + +super_client: $(SUPER_CLIENT_GDSSHR) + +gdsmt.so.1 $(SO_SUPER_GDSSHR): \ + $(JRD_GDS_H) client_p_objects $(CLIENT_P_OBJECTS) + -$(RM) gdsmt.so.1 + ld $(LD_OPTS) libgdsmt.so.0 $(ZDEFS) $(CLIENT_P_OBJECTS) \ + $(LD_LIBS) -o gdsmt.so.1 + $(CHMOD_6) gdsmt.so.1 + $(MV) gdsmt.so.1 $(SO_SUPER_GDSSHR) + $(TOUCH) gdsmt.so.1 + $(CHMOD_6) gdsmt.so.1 + +gds.sl.1 $(HP_SUPER_GDSSHR): \ + $(JRD_GDS_H) client_p_objects $(CLIENT_P_OBJECTS) + -$(RM) gds.sl.1 + ld -b $(LD_OPTS) $(CLIENT_P_OBJECTS) $(LD_LIBS) \ + -o gds.sl.1 + $(CHMOD_7) gds.sl.1 + $(MV) gds.sl.1 $(HP_SUPER_GDSSHR) + $(TOUCH) gds.sl.1 + $(CHMOD_6) gds.sl.1 + +gds.so.1 $(LX_SUPER_GDSSHR): \ + $(JRD_GDS_H) client_p_objects $(CLIENT_P_OBJECTS) + -$(RM) gds.so.1 + ld $(LD_OPTS) $(CLIENT_P_OBJECTS) $(LD_LIBS) \ + -o gds.so.1 + $(CHMOD_7) gds.so.1 + $(MV) gds.so.1 $(LX_SUPER_GDSSHR) + $(TOUCH) gds.so.1 + $(CHMOD_6) gds.so.1 + +gds.dylib.1 $(DARWIN_SUPER_GDSSHR): $(JRD_GDS_H) $(PYXIS_P_MISC) $(WAL_P_MISC) \ + client_p_objects $(CLIENT_P_OBJECTS) + -$(RM) gds.dylib.1 + libtool -dynamic -o gds.dylib.1 -install_name \ + /Library/Frameworks/Firebird.framework/Versions/A/Firebird \ + -current_version 1.0.0 -compatibility_version 1.0.0 \ + $(CLIENT_P_OBJECTS) $(PYXIS_P_MISC) $(WAL_P_MISC) \ + $(LD_LIBS) -framework System -framework Foundation + $(CHMOD_7) gds.dylib.1 + $(MV) gds.dylib.1 $(DARWIN_SUPER_GDSSHR) + $(TOUCH) gds.dylib.1 + $(CHMOD_6) gds.dylib.1 + -$(RM) $(WAL_P_MISC) $(WAL_MISC) + +gdsshr.a.1 $(AIX_PPC_SUPER_GDSSHR): \ + $(JRD_GDS_H) client_p_objects $(CLIENT_P_OBJECTS) + -$(RM) gdsshr.a.1 + ld $(CLIENT_P_OBJECTS) -bM:SRE -H1024 -bE:source/jrd/gds.bind -lc \ + -o gdsshr.a.1 + $(CHMOD_6) gdsshr.a.1 + $(MV) gdsshr.a.1 $(AIX_PPC_SUPER_GDSSHR) + $(TOUCH) gdsshr.a.1 + $(CHMOD_6) gdsshr.a.1 + +gds.so.0 $(DG_GDSSHR) $(DG_X86_GDSSHR) $(SOL_GDSSHR) $(UNIXWARE_GDSSHR): \ + $(JRD_P_OBJECTS) flu.bin $(CSI_P_MISC) $(DSQL_P_MISC) \ + $(LOCK_P_MISC) $(REMOTE_P_MISC) $(BRIDGE_P_MISC) \ + $(INTL_P_MISC) $(WAL_P_MISC) \ + $(FUNCTIONS) $(GDSFLIB) + -$(RM) gds.so.0 + ld $(LD_OPTS) libgds.so.0 $(ZDEFS) $(JRD_P_OBJECTS) flu.bin \ + $(CSI_P_MISC) $(DSQL_P_MISC) $(LOCK_P_MISC) \ + $(REMOTE_P_MISC) $(BRIDGE_P_MISC) \ + $(INTL_P_MISC) $(WAL_P_MISC) $(FUNCTIONS) $(GDSF_LIB) \ + $(LD_LIBS) -o gds.so.0 + $(CHMOD_6) gds.so.0 + $(MV) gds.so.0 $(GDSSHR) + $(TOUCH) gds.so.0 + $(CHMOD_6) gds.so.0 + +gdsf.so $(DG_FUNCSHR) $(DG_X86_FUNCSHR): functions.bin + -$(RM) gdsf.so + ld -G functions.bin -o gdsf.so + $(CHMOD_6) gdsf.so + $(MV) gdsf.so $(FUNCSHR) + $(TOUCH) gdsf.so + $(CHMOD_6) gdsf.so + +gdsshr.dll: $(WIN_NT_GDSSHR) + $(TOUCH) gdsshr.dll + +gds32_nt_ms.dll: $(CLIENT_OBJECTS) $(JRD_MISC) $(REMOTE_MISC) ..\jrd\gdsalias.o + -$(RM) gds32.dll gds32.lib + $(IMPLIB) -out:gds_temp.lib $(CLIENT_OBJECTS) $(JRD_MISC) $(REMOTE_MISC) + $(IMPLIB) -out:gds32.lib -def:..\jrd\gds.bind gds_temp.lib + $(LINK) $(LD_OPTS) -out:gds32.dll -dll -entry:_CRT_INIT$(DLLENTRY) gds_temp.lib gds32.exp $(CONLIBSDLL) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) + $(RM) gds_temp.lib + $(RM) gds32.exp + $(MV) gds32.lib gds32_ms.lib + $(RM) gds32.lib + implib gds32.lib gds32.dll + tlib gds32.lib +- ..\jrd\gdsalias.o + $(MV) gds32.lib ..\interbase\lib + $(MV) gds32_ms.lib ..\interbase\lib + $(MV) gds32.dll ..\interbase\bin + $(RM) gds32.dll gds32.lib gds32_ms.lib + $(TOUCH) gds32_nt_ms.dll + +gds32_nt_bc4.dll: $(CLIENT_OBJECTS) $(JRD_MISC) $(REMOTE_MISC) + -$(RM) gds32.dll gds32.lib tmp.bind + sed -e 's/DATA READ WRITE/DATA MULTIPLE/' -e 's/LIBRARY gds32/LIBRARY gds32 INITINSTANCE/' gds.bind > tmp.bind + $(LINK) -Tpd -ap -c $(LD_OPTS) -w-inq -x /Lc:\bc4\lib c0d32 @gds.rsp,gds32.dll,,import32 cw32mt,tmp.bind + implib gds32.lib gds32.dll + $(MV) gds32.lib ..\interbase\lib + $(MV) gds32.dll ..\interbase\bin + $(RM) gds32.dll gds32.lib tmp.bind + $(TOUCH) gds32_nt_bc4.dll + +# This target just forces those who depend on it, to execute their actions +force: + $(ECHO) force + +# CLIENT + +$(DSQL_P_MISC): force + $(SH) '$(CD) source/dsql; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM=$(SYSTEM) $(@F);' + +$(REMOTE_P_MISC): force + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM=$(SYSTEM) $(@F);' + +$(JRD_P_MISC): force + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM=$(SYSTEM) $(@F);' + +$(SECURITY_P_MISC): force + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM=$(SYSTEM) $(@F);' + +$(JRD_GDS_H): + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM=$(SYSTEM) $(@F)' + +client_p_objects: force + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM=$(SYSTEM) super_client_objects' + $(SH) '$(CD) source/dsql; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM=$(SYSTEM) super_client_objects' + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM=$(SYSTEM) super_client_objects' diff --git a/src/makefiles/sfx.csv b/src/makefiles/sfx.csv new file mode 100644 index 0000000000..11681f3df6 --- /dev/null +++ b/src/makefiles/sfx.csv @@ -0,0 +1,132 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +GPRE_FLAGS= -gds -raw -ids $< + +GPRE= source/interbase/bin/gpre +CSU= source/interbase/bin/gcsu +CENTRAL_SERVER= source/interbase/bin/gds_cserver + +JRD_LINK= source/jrd/isc.o source/jrd/isc_file.o +JRD2_LINK= source/jrd/gds.o +REMOTE_LINK= source/remote/merge.o + +CSI_OBJECTS= csi.o css.o +CSI_P_OBJECTS= csi.bin css.bin + +all: csi_objects $(CSI_P_OBJS) central_server$(EXEC_EXT) csu$(EXEC_EXT) + +csi_objects: $(CSI_OBJECTS) + -$(RM) csi_objects + $(TOUCH) csi_objects + $(CHMOD_6) csi_objects + +csi_p_objs: csi_objects $(CSI_P_OBJECTS) + -$(RM) csi_objects csi_p_objs + $(TOUCH) csi_objects csi_p_objs + $(CHMOD_6) csi_objects csi_p_objs + +csilib: $(CSI_OBJECTS) $(JRD_LINK) $(REMOTE_LINK) + -$(RM) csilib + /com/bind &2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - csv" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/csv/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.dbs b/src/makefiles/sfx.dbs new file mode 100644 index 0000000000..96c51e2699 --- /dev/null +++ b/src/makefiles/sfx.dbs @@ -0,0 +1,63 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@SET_MAKE@ +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/dbs +VPATH= $(SOURCE)/dbs +CXX= @CXX@ + +# If we export the username/password we get an error because we can't connect +# to isc4.gdb! So we won't export them while we make the databases... +unexport ISC_USER +unexport ISC_PASSWORD +export DYLD_FRAMEWORK_PATH +DYLD_FRAMEWORK_PATH= $(OBJS)/firebird + +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + +GBAK_STATIC= $(OBJS)/firebird/bin/gbak_static$(EXEC_EXT) +CREATE_DB= $(OBJS)/firebird/bin/create_db$(EXEC_EXT) + +empty.gdb.dummy: $(CREATE_DB) + $(RM) -f empty.gdb empty.gdb.dummy + $(CREATE_DB) empty.gdb + touch $@ + chmod 444 empty.gdb + +forms.gdb.dummy: $(SOURCE)/pyxis/forms.gbk + $(GBAK_STATIC) -MODE read_only -R $< forms.gdb + chmod 444 forms.gdb + touch $@ + +msg.gdb.dummy: $(SOURCE)/msgs/msg.gbak + $(GBAK_STATIC) -MODE read_only -R $< msg.gdb + chmod 444 msg.gdb + touch $@ + +help.gdb.dummy: $(SOURCE)/misc/help.gbak + $(GBAK_STATIC) -MODE read_only -R $< help.gdb + chmod 444 help.gdb + touch $@ + +metadata.gdb.dummy: $(SOURCE)/misc/metadata.gbak + $(GBAK_STATIC) -MODE read_only -R $< metadata.gdb + chmod 444 metadata.gdb + touch $@ + +force: diff --git a/src/makefiles/sfx.dsql b/src/makefiles/sfx.dsql new file mode 100644 index 0000000000..842b602524 --- /dev/null +++ b/src/makefiles/sfx.dsql @@ -0,0 +1,204 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/dsql +VPATH= $(SOURCE)/dsql +CXX= @CXX@ + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_BOOT) $(GPRE_FLAGS) $< $@ + +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT) +GPRE_FLAGS= -lang_internal -r -m -z -n +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + + +DSQL_OBJECTS= alld.o array.o blob.o ddl.o dsql.o \ + errd.o gen.o hsh.o make.o metd.o \ + movd.o parse.o pass1.o preparse.o \ + user_dsql.o utld.o +DSQL_P_OBJECTS= alld.bin array.bin blob.bin ddl.bin dsql.bin \ + errd.bin gen.bin hsh.bin make.bin metd.bin \ + movd.bin parse.bin pass1.bin preparse.bin \ + user_dsql.bin utld.bin +DSQL_J_OBJECTS= array.j blob.j preparse.j user_dsql.j utld.j + +# Files which going to the super client library are : +DSQL_CLIENT_P_OBJECTS= array.bin blob.bin preparse.bin user_dsql.bin utld.bin + +objects: dsql_objects $(DSQL_P_OBJS) dsql_$(SPECIAL_OBJECTS)_objects + +dsql_objects: $(DSQL_OBJECTS) + -$(RM) dsql_objects + $(TOUCH) dsql_objects + $(CHMOD_6) dsql_objects + +dsql_p_objects: $(DSQL_P_OBJECTS) + -$(RM) dsql_p_objects + $(TOUCH) dsql_p_objects + $(CHMOD_6) dsql_p_objects + +dsql__objects: + -$(RM) dsql__objects + $(TOUCH) dsql__objects + $(CHMOD_6) dsql__objects + +dsql_j_objects: $(DSQL_J_OBJECTS) + -$(RM) dsql_j_objects + $(TOUCH) dsql_j_objects + $(CHMOD_6) dsql_j_objects + +super_client_objects: $(DSQL_CLIENT_P_OBJECTS) + -$(RM) super_client_objects + $(TOUCH) super_client_objects + $(CHMOD_6) super_client_objects + +dsqllib: $(DSQL_OBJECTS) + -$(RM) dsqllib + /com/bind tmp.$< +# $(YACC) -l $(YFLAGS) tmp.$< +# -$(RM) tmp.$< + sed -f $< y.tab.c > $@ + -$(RM) y.tab.c +parse.o parse.bin: parse.cpp dsql.h keywords.h node.h sym.h chars.h \ + alld_proto.h errd_proto.h hsh_proto.h make_proto.h \ + parse_proto.h \ + source/jrd/flags.h source/wal/wal.h \ + source/jrd/gds_proto.h source/jrd/thd_proto.h +pass1.o: pass1.cpp dsql.h node.h sym.h \ + alld_proto.h ddl_proto.h errd_proto.h hsh_proto.h \ + make_proto.h metd_proto.h pass1_proto.h \ + source/jrd/thd.h source/jrd/intl.h \ + source/jrd/dsc_proto.h + $(SPECIAL_OPT) $(COPT_DSQL_PASS1) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +preparse.o: preparse.cpp chars.h prepa_proto.h source/jrd/gds_proto.h +user_dsql.o: user_dsql.cpp dsql.h chars.h sqlda.h user__proto.h \ + source/jrd/blr.h source/jrd/inf.h source/jrd/align.h \ + source/jrd/gds_proto.h source/jrd/ibsetjmp.h +utld.o: utld.cpp dsql.h sqlda.h utld_proto.h \ + source/jrd/blr.h source/jrd/align.h source/jrd/gds_proto.h + +jrd/% $(OBJS)/jrd/%: + $(CD) $(OBJS)/jrd && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) + +pass1.bin: pass1.cpp + $(CP) $< pass1foo.c + $(SPECIAL_OPT) $(COPT_DSQL_PASS1) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) pass1foo.c + $(MV) pass1foo.o pass1.bin + -$(RM) pass1foo.c pass1foo.o + +# .j objects are a special compilation for SOLARIS +array.j: array.o +blob.j: blob.o +preparse.j: preparse.o +user_dsql.j: user_dsql.o +utld.j: utld.o + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - dsql" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/dsql/::g"\ + depends.out |sort|uniq > depends.out.1 + -$(CAT) depends.out.1 >> depends.mak + sed -e "s:\.o\::\.bin\::g" depends.out.1 >> depends.mak + -$(RM) depends.out depends.out.1 + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.dudley b/src/makefiles/sfx.dudley new file mode 100644 index 0000000000..f41f80c683 --- /dev/null +++ b/src/makefiles/sfx.dudley @@ -0,0 +1,187 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +@SET_MAKE@ +OBJS= objs +SOURCE= source + +srcdir= $(SOURCE)/dudley +VPATH= $(SOURCE)/dudley +CXX= @CXX@ + +unexport ISC_USER +unexport ISC_PASSWORD + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_STATIC) $(GPRE_FLAGS) $< $@ + +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT) +DUDLEY= $(OBJS)/firebird/bin/gdef$(EXEC_EXT) +GPRE_FLAGS= -r -m -z -n +CXX_INCLUDE_DIRS= -I. -Isource/jrd + + +# If you add any more Objects from other components in this makefile, +# please create an action rule for the object below. +# For eg: see the rule for $(JRD_LINK) +ISC_LINK= $(OBJS)/jrd/isc.o +JRD_LINK= $(OBJS)/jrd/isc_file.o $(OBJS)/jrd/llio.o $(OBJS)/jrd/misc.o $(OBJS)/jrd/iberr.o +GPRE_LINK= $(OBJS)/gpre/pretty.o +WALF_LINK= $(OBJS)/wal/walf.o + +DUDLEY_OBJECTS= ddl.o exe.o expand.o expr.o extract.o generate.o \ + hsh.o lex.o parse.o trn.o + +DDL_LINK_OBJECTS= $(DUDLEY_OBJECTS) $(ISC_LINK) $(JRD_LINK) $(GPRE_LINK) \ + $(WALF_LINK) + +all: dudley$(EXEC_EXT) + +# JMB $(ISC_LINK) already in shared library +# JMB $(JRD_LINK) already in shared library +# JMB $(WALF_LINK) already in shared library +dudley: ddllib.a $(DDL_LINK_OBJECTS) $(GDSSHR) + -$(RM) dudley + $(CXX) $(LINK_OPTS) $(DUDLEY_OBJECTS) \ + $(GPRE_LINK) -o dudley $(GDSSHR_LINK) + $(CHMOD_7) dudley + $(MV) dudley $(DUDLEY) + $(TOUCH) dudley + $(CHMOD_6) dudley + +dudley.exe: ddllib.lib $(DDL_LINK_OBJECTS) + -$(RM) dudley.exe dudley.rsp + $(ECHO) $(DUDLEY_OBJECTS) > dudley.rsp + $(ECHO) $(JRD_LINK) $(GPRE_LINK) $(WALF_LINK) \ + >> dudley.rsp + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)dudley \ + @dudley.rsp $(GDSSHR_LINK) $(ADVAPILIB) $(MPRLIB) + $(MV) dudley.exe $(DUDLEY) + $(RM) dudley.exe dudley.rsp + $(TOUCH) dudley.exe + +ddllib.a: $(DUDLEY_OBJECTS) + -rm -f ddllib.a + $(AR) ddllib.a $(DUDLEY_OBJECTS) + -ranlib ddllib.a + +ddllib.lib: $(DUDLEY_OBJECTS) + -$(RM) ddllib.lib + $(IMPLIB) -out:ddllib.lib $(DUDLEY_OBJECTS) + $(TOUCH) ddllib.lib + +debug: $(DUDLEY_OBJECTS) $(GPRE_LINK) $(GDSLIB) + $(CXX) $(LINK_OPTS) -g $(DUDLEY_OBJECTS) $(GPRE_LINK) -o dudley_dbg $(GDSLIB_LINK) + +debug_nt: $(DUDLEY_OBJECTS) $(GPRE_LINK) + $(CXX) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)dudley_dbg $(DUDLEY_OBJECTS) $(GPRE_LINK) $(GDSLIB_LINK) + +ddl.h: $(SOURCE)/jrd/dsc.h +# $(TOUCH) ddl.h +ddl.o: ddl.cpp ddl.h \ + ddl_proto.h exe_proto.h expan_proto.h extra_proto.h \ + hsh_proto.h lex_proto.h parse_proto.h trn_proto.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/gds_proto.h +exe.cpp: yachts.lnk exe.epp +exe.o: exe.cpp ddl.h \ + ddl_proto.h exe_proto.h gener_proto.h hsh_proto.h \ + lex_proto.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/flags.h \ + $(SOURCE)/jrd/acl.h $(SOURCE)/jrd/intl.h $(SOURCE)/jrd/obj.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_f_proto.h \ + $(SOURCE)/wal/walf_proto.h + $(SPECIAL_OPT) $(COPT_DUDLEY_EXE) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +expand.o: expand.cpp ddl.h parse.h \ + expan_proto.h ddl_proto.h hsh_proto.h parse_proto.h \ + $(SOURCE)/jrd/gds_proto.h +expr.o: expr.cpp ddl.h parse.h $(SOURCE)/jrd/acl.h $(SOURCE)/jrd/intl.h \ + ddl_proto.h expr_proto.h lex_proto.h parse_proto.h +extract.cpp: yachts.lnk extract.epp +extract.o: extract.cpp ddl.h \ + ddl_proto.h extra_proto.h \ + $(SOURCE)/jrd/acl.h $(SOURCE)/jrd/flags.h \ + $(SOURCE)/jrd/obj.h $(SOURCE)/jrd/gds_proto.h $(SOURCE)/wal/wal.h +generate.o: generate.cpp ddl.h \ + ddl_proto.h gener_proto.h trn_proto.h \ + $(SOURCE)/jrd/acl.h $(SOURCE)/jrd/gds_proto.h +hsh.o: hsh.cpp ddl.h parse.h \ + ddl_proto.h hsh_proto.h +lex.o: lex.cpp ddl.h parse.h \ + ddl_proto.h hsh_proto.h lex_proto.h \ + $(SOURCE)/jrd/gds_proto.h +parse.o: parse.cpp ddl.h parse.h \ + exe_proto.h expr_proto.h hsh_proto.h lex_proto.h \ + parse_proto.h \ + $(SOURCE)/jrd/acl.h $(SOURCE)/jrd/flags.h \ + $(SOURCE)/wal/wal.h $(SOURCE)/jrd/isc_f_proto.h + $(SPECIAL_OPT) $(COPT_DUDLEY_PARSE) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +trn.o: trn.cpp ddl.h \ + gener_proto.h lex_proto.h trn_proto.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/gds_proto.h \ + $(SOURCE)/jrd/gdsassert.h \ + $(SOURCE)/gpre/prett_proto.h + +yachts.lnk: $(OBJS)/dbs/empty.gdb + ln -fs $(OBJS)/dbs/empty.gdb yachts.lnk + +$(OBJS)/dbs/empty.gdb: force + $(CD) $(OBJS)/dbs && $(MAKE) empty.gdb + +$(GDSSHR) $(GDSLIB) $(JRD_LINK) $(ISC_LINK): + $(CD) $(OBJS)/jrd && $(MAKE) ALT_O="alt.o.ps1" ALT_BIN="alt.bin.ps1" SECURITY_MISC="" SECURITY_P_MISC="" $(@F) + +$(GPRE_LINK): + $(CD) $(OBJS)/gpre && $(MAKE) $(@F) + +$(WALF_LINK): + $(CD) $(OBJS)/wal && $(MAKE) $(@F) + +force: + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - dudley" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/dudley/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.example4 b/src/makefiles/sfx.example4 new file mode 100644 index 0000000000..d32c84a025 --- /dev/null +++ b/src/makefiles/sfx.example4 @@ -0,0 +1,140 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +GBAK= source/interbase/bin/gbak +GPRE= source/interbase/bin/gpre +ISQL= source/interbase/bin/isql + +GPRE_FLAGS= -r -m -z -n + +EXAMPLES_DEST= source/interbase/examples/v4/ +EXAMPLES_SRC= source/example4/ + +EMPBLD_OBJ= empbuild.o + +INTLBLD_OBJ= intlbld.o + +INPUT_FILES= empddl.sql empdml.sql indexoff.sql indexon.sql \ + job.inp lang.inp proj.inp qtr.inp + +INTL_FILES= intlddl.sql intldml.sql indexoff.sql indexon.sql \ + job.inp lang.inp proj.inp qtr.inp + + +v4_examples: employee.gdb intlemp.gdb $(NT_EXAMPLES) + $(CP) $(EXAMPLES_SRC)readme $(EXAMPLES_DEST)README + $(CP) $(EXAMPLES_SRC)align.h $(EXAMPLES_DEST)align.h + $(CP) $(EXAMPLES_SRC)api1.c $(EXAMPLES_DEST)api1.c + $(CP) $(EXAMPLES_SRC)api10.c $(EXAMPLES_DEST)api10.c + $(CP) $(EXAMPLES_SRC)api11.c $(EXAMPLES_DEST)api11.c + $(CP) $(EXAMPLES_SRC)api12.c $(EXAMPLES_DEST)api12.c + $(CP) $(EXAMPLES_SRC)api13.c $(EXAMPLES_DEST)api13.c + $(CP) $(EXAMPLES_SRC)api14.e $(EXAMPLES_DEST)api14.e + $(CP) $(EXAMPLES_SRC)api15.c $(EXAMPLES_DEST)api15.c + $(CP) $(EXAMPLES_SRC)api16.c $(EXAMPLES_DEST)api16.c + $(CP) $(EXAMPLES_SRC)api16t.c $(EXAMPLES_DEST)api16t.c + $(CP) $(EXAMPLES_SRC)api2.c $(EXAMPLES_DEST)api2.c + $(CP) $(EXAMPLES_SRC)api3.c $(EXAMPLES_DEST)api3.c + $(CP) $(EXAMPLES_SRC)api4.c $(EXAMPLES_DEST)api4.c + $(CP) $(EXAMPLES_SRC)api5.c $(EXAMPLES_DEST)api5.c + $(CP) $(EXAMPLES_SRC)api6.c $(EXAMPLES_DEST)api6.c + $(CP) $(EXAMPLES_SRC)api7.c $(EXAMPLES_DEST)api7.c + $(CP) $(EXAMPLES_SRC)api8.c $(EXAMPLES_DEST)api8.c + $(CP) $(EXAMPLES_SRC)api9.c $(EXAMPLES_DEST)api9.c + $(CP) $(EXAMPLES_SRC)api9f.c $(EXAMPLES_DEST)api9f.c + $(CP) $(EXAMPLES_SRC)apifull.c $(EXAMPLES_DEST)apifull.c + $(CP) $(EXAMPLES_SRC)create2.sql $(EXAMPLES_DEST)create2.sql + $(CP) $(EXAMPLES_SRC)dyn1.e $(EXAMPLES_DEST)dyn1.e + $(CP) $(EXAMPLES_SRC)dyn2.e $(EXAMPLES_DEST)dyn2.e + $(CP) $(EXAMPLES_SRC)dyn3.e $(EXAMPLES_DEST)dyn3.e + $(CP) $(EXAMPLES_SRC)dyn4.e $(EXAMPLES_DEST)dyn4.e + $(CP) $(EXAMPLES_SRC)dyn5.e $(EXAMPLES_DEST)dyn5.e + $(CP) $(EXAMPLES_SRC)dynfull.e $(EXAMPLES_DEST)dynfull.e + $(SETUP_ISC_LOCAL) \ + $(GBAK) $(EXAMPLES_SRC)employee.gdb $(EXAMPLES_DEST)employee.gbk + -$(RM) $(EXAMPLES_DEST)employee.gdb + $(SETUP_ISC_LOCAL) \ + $(GBAK) -r $(EXAMPLES_DEST)employee.gbk $(EXAMPLES_DEST)employee.gdb + $(CP) $(EXAMPLES_SRC)example.h $(EXAMPLES_DEST)example.h + $(CP) $(EXAMPLES_SRC)filter.sql $(EXAMPLES_DEST)filter.sql + $(SETUP_ISC_LOCAL) \ + $(GBAK) $(EXAMPLES_SRC)intlemp.gdb $(EXAMPLES_DEST)intlemp.gbk + -$(RM) $(EXAMPLES_DEST)intlemp.gdb + $(SETUP_ISC_LOCAL) \ + $(GBAK) -r $(EXAMPLES_DEST)intlemp.gbk $(EXAMPLES_DEST)intlemp.gdb + $(CP) $(EXAMPLES_SRC)stat1.e $(EXAMPLES_DEST)stat1.e + $(CP) $(EXAMPLES_SRC)stat10.e $(EXAMPLES_DEST)stat10.e + $(CP) $(EXAMPLES_SRC)stat11.e $(EXAMPLES_DEST)stat11.e + $(CP) $(EXAMPLES_SRC)stat12.e $(EXAMPLES_DEST)stat12.e + $(CP) $(EXAMPLES_SRC)stat12t.e $(EXAMPLES_DEST)stat12t.e + $(CP) $(EXAMPLES_SRC)stat2.e $(EXAMPLES_DEST)stat2.e + $(CP) $(EXAMPLES_SRC)stat3.e $(EXAMPLES_DEST)stat3.e + $(CP) $(EXAMPLES_SRC)stat4.e $(EXAMPLES_DEST)stat4.e + $(CP) $(EXAMPLES_SRC)stat5.e $(EXAMPLES_DEST)stat5.e + $(CP) $(EXAMPLES_SRC)stat6.e $(EXAMPLES_DEST)stat6.e + $(CP) $(EXAMPLES_SRC)stat7.e $(EXAMPLES_DEST)stat7.e + $(CP) $(EXAMPLES_SRC)stat8.e $(EXAMPLES_DEST)stat8.e + $(CP) $(EXAMPLES_SRC)stat9.e $(EXAMPLES_DEST)stat9.e + $(CP) $(EXAMPLES_SRC)udf.sql $(EXAMPLES_DEST)udf.sql + $(CP) $(EXAMPLES_SRC)udflib.c $(EXAMPLES_DEST)udflib.c + +nt_examples: + $(CP) $(EXAMPLES_SRC)api9f.def $(EXAMPLES_DEST)api9f.def + $(CP) $(EXAMPLES_SRC)udflib.def $(EXAMPLES_DEST)udflib.def + $(CP) $(EXAMPLES_SRC)makefile.bor $(EXAMPLES_DEST)Makefile.bor + $(CP) $(EXAMPLES_SRC)makefile.msc $(EXAMPLES_DEST)Makefile.msc + +employee.gdb: empbuild$(EXEC_EXT) $(INPUT_FILES) + -$(RM) employee.gdb + $(SETUP_ISC_LOCAL) \ + empbuild employee.gdb + -$(CHMOD_6) employee.gdb + +intlemp.gdb: intlbld$(EXEC_EXT) $(INTL_FILES) + -$(RM) intlemp.gdb + $(SETUP_ISC_LOCAL) \ + intlbld intlemp.gdb + -$(CHMOD_6) intlemp.gdb + +empbuild: $(EMPBLD_OBJ) + -$(RM) empbuild + $(CC) $(LINK_OPTS) empbuild.o -o empbuild $(GDS_LINK) + $(CHMOD_7) empbuild + +empbuild.exe: $(EMPBLD_OBJ) + -$(RM) empbuild.exe + $(CC) $(O_EXE_SWITCH)empbuild $(LINK_OPTS) empbuild.o $(GDS_LINK) + +dbs: empddl.sql empbld.sql intlddl.sql intlbld.sql + -$(RM) employee.gdb + -$(RM) intlemp.gdb + $(ISQL) -i empbld.sql + $(ISQL) -i intlbld.sql + $(TOUCH) dbs + +intlbld: $(INTLBLD_OBJ) + -$(RM) intlbld + $(CC) $(LINK_OPTS) intlbld.o -o intlbld $(GDS_LINK) + $(CHMOD_7) intlbld + +intlbld.exe: $(INTLBLD_OBJ) + -$(RM) intlbld.exe + $(CC) $(O_EXE_SWITCH)intlbld $(LINK_OPTS) intlbld.o $(GDS_LINK) + +empbuild.c: dbs empbuild.e +empbuild.o: empbuild.c +intlbld.c: dbs intlbld.e +intlbld.o: intlbld.c diff --git a/src/makefiles/sfx.example5 b/src/makefiles/sfx.example5 new file mode 100644 index 0000000000..f68b2ad387 --- /dev/null +++ b/src/makefiles/sfx.example5 @@ -0,0 +1,154 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@SET_MAKE@ +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/examples +VPATH= $(SOURCE)/examples +CXX= @CXX@ + +GBAK= $(OBJS)/firebird/bin/gbak +GPRE= $(OBJS)/firebird/bin/gpre +ISQL= $(OBJS)/firebird/bin/isql + +GPRE_FLAGS= -r -m -z -n + +EXAMPLES_DEST= $(OBJS)/firebird/examples/v5/ +EXAMPLES_SRC= $(VPATH) + +EMPBLD_OBJ= empbuild.o + +INTLBLD_OBJ= intlbld.o + +INPUT_FILES= empddl.sql empdml.sql indexoff.sql indexon.sql \ + job.inp lang.inp proj.inp qtr.inp + +INTL_FILES= intlddl.sql intldml.sql indexoff.sql indexon.sql \ + job.inp lang.inp proj.inp qtr.inp + + +v5_examples: employee.gdb intlemp.gdb $(NT_EXAMPLES) makefile.example + $(CP) $(EXAMPLES_SRC)readme $(EXAMPLES_DEST)README + $(CP) $(EXAMPLES_SRC)align.h $(EXAMPLES_DEST)align.h + $(CP) $(EXAMPLES_SRC)api1.c $(EXAMPLES_DEST)api1.c + $(CP) $(EXAMPLES_SRC)api10.c $(EXAMPLES_DEST)api10.c + $(CP) $(EXAMPLES_SRC)api11.c $(EXAMPLES_DEST)api11.c + $(CP) $(EXAMPLES_SRC)api12.c $(EXAMPLES_DEST)api12.c + $(CP) $(EXAMPLES_SRC)api13.c $(EXAMPLES_DEST)api13.c + $(CP) $(EXAMPLES_SRC)api14.e $(EXAMPLES_DEST)api14.e + $(CP) $(EXAMPLES_SRC)api15.c $(EXAMPLES_DEST)api15.c + $(CP) $(EXAMPLES_SRC)api16.c $(EXAMPLES_DEST)api16.c + $(CP) $(EXAMPLES_SRC)api16t.c $(EXAMPLES_DEST)api16t.c + $(CP) $(EXAMPLES_SRC)api2.c $(EXAMPLES_DEST)api2.c + $(CP) $(EXAMPLES_SRC)api3.c $(EXAMPLES_DEST)api3.c + $(CP) $(EXAMPLES_SRC)api4.c $(EXAMPLES_DEST)api4.c + $(CP) $(EXAMPLES_SRC)api5.c $(EXAMPLES_DEST)api5.c + $(CP) $(EXAMPLES_SRC)api6.c $(EXAMPLES_DEST)api6.c + $(CP) $(EXAMPLES_SRC)api7.c $(EXAMPLES_DEST)api7.c + $(CP) $(EXAMPLES_SRC)api8.c $(EXAMPLES_DEST)api8.c + $(CP) $(EXAMPLES_SRC)api9.c $(EXAMPLES_DEST)api9.c + $(CP) $(EXAMPLES_SRC)api9f.c $(EXAMPLES_DEST)api9f.c + $(CP) $(EXAMPLES_SRC)apifull.c $(EXAMPLES_DEST)apifull.c + $(CP) $(EXAMPLES_SRC)employe2.sql $(EXAMPLES_DEST)employe2.sql + $(CP) $(EXAMPLES_SRC)dyn1.e $(EXAMPLES_DEST)dyn1.e + $(CP) $(EXAMPLES_SRC)dyn2.e $(EXAMPLES_DEST)dyn2.e + $(CP) $(EXAMPLES_SRC)dyn3.e $(EXAMPLES_DEST)dyn3.e + $(CP) $(EXAMPLES_SRC)dyn4.e $(EXAMPLES_DEST)dyn4.e + $(CP) $(EXAMPLES_SRC)dyn5.e $(EXAMPLES_DEST)dyn5.e + $(CP) $(EXAMPLES_SRC)dynfull.e $(EXAMPLES_DEST)dynfull.e + $(SETUP_ISC_LOCAL) \ + $(GBAK) $(EXAMPLES_SRC)employee.gdb $(EXAMPLES_DEST)employee.gbk + -$(RM) $(EXAMPLES_DEST)employee.gdb + $(SETUP_ISC_LOCAL) \ + $(GBAK) -r $(EXAMPLES_DEST)employee.gbk $(EXAMPLES_DEST)employee.gdb + $(CP) $(EXAMPLES_SRC)example.h $(EXAMPLES_DEST)example.h + $(CP) $(EXAMPLES_SRC)api9f.sql $(EXAMPLES_DEST)api9f.sql + $(SETUP_ISC_LOCAL) \ + $(GBAK) $(EXAMPLES_SRC)intlemp.gdb $(EXAMPLES_DEST)intlemp.gbk + -$(RM) $(EXAMPLES_DEST)intlemp.gdb + $(SETUP_ISC_LOCAL) \ + $(GBAK) -r $(EXAMPLES_DEST)intlemp.gbk $(EXAMPLES_DEST)intlemp.gdb + $(CP) $(EXAMPLES_SRC)stat1.e $(EXAMPLES_DEST)stat1.e + $(CP) $(EXAMPLES_SRC)stat10.e $(EXAMPLES_DEST)stat10.e + $(CP) $(EXAMPLES_SRC)stat11.e $(EXAMPLES_DEST)stat11.e + $(CP) $(EXAMPLES_SRC)stat12.e $(EXAMPLES_DEST)stat12.e + $(CP) $(EXAMPLES_SRC)stat12t.e $(EXAMPLES_DEST)stat12t.e + $(CP) $(EXAMPLES_SRC)stat2.e $(EXAMPLES_DEST)stat2.e + $(CP) $(EXAMPLES_SRC)stat3.e $(EXAMPLES_DEST)stat3.e + $(CP) $(EXAMPLES_SRC)stat4.e $(EXAMPLES_DEST)stat4.e + $(CP) $(EXAMPLES_SRC)stat5.e $(EXAMPLES_DEST)stat5.e + $(CP) $(EXAMPLES_SRC)stat6.e $(EXAMPLES_DEST)stat6.e + $(CP) $(EXAMPLES_SRC)stat7.e $(EXAMPLES_DEST)stat7.e + $(CP) $(EXAMPLES_SRC)stat8.e $(EXAMPLES_DEST)stat8.e + $(CP) $(EXAMPLES_SRC)stat9.e $(EXAMPLES_DEST)stat9.e + $(CP) $(EXAMPLES_SRC)udf.sql $(EXAMPLES_DEST)udf.sql + $(CP) $(EXAMPLES_SRC)udflib.c $(EXAMPLES_DEST)udflib.c + $(CP) $(EXAMPLES_SRC)makefile.example $(EXAMPLES_DEST)makefile + +nt_examples: + $(CP) $(EXAMPLES_SRC)api9f.def $(EXAMPLES_DEST)api9f.def + $(CP) $(EXAMPLES_SRC)udflib.def $(EXAMPLES_DEST)udflib.def + $(CP) $(EXAMPLES_SRC)makefile.bc $(EXAMPLES_DEST)Makefile.bc + $(CP) $(EXAMPLES_SRC)makefile.msc $(EXAMPLES_DEST)Makefile.msc + +employee.gdb: empbuild$(EXEC_EXT) $(INPUT_FILES) + -$(RM) employee.gdb + $(SETUP_ISC_LOCAL) \ + empbuild employee.gdb + -$(CHMOD_6) employee.gdb + +intlemp.gdb: intlbld$(EXEC_EXT) $(INTL_FILES) + -$(RM) intlemp.gdb + $(SETUP_ISC_LOCAL) \ + intlbld intlemp.gdb + -$(CHMOD_6) intlemp.gdb + +empbuild: $(EMPBLD_OBJ) + -$(RM) empbuild + $(CC) $(LINK_OPTS) empbuild.o -o empbuild $(GDS_LINK) + $(CHMOD_7) empbuild + +empbuild.exe: $(EMPBLD_OBJ) + -$(RM) empbuild.exe + $(CC) $(O_EXE_SWITCH)empbuild $(LINK_OPTS) empbuild.o $(GDS_LINK) + +dbs: empddl.sql empbld.sql intlddl.sql intlbld.sql + -$(RM) employee.gdb + -$(RM) intlemp.gdb + $(ISQL) -i empbld.sql + $(ISQL) -i intlbld.sql + $(TOUCH) dbs + +intlbld: $(INTLBLD_OBJ) + -$(RM) intlbld + $(CC) $(LINK_OPTS) intlbld.o -o intlbld $(GDS_LINK) + $(CHMOD_7) intlbld + +intlbld.exe: $(INTLBLD_OBJ) + -$(RM) intlbld.exe + $(CC) $(O_EXE_SWITCH)intlbld $(LINK_OPTS) intlbld.o $(GDS_LINK) + +empbuild.c: dbs empbuild.e +empbuild.o: empbuild.c +intlbld.c: dbs intlbld.e +intlbld.o: intlbld.c + +makefile.example: + $(CHMOD_7) build_make + $(SH) "build_make" + diff --git a/src/makefiles/sfx.examples b/src/makefiles/sfx.examples new file mode 100644 index 0000000000..a61cf22125 --- /dev/null +++ b/src/makefiles/sfx.examples @@ -0,0 +1,395 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +GBAK= source/interbase/bin/gbak + +EXAMPLES_DEST= source/interbase/examples/v3/ +EXAMPLES_SRC= source/examples/ + + +examples: $(LANGUAGES) + $(SETUP_ISC_REMOTE) \ + $(GBAK) $(EXAMPLES_DBS)atlas.gdb $(EXAMPLES_DEST)atlas.gbak; \ + $(GBAK) $(EXAMPLES_DBS)c_guide.gdb $(EXAMPLES_DEST)c_guide.gbak; \ + $(GBAK) $(EXAMPLES_DBS)emp.gdb $(EXAMPLES_DEST)emp.gbak; \ + $(GBAK) $(EXAMPLES_DBS)nc_guide.gdb $(EXAMPLES_DEST)nc_guide.gbak; \ + $(GBAK) $(EXAMPLES_DBS)slides.gdb $(EXAMPLES_DEST)slides.gbak; \ + $(GBAK) $(EXAMPLES_DBS)stocks.gdb $(EXAMPLES_DEST)stocks.gbak + -$(RM) $(EXAMPLES_DEST)atlas.gdb + -$(RM) $(EXAMPLES_DEST)emp.gdb + $(SETUP_ISC_LOCAL) \ + $(GBAK) -r $(EXAMPLES_DEST)atlas.gbak $(EXAMPLES_DEST)atlas.gdb; \ + $(GBAK) -r $(EXAMPLES_DEST)emp.gbak $(EXAMPLES_DEST)emp.gdb; + $(CP) $(EXAMPLES_SRC)atlas.gdl $(EXAMPLES_DEST)atlas.gdl + $(CP) $(EXAMPLES_SRC)c_guide.gdl $(EXAMPLES_DEST)c_guide.gdl + $(CP) $(EXAMPLES_SRC)emp.gdl $(EXAMPLES_DEST)emp.gdl + $(CP) $(EXAMPLES_SRC)nc_guide.gdl $(EXAMPLES_DEST)nc_guide.gdl + $(CP) $(EXAMPLES_SRC)slides.gdl $(EXAMPLES_DEST)slides.gdl + $(CP) $(EXAMPLES_SRC)sources.gdl $(EXAMPLES_DEST)sources.gdl + $(CP) $(EXAMPLES_SRC)stocks.gdl $(EXAMPLES_DEST)stocks.gdl + $(CP) $(EXAMPLES_SRC)udf_trig.gdl $(EXAMPLES_DEST)udf_trig.gdl + +refresh: + $(BIN_PATH)/marion $(MARION) -c examples -x -a -v -z + -$(RM) refresh + $(TOUCH) refresh + +cc: c_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.e $(EXAMPLES_DEST)dsql.e + $(CP) $(EXAMPLES_SRC)dsql_blob.e $(EXAMPLES_DEST)dsql_blob.e + $(CP) $(EXAMPLES_SRC)dsql_date1.e $(EXAMPLES_DEST)dsql_date1.e + $(CP) $(EXAMPLES_SRC)dsql_date2.e $(EXAMPLES_DEST)dsql_date2.e + $(CP) $(EXAMPLES_SRC)emp.e $(EXAMPLES_DEST)emp.e + $(CP) $(EXAMPLES_SRC)full_dsql.e $(EXAMPLES_DEST)full_dsql.e + $(CP) $(EXAMPLES_SRC)gconf.e $(EXAMPLES_DEST)gconf.e + $(CP) $(EXAMPLES_SRC)gconv.e $(EXAMPLES_DEST)gconv.e + $(CP) $(EXAMPLES_SRC)gconv.readme $(EXAMPLES_DEST)gconv.readme + $(CP) $(EXAMPLES_SRC)gdml.e $(EXAMPLES_DEST)gdml.e + $(CP) $(EXAMPLES_SRC)gdump.e $(EXAMPLES_DEST)gdump.e + $(CP) $(EXAMPLES_SRC)gdump.readme $(EXAMPLES_DEST)gdump.readme + $(CP) $(EXAMPLES_SRC)gref.e $(EXAMPLES_DEST)gref.e + $(CP) $(EXAMPLES_SRC)gref.readme $(EXAMPLES_DEST)gref.readme + $(CP) $(EXAMPLES_SRC)multi_db1.e $(EXAMPLES_DEST)multi_db1.e + $(CP) $(EXAMPLES_SRC)multi_db2.e $(EXAMPLES_DEST)multi_db2.e + $(CP) $(EXAMPLES_SRC)nr_filter.c $(EXAMPLES_DEST)nr_filter.c + $(CP) $(EXAMPLES_SRC)slides.e $(EXAMPLES_DEST)slides.e + $(CP) $(EXAMPLES_SRC)sql.e $(EXAMPLES_DEST)sql.e + $(CP) $(EXAMPLES_SRC)sql_blob1.e $(EXAMPLES_DEST)sql_blob1.e + $(CP) $(EXAMPLES_SRC)sql_blob2.e $(EXAMPLES_DEST)sql_blob2.e + $(CP) $(EXAMPLES_SRC)sql_blob3.e $(EXAMPLES_DEST)sql_blob3.e + $(CP) $(EXAMPLES_SRC)sql_date.e $(EXAMPLES_DEST)sql_date.e + $(CP) $(EXAMPLES_SRC)sql_trans.e $(EXAMPLES_DEST)sql_trans.e + $(CP) $(EXAMPLES_SRC)stocks.e $(EXAMPLES_DEST)stocks.e + $(CP) $(EXAMPLES_SRC)udf.c $(EXAMPLES_DEST)udf.c + $(CP) $(EXAMPLES_SRC)udftest.e $(EXAMPLES_DEST)udftest.e + +c_: + $(ECHO) c_ + +c_pyxis: + $(CP) $(EXAMPLES_SRC)array.e $(EXAMPLES_DEST)array.e + $(CP) $(EXAMPLES_SRC)city_pops.e $(EXAMPLES_DEST)city_pops.e + $(CP) $(EXAMPLES_SRC)forms_ski.e $(EXAMPLES_DEST)forms_ski.e + $(CP) $(EXAMPLES_SRC)forms_state.e $(EXAMPLES_DEST)forms_state.e + +bas: bas_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.ebas $(EXAMPLES_DEST)dsql.ebas + $(CP) $(EXAMPLES_SRC)gdml.ebas $(EXAMPLES_DEST)gdml.ebas + $(CP) $(EXAMPLES_SRC)sql.ebas $(EXAMPLES_DEST)sql.ebas + +bas_: + $(ECHO) bas_ + +bas_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.ebas $(EXAMPLES_DEST)city_pops.ebas + +microfocus_cob: + $(CP) $(EXAMPLES_SRC)dsql.ecob $(EXAMPLES_DEST)dsql.ecbl + $(CP) $(EXAMPLES_SRC)gdml.ecob $(EXAMPLES_DEST)gdml.ecbl + $(CP) $(EXAMPLES_SRC)sql.ecob $(EXAMPLES_DEST)sql.ecbl + +vms_cob: vms_cob_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.vecob $(EXAMPLES_DEST)dsql.ecob + $(CP) $(EXAMPLES_SRC)gdml.vecob $(EXAMPLES_DEST)gdml.ecob + $(CP) $(EXAMPLES_SRC)sql.vecob $(EXAMPLES_DEST)sql.ecob + +vms_cob_: + $(ECHO) vms_cob_ + +vms_cob_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.vecob $(EXAMPLES_DEST)city_pops.ecob + +vms_cxx: vms_cxx_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.exx $(EXAMPLES_DEST)dsql.exx + $(CP) $(EXAMPLES_SRC)gdml.exx $(EXAMPLES_DEST)gdml.exx + $(CP) $(EXAMPLES_SRC)sql.exx $(EXAMPLES_DEST)sql.exx + +vms_cxx_: + $(ECHO) vms_cxx_ + +vms_cxx_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.exx $(EXAMPLES_DEST)city_pops.exx + +cxx: cxx_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.exx $(EXAMPLES_DEST)dsql.E + $(CP) $(EXAMPLES_SRC)gdml.exx $(EXAMPLES_DEST)gdml.E + $(CP) $(EXAMPLES_SRC)sql.exx $(EXAMPLES_DEST)sql.E + +cxx_: + $(ECHO) cxx_ + +cxx_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.exx $(EXAMPLES_DEST)city_pops.E + +aix_ftn: aix_ftn_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql_aix.ef $(EXAMPLES_DEST)dsql.ef + $(CP) $(EXAMPLES_SRC)gdml_aix.ef $(EXAMPLES_DEST)gdml.ef + $(CP) $(EXAMPLES_SRC)sql.ef $(EXAMPLES_DEST)sql.ef + +aix_ftn_: + $(ECHO) aix_ftn_ + +aix_ftn_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.ef $(EXAMPLES_DEST)city_pops.ef + +dg_ftn: dg_ftn_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.efor $(EXAMPLES_DEST)dsql.ef + $(CP) $(EXAMPLES_SRC)gdml_dg.ef $(EXAMPLES_DEST)gdml.ef + $(CP) $(EXAMPLES_SRC)sql.efor $(EXAMPLES_DEST)sql.ef + $(CP) $(EXAMPLES_SRC)gds_blk_data.f $(EXAMPLES_DEST)gds_blk_data.f + +dg_ftn_: + $(ECHO) dg_ftn_ + +dg_ftn_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.efor $(EXAMPLES_DEST)city_pops.ef + +dg_x86_ftn: dg_x86_ftn_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.efor $(EXAMPLES_DEST)dsql.ef + $(CP) $(EXAMPLES_SRC)gdml_dg.ef $(EXAMPLES_DEST)gdml.ef + $(CP) $(EXAMPLES_SRC)sql.efor $(EXAMPLES_DEST)sql.ef + $(CP) $(EXAMPLES_SRC)gds_blk_data.f $(EXAMPLES_DEST)gds_blk_data.f + +dg_x86_ftn_: + $(ECHO) dg_x86_ftn_ + +dg_x86_ftn_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.efor $(EXAMPLES_DEST)city_pops.ef + +hp_ftn: hp_ftn_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql_hp.ef $(EXAMPLES_DEST)dsql.ef + $(CP) $(EXAMPLES_SRC)gdml.ef $(EXAMPLES_DEST)gdml.ef + $(CP) $(EXAMPLES_SRC)sql.ef $(EXAMPLES_DEST)sql.ef + +hp_ftn_: + $(ECHO) hp_ftn_ + +hp_ftn_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.ef $(EXAMPLES_DEST)city_pops.ef + +sun_ftn: sun_ftn_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql_sun.ef $(EXAMPLES_DEST)dsql.ef + $(CP) $(EXAMPLES_SRC)gdml_sun.ef $(EXAMPLES_DEST)gdml.ef + $(CP) $(EXAMPLES_SRC)sql.ef $(EXAMPLES_DEST)sql.ef + +sun_ftn_: + $(ECHO) sun_ftn_ + +sun_ftn_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.ef $(EXAMPLES_DEST)city_pops.ef + +vms_ftn: vms_ftn_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.efor $(EXAMPLES_DEST)dsql.efor + $(CP) $(EXAMPLES_SRC)gdml.efor $(EXAMPLES_DEST)gdml.efor + $(CP) $(EXAMPLES_SRC)sql.efor $(EXAMPLES_DEST)sql.efor + +vms_ftn_: + $(ECHO) vms_ftn_ + +vms_ftn_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.efor $(EXAMPLES_DEST)city_pops.efor + +apollo_ftn: apollo_ftn_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql_apollo.ef $(EXAMPLES_DEST)dsql.eftn + $(CP) $(EXAMPLES_SRC)gdml_apollo.ef $(EXAMPLES_DEST)gdml.eftn + $(CP) $(EXAMPLES_SRC)sql_apollo.ef $(EXAMPLES_DEST)sql.eftn + +apollo_ftn_: + $(ECHO) apollo_ftn_ + +apollo_ftn_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops_apollo.ef $(EXAMPLES_DEST)city_pops.eftn + +pli: pli_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.epli $(EXAMPLES_DEST)dsql.epli + $(CP) $(EXAMPLES_SRC)gdml.epli $(EXAMPLES_DEST)gdml.epli + $(CP) $(EXAMPLES_SRC)sql.epli $(EXAMPLES_DEST)sql.epli + +pli_: + $(ECHO) pli_ + +pli_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.epli $(EXAMPLES_DEST)city_pops.epli + +apollo_pas: apollo_pas_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.epas $(EXAMPLES_DEST)dsql.epas + $(CP) $(EXAMPLES_SRC)dsql_blob.epas $(EXAMPLES_DEST)dsql_blob.epas + $(CP) $(EXAMPLES_SRC)dsql_date1.epas $(EXAMPLES_DEST)dsql_date1.epas + $(CP) $(EXAMPLES_SRC)dsql_date2.epas $(EXAMPLES_DEST)dsql_date2.epas + $(CP) $(EXAMPLES_SRC)emp.epas $(EXAMPLES_DEST)emp.epas + $(CP) $(EXAMPLES_SRC)full_dsql.epas $(EXAMPLES_DEST)full_dsql.epas + $(CP) $(EXAMPLES_SRC)gdml.epas $(EXAMPLES_DEST)gdml.epas + $(CP) $(EXAMPLES_SRC)sql.epas $(EXAMPLES_DEST)sql.epas + +apollo_pas_: + $(ECHO) apollo_pas_ + +apollo_pas_pyxis: + $(CP) $(EXAMPLES_SRC)array.epas $(EXAMPLES_DEST)array.epas + $(CP) $(EXAMPLES_SRC)city_pops.epas $(EXAMPLES_DEST)city_pops.epas + +vms_pas: vms_pas_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql_blob.vepas $(EXAMPLES_DEST)dsql_blob.epas + $(CP) $(EXAMPLES_SRC)dsql_date1.vepas $(EXAMPLES_DEST)dsql_date1.epas + $(CP) $(EXAMPLES_SRC)dsql_date2.vepas $(EXAMPLES_DEST)dsql_date2.epas + $(CP) $(EXAMPLES_SRC)emp.vepas $(EXAMPLES_DEST)emp.epas + $(CP) $(EXAMPLES_SRC)full_dsql.vepas $(EXAMPLES_DEST)full_dsql.epas + $(CP) $(EXAMPLES_SRC)gdml.vepas $(EXAMPLES_DEST)gdml.epas + $(CP) $(EXAMPLES_SRC)sql.vepas $(EXAMPLES_DEST)sql.epas + +vms_pas_: + $(ECHO) vms_pas_ + +vms_pas_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.vepas $(EXAMPLES_DEST)city_pops.epas + $(CP) $(EXAMPLES_SRC)dsql.vepas $(EXAMPLES_DEST)dsql.epas + +ada: ada_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.ea $(EXAMPLES_DEST)dsql.ea + $(CP) $(EXAMPLES_SRC)gdml.ea $(EXAMPLES_DEST)gdml.ea + $(CP) $(EXAMPLES_SRC)sql.ea $(EXAMPLES_DEST)sql.ea + +ada_: + $(ECHO) ada_ + +ada_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.ea $(EXAMPLES_DEST)city_pops.ea + +other_ada: other_ada_$(PYXIS) + $(CP) $(EXAMPLES_SRC)dsql.ea $(EXAMPLES_DEST)dsql.eada + $(CP) $(EXAMPLES_SRC)gdml.ea $(EXAMPLES_DEST)gdml.eada + $(CP) $(EXAMPLES_SRC)sql.ea $(EXAMPLES_DEST)sql.eada + +other_ada_: + $(ECHO) other_ada_ + +other_ada_pyxis: + $(CP) $(EXAMPLES_SRC)city_pops.ea $(EXAMPLES_DEST)city_pops.eada + +apollo_ada: + $(CP) $(EXAMPLES_SRC)basic_io.a $(EXAMPLES_DEST)basic_io.a + $(CP) $(EXAMPLES_SRC)basic_io_alsys.a $(EXAMPLES_DEST)basic_io.ada + +hp_ada: + $(CP) $(EXAMPLES_SRC)basic_io_alsys.a $(EXAMPLES_DEST)basic_io.ada + +sco_ada: + $(CP) $(EXAMPLES_SRC)basic_io_sco.a $(EXAMPLES_DEST)basic_io.a + +sun_ada: + $(CP) $(EXAMPLES_SRC)basic_io_sun.a $(EXAMPLES_DEST)basic_io.a + +vms_ada: + $(CP) $(EXAMPLES_SRC)basic_io_vms.a $(EXAMPLES_DEST)basic_io.ada + +apollo: + $(CP) $(EXAMPLES_SRC)iscmapdb.c $(EXAMPLES_DEST)iscmapdb.c + +vms: + $(CP) $(EXAMPLES_SRC)filter_link.com $(EXAMPLES_DEST)filter_link.com + $(CP) $(EXAMPLES_SRC)interbase_ivp.com $(EXAMPLES_DEST)interbase_ivp.com + $(CP) $(EXAMPLES_SRC)isc_tcp.dat $(EXAMPLES_DEST)isc_tcp.dat + $(CP) $(EXAMPLES_SRC)link.com $(EXAMPLES_DEST)link.com + $(CP) $(EXAMPLES_SRC)udf_link.com $(EXAMPLES_DEST)udf_link.com + +gdl1: + $(CP) $(EXAMPLES_SRC)udf.gdl1 $(EXAMPLES_DEST)udf.gdl + +gdl2: + $(CP) $(EXAMPLES_SRC)udf.gdl2 $(EXAMPLES_DEST)udf.gdl + +ndl: + $(CP) $(EXAMPLES_SRC)filter_func.c $(EXAMPLES_DEST)filter_func.c + $(CP) $(EXAMPLES_SRC)functions.c $(EXAMPLES_DEST)functions.c + +make1: + $(CP) $(EXAMPLES_SRC)filter.make1 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make1 $(EXAMPLES_DEST)make.udf + +make2: + $(CP) $(EXAMPLES_SRC)filter.make2 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make2 $(EXAMPLES_DEST)make.udf + +make3: + $(CP) $(EXAMPLES_SRC)filter.make3 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make3 $(EXAMPLES_DEST)make.udf + +make4: + $(CP) $(EXAMPLES_SRC)filter.make4 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make4 $(EXAMPLES_DEST)make.udf + +make5: + $(CP) $(EXAMPLES_SRC)filter.make5 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make5 $(EXAMPLES_DEST)make.udf + +make6: + $(CP) $(EXAMPLES_SRC)filter.make6 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make6 $(EXAMPLES_DEST)make.udf + +make7: + $(CP) $(EXAMPLES_SRC)filter.make7 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make7 $(EXAMPLES_DEST)make.udf + $(CP) $(EXAMPLES_SRC)slides.qli $(EXAMPLES_DEST)slides.qli + +make8: + $(CP) $(EXAMPLES_SRC)filter.make8 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make8 $(EXAMPLES_DEST)make.udf + $(CP) $(EXAMPLES_SRC)bind_udf.sco $(EXAMPLES_DEST)udf.bind + $(CP) $(EXAMPLES_SRC)shrudf.c $(EXAMPLES_DEST)shrudf.c + $(CP) $(EXAMPLES_SRC)bind_filter.sco $(EXAMPLES_DEST)filter.bind + $(CP) $(EXAMPLES_SRC)shrfilter.c $(EXAMPLES_DEST)shrfilter.c + +make9: + $(CP) $(EXAMPLES_SRC)filter.make9 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make9 $(EXAMPLES_DEST)make.udf + +make10: + $(CP) $(EXAMPLES_SRC)filter.make10 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make10 $(EXAMPLES_DEST)make.udf + +make11: + $(CP) $(EXAMPLES_SRC)filter.make11 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make11 $(EXAMPLES_DEST)make.udf + $(CP) $(EXAMPLES_SRC)bind_udf.imp $(EXAMPLES_DEST)udf.bind + $(CP) $(EXAMPLES_SRC)shrudf1.c $(EXAMPLES_DEST)shrudf.c + $(CP) $(EXAMPLES_SRC)bind_filt.imp $(EXAMPLES_DEST)filter.bind + $(CP) $(EXAMPLES_SRC)shrfilter1.c $(EXAMPLES_DEST)shrfilter.c + $(CP) $(EXAMPLES_SRC)filter_func1.c $(EXAMPLES_DEST)filter_func.c + $(CP) $(EXAMPLES_SRC)nr_filter1.c $(EXAMPLES_DEST)nr_filter.c + $(CP) $(EXAMPLES_SRC)functions1.c $(EXAMPLES_DEST)functions.c + $(CP) $(EXAMPLES_SRC)udf1.c $(EXAMPLES_DEST)udf.c + +make12: + $(CP) $(EXAMPLES_SRC)filter.make12 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make12 $(EXAMPLES_DEST)make.udf + +make13: + $(CP) $(EXAMPLES_SRC)filter.make13 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make13 $(EXAMPLES_DEST)make.udf + +make14: + $(CP) $(EXAMPLES_SRC)filter.make14 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make14 $(EXAMPLES_DEST)make.udf + +make15: + $(CP) $(EXAMPLES_SRC)filter.make15 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make15 $(EXAMPLES_DEST)make.udf + $(CP) $(EXAMPLES_SRC)slides.qli $(EXAMPLES_DEST)slides.qli + +make16: + $(CP) $(EXAMPLES_SRC)filter.make16 $(EXAMPLES_DEST)make.filter + $(CP) $(EXAMPLES_SRC)udf.make16 $(EXAMPLES_DEST)make.udf + $(CP) $(EXAMPLES_SRC)slides.qli $(EXAMPLES_DEST)slides.qli diff --git a/src/makefiles/sfx.extlib b/src/makefiles/sfx.extlib new file mode 100644 index 0000000000..3d991f71a4 --- /dev/null +++ b/src/makefiles/sfx.extlib @@ -0,0 +1,54 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +@SET_MAKE@ +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/extlib +VPATH= $(SOURCE)/extlib +CXX= @CXX@ + + +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) +GPRE_FLAGS= -z -e -n + +FUNCLIB_DEST= $(OBJS)/firebird/UDF +UTIL_DEST= $(OBJS)/firebird/lib +SCRIPT_DEST= $(OBJS)/firebird/examples/v5 + +ib_util: ib_util.o + $(UDF_LINK_CMD) $(UDF_LFLAGS) ib_util.o $(UDF_SHRLIBS) -o ib_util $(UDF_UTIL_RESOLV) + $(CP) ib_util libib_util$(SHRLIB_EXT) + $(MV) ib_util $(UTIL_DEST)/ib_util$(SHRLIB_EXT) + $(TOUCH) ib_util + $(CHMOD_6) ib_util + +ib_util.o: ib_util.c + $(CC) $(UDF_CFLAGS) -c $< + +ib_udf: ib_udf.o + $(UDF_LINK_CMD) $(UDF_LFLAGS) ib_udf.o -L. -lib_util $(UDF_SHRLIBS) -o ib_udf + mkdir -p $(FUNCLIB_DEST) + $(MV) ib_udf $(FUNCLIB_DEST)/ib_udf + $(TOUCH) ib_udf + $(CHMOD_6) ib_udf + $(CP) $(VPATH)/ib_udf.sql $(SCRIPT_DEST)/ib_udf.sql + +ib_udf.o: ib_udf.c + $(CC) $(UDF_CFLAGS) -c $< + diff --git a/src/makefiles/sfx.firebird b/src/makefiles/sfx.firebird new file mode 100644 index 0000000000..5d62ebfb8b --- /dev/null +++ b/src/makefiles/sfx.firebird @@ -0,0 +1,874 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +@SET_MAKE@ +OBJS= objs +SOURCE= source + +srcdir= source +VPATH= source +CXX= @CXX@ + +###################################################################### +########### Build process overview ################################# +# +# Firebird2 has brought with it a new build process. This extended +# comment should help explain that process. Keep in mind there are +# a number of artifacts left in the makefiles from the previous build +# processes. +# +# The build process starts by building a bootstrap version of gpre. +# This is possible because of a special version of gpre_meta.cpp, +# gpre_meta_boot.cpp. It is a copy of the gpre_meta.epp file with all +# the embeded commands removed. There are pregenerated copy of the +# codes.h and related files in the source tree. These are used for the +# entire build process. In the future we should check for the ability +# to regenerate codes.h and friends (ie, a working FB install) and only +# use the static files as a last resort. +# +# The bootstrap version of gpre (gpre_boot) is used to build all the +# engine files, except security.bin. security.epp requires the security +# database which is not available at this time. The code in jrd/alt.cpp +# that references the functions in security.bin has been #ifdef'ed out. +# During this phase of the build process the limited version of alt.bin +# is used. The full version of alt.bin is compiled later in the build +# process after the security database is available. After the +# (hopefully pending) redesign of FB security the security database +# dependancies should go away. +# +# The engine objects are placed in the jrd_static.a archive. This archive +# contains all the objects needed to create statically linked programs. +# A fully functional version of gpre, gpre_static, is then generated +# using jrd_static.a. I choose to statically link the few utilities +# required to build FB to avoid possible shared library symbol conflicts. +# +# All of the aforementioned work is done in the +# first phase of the compilation. I called it the first phase because +# none of the work (except codes.h and friends) requires database access. +# Phase 2 builds all the tools necessary to compile the rest of FB. Those +# tools are gbak and the gds.so shared library. +# +# The .epp files in gbak require the yachts.lnk database. But the only +# thing the database is used for is the metadata, so an empty database +# will do the job. The create_db program is a small c API utility that +# creates an empty database. This utility is statically linked. +# Once there is an empty database gbak_static is built. gbak_static is +# used later on in the compilation process to restore build databases. +# +# After gbak_static is built the gds.so library is built. This library is +# still missing the security functionality. Note there is a dependancy +# between gbak_static and gds.so because the shared library contains the +# PYXIS code, which needs the forms.gdb database restored from forms.gbak. +# +# Now we are on phase 3, building the actual DB tools. This is as expected. +# We build all tools and link them against the shared library, including +# gpre, gbak, and the fully functional gds.so. +# +########### And now on with the show............ +################################################################# + +ISC_USER= sysdba +ISC_PASSWORD= masterkey + +export ISC_USER +export ISC_PASSWORD +export INTERBASE +export DYLD_FRAMEWORK_PATH + + +EXTERNAL_OBJECTS= $(CSI_OBJS) dsql_objects lock.o $(PYXIS_OBJECTS) rem_objects $(INTL) wal_objects +EXTERNAL_P_OBJECTS= $(CSI_P_OBJS) dsql_p_objects lock.bin $(PYXIS_P_OBJS) rem_p_objects $(INTL_P_OBJS) wal_p_objects + +INCLUDE_DEST= $(OBJS)/firebird/include/ + +SRC_DIRS= alice burp dudley dsql extlib gpre intl isql journal jrd lock msgs \ + pyxis qli remote super/remote utilities wal + +GPRE= $(OBJS)/firebird/bin/gpre +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static +GBAK= $(OBJS)/firebird/bin/gbak +GBAK_STATIC= $(OBJS)/firebird/bin/gbak_static +GDEF= $(OBJS)/firebird/bin/gdef +GFIX= $(OBJS)/firebird/bin/gfix +HELP_GDB= $(OBJS)/firebird/help/help.gdb +HELP_GBAK= $(OBJS)/firebird/help/help.gbak +ISC_GDB= $(OBJS)/firebird/isc4.gdb +ISC_GBAK= $(OBJS)/firebird/bin/isc4.gbak +JRN_GBAK= $(OBJS)/firebird/bin/journal.gbak +CMP= cmp + +CODES=source/jrd/codes + +# removed examples 03-Aug-00 TMC +#interbase: run_codes gds.h includes executables examples help msgs msgs_intl extlib + +#added completed according to inprise tree +#FSG 093000 + +# The only difference between firebird and super_firebird is the executables +# target and in there super just had one more target "super_targets". The +# difference used to be done via a parameter passed into this makefile, but +# I've put the change here to reduce the complexity of the build script files. +# MOD 07-Apr-2001. + +# I've taken run_codes out pending a decision on how to handle the codes thing +# I'm also using the target to add to as I bring the build system on line. +#firebird: run_codes gds.h includes executables help msgs msgs_intl extlib $(POST_BUILD_TARGET) completed +firebird: CFLAGS=$(CFLAGS_COMMON) $(DEV_CFLAGS) $(SUPER_FLAG) +firebird: VERSION_FLAG=$(DEV_VERSION_FLAG) +firebird: DEBUG_OBJECTS=$(DEV_DEBUG_OBJECTS) +firebird: SUBMAKE_FLAGS:= CFLAGS="$(CFLAGS)" \ + VERSION_FLAG="$(VERSION_FLAG)" \ + DEBUG_OBJECTS="$(DEBUG_OBJECTS)" +firebird: phase1 phase2 phase3 completed + +super_firebird: run_codes gds.h includes super_executables help msgs msgs_intl extlib $(SS_POST_BUILD_TARGET) completed + +installer: $(PLATFORM_INSTALLER) + echo "Installer created" + +super_installer: $(SUPER_PLATFORM_INSTALLER) + echo "Super Installer created" + +executables: alice burp dudley gpre miscFiles $(INTL) isql locks \ + pyxis qli remote spit utilities \ + $(SHARED_AM) $(LINKABLE_LIBS) + +super_executables: alice burp dudley gpre superMiscFiles $(INTL) isql locks \ + super_targets pyxis qli remote spit utilities \ + $(SHARED_AM) $(LINKABLE_LIBS) + +super_targets: s_run_codes s_alice s_burp s_dba s_security_c super_client super_server super_utils + +phase1: ISC_USER = sysdba +phase1: ISC_PASSWORD = masterkey +phase1: run_codes gds.h includes $(GPRE_BOOT) jrd_static.a $(GPRE_STATIC) + +phase2: ISC_USER = sysdba +phase2: ISC_PASSWORD = masterkey +phase2: DYLD_FRAMEWORK_PATH:=$(FW_PATH) +phase2: empty_db manager $(GBAK_STATIC) $(GDSSHR)_PHASE_2 + +phase3: DYLD_FRAMEWORK_PATH:=$(FW_PATH) +phase3: alice burp dudley msgs isql isc4.gdb security_c $(GDSSHR) sysdba_user \ + $(INTL) locks pyxis qli remote spit utilities gpre miscFiles \ + extlib msgs_intl examples help $(POST_BUILD_TARGET) completed + + +# Run the codes program, thus generating codes.h, iberror.h, etc +# compare and copy the file only if the files are different +run_codes: force + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) run_codes +# force $(CODES) +# $(SH) '$(CD) source/jrd; $(CODES)' +# $(SH) '$(CMP) source/jrd/iberror.h $(INCLUDE_DEST)iberror.h; if [ $$? != 0 ]; then $(CP) source/jrd/iberror.h $(INCLUDE_DEST)iberror.h; fi' + +# NOTE: "journals" removed from "executables" as it currently doesn't +# build and isn't used for V4 anyway. +# 1995-June-7 David Schnepper + + + + +#added completed according to inprise tree +#FSG 093000 +completed: force + $(QUIET_ECHO) "Build succeeded!" + +alice gfix: $(GPRE_STATIC) force + $(QUIET_ECHO) "Building GFIX..." + $(CD) $(OBJS)/alice && $(MAKE) $(SUBMAKE_FLAGS) alice + +#burp gbak: $(GPRE_STATIC) msgs force +burp gbak: $(GPRE_STATIC) force + $(QUIET_ECHO) "Building GBAK..." + $(CD) $(OBJS)/burp && $(MAKE) $(SUBMAKE_FLAGS) burp + +burplib.a: burp + $(QUIET_ECHO) "Building interbase/lib/gbaklib.a..." + $(CD) $(OBJS)/burp && $(MAKE) $(SUBMAKE_FLAGS) libgbaklib.a + +central_server gds_cserver: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_CSERVER..." + $(CD) $(OBJS) && $(MAKE) $(SUBMAKE_FLAGS) central_server + +super_client: force + $(QUIET_ECHO) "Building super/client..." + $(CD) $(OBJS) && $(MAKE) $(SUBMAKE_FLAGS) super_client + +csu gcsu: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GCSU..." + $(CD) $(OBJS)/csv && $(MAKE) $(SUBMAKE_FLAGS) csu + +csvs: central_server csu + +gds_archive: $(ACCESS_METHOD) $(GPRE_STATIC) force + $(QUIET_ECHO) "Building GDS_ARCHIVE..." + $(CD) $(OBJS)/journal && $(MAKE) $(SUBMAKE_FLAGS) gds_archive + +dba gstat: $(GPRE_STATIC) force + $(QUIET_ECHO) "Building GSTAT..." + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) dba + +dnet_server gds_dnet_server: $(DNET_SERVER_LIB) $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_DNET_SERVER..." + $(CD) $(OBJS)/remote && $(MAKE) $(SUBMAKE_FLAGS) dnet_server + +dnet_server.a gds_dnet_server.a: force + $(QUIET_ECHO) "Building GDS_DNET_SERVER.A..." + $(CD) $(OBJS)/remote && $(MAKE) $(SUBMAKE_FLAGS) dnet_server.a + +drop gds_drop: force + $(QUIET_ECHO) "Building GDS_DROP..." + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) drop + +empty_db: create_db force + $(QUIET_ECHO) "Creating the very first database..." + $(CD) $(OBJS)/dbs && $(MAKE) $(SUBMAKE_FLAGS) empty.gdb.dummy + +create_db: force + $(QUIET_ECHO) "Building CREATE_DB..." + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) create_db + +driver: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building DRIVER..." + $(CD) $(OBJS)/wal && $(MAKE) $(SUBMAKE_FLAGS) driver + +#dudley gdef: $(GPRE_STATIC) msgs force +dudley gdef: $(GPRE_STATIC) force + $(QUIET_ECHO) "Building GDEF..." + $(CD) $(OBJS)/dudley && $(MAKE) $(SUBMAKE_FLAGS) dudley + +extlib: force + $(QUIET_ECHO) "Building EXTLIB..." + $(CD) $(OBJS)/extlib && $(MAKE) $(SUBMAKE_FLAGS) ib_util ib_udf + +# examples: v5_examples force +# $(QUIET_ECHO) "Building examples directory..." +# $(CD) $(OBJS)/examples && $(MAKE) $(SUBMAKE_FLAGS) examples +examples: + mkdir -p $(OBJS)/firebird/examples + +fred: $(GPRE_STATIC) force + $(QUIET_ECHO) "Building FRED..." + $(CD) $(OBJS)/pyxis && $(MAKE) $(SUBMAKE_FLAGS) fred + +jrd_static.a: force + $(QUIET_ECHO) "Building static DB engine..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) ALT_O="alt.o.ps1" ALT_BIN="alt.bin.ps1" SECURITY_MISC="" SECURITY_P_MISC="" $@ + +$(GBAK_STATIC): + $(QUIET_ECHO) "Building static database restore utility..." + $(CD) $(OBJS)/burp && $(MAKE) $(SUBMAKE_FLAGS) $@ + +gds.h: force + $(QUIET_ECHO) "Building GDS.H..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.h + +codes.h: force + $(QUIET_ECHO) "Building CODES.H..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) codes.h + +gds_server: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_SERVER..." + $(CD) $(OBJS)/remote && $(MAKE) $(SUBMAKE_FLAGS) gds_server + +$(GDSSHR)_PHASE_2: force + $(QUIET_ECHO) "Building GDSSHR..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) ALT_O="alt.o.ps1" ALT_BIN="alt.bin.ps1" SECURITY_MISC="" SECURITY_P_MISC="" $(GDSSHR) + +$(GDSSHR): force + $(QUIET_ECHO) "Building GDSSHR..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) DO_FORCE="force" $(GDSSHR) + +gdslib.aix gdslib.aix_ppc: $(GPRE) $(EXTERNAL_OBJECTS) force + $(QUIET_ECHO) "Building GDSSHR..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gdsshr.a + +gdslib.apollo: $(GPRE) $(EXTERNAL_OBJECTS) pyxislib force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gdslib + +gdslib.decosf gdslib.sgi gdslib.epson : \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.so.o + +gdslib.linux: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.so.linux + +gdslib.dylib: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.dylib + +gdslib.freebsd: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.so.linux + +gdslib.netbsd: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.so.linux + +gdslib.sco_ev: \ + $(GPRE) $(EXTERNAL_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.so.O + +gdslib.dg gdslib.m88k gdslib.unixware gdslib.ncr3000 gdslib.dg_x86: \ + $(GPRE) $(EXTERNAL_P_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.so.0 + +gdslib.solaris: \ + $(GPRE) $(EXTERNAL_P_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.so.solaris + +gdslib.hp: $(GPRE) $(EXTERNAL_P_OBJECTS) $(GDS_PYXIS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.sl + +gdslib.imp: $(GPRE) $(EXTERNAL_P_OBJECTS) force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds_s.a + +gdslib.sco: $(GPRE) $(EXTERNAL_P_OBJECTS) gds_pyxis.a force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds_s.a + +gdslib.sunos4: $(GPRE) $(EXTERNAL_P_OBJECTS) gds_pyxis.a force + $(QUIET_ECHO) "Building GDSLIB..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gdslib.so.1.0 + +gds_pipe: $(PIPE_LIBRARY) gds_b.a $(GPRE) force + $(QUIET_ECHO) "Building GDS_PIPE..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds_pipe + +gds_b.a: force + $(QUIET_ECHO) "Building GDS_B.A..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds_b.a + +gds_pipe.a: force + $(QUIET_ECHO) "Building GDS_PIPE.A..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds_pipe.a + +gds.a: force + $(QUIET_ECHO) "Building GDS.A..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.a + +gds.a.solaris: force + $(QUIET_ECHO) "Building GDS.A.SOLARIS..." + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) gds.a.solaris + +gpre: security_c force + $(QUIET_ECHO) "Building GPRE..." + $(CD) $(OBJS)/gpre && $(MAKE) $(SUBMAKE_FLAGS) gpre + +security_c: force + $(QUIET_ECHO) "Building security.cpp ..." + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) security.cpp + + +$(GPRE_BOOT) $(GPRE_STATIC): force + $(CD) $(OBJS)/gpre && $(MAKE) $(SUBMAKE_FLAGS) $@ +# Run the codes program (for SUPERSERVER hierarchy), +# thus generating codes.h, iberror.h, etc +s_run_codes: +# force $(CODES) + $(QUIET_ECHO) "Running codes in super ..." +# $(SH) '$(CD) source/super/jrd; $(CODES)' + +s_security_c: force + $(QUIET_ECHO) "Building security.c ..." + $(CD) $(OBJS)/super/utilities && $(MAKE) $(SUBMAKE_FLAGS) security.c + +s_alice: force + $(QUIET_ECHO) "Building met.c ..." + $(CD) $(OBJS)/super/alice && $(MAKE) $(SUBMAKE_FLAGS) met.c + +s_burp: force + $(QUIET_ECHO) "Building restore.c and backup.c ..." + $(CD) $(OBJS)/super/burp && $(MAKE) $(SUBMAKE_FLAGS) restore.c backup.c + +s_dba: force + $(QUIET_ECHO) "Building dba.e ..." + $(CD) $(OBJS)/super/utilities && $(MAKE) $(SUBMAKE_FLAGS) dba.c + +gsec: $(GPRE_STATIC) force + $(QUIET_ECHO) "Building GSEC..." + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) gsec + +$(GPRE): + $(QUIET_ECHO) "Building bootstrap version of GPRE..." + $(CD) $(OBJS)/gpre && $(MAKE) $(SUBMAKE_FLAGS) gpre_boot + +help: gbak force + $(QUIET_ECHO) "Building the QLI help database..." + $(CD) $(OBJS)/qli && $(MAKE) $(SUBMAKE_FLAGS) qli_help + +include_generic: force + $(QUIET_ECHO) "Building the include directory..." + mkdir -p $(OBJS)/firebird/intl + $(CAT) $(SOURCE)/jrd/ibase.h $(SOURCE)/jrd/gdsold.h > $(INCLUDE_DEST)gds.h + $(CP) $(SOURCE)/extlib/ib_util.h $(INCLUDE_DEST)ib_util.h + $(CP) $(SOURCE)/jrd/gds.hxx $(INCLUDE_DEST)gds.hxx + $(CP) $(SOURCE)/jrd/perf.h $(INCLUDE_DEST)perf.h + $(CP) $(SOURCE)/jrd/ibase.h $(INCLUDE_DEST)ibase.h + -$(SH) '$(CMP) $(OBJS)/jrd/iberror.h $(INCLUDE_DEST)iberror.h; if [ $$? != 0 ]; then $(CP) $(OBJS)/jrd/iberror.h $(INCLUDE_DEST)iberror.h; fi' + +include_apollo: include_generic + $(CP) $(INCLUDE_DEST)gds.h $(INCLUDE_DEST)gds.ins.c + $(ECHO) "sm gds_apollo.f $(INCLUDE_DEST)gds.ins.ftn" >> sm_include + $(ECHO) "sm gds.pas $(INCLUDE_DEST)gds.ins.pas" >> sm_include + $(ECHO) "sm interbase.a $(INCLUDE_DEST)interbase.a" >> sm_include + $(ECHO) "sm interbase_alsys.a $(INCLUDE_DEST)interbase.ada" >> sm_include + $(ECHO) "sm perf.pas $(INCLUDE_DEST)perf.pas" >> sm_include + + +include_aix: include_generic + $(ECHO) "sm gds_aix.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_dg: include_generic + $(ECHO) "sm gds_sun.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_dg_x86: include_generic + $(ECHO) "sm gds_sun.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_hp: include_generic + $(ECHO) "sm gds_hp.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_hp_ada: include_generic + $(ECHO) "sm interbase_hp.a $(INCLUDE_DEST)interbase.ada" >> sm_include + +include_sco: include_generic + $(ECHO) "sm interbase_sco.a $(INCLUDE_DEST)interbase.ada" >> sm_include + +include_sgi: include_generic + $(ECHO) "sm gds_sun.f $(INCLUDE_DEST)gds.f" >> sm_include + +include_so: include_generic + $(CP) source/jrd/gds_sun.f $(INCLUDE_DEST)gds.f + +include_darwin: include_generic force + $(RM) -rf $(FB_FRAMEWORK) + mkdir -p $(FB_FRAMEWORK)/Versions/A/Resources/English.lproj/var + ln -s Versions/Current/$(FBFW_PREFIX) $(FB_FRAMEWORK)/$(FBFW_PREFIX) + ln -s Versions/Current/Resources $(FB_FRAMEWORK)/Resources + ln -s Versions/Current/Headers $(FB_FRAMEWORK)/Headers + ln -s A $(FB_FRAMEWORK)/Versions/Current + sed "s/__VERSION__/`$(GPRE_BOOT) -Z | sed 's/gpre version //g'`/g" $(SOURCE)/sandbox/bellardo/darwin/FrameworkInfo.plist > $(FB_FRAMEWORK)/Resources/Info.plist + ln -s ../../../include $(FB_FRAMEWORK)/Versions/A/Headers + ln -s ../../../lib/gds.dylib $(FB_FRAMEWORK)/Versions/A/$(FBFW_PREFIX) + ln -s ../../../../../../interbase.msg \ + $(FB_FRAMEWORK)/Versions/A/Resources/English.lproj/var/interbase.msg + ln -s ../../../../../../bin \ + $(FB_FRAMEWORK)/Versions/A/Resources/English.lproj/var/bin + ln -s ../../../../../../intl \ + $(FB_FRAMEWORK)/Versions/A/Resources/English.lproj/var/intl + ln -s ../../../../../../isc4.gdb \ + $(FB_FRAMEWORK)/Versions/A/Resources/English.lproj/var/isc4.gdb + ln -s ../../../../../../help \ + $(FB_FRAMEWORK)/Versions/A/Resources/English.lproj/var/help + +include_so_ada: include_generic +# $(ECHO) "sm interbase_sol.a $(INCLUDE_DEST)interbase.a" >> sm_include + +include_sun4: include_generic + $(ECHO) "sm gds_sun.f $(INCLUDE_DEST)gds.f" >> sm_include + $(ECHO) "sm interbase_sun.a $(INCLUDE_DEST)interbase.a" >> sm_include + +includes: include_generic $(INCLUDES) force +# $(BIN_PATH)/marion $(MARION_DB) -c jrd -x -v -z < sm_include +# -$(RM) sm_include + +inet_server gds_inet_server: $(INET_LIBRARY) force + $(QUIET_ECHO) "Building GDS_INET_SERVER..." + $(CD) $(OBJS)/remote && $(MAKE) $(SUBMAKE_FLAGS) inet_server + +inet_server.a gds_inet_server.a: force + $(QUIET_ECHO) "Building GDS_INET_SERVER.A..." + $(CD) $(OBJS)/remote && $(MAKE) $(SUBMAKE_FLAGS) inet_server.a + +intl: force + $(QUIET_ECHO) "Building INTL..." + $(CD) $(OBJS)/intl && $(MAKE) $(SUBMAKE_FLAGS) intl + +iscinstall: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building ISCINSTALL..." + $(CD) $(OBJS)/register && $(MAKE) $(SUBMAKE_FLAGS) iscinstall + +isql: $(GPRE_STATIC) msgs force + $(QUIET_ECHO) "Building ISQL..." + $(CD) $(OBJS)/isql && $(MAKE) $(SUBMAKE_FLAGS) all + +isqllib.a: isql + $(QUIET_ECHO) "Building interbase/lib/isqllib.a..." + $(CD) $(OBJS)/isql && $(MAKE) $(SUBMAKE_FLAGS) libisqllib.a + +gjrn: $(ACCESS_METHOD) $(GPRE_STATIC) force + $(QUIET_ECHO) "Building GJRN..." + $(CD) $(OBJS)/journal && $(MAKE) $(SUBMAKE_FLAGS) gjrn + +journals: gjrn gds_archive gdef gfix gbak force + $(QUIET_ECHO) "Building journal database backup file..." + $(CD) $(OBJS)/journal && $(MAKE) $(SUBMAKE_FLAGS) journal.db + -$(RM) $(JRN_GBAK) + $(COMPRESS_JRN) + $(SETUP_ISC_LOCAL) \ + $(GDEF) -z -r source/journal.gdl + $(GFIX) -w sync journal.gdb + $(GBAK) -z journal.gdb $(JRN_GBAK) + $(CHMOD_6) $(JRN_GBAK) + -$(RM) source/journal.gdl source/journal.gdb + +locks: lock_print $(LOCK_MANAGER) force + $(QUIET_ECHO) "Building template of IPC configuration file..." + -$(CP) $(SOURCE)/lock/config_params $(OBJS)/firebird/isc_config + +lock_print gds_lock_print: force + $(QUIET_ECHO) "Building GDS_LOCK_PRINT..." + $(CD) $(OBJS)/lock && $(MAKE) $(SUBMAKE_FLAGS) lock_print + +manager gds_lock_manager: drop force + $(QUIET_ECHO) "Building GDS_LOCK_MANAGER..." + $(CD) $(OBJS)/lock && $(MAKE) $(SUBMAKE_FLAGS) manager + +msgs: $(GPRE_STATIC) $(GBAK_STATIC) force + $(QUIET_ECHO) "Building message file(s)..." + $(CD) $(OBJS)/msgs && $(MAKE) $(SUBMAKE_FLAGS) check_messages + $(CD) $(OBJS)/msgs && $(MAKE) $(SUBMAKE_FLAGS) do_check + $(CD) $(OBJS)/msgs && $(MAKE) $(SUBMAKE_FLAGS) interbase.msg + $(CD) $(OBJS)/jrd && $(MAKE) $(SUBMAKE_FLAGS) includes.msg + +msgs_intl: force + $(QUIET_ECHO) "Building international message file(s)..." + $(CD) $(OBJS)/msgs && $(MAKE) $(SUBMAKE_FLAGS) locales.msg + +pipe: $(EXTERNAL_OBJECTS) $(PIPE) + +pyxis: force + $(QUIET_ECHO) "Building PYXIS..." + $(CD) $(OBJS)/pyxis && $(MAKE) $(SUBMAKE_FLAGS) objects + +qli: $(GPRE_STATIC) msgs force + $(QUIET_ECHO) "Building QLI..." + $(CD) $(OBJS)/qli && $(MAKE) $(SUBMAKE_FLAGS) qli + +qlilib.a: qli + $(QUIET_ECHO) "Building interbase/lib/qlilib.a..." + $(CD) $(OBJS)/qli && $(MAKE) $(SUBMAKE_FLAGS) libqlilib.a + +register: $(GPRE_STATIC) force + $(QUIET_ECHO) "Building REGISTER..." + $(CD) $(OBJS)/register && $(MAKE) $(SUBMAKE_FLAGS) register + +relay gds_relay: force + $(QUIET_ECHO) "Building GDS_RELAY..." + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) relay + +remote: inet_server $(DNET_SERVER) $(AMBX_SERVER) + +spit: force + $(QUIET_ECHO) "Building GSPLIT..." + $(CD) $(OBJS)/burp && $(MAKE) $(SUBMAKE_FLAGS) spit + +super_server: force + $(QUIET_ECHO) "Building super_server... " + $(CD) $(OBJS)/super/remote && $(MAKE) $(SUBMAKE_FLAGS) super_server + +super_utils: force + $(QUIET_ECHO) "Building super server utlities... " + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) super_server_targets + +isc4.gdb: dudley isql force + $(QUIET_ECHO) "Building the ISC security database..." + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) isc4.gdb + +sysdba_user: force + $(QUIET_ECHO) "Adding SYSDBA to the ISC security database..." + $(CD) $(OBJS)/utilities && $(MAKE) $(SUBMAKE_FLAGS) sysdba_user + +utilities: dba relay gsec $(UTILITIES) + +v4_examples: gbak force + $(QUIET_ECHO) "Building V4 examples directory..." + $(CD) $(OBJS)/example4 && $(MAKE) $(SUBMAKE_FLAGS) v4_examples + +v5_examples: gbak force + $(QUIET_ECHO) "Building V5 examples directory..." + $(CD) $(OBJS)/example5 && $(MAKE) $(SUBMAKE_FLAGS) v5_examples + +wal_print: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_WAL_PRINT..." + $(CD) $(OBJS)/wal && $(MAKE) $(SUBMAKE_FLAGS) wal_print + +wal_writer: $(ACCESS_METHOD) force + $(QUIET_ECHO) "Building GDS_WAL_WRITER..." + $(CD) $(OBJS)/wal && $(MAKE) $(SUBMAKE_FLAGS) wal_writer + +csi_objects: + $(QUIET_ECHO) "Building CSI OBJECTS..." + $(CD) $(OBJS)/csv && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +dsql_objects: + $(QUIET_ECHO) "Building DSQL OBJECTS..." + $(CD) $(OBJS)/dsql && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +lock.o: + $(QUIET_ECHO) "Building LOCK.O..." + $(CD) $(OBJS)/lock && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +pyxis_objects: + $(QUIET_ECHO) "Building PYXIS OBJECTS..." + $(CD) $(OBJS)/pyxis && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +pyxlib.o: + $(QUIET_ECHO) "Building PYXLIB.O..." + $(CD) $(OBJS)/pyxis && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +rem_objects: + $(QUIET_ECHO) "Building REMOTE OBJECTS..." + $(CD) $(OBJS)/remote && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +wal_objects: + $(QUIET_ECHO) "Building WAL OBJECTS..." + $(CD) $(OBJS)/wal && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +dsqllib: + $(QUIET_ECHO) "Building DSQLLIB..." + $(CD) $(OBJS)/dsql && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +pyxislib: + $(QUIET_ECHO) "Building PYXISLIB..." + $(CD) $(OBJS)/pyxis && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +csi_p_objs: + $(QUIET_ECHO) "Building CSI PIC OBJECTS..." + $(CD) $(OBJS)/csv && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +dsql_p_objects: + $(QUIET_ECHO) "Building DSQL PIC OBJECTS..." + $(CD) $(OBJS)/dsql && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +gds_pyxis.a: + $(QUIET_ECHO) "Building GDS_PYXIS.A..." + $(CD) $(OBJS)/pyxis && $(MAKE) $(SUBMAKE_FLAGS) libpyxis.a + +lock.bin: + $(QUIET_ECHO) "Building LOCK.BIN..." + $(CD) $(OBJS)/lock && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +pyx_p_objects: + $(QUIET_ECHO) "Building PYXIS PIC OBJECTS..." + $(CD) $(OBJS)/pyxis && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +wal_p_objects: + $(QUIET_ECHO) "Building WAL PIC OBJECTS..." + $(CD) $(OBJS)/wal && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +rem_p_objects: + $(QUIET_ECHO) "Building REMOTE PIC OBJECTS..." + $(CD) $(OBJS)/remote && $(MAKE) $(SUBMAKE_FLAGS) $(@F) + +darwin_installer_common: force + $(QUIET_ECHO) "Building Firebird Installer..." + mkdir -p $(OBJS)/firebird/installer_tmp + $(MV) $(OBJS)/firebird/Firebird.framework $(OBJS)/firebird/installer_tmp + $(CP) $(SOURCE)/sandbox/bellardo/darwin/makefile \ + $(OBJS)/firebird/installer_tmp + ln -s $(OBJS)/firebird/bellardo/darwin \ + $(OBJS)/firebird/installer_tmp/files + ln -s ../.. $(OBJS)/firebird/installer_tmp/source + $(CD) $(OBJS)/firebird/installer_tmp && $(MAKE) install_package + $(RM) -rf $(OBJS)/firebird/installer_tmp + -$(RM) -rf $(OBJS)/firebird/Firebird.framework + +darwin_installer: darwin_installer_common darwin_framework +super_darwin_installer: darwin_installer_common ss_darwin_framework + +darwin_framework: force + $(QUIET_ECHO) "Building Classic Firebird Framework..." + $(RM) -rf $(OBJS)/firebird/Firebird2.framework + $(MAKE) -f $(SOURCE)/sandbox/bellardo/darwin/FirebirdFramework.make \ + framework + +ss_darwin_framework: force + $(QUIET_ECHO) "Building Super Server Firebird Framework..." + $(RM) -rf $(OBJS)/firebird/Firebird.framework + $(MAKE) -f $(SOURCE)/sandbox/bellardo/darwin/FirebirdFramework.make \ + super_framework + +# Note: So far this target is only available on Solaris +makedepend: + $(QUIET_ECHO) "Building component dependency files..." + $(RM) \ + source/alice/depends.mak \ + source/burp/depends.mak \ + source/csv/depends.mak \ + source/dsql/depends.mak \ + source/dudley/depends.mak \ + source/gpre/depends.mak \ + source/intl/depends.mak \ + source/lock/depends.mak \ + source/isql/depends.mak \ + source/journal/depends.mak \ + source/jrd/depends.mak \ + source/msgs/depends.mak \ + source/qli/depends.mak \ + source/remote/depends.mak \ + source/utilities/depends.mak \ + source/wal/depends.mak + $(SH) '$(CD) source/alice; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/burp; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/csv; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/dsql; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/dudley; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/gpre; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/intl; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/lock; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/isql; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/journal; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/msgs; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/qli; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/remote; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/utilities; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + $(SH) '$(CD) source/wal; $(MAKE) CFLAGS="$(CFLAGS)" depends.mak' + +clean: clean_executables + -$(RM) \ + $(OBJS)/burp/gbaklib.a \ + $(OBJS)/super/client/gds.so.0 \ + $(OBJS)/examples/refresh \ + $(OBJS)/jrd/gdsshr.a $(OBJS)/jrd/gdslib $(OBJS)/jrd/gds.sl \ + $(OBJS)/jrd/gds_s.a $(OBJS)/jrd/gdsf_s.a \ + $(OBJS)/jrd/gds.so.0 \ + $(OBJS)/jrd/gdslib.so.1.0 $(OBJS)/jrd/gdslib.so.0.1 \ + $(OBJS)/jrd/gdsflib.so.0.0 \ + $(OBJS)/jrd/gds_b.a $(OBJS)/jrd/gds.a $(OBJS)/jrd/gds.a.solaris \ + $(OBJS)/jrd/gds_pipe.a \ + $(OBJS)/jrd/gdsmt.so.0 \ + $(OBJS)/super/jrd/gds_ss.a $(OBJS)/super/client/gdsmt.so.1 \ + $(OBJS)/super/client/gds.sl.1 \ + $(OBJS)/pyxis/libpyxis.a \ + $(OBJS)/qli/qlilib.a \ + $(OBJS)/remote/inet_server.a $(OBJS)/remote/dnet_server.a + +clean_executables: + -$(RM) \ + $(OBJS)/alice/alice \ + $(OBJS)/burp/burp \ + $(OBJS)/csv/central_server $(OBJS)/csv/csu \ + $(OBJS)/dudley/dudley \ + $(OBJS)/gpre/gpre \ + $(OBJS)/intl/intl \ + $(OBJS)/journal/gjrn $(OBJS)/journal/gds_archive \ + $(OBJS)/jrd/codes \ + $(OBJS)/lock/lock_print $(OBJS)/lock/manager \ + $(OBJS)/jrd/gds_pipe \ + $(OBJS)/msgs/build_file $(OBJS)/msgs/check_messages \ + $(OBJS)/pyxis/fred \ + $(OBJS)/qli/qli \ + $(OBJS)/register/iscinstall \ + $(OBJS)/remote/inet_server $(OBJS)/remote/dnet_server \ + $(OBJS)/remote/gds_server \ + $(OBJS)/super/remote/super_server \ + $(OBJS)/utilities/dba $(OBJS)/utilities/drop $(OBJS)/utilities/gsec \ + $(OBJS)/utilities/relay \ + $(OBJS)/utilities/ibmgr $(OBJS)/utilities/ibguard \ + $(OBJS)/wal/wal_writer + +realclean: clean clean_obj clean_build_gdb + $(QUIET_ECHO) "Removed compiled binaries and build files." + +clean_obj: + -for ND in ${SRC_DIRS} ; do \ + rm $${ND}/*.o ; \ + rm $${ND}/*.a ; \ + rm $${ND}/*.j ; \ + rm $${ND}/*.bin ; \ + done + +clean_build_gdb: + -$(RM) \ + source/example5/*.gdb \ + jrd/isc.gdb \ + jrd/yachts.gdb \ + msgs/msg.gdb + + + +# The installations need to find a better and possibly linux +# specific home. The tar installs should probably work with +# other unix type of systems. + +# I have seperated super and classic out since I needed different +# files in each case. + +miscFiles: force + $(QUIET_ECHO) "Building miscellaneous install files..." + mkdir -p $(OBJS)/firebird/misc + -$(CP) $(SOURCE)/makefiles/install.unix $(OBJS)/firebird/install + -$(CP) $(SOURCE)/makefiles/servers.isc $(OBJS)/firebird + -$(CP) $(SOURCE)/makefiles/inetd.conf.unx $(OBJS)/firebird/inetd.conf.isc + -$(CP) $(SOURCE)/makefiles/services.isc $(OBJS)/firebird + -$(CP) $(SOURCE)/makefiles/sys.conf.isc $(OBJS)/firebird + -$(CP) $(SOURCE)/sandbox/skywalker/install/misc/firebird.xinetd $(OBJS)/firebird/misc + +superMiscFiles: force + $(QUIET_ECHO) "Building miscellaneous install files..." + $(CP) source/$(SYSTEM)/install source/interbase + -$(CP) source/$(SYSTEM)/servers.isc source/interbase + $(CP) source/$(SYSTEM)/inetd.conf.isc source/interbase + $(CP) source/$(SYSTEM)/original/services.isc source/interbase + -$(CP) source/$(SYSTEM)/sys.conf.isc source/interbase + mkdir -p source/interbase/misc + $(CP) firebird/skywalker/install/misc/firebird.init.d.* source/interbase/misc + +install: force + make -f firebird/skywalker/install/Makefile install + +runclassicinstall: force + make -f firebird/skywalker/install/Makefile runclassicinstall + +classicpackages: force + make -f firebird/skywalker/install/Makefile classicpackages + +classictarfile: force + make -f firebird/skywalker/install/Makefile classictarfile + +classicrpmfile: force + make -f firebird/skywalker/install/Makefile classicrpmfile + + +superpackages: force + make -f firebird/skywalker/install/Makefile superpackages + +supertarfile: force + make -f firebird/skywalker/install/Makefile supertarfile + +superrpmfile: force + make -f firebird/skywalker/install/Makefile superrpmfile + + +force: diff --git a/src/makefiles/sfx.gpre b/src/makefiles/sfx.gpre new file mode 100644 index 0000000000..784bae43b4 --- /dev/null +++ b/src/makefiles/sfx.gpre @@ -0,0 +1,190 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@SET_MAKE@ +OBJS= objs +SOURCE= source + +srcdir= source/gpre +VPATH= source/gpre +CXX= @CXX@ + +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT) +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT) +GPRE_FLAGS= -r -m -z -n +CXX_INCLUDE_DIRS= -I. -Isource/jrd + + +NODE_LINK= +DSC_LINK= $(OBJS)/jrd/dsc.o +JRD_LINK= $(NODE_LINK) $(DSC_LINK) + +BOOT= $(OBJS)/jrd/gds_boot.a + +GPRE_BOOT_OBJECTS= cmd.o cme.o cmp.o c_cxx.o exp.o gpre.o hsh.o int.o \ + int_cxx.o jrdmet.o movg.o gpre_meta_boot.o msc.o par.o pat.o pretty.o sqe.o \ + sql.o noform.o $(OBJS)/jrd/dsc.o $(OBJS)/jrd/gds.o \ + $(OBJS)/jrd/isc_ipc.o $(OBJS)/jrd/isc.o $(OBJS)/jrd/dls.o + +GPRE_OBJECTS= cmd.o cme.o cmp.o c_cxx.o exp.o gpre.o hsh.o int.o int_cxx.o \ + jrdmet.o movg.o gpre_meta.o msc.o par.o pat.o pretty.o sqe.o sql.o \ + $(LANG_OBJECTS) + +all: gpre$(EXEC_EXT) + +# JMB / DARWIN dsc.o (dsc.bin) already in shared lib. Removed link with +# $(DSC_LINK) +gpre: gprelib.a $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) $(JRD_LINK) \ + $(GDSSHR) + -$(RM) gpre + $(CC) $(LINK_OPTS) gprelib.a $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) \ + $(T_SWITCH) $(NODE_LINK) $(T_SWITCH) \ + -o gpre $(GDSSHR_LINK) $(CURSES_LIB) + $(CHMOD_7) gpre + $(MV) gpre $(GPRE) + $(TOUCH) gpre + $(CHMOD_6) gpre + +$(GPRE_STATIC) gpre_static gpre/gpre_static: override LANG_OBJECTS= +$(GPRE_STATIC): \ + gprelib.a $(OBJS)/jrd/jrd_static.a noform.o + -$(RM) gpre_static + $(CXX) $(LINK_OPTS) gprelib.a noform.o \ + $(T_SWITCH) $(NODE_LINK) $(T_SWITCH) $(OBJS)/jrd/jrd_static.a \ + $(COREFOUNDATION_LINK) \ + -o gpre $(CURSES_LIB) $(DROP_LINK) + $(CHMOD_7) gpre + $(MV) gpre $(OBJS)/firebird/bin/gpre_static + $(TOUCH) gpre_static + $(CHMOD_6) gpre_static + +gpre.exe: gprelib.lib $(JRD_LINK) + -$(RM) gpre.exe + $(CC) $(LINK_OPTS) $(O_EXE_SWITCH)gpre \ + $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) $(JRD_LINK) $(GDSSHR_LINK) + $(MV) gpre.exe $(GPRE) + $(RM) gpre.exe + $(TOUCH) gpre.exe + +gprelib.a: $(GPRE_OBJECTS) + -$(RM) gprelib.a + $(AR) gprelib.a $(GPRE_OBJECTS) + -ranlib gprelib.a + $(CHMOD_6) gprelib.a + +gprelib.lib: $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) + -$(RM) gprelib.lib + $(IMPLIB) -out:gprelib.lib $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) + $(TOUCH) gprelib.lib + +$(GPRE_BOOT): $(GPRE_BOOT_OBJECTS) + $(CXX) -framework Foundation $(GPRE_BOOT_OBJECTS) \ + $(T_SWITCH) $(NODE_LINK) $(T_SWITCH) \ + -o $(GPRE_BOOT) $(CURSES_LIB) + +#gpre_boot: $(GPRE_OBJECTS) no_form.o $(JRD_LINK) $(BOOT) +# $(CC) $(LINK_OPTS) $(GPRE_OBJECTS) noform.o $(JRD_LINK) -o gpre $(BOOT) +# $(MV) gpre $(GPRE) + +debug: $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) $(GDSLIB) + $(CC) $(LINK_OPTS) -g $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) -o gpre_dbg $(GDSLIB_LINK) + +debug_nt: $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) + $(CC) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)gpre_dbg $(GPRE_OBJECTS) $(FORM_OBJECTS) $(FORM_TRN_OBJECTS) $(GDSLIB_LINK) + +ada.o: ada.cpp gpre.h form.h pat.h gpre_proto.h prett_proto.h \ + $(SOURCE)/jrd/gds_proto.h +bas.o: bas.cpp gpre.h form.h pat.h +blrtable.o: blrtable.cpp +cmd.o: cmd.cpp gpre.h $(SOURCE)/jrd/flags.h +cme.o: cme.cpp gpre.h $(SOURCE)/jrd/intl.h +cmp.o: cmp.cpp gpre.h form.h +cob.o: cob.cpp gpre.h form.h pat.h +cxx.o: cxx.cpp gpre.h form.h pat.h +c_cxx.o: c_cxx.cpp gpre.h form.h pat.h +dyntable.o: dyntable.cpp +exp.o: exp.cpp gpre.h parse.h form.h +form.o: form.cpp gpre.h form.h $(SOURCE)/pyxis/phase1.h +form_trn.o: form_trn.cpp $(SOURCE)/jrd/dsc.h +ftn.o: ftn.cpp gpre.h form.h pat.h +gen.o: gen.cpp gpre.h form.h pat.h +gpre.h: $(SOURCE)/jrd/dsc.h +# $(TOUCH) gpre.h +gpre.o: gpre.cpp gpre.h $(SOURCE)/jrd/license.h parse.h $(SOURCE)/jrd/intl.h +hsh.o: hsh.cpp gpre.h parse.h hsh.h +int.o: int.cpp gpre.h +int_cxx.o: int_cxx.cpp gpre.h +jrdmet.o: jrdmet.cpp gpre.h $(SOURCE)/jrd/val.h $(SOURCE)/jrd/names.h \ + $(SOURCE)/jrd/fields.h $(SOURCE)/jrd/relations.h $(SOURCE)/jrd/types.h \ + $(SOURCE)/intl/charsets.h $(SOURCE)/intl/country_codes.h \ + $(SOURCE)/jrd/constants.h +gpre_meta.cpp: gpre_meta.epp + $(GPRE_BOOT) -lang_internal $(GPRE_FLAGS) $< $@ +gpre_meta.o: gpre_meta.cpp gpre.h $(SOURCE)/jrd/license.h parse.h $(SOURCE)/jrd/intl.h +movg.o: movg.cpp +msc.o: msc.cpp gpre.h parse.h +no_ada.o: no_ada.cpp gpre.h form.h +no_form.o: no_form.cpp gpre.h form.h $(SOURCE)/pyxis/phase1.h +par.o: par.cpp gpre.h parse.h form.h +parse.h: words.h + $(TOUCH) parse.h +pas.o: pas.cpp gpre.h form.h pat.h +pat.o: pat.cpp gpre.h form.h pat.h +pli.o: pli.cpp gpre.h form.h pat.h +pretty.o: pretty.cpp dyntable.h cdbtable.h sdltable.h +sqe.o: sqe.cpp gpre.h parse.h +sql.o: sql.cpp gpre.h parse.h $(SOURCE)/jrd/intl.h $(SOURCE)/wal/wal.h \ + $(SOURCE)/jrd/flags.h +vms_print.o: vms_print.cpp gpre.h + +$(OBJS)/jrd/%: + $(CD) $(OBJS)/jrd && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) + +$(GDSSHR): force + $(CD) $(OBJS)/jrd && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - gpre" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/gpre/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + + +force: diff --git a/src/makefiles/sfx.intl b/src/makefiles/sfx.intl new file mode 100644 index 0000000000..4f92b75967 --- /dev/null +++ b/src/makefiles/sfx.intl @@ -0,0 +1,336 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@SET_MAKE@ +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/intl +VPATH= $(SOURCE)/intl +CXX= @CXX@ + +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + + +.SUFFIXES: .sl .bin .o .c +.c.o: + $(CC) -c $(INTL_CFLAGS) $(CXX_INCLUDE_DIRS) $(SWB) $(VERSION_FLAG) $< +.c.bin: + $(CP) $< $*f.c + $(CC) -c $(INTL_PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $*f.c + $(MV) $*f.o $*.bin + -$(RM) $*f.c +.c.sl: + -$(RM) $*.sl + $(CP) $< $*foo.c + $(CC) -c $(INTL_PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $*foo.c + $(MV) $*foo.o $*.sl + -$(RM) $*foo.c + $(INTL_LD_LINE) + $(CHMOD) $(CHMOD_VAL) $* + $(MV) $* $(INTL_DEST) + $(CHMOD_6) $*.sl + +INTL_SHLIBS = gdsintl.sl + +# Note: Definition of INTL_OBJECTS & INTL_P_OBJECTS must match sfx.jrd. + +INTL_OBJECTS1= ld.o cv_narrow.o \ + cs_narrow.o lc_ascii.o lc_narrow.o lc_latin1.o lc_dos.o \ + cs_unicode.o lc_unicode.o \ + cs_utffss.o \ + cs_big5.o cv_big5.o lc_big5.o \ + cs_gb2312.o cv_gb2312.o lc_gb2312.o \ + cs_jis.o cv_jis.o lc_jis.o \ + cs_ksc.o cv_ksc.o lc_ksc.o + +INTL_OBJECTS2= ld2.o +INTL_OBJECTS= $(INTL_OBJECTS1) $(INTL_OBJECTS2) + +INTL_P_OBJECTS1= ld.bin cv_narrow.bin \ + cs_narrow.bin lc_ascii.bin lc_narrow.bin lc_latin1.bin lc_dos.bin \ + cs_unicode.bin lc_unicode.bin \ + cs_utffss.bin \ + cs_big5.bin cv_big5.bin lc_big5.bin \ + cs_gb2312.bin cv_gb2312.bin lc_gb2312.bin \ + cs_jis.bin cv_jis.bin lc_jis.bin \ + cs_ksc.bin cv_ksc.bin lc_ksc.bin + +INTL_P_OBJECTS2= ld2.bin +INTL_P_OBJECTS= $(INTL_P_OBJECTS1) $(INTL_P_OBJECTS2) + +INTL_DEST= $(OBJS)/firebird/intl + +# Note: This is the list of files included by ldcommon.h, +# and should be updated when the list changes. + +COMMON_INCLUDES = \ + ldcommon.h \ + charsets.h country_codes.h \ + langdrv.h ld.h undef.h \ + $(SOURCE)/jrd/gdsassert.h $(SOURCE)/jrd/intl.h \ + $(SOURCE)/jrd/intlobj.h $(SOURCE)/jrd/jrd.h \ + $(SOURCE)/jrd/kanji.h $(SOURCE)/jrd/ods.h \ + $(SOURCE)/jrd/btr.h + +intl: $(INTL_TARGET) + -$(RM) intl + $(TOUCH) intl + $(CHMOD_6) intl + +nointl_objs: + -$(RM) nointl_objs + $(QUIET_ECHO) "Intl module not yet ported to $(SYSTEM)" + $(TOUCH) nointl_objs + $(CHMOD_6) nointl_objs + +intl_objects: $(INTL_OBJECTS) + -$(RM) intl_objects + $(TOUCH) intl_objects + $(CHMOD_6) intl_objects + +intl_p_objs: $(INTL_P_OBJECTS) + -$(RM) intl_p_objs + $(TOUCH) intl_p_objs + $(CHMOD_6) intl_p_objs + +intl_shr_objs: $(INTL_SHLIBS) + -$(RM) intl_shr_objs + $(TOUCH) intl_shr_objs + $(CHMOD_6) intl_shr_objs + +gdsintl.so.0.0: $(INTL_P_OBJECTS1) + -$(RM) gdsintl.so.0.0 + ld -assert pure-text -assert nosymbolic $(INTL_P_OBJECTS1) -o gdsintl + $(MV) gdsintl $(INTL_DEST) + $(TOUCH) gdsintl.so.0.0 + $(CHMOD_6) gdsintl.so.0.0 + +gdsintl.sl: $(INTL_P_OBJECTS1) + -$(RM) gdsintl.sl + $(INTL_LD_LINE) $(INTL_P_OBJECTS1) $(INTL_LD_TARGET) + $(CHMOD) $(CHMOD_VAL) gdsintl + $(MV) gdsintl $(INTL_DEST) + $(TOUCH) gdsintl.sl + $(CHMOD_6) gdsintl.sl + +gdsintl.dll: $(WIN_NT_GDSINTL) + $(TOUCH) gdsintl.dll + +gdsintl_nt_ms.dll: $(INTL_OBJECTS1) + -$(RM) gdsintl.dll gdsintl.lib + $(IMPLIB) -out:gds_temp.lib $(INTL_OBJECTS1) + $(IMPLIB) -out:gdsintl.lib -def:gdsintl.bind gds_temp.lib + $(LINK) -out:gdsintl.dll -dll -entry:_CRT_INIT$(DLLENTRY) gds_temp.lib gdsintl.exp $(CONLIBSDLL) + $(RM) gds_temp.lib + $(RM) gdsintl.exp + $(MV) gdsintl.dll ..\interbase\bin + $(RM) gdsintl.dll gdsintl.lib + $(TOUCH) gdsintl_ms.dll + +gdsintl_nt_bc4.dll: $(INTL_OBJECTS1) + -$(RM) gdsintl.dll gdsintl.lib tmpintl.bind + sed -e 's/DATA READ WRITE/DATA MULTIPLE/' \ + -e 's/LIBRARY gdsintl/LIBRARY gdsintl INITINSTANCE/' \ + -e 's/ LD_lookup/ _LD_lookup/' gdsintl.bind > tmpintl.bind + $(LINK) -Tpd -ap -c $(LD_OPTS) -w-inq -x /Lc:\bc4\lib c0d32 \ + ld.o+cv_narrow.o+cs_narrow.o+lc_ascii.o+lc_narrow.o+lc_latin1.o+lc_dos.o+cs_unicode.o+lc_unicode.o+cs_utffss.o+cs_jis.o+cv_jis.o+lc_jis.o+cs_big.o+cs_gb2312.o+cs_ksc.o+cv_big.o+cv_gb2312.o+cv_ksc.o+lc_big.o+lc_gb2312.o+lc_ksc.o,\ + gdsintl.dll,,import32 cw32mt,tmpintl.bind + implib gdsintl.lib gdsintl.dll + $(MV) gdsintl.dll ..\interbase\bin + $(RM) gdsintl.dll gdsintl.lib tmpintl.bind + $(TOUCH) gdsintl_bc4.dll + +gdsintl_os2_bc4.dll: $(INTL_OBJECTS1) + -$(RM) gdsintl.dll gdsintl.lib tmpintl.bind + sed -e 's/DATA READ WRITE/DATA MULTIPLE NONSHARED/' \ + -e 's/LIBRARY gdsintl/LIBRARY gdsintl INITINSTANCE/' \ + -e 's/ LD_lookup/ _LD_lookup/' gdsintl.bind > tmpintl.bind + $(LINK) -Tod -ap -c $(LD_OPTS) -x /Lc:\bcos2\lib c02d \ + ld.o+cv_narrow.o+cs_narrow.o+lc_ascii.o+lc_narrow.o+lc_latin1.o+lc_dos.o+cs_unicode.o+lc_unicode.o+cs_utffss.o+cs_jis.o+cv_jis.o+lc_jis.o+cs_big.o+cs_gb2312.o+cs_ksc.o+cv_big.o+cv_gb2312.o+cv_ksc.o+lc_big.o+lc_gb2312.o+lc_ksc.o,\ + gdsintl.dll,,os2 c2mt,tmpintl.bind + implib gdsintl.lib gdsintl.dll + $(MV) gdsintl.dll ..\interbase\bin + $(RM) gdsintl.dll gdsintl.lib tmpintl.bind + $(TOUCH) gdsintl_bc4.dll + +gdsintl_os2_ibm.dll: $(INTL_OBJECTS1) + -$(RM) gdsintl.dll gdsintl.lib bindintl.tmp + sed -e 's/DATA READ WRITE/DATA MULTIPLE NONSHARED/' \ + -e 's/LIBRARY gdsintl/LIBRARY gdsintl INITINSTANCE/' \ + gdsintl.bind > bindintl.tmp + $(LINK) $(LD_OPTS) \ + ld.o+cv_narrow.o+cs_narrow.o+lc_ascii.o+lc_narrow.o+lc_latin1.o+lc_dos.o+cs_unicode.o+lc_unicode.o+cs_utffss.o+cs_jis.o+cv_jis.o+lc_jis.o+cs_big.o+cs_gb2312.o+cs_ksc.o+cv_big.o+cv_gb2312.o+cv_ksc.o+lc_big.o+lc_gb2312.o+lc_ksc.o,\ + gdsintl.dll,,,bindintl.tmp + c:\toolkt21\os2bin\implib gdsintl.lib gdsintl.dll + $(MV) gdsintl.dll ..\interbase\bin + $(RM) gdsintl.dll gdsintl.lib bindintl.tmp + $(TOUCH) gdsintl_ibm.dll + +# gdsintl.a is used for debugging with INTL_BACKEND set in jrd/intl.c +gdsintl.a: $(INTL_OBJECTS) + -$(RM) gdsintl.a + $(AR) gdsintl.a $(INTL_OBJECTS) + -ranlib gdsintl.a + $(CHMOD) $(CHMOD_VAL) gdsintl.a + +cs_big5.o: cs_big5.c $(COMMON_INCLUDES) \ + cs_big5.h + $(SPECIAL_OPT) $(COPT_INTL_CS_JIS) \ + $(CC) -c $(INTL_CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +cs_gb2312.o: cs_gb2312.c $(COMMON_INCLUDES) \ + cs_gb2312.h + $(SPECIAL_OPT) $(COPT_INTL_CS_JIS) \ + $(CC) -c $(INTL_CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +cs_jis.o: cs_jis.c $(COMMON_INCLUDES) \ + cs_jis_0208_1990.h + $(SPECIAL_OPT) $(COPT_INTL_CS_JIS) \ + $(CC) -c $(INTL_CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +cs_ksc.o: cs_ksc.c $(COMMON_INCLUDES) \ + cs_ksc5601.h + $(SPECIAL_OPT) $(COPT_INTL_CS_JIS) \ + $(CC) -c $(INTL_CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +cs_narrow.o: cs_narrow.c $(COMMON_INCLUDES) \ + cs_437.h cs_850.h cs_852.h cs_857.h cs_860.h \ + cs_861.h cs_863.h cs_865.h cs_cyrl.h cs_latin1.h \ + cs_w1250.h cs_w1251.h cs_w1252.h cs_w1253.h \ + cs_w1254.h cs_next.h +cs_unicode.o: cs_unicode.c $(COMMON_INCLUDES) +cs_utffss.o: cs_utffss.c $(COMMON_INCLUDES) +cv_big5.o: cv_big5.c $(COMMON_INCLUDES) +cv_gb2312.o: cv_gb2312.c $(COMMON_INCLUDES) +cv_jis.o: cv_jis.c $(COMMON_INCLUDES) +cv_ksc.o: cv_ksc.c $(COMMON_INCLUDES) +cv_narrow.o: cv_narrow.c $(COMMON_INCLUDES) \ + tx437_865.h tx437_lat1.h tx865_lat1.h +lc_ascii.o: lc_ascii.c $(COMMON_INCLUDES) +lc_big5.o: lc_big5.c $(COMMON_INCLUDES) \ + $(SOURCE)/jrd/license.h +lc_dos.o: lc_dos.c $(COMMON_INCLUDES) \ + nordan40.h swedfin.h intl.h \ + db437de0.h db437es1.h db437fi0.h db437fr0.h \ + db437it0.h db437nl0.h db437sv0.h db437uk0.h \ + db437us0.h db850cf0.h db850de0.h db850es0.h \ + db850fr0.h db850it1.h db850nl0.h db850pt0.h \ + db850sv1.h db850uk0.h db850us0.h db865da0.h \ + db865no0.h db852cz0.h db852po0.h db852hdc.h \ + db852sl0.h czech.h polish.h hun852dc.h \ + slovene.h db857tr0.h turk.h db860pt0.h \ + iceland.h db863cf1.h db866ru0.h cyrr.h +lc_gb2312.o: lc_gb2312.c $(COMMON_INCLUDES) \ + $(SOURCE)/jrd/license.h +lc_jis.o: lc_jis.c $(COMMON_INCLUDES) \ + $(SOURCE)/jrd/license.h +lc_ksc.o: lc_ksc.c $(COMMON_INCLUDES) \ + $(SOURCE)/jrd/license.h +lc_latin1.o: lc_latin1.c $(COMMON_INCLUDES) \ + bllt1ca0.h bllt1da0.h bllt1de0.h bllt1es0.h \ + bllt1fi0.h bllt1fr0.h bllt1is0.h bllt1it0.h \ + bllt1nl0.h bllt1no0.h bllt1pt0.h bllt1sv0.h \ + bllt1uk0.h bllt1us0.h anczech.h anhundc.h \ + anpolish.h ansislov.h ancyrr.h ansiintl.h \ + ansii850.h ansinor4.h ansispan.h ansiswfn.h \ + angreek1.h anturk.h blnxtus0.h blnxtde0.h \ + blnxtfr0.h blnxtit0.h +lc_narrow.o: lc_narrow.c $(COMMON_INCLUDES) +lc_unicode.o: lc_unicode.c $(COMMON_INCLUDES) +ld.o: ld.c $(COMMON_INCLUDES) +ld2.o: ld2.c $(COMMON_INCLUDES) + +cs_big5.bin: cs_big5.c $(COMMON_INCLUDES) cs_big5.h + $(CP) $< cs_big5foo.c + $(SPECIAL_OPT) $(COPT_INTL_CS_JIS) \ + $(CC) -c $(INTL_PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) cs_big5foo.c + $(MV) cs_big5foo.o cs_big5.bin + -$(RM) cs_big5foo.c cs_big5foo.o +cs_gb2312.bin: cs_gb2312.c $(COMMON_INCLUDES) cs_gb2312.h + $(CP) $< cs_gb2312foo.c + $(SPECIAL_OPT) $(COPT_INTL_CS_JIS) \ + $(CC) -c $(INTL_PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) cs_gb2312foo.c + $(MV) cs_gb2312foo.o cs_gb2312.bin + -$(RM) cs_gb2312foo.c cs_gb2312foo.o +cs_jis.bin: cs_jis.c $(COMMON_INCLUDES) cs_jis_0208_1990.h + $(CP) $< cs_jisfoo.c + $(SPECIAL_OPT) $(COPT_INTL_CS_JIS) \ + $(CC) -c $(INTL_PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) cs_jisfoo.c + $(MV) cs_jisfoo.o cs_jis.bin + -$(RM) cs_jisfoo.c cs_jisfoo.o +cs_ksc.bin: cs_ksc.c $(COMMON_INCLUDES) cs_ksc5601.h + $(CP) $< cs_kscfoo.c + $(SPECIAL_OPT) $(COPT_INTL_CS_JIS) \ + $(CC) -c $(INTL_PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) cs_kscfoo.c + $(MV) cs_kscfoo.o cs_ksc.bin + -$(RM) cs_kscfoo.c cs_kscfoo.o +cs_narrow.bin: cs_narrow.o +cs_unicode.bin: cs_unicode.o +cs_utffss.bin: cs_utffss.o +cv_big5.bin: cv_big5.o +cv_gb2312.bin: cv_gb2312.o +cv_jis.bin: cv_jis.o +cv_ksc.bin: cv_ksc.o +cv_narrow.bin: cv_narrow.o +lc_ascii.bin: lc_ascii.o +lc_big5.bin: lc_big5.o +lc_dos.bin: lc_dos.o +lc_gb2312.bin: lc_gb2312.o +lc_jis.bin: lc_jis.o +lc_ksc.bin: lc_ksc.o +lc_narrow.bin: lc_narrow.o +lc_latin1.bin: lc_latin1.o +lc_unicode.bin: lc_unicode.o +ld.bin: ld.o +ld2.bin: ld2.o + + +clean: + -$(RM) *.o + -$(RM) *.bin + -$(RM) dtest + -$(RM) a.out + -$(RM) $(INTL_SHLIBS) + -$(RM) intl_* + -$(RM) intl + +# This entry is used to programatically update the include file dependancies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependancy lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependant, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - intl" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" \ + -e "s:source/intl/::g" \ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.isql b/src/makefiles/sfx.isql new file mode 100644 index 0000000000..6105aef312 --- /dev/null +++ b/src/makefiles/sfx.isql @@ -0,0 +1,160 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@SET_MAKE@ +SOURCE= source +OBJS= objs + +unexport ISC_USER +unexport ISC_PASSWORD + +srcdir= $(SOURCE)/isql +VPATH= $(SOURCE)/isql +CXX= @CXX@ + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_STATIC) $(GPRE_FLAGS) $< $@ + + +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT) +ISQL= $(OBJS)/firebird/bin/isql$(EXEC_EXT) +MUISQL= $(OBJS)/firebird/bin/muisql$(EXEC_EXT) +GPRE_FLAGS= -r -m -z -n +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + +ISQL_OBJECTS= extract.o isql.o show.o +ISQL_LINK_OBJS= $(ISQL_OBJECTS) +JRD_LINK= +MUISQL_LINK_OBJS= extract.o muisql.o show.o + +# We no longer have all the code needed to compile muisql. We are missing +# a number of the functions like "qa_mu_environment()" +#all: isql$(EXEC_EXT) muisql$(EXEC_EXT) +all: isql$(EXEC_EXT) + +isql: isqllib.a $(ISQL_OBJECTS) $(GDSSHR) + -$(RM) isql + $(CXX) $(LINK_OPTS) $(ISQL_LINK_OBJS) -o isql $(GDSSHR_LINK) -lm + $(CHMOD_7) isql + $(MV) isql $(ISQL) + $(TOUCH) isql + $(CHMOD_6) isql + +muisql: isql muisql.o + -$(RM) muisql + -$(CXX) $(LINK_OPTS) $(MUISQL_LINK_OBJS) -o muisql $(GDSSHR_LINK) -lm $(MUISQL_MU_LIB) + -$(CHMOD_7) muisql + -$(MV) muisql $(MUISQL) + -$(TOUCH) muisql + -$(CHMOD_6) muisql + +isql.exe: isqllib.lib $(ISQL_OBJECTS) + -$(RM) isql.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)isql $(ISQL_LINK_OBJS) $(GDSSHR_LINK) + $(MV) isql.exe $(ISQL) + $(RM) isql.exe + $(TOUCH) isql.exe + +muisql.exe: # Not currently supported on NT + $(TOUCH) muisql.exe + +isqllib.a: $(ISQL_OBJECTS) $(SCO_OBJS_ISQLLIB) + -$(RM) isqllib.a + $(AR) isqllib.a $(ISQL_OBJECTS) $(SCO_OBJS_ISQLLIB) + -ranlib isqllib.a + $(CHMOD_6) isqllib.a + +libisqllib.a: isqllib.a + -$(RM) libisqllib.a + $(CP) isqllib.a $(OBJS)/firebird/lib/isqllib.a + $(TOUCH) libisqllib.a + $(CHMOD_6) libisqllib.a + +isqllib.lib: $(ISQL_OBJECTS) + -$(RM) isqllib.lib + $(IMPLIB) -out:isqllib.lib $(ISQL_OBJECTS) + $(TOUCH) isqllib.lib + +debug: $(ISQL_OBJECTS) $(GDSLIB) + $(CXX) $(LINK_OPTS) -g $(ISQL_OBJECTS) -o isql_dbg $(GDSLIB_LINK) -lm + +debug_nt: $(ISQL_OBJECTS) + $(CXX) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)isql_dbg $(ISQL_OBJECTS) $(GDSLIB_LINK) + +extract.cpp: yachts.lnk extract.epp +extract.o: extract.cpp isql.h \ + extra_proto.h isql_proto.h show_proto.h \ + source/jrd/constants.h +isql.h: source/jrd/flags.h +# $(TOUCH) isql.h +isql.cpp: yachts.lnk isql.epp +isql.o: isql.cpp isql.h \ + extra_proto.h isql_proto.h show_proto.h \ + source/jrd/license.h source/jrd/perf.h source/jrd/constants.h \ + source/jrd/gds_proto.h +show.cpp: yachts.lnk show.epp +show.o: show.cpp isql.h \ + isql_proto.h show_proto.h \ + source/jrd/constants.h source/jrd/intl.h \ + source/jrd/license.h \ + source/jrd/gds_proto.h +muisql.cpp: isql.cpp + -$(RM) muisql.cpp + $(CP) $< muisql.cpp +muisql.o: muisql.cpp + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DMU_ISQL $< -o muisql.o + +yachts.lnk: $(OBJS)/dbs/empty.gdb.dummy + ln -sf $(OBJS)/dbs/empty.gdb yachts.lnk + +$(OBJS)/dbs/empty.gdb.dummy: force + $(CD) $(OBJS)/dbs && $(MAKE) empty.gdb.dummy + +$(GDSSHR) $(GDSLIB) $(JRD_LINK): force + $(CD) $(OBJS)/jrd && $(MAKE) ALT_O="alt.o.ps1" ALT_BIN="alt.bin.ps1" SECURITY_MISC="" SECURITY_P_MISC="" $(@F) + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - isql" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/isql/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + + +force: diff --git a/src/makefiles/sfx.journal b/src/makefiles/sfx.journal new file mode 100644 index 0000000000..9775bd496e --- /dev/null +++ b/src/makefiles/sfx.journal @@ -0,0 +1,171 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +GPRE= source/interbase/bin/gpre$(EXEC_EXT) +GPRE_FLAGS= -r -m -z -n +GJRN= source/interbase/bin/gjrn$(EXEC_EXT) +GDS_ARCHIVE= source/interbase/bin/gds_archive$(EXEC_EXT) +GDEF= source/interbase/bin/gdef$(EXEC_EXT) + +IBERR_LINK= source/jrd/iberr.o +ISC_LINK= source/jrd/isc.o +ISC_FILE_LINK= source/jrd/isc_file.o +ISC_SYNC_LINK= source/jrd/isc_sync.o +MISC_LINK= source/jrd/misc.o +WALF_LINK= source/wal/walf.o +WALR_LINK= source/wal/walr.o +LLIO_LINK= source/jrd/llio.o +JRN_LINK= source/jrd/jrn.o + +JRD_OBJECTS= $(IBERR_LINK) $(ISC_LINK) $(ISC_FILE_LINK) $(ISC_SYNC_LINK) \ + $(MISC_LINK) +WAL_OBJECTS= $(WALF_LINK) $(WALR_LINK) $(LLIO_LINK) + +GJRN_OBJECTS= gjrn.o console.o misc.o oldr.o rebuild.o server.o + +all: gjrn$(EXEC_EXT) gds_archive$(EXEC_EXT) + +gjrn: $(GJRN_OBJECTS) $(JRD_OBJECTS) $(WAL_OBJECTS) $(GDSSHR) + -$(RM) gjrn + $(CC) $(LINK_OPTS) $(GJRN_OBJECTS) \ + $(T_SWITCH) $(IBERR_LINK) \ + $(T_SWITCH) $(MISC_LINK) \ + $(T_SWITCH) $(WALF_LINK) \ + $(T_SWITCH) $(WALR_LINK) \ + $(T_SWITCH) $(LLIO_LINK) \ + $(T_SWITCH) $(ISC_LINK) \ + $(T_SWITCH) $(ISC_FILE_LINK) \ + $(T_SWITCH) $(ISC_SYNC_LINK) \ + -o gjrn $(GDSSHR_LINK) $(SO_NETWORK_LIB) $(SO_SOCKET_LIB) + $(CHMOD_7) gjrn + $(MV) gjrn $(GJRN) + $(TOUCH) gjrn + $(CHMOD_6) gjrn + +gjrn.exe: $(GJRN_OBJECTS) $(JRD_OBJECTS) $(WAL_OBJECTS) + -$(RM) gjrn.exe journal.rsp + $(ECHO) $(GJRN_OBJECTS) $(JRD_OBJECTS) $(WAL_OBJECTS) > journal.rsp + $(CC) $(LINK_OPTS) $(O_EXE_SWITCH)gjrn \ + @journal.rsp $(GDSSHR_LINK) $(ADVAPILIB) $(MPRLIB) + $(MV) gjrn.exe $(GJRN) + $(RM) gjrn.exe journal.rsp + $(TOUCH) gjrn.exe + +gds_archive: archive.o $(IBERR_LINK) $(LLIO_LINK) $(JRN_LINK) $(GDSSHR) + -$(RM) gds_archive + $(CC) $(LINK_OPTS) archive.o \ + $(T_SWITCH) $(IBERR_LINK) \ + $(T_SWITCH) $(JRN_LINK) \ + $(T_SWITCH) $(LLIO_LINK) \ + -o gds_archive $(GDSSHR_LINK) $(SO_NETWORK_LIB) $(SO_SOCKET_LIB) + $(CHMOD_7) gds_archive + $(MV) gds_archive $(GDS_ARCHIVE) + $(TOUCH) gds_archive + $(CHMOD_6) gds_archive + +gds_archive.exe: archive.o $(IBERR_LINK) $(LLIO_LINK) $(JRN_LINK) + -$(RM) gds_archive.exe + $(CC) $(LINK_OPTS) $(O_EXE_SWITCH)gds_archive \ + archive.o $(IBERR_LINK) $(LLIO_LINK) $(JRN_LINK) $(GDSSHR_LINK) + $(MV) gds_archive.exe $(GDS_ARCHIVE) + $(RM) gds_archive.exe + $(TOUCH) gds_archive.exe + +journal.db: $(GDEF) force + $(GDEF) -z -e $(JRNDIR)journal.gdb source/journal.gdl + +debug: $(GJRN_OBJECTS) archive.o $(GDSLIB) + $(CC) $(LINK_OPTS) -g $(GJRN_OBJECTS) -o gjrn_dbg $(GDSLIB_LINK) + $(CC) $(LINK_OPTS) -g archive.o -o archive_dbg $(GDSLIB_LINK) + +debug_nt: $(GJRN_OBJECTS) archive.o + $(CC) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)gjrn_dbg $(GJRN_OBJECTS) $(GDSLIB_LINK) + $(CC) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)archive_dbg archive.o $(GDSLIB_LINK) + +force: + $(ECHO) force + +archive.o: archive.c source/wal/wal.h source/jrd/jrn.h source/jrd/llio.h +console.o: console.c journal.h \ + conso_proto.h gjrn_proto.h misc_proto.h \ + source/jrd/jrd.h source/jrd/jrn.h source/jrd/isc_f_proto.h +gjrn.o: gjrn.c journal.h \ + conso_proto.h gjrn_proto.h misc_proto.h \ + rebui_proto.h serve_proto.h \ + source/jrd/license.h source/jrd/gds_proto.h +misc.o: misc.c journal.h \ + gjrn_proto.h misc_proto.h \ + source/jrd/ods.h source/jrd/license.h \ + source/jrd/jrn.h source/jrd/gds_proto.h +oldr.o: oldr.c \ + misc_proto.h oldr_proto.h \ + source/jrd/old.h source/jrd/llio.h \ + source/jrd/llio_proto.h +rebuild.c: rebuild.e +rebuild.o: rebuild.c journal.h \ + conso_proto.h gjrn_proto.h misc_proto.h oldr_proto.h \ + rebui_proto.h \ + source/jrd/ods.h source/jrd/old.h \ + source/jrd/jrn.h source/jrd/thd.h source/jrd/pio.h \ + source/jrd/dsc.h source/jrd/btr.h \ + source/wal/wal.h source/jrd/btr.h source/jrd/license.h \ + source/jrd/gds_proto.h source/jrd/isc_f_proto.h \ + source/jrd/llio_proto.h source/wal/walr_proto.h +server.c: server.e +server.o: server.c journal.h \ + conso_proto.h gjrn_proto.h misc_proto.h serve_proto.h \ + source/jrd/jrn.h source/jrd/license.h \ + source/jrd/thd.h source/jrd/isc.h source/jrd/llio.h \ + source/jrd/pio.h \ + source/jrd/gds_proto.h source/jrd/isc_proto.h \ + source/jrd/isc_f_proto.h source/jrd/llio_proto.h \ + source/wal/wal.h source/wal/walf_proto.h + +$(GDSSHR) $(GDSLIB) $(JRD_OBJECTS): + $(SH) '$(CD) source/jrd; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' +$(WAL_OBJECTS): + $(SH) '$(CD) source/wal; $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F)' + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - journal" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/journal/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.jrd b/src/makefiles/sfx.jrd new file mode 100644 index 0000000000..2a8874f4ae --- /dev/null +++ b/src/makefiles/sfx.jrd @@ -0,0 +1,1531 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# $Id: sfx.jrd,v 1.1 2001-07-12 06:32:04 bellardo Exp $ +# +@SET_MAKE@ +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/jrd +VPATH= $(SOURCE)/jrd +CXX= @CXX@ + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_BOOT) $(GPRE_FLAGS) $< $@ + + +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT) +GBAK_STATIC= $(OBJS)/firebird/bin/gbak_static$(EXEC_EXT) +GPRE_FLAGS= -n -z -gds_cxx -raw -ids +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- +FOOT= $(OBJS)/firebird/bin/gds_pipe +HEAD_LIB= $(OBJS)/firebird/lib/gds.a +FOOT_LIB= $(OBJS)/firebird/lib/gds_pipe.a + +ALT_O= alt.o +ALT_BIN= alt.bin + +ALICE_MISC= $(OBJS)/alice/alice.o $(OBJS)/alice/all.o $(OBJS)/alice/exe.o \ + $(OBJS)/alice/met.o $(OBJS)/alice/tdr.o + +BURP_MISC= $(OBJS)/burp/burp.o $(OBJS)/burp/backup.o $(OBJS)/burp/restore.o \ + $(OBJS)/burp/mvol.o $(OBJS)/burp/misc.o $(OBJS)/burp/canonical.o + +CSI_FILES= $(OBJS)/csv/csi.o $(OBJS)/csv/css.o +CSI_MISC= $(CSI_CSERV) + +CSI_P_FILES= $(OBJS)/csv/csi.bin $(OBJS)/csv/css.bin +CSI_P_MISC= $(CSI_P_CSERV) + +DIVORCE_MISC= $(OBJS)/lock/divorce.o $(OBJS)/wal/divorce.o \ + $(OBJS)/remote/divorce.o + +DSQL_HEAD_MISC= $(OBJS)/dsql/array.o $(OBJS)/dsql/blob.o \ + $(OBJS)/dsql/preparse.o \ + $(OBJS)/dsql/user_dsql.o $(OBJS)/dsql/utld.o + +DSQL_J_HEAD_MISC= source/dsql/array.j source/dsql/blob.j \ + source/dsql/preparse.j \ + source/dsql/user_dsql.j source/dsql/utld.j + +DSQL_MISC= $(OBJS)/dsql/alld.o $(OBJS)/dsql/array.o \ + $(OBJS)/dsql/blob.o \ + $(OBJS)/dsql/ddl.o $(OBJS)/dsql/dsql.o \ + $(OBJS)/dsql/errd.o $(OBJS)/dsql/gen.o \ + $(OBJS)/dsql/hsh.o $(OBJS)/dsql/make.o \ + $(OBJS)/dsql/metd.o $(OBJS)/dsql/movd.o \ + $(OBJS)/dsql/parse.o $(OBJS)/dsql/pass1.o \ + $(OBJS)/dsql/preparse.o $(OBJS)/dsql/user_dsql.o \ + $(OBJS)/dsql/utld.o + +DSQL_P_MISC= $(OBJS)/dsql/alld.bin $(OBJS)/dsql/array.bin \ + $(OBJS)/dsql/blob.bin \ + $(OBJS)/dsql/ddl.bin $(OBJS)/dsql/dsql.bin \ + $(OBJS)/dsql/errd.bin $(OBJS)/dsql/gen.bin \ + $(OBJS)/dsql/hsh.bin $(OBJS)/dsql/make.bin \ + $(OBJS)/dsql/metd.bin $(OBJS)/dsql/movd.bin \ + $(OBJS)/dsql/parse.bin $(OBJS)/dsql/pass1.bin \ + $(OBJS)/dsql/preparse.bin $(OBJS)/dsql/user_dsql.bin \ + $(OBJS)/dsql/utld.bin + +GSTAT_MISC= $(OBJS)/utilities/dba.o $(OBJS)/utilities/ppg.o + +GSEC_MISC= $(OBJS)/utilities/gsec.o + +UTIL_MISC= $(OBJS)/utilities/cmd_util.o + +LOCK_MISC_DUM= lck_dummy.o +LOCK_MISC_REAL= $(OBJS)/lock/lock.o +LOCK_P_MISC_DUM= lck_dummy.bin +LOCK_P_MISC_REAL= $(OBJS)/lock/lock.bin +LOCK_MISC= $(LOCK_MISC_DUM) +LOCK_MISC= $(LOCK_MISC_REAL) +LOCK_P_MISC= $(LOCK_P_MISC_DUM) +LOCK_P_MISC= $(LOCK_P_MISC_REAL) + +# This list of INTL_OBJECTS must match that in sfx.intl +INTL_OBJECTS= $(OBJS)/intl/ld.o $(OBJS)/intl/cv_narrow.o \ + $(OBJS)/intl/cs_narrow.o $(OBJS)/intl/lc_ascii.o \ + $(OBJS)/intl/lc_narrow.o \ + $(OBJS)/intl/lc_latin1.o $(OBJS)/intl/lc_dos.o \ + $(OBJS)/intl/cs_unicode.o $(OBJS)/intl/lc_unicode.o \ + $(OBJS)/intl/cs_utffss.o \ + $(OBJS)/intl/cs_jis.o $(OBJS)/intl/cv_jis.o \ + $(OBJS)/intl/lc_jis.o \ + $(OBJS)/intl/ld2.o + +INTL_P_OBJECTS= $(OBJS)/intl/ld.bin $(OBJS)/intl/cv_narrow.bin \ + $(OBJS)/intl/cs_narrow.bin $(OBJS)/intl/lc_ascii.bin \ + $(OBJS)/intl/lc_narrow.bin \ + $(OBJS)/intl/lc_latin1.bin $(OBJS)/intl/lc_dos.bin \ + $(OBJS)/intl/cs_unicode.bin $(OBJS)/intl/lc_unicode.bin \ + $(OBJS)/intl/cs_utffss.bin \ + $(OBJS)/intl/cs_jis.bin $(OBJS)/intl/cv_jis.bin \ + $(OBJS)/intl/lc_jis.bin \ + $(OBJS)/intl/ld2.bin + +MERGE_MISC= $(OBJS)/remote/merge.o +MERGE_J_MISC= source/remote/merge.j + +PYXDIR= source/pyxis/ +PYXIS_MISC= $(OBJS)/pyxis/allp.o $(OBJS)/pyxis/altp.o \ + $(OBJS)/pyxis/scr.o $(OBJS)/pyxis/debug.o \ + $(OBJS)/pyxis/edit.o $(OBJS)/pyxis/menu.o \ + $(OBJS)/pyxis/movp.o $(OBJS)/pyxis/phase2.o \ + $(OBJS)/pyxis/phase3.o $(OBJS)/pyxis/picstr.o \ + $(OBJS)/pyxis/pyxis.o $(OBJS)/pyxis/save.o \ + $(PYXIS_MISC_OBJECTS) + +PYXIS_P_MISC= $(OBJS)/pyxis/allp.bin $(OBJS)/pyxis/altp.bin \ + $(OBJS)/pyxis/cdm.bin $(OBJS)/pyxis/debug.bin \ + $(OBJS)/pyxis/edit.bin $(OBJS)/pyxis/menu.bin \ + $(OBJS)/pyxis/movp.bin $(OBJS)/pyxis/phase2.bin \ + $(OBJS)/pyxis/phase3.bin $(OBJS)/pyxis/picstr.bin \ + $(OBJS)/pyxis/pyxis.bin $(OBJS)/pyxis/save.bin \ + $(OBJS)/pyxis/scr.bin $(OBJS)/pyxis/vt100.bin + +REGISTER_MISC= +REGISTER_P_MISC= + +REMDIR= source/remote/ +REMOTE_MISC= $(OBJS)/remote/interface.o $(OBJS)/remote/allr.o \ + $(OBJS)/remote/inet.o $(OBJS)/./remote/merge.o \ + $(OBJS)/remote/parser.o $(OBJS)/remote/protocol.o \ + $(OBJS)/remote/remote.o $(NET_OBJECTS) + +REMOTE_P_MISC= $(OBJS)/remote/interface.bin $(OBJS)/remote/allr.bin \ + $(OBJS)/remote/inet.bin $(OBJS)/remote/merge.bin \ + $(OBJS)/remote/parser.bin $(OBJS)/remote/protocol.bin \ + $(OBJS)/remote/remote.bin $(NET_P_OBJECTS) + +SECURITY_MISC= $(OBJS)/utilities/security.o + +SECURITY_P_MISC= $(OBJS)/utilities/security.bin + +WAL_MISC= $(OBJS)/wal/wal.o $(OBJS)/wal/walc.o $(OBJS)/wal/walf.o \ + $(OBJS)/wal/walr.o $(OBJS)/wal/walw.o + +WAL_P_MISC= $(OBJS)/wal/wal.bin $(OBJS)/wal/walc.bin $(OBJS)/wal/walf.bin \ + $(OBJS)/wal/walr.bin $(OBJS)/wal/walw.bin + +# The first three lines of JRD_HEADERS must be the includes in $(EVERYTHING_H_DEP) everything.h +JRD_HEADERS= $(JRD_H) cch.h all.h pio.h lck.h pag.h $(VAL_H) $(EXE_H) req.h \ + lls.h $(RSE_H) sbm.h tra.h sqz.h blb.h btr.h jrn.h scl.h \ + ext.h $(MET_H) sdw.h log.h $(INTL_H) intlobj.h fil.h tpc.h \ + blk.h $(INI_H) trig.h idx.h svc.h + +# Note: cvt.o may not be needed - anything else? +JRD_MISC= $(ALT_O) gds.o isc.o isc_file.o isc_ipc.o isc_sync.o \ + perf.o cvt.o $(JRD_MISC_OBJECTS) + +JRD_J_MISC= alt.j gds.j isc.j isc_file.j isc_ipc.j isc_sync.j \ + perf.j $(JRD_J_MISC_OBJECTS) + +WHY_O= why.o +WHYBK_O= whybk.o + +# I removed qatest.o from the targets to close an ugly +# security hole. +# FSG 18.Dez.2000 + +DEBUG_P_OBJECTS= $(DEBUG_OBJECTS:%.o=%.bin) + +JRD_OBJECTS= ail.o $(ALT_O) all.o bookmark.o blb.o blob_filter.o btr.o builtin.o \ + cch.o cmp.o cvt.o cvt2.o \ + dfw.o divorce.o dls.o dpm.o dsc.o dyn.o dyn_def.o dyn_del.o \ + dyn_mod.o dyn_util.o enc.o err.o iberr.o \ + event.o evl.o exe.o ext.o filters.o flu.o fun.o functions.o \ + gds.o grant.o idx.o inf.o ini.o intl.o inuse.o \ + isc.o isc_file.o isc_ipc.o isc_sync.o \ + jrd.o jrn.o lck.o llio.o log.o met.o \ + misc.o mov.o nav.o old.o opt.o pag.o par.o pcmet.o \ + perf.o pwd.o rec.o rlck.o \ + rng.o rse.o sbm.o sch.o scl.o \ + sdl.o sdw.o shut.o sort.o sqz.o status.o svc.o sym.o thd.o tpc.o \ + tra.o utl.o val.o vio.o \ + $(JRD_MISC_OBJECTS) $(IO_OBJECTS) $(DEBUG_OBJECTS) + +JRD_P_OBJECTS= ail.bin $(ALT_BIN) all.bin bookmark.bin blb.bin blob_filter.bin btr.bin \ + builtin.bin \ + cch.bin cmp.bin cvt.bin cvt2.bin dfw.bin divorce.bin dls.bin \ + dpm.bin dsc.bin dyn.bin dyn_def.bin dyn_del.bin \ + dyn_mod.bin dyn_util.bin enc.bin err.bin iberr.bin event.bin evl.bin \ + exe.bin ext.bin filters.bin fun.bin gds.bin \ + grant.bin idx.bin inf.bin ini.bin intl.bin inuse.bin \ + isc.bin isc_file.bin isc_ipc.bin isc_sync.bin \ + jrd.bin jrn.bin lck.bin \ + llio.bin log.bin met.bin misc.bin mov.bin nav.bin \ + old.bin opt.bin pag.bin par.bin pcmet.bin perf.bin \ + pwd.bin rec.bin rlck.bin \ + rng.bin rse.bin sbm.bin sch.bin \ + scl.bin sdl.bin sdw.bin shut.bin sort.bin sqz.bin status.bin svc.bin \ + sym.bin thd.bin tpc.bin tra.bin utl.bin val.bin vio.bin \ + why.bin $(JRD_P_MISC_OBJECTS) $(IO_P_OBJECTS) $(DEBUG_P_OBJECTS) + +JRD_CLIENT_P_OBJECTS= $(ALT_BIN) cvt.bin dsc.bin dls.bin enc.bin gds.bin \ + isc.bin isc_file.bin isc_ipc.bin isc_sync.bin \ + perf.bin sch.bin sdl.bin thd.bin utl.bin \ + why.bin $(JRD_P_MISC_OBJECTS) + +OTHER_OBJECTS= $(DSQL_MISC) $(LOCK_MISC) $(PYXIS_MISC_OBJS) \ + $(REMOTE_MISC) $(CSI_MISC) $(BACKEND_BRIDGE_MISC) \ + $(INTL_MISC) $(WAL_MISC) $(SECURITY_MISC) \ + $(REGISTER_MISC) + +# The infamous codes files +CODES_FILES= $(OBJS)/firebird/include/gds_codes.pas \ + $(OBJS)/firebird/include/gds_codes.ftn \ + $(OBJS)/firebird/include/codes.h \ + $(OBJS)/firebird/include/iberror.h \ + $(OBJS)/firebird/include/codetext.h \ + $(OBJS)/firebird/include/msgs.h \ + $(OBJS)/firebird/include/rdb_codes.h \ + $(OBJS)/firebird/include/sql_code.h \ + $(OBJS)/firebird/include/msg_facs.h + +# Temporarily removing $(BACKEND_BRIDGE_MISC) from SUPER_OBJECTS +# Also, whatever SUPER_OBJECTS includes should be forced to build under +# the 'super_server_objects' target. Currently DSQL, LOCK, REMOTE, +# WAL are included. INTL is not needed. +SUPER_OBJECTS= $(DSQL_MISC) $(LOCK_MISC) \ + $(REMOTE_MISC) $(REGISTER_MISC) \ + $(INTL_MISC) $(WAL_MISC) $(ALICE_MISC) $(BURP_MISC) \ + $(SECURITY_MISC) $(GSTAT_MISC) $(GSEC_MISC) $(UTIL_MISC) \ + $(STDIO) + +HEAD_OBJECTS= $(OBJS)/pipe/head.o $(OBJS)/pipe/head5.o $(OBJS)/pipe/allp.o \ + whyp.o utlp.o dls.o enc.o \ + $(JRD_MISC) $(JRD_HEAD_MISC) $(DSQL_HEAD_MISC) \ + $(PYXIS_MISC_OBJS) $(MERGE_MISC) $(SECURITY_MISC) + +HEAD_J_OBJECTS= head.j head5.j allp.j whyp.j utlp.j \ + $(JRD_J_MISC) $(JRD_J_HEAD_MISC) $(DSQL_J_HEAD_MISC) \ + $(MERGE_J_MISC) + +BRIDGE_P_MISC= $(OBJS)/pipe/head5.bin $(OBJS)/pipe/allp.bin + +FOOT_OBJECTS= $(FOOT_OBJECT) $(ALLP_OBJECT) +ALLP_OBJECT= $(OBJS)/pipe/allp.o +FOOT_OBJECT= $(OBJS)/pipe/foot.o + +BOOT_OBJECTS= $(OBJS)/pipe/head.o $(OBJS)/pipe/allp.o whyp.o utlp.o \ + $(JRD_MISC) $(MERGE_MISC) + +# All objects necessary to have a minimal (but functional) engine statically +# linked an executable. Used to create gbak_static and gpre_static, amoung +# other things. +ENGINE_STATIC_OBJS= \ + $(JRD_OBJECTS) $(CSI_MISC) $(DSQL_MISC) \ + $(LOCK_MISC) $(REMOTE_MISC) $(BRIDGE_MISC) \ + $(INTL_MISC) $(REGISTER_MISC) $(WAL_MISC) \ + $(GDSFLIB) $(WHY_O) + + +all: gds.h $(GDSSHR) $(PIPE) + +jrd/jrd_static.a jrd_static.a: $(ENGINE_STATIC_OBJS) + ar -r jrd_static.a $(ENGINE_STATIC_OBJS) + -ranlib jrd_static.a + +gds_b.a source/./interbase/lib/gds_b.a $(GDSLIB_BACKEND): \ + $(WHYBK_O) $(JRD_OBJECTS) $(OTHER_OBJECTS) + -$(RM) gds_b.a + $(AR) gds_b.a $(WHYBK_O) $(JRD_OBJECTS) $(OTHER_OBJECTS) + -ranlib gds_b.a + $(CHMOD_6) gds_b.a + +gds_ss.a source/./interbase/lib/gds_ss.a $(SUPER_BACKEND): \ + gds.h $(WHYBK_O) $(JRD_OBJECTS) super_server_objects $(SUPER_OBJECTS) + -$(RM) gds_ss.a + $(AR) gds_ss.a $(WHYBK_O) $(JRD_OBJECTS) $(SUPER_OBJECTS) + -ranlib gds_ss.a + $(CHMOD_6) gds_ss.a + +gds_b.lib: $(WHYBK_O) $(JRD_OBJECTS) + -$(RM) gds_b.lib + $(IMPLIB) -out:gds_b.lib $(WHYBK_O) $(JRD_OBJECTS) + $(IMPLIB) -out:gds_b.lib gds_b.lib $(OTHER_OBJECTS) + $(TOUCH) gds_b.lib + +gdsshr.a $(AIX_GDSSHR) $(AIX_PPC_GDSSHR): gds_b.a gds.bind + ld -bE:gds.bind -bM:SRE -H1024 $(GDSLIB_LINK) $(SCREEN_LIB) -lc -o gdsshr.o + strip -t gdsshr.o + -$(RM) gdsshr.a + $(AR) gdsshr.a gdsshr.o + -ranlib gdsshr.a + $(CHMOD_6) gdsshr.a + $(MV) gdsshr.a $(GDSSHR) + -$(RM) gdsshr.o + $(TOUCH) gdsshr.a + $(CHMOD_6) gdsshr.a + +gdslib $(AP_GDSSHR) $(AX_GDSSHR): gds_b.a bind_gdslib nodebug.o + -$(RM) gdslib + /com/bind v4.0 customers +# to recompile and relink. +# In v4.0 we add a "gds.so.0" library which is really a pipe +# client library. This is so existing 3.3 customers are +# isolated from Solaris problems involving threads & signals. +gds.so.solaris $(SOL_GDSSHR): gdsmt.so.0 gdspipe.so.0 + +gdsmt.so.0: \ + $(JRD_P_OBJECTS) flu.bin $(CSI_P_MISC) $(DSQL_P_MISC) \ + $(LOCK_P_MISC) $(REGISTER_P_MISC) \ + $(REMOTE_P_MISC) $(SECURITY_P_MISC) $(BRIDGE_P_MISC) \ + $(INTL_P_MISC) $(WAL_P_MISC) \ + $(FUNCTIONS) $(GDSFLIB) + -$(RM) gdsmt.so.0 + ld $(LD_OPTS) libgdsmt.so.0 $(ZDEFS) $(JRD_P_OBJECTS) flu.bin \ + $(CSI_P_MISC) $(DSQL_P_MISC) $(LOCK_P_MISC) \ + $(REGISTER_P_MISC) \ + $(REMOTE_P_MISC) $(SECURITY_P_MISC) $(BRIDGE_P_MISC) \ + $(INTL_P_MISC) $(WAL_P_MISC) $(FUNCTIONS) \ + $(GDSF_LIB) $(LD_LIBS) -o gdsmt.so.0 + $(CHMOD_6) gdsmt.so.0 + $(MV) gdsmt.so.0 $(GDSSHR) + $(TOUCH) gdsmt.so.0 + $(CHMOD_6) gdsmt.so.0 + +gdsf.so $(DG_FUNCSHR) $(DG_X86_FUNCSHR): functions.bin + -$(RM) gdsf.so + ld -G functions.bin -o gdsf.so + $(CHMOD_6) gdsf.so + $(MV) gdsf.so $(FUNCSHR) + $(TOUCH) gdsf.so + $(CHMOD_6) gdsf.so + +gdsshr_ss.dll: $(WIN_NT_SS_GDSSHR) + $(TOUCH) gdsshr_ss.dll + +gdsshr.dll: $(WIN_NT_GDSSHR) + $(TOUCH) gdsshr.dll + +gds32_nt_ms.dll: $(WHY_O) $(JRD_OBJECTS) gdsalias.o + -$(RM) gds32.dll gds32.lib + $(IMPLIB) -out:gds_temp.lib $(WHY_O) $(JRD_OBJECTS) + $(IMPLIB) -out:gds_temp.lib gds_temp.lib $(DSQL_MISC) $(LOCK_MISC) $(REMOTE_MISC) $(WAL_MISC) \ + $(SECURITY_MISC) + $(IMPLIB) -out:gds32.lib -def:gds.bind gds_temp.lib + $(LINK) $(LD_OPTS) -out:gds32.dll -dll -entry:_CRT_INIT$(DLLENTRY) gds_temp.lib gds32.exp $(CONLIBSDLL) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) + $(RM) gds_temp.lib + $(RM) gds32.exp + $(MV) gds32.lib gds32_ms.lib + $(RM) gds32.lib + implib gds32.lib gds32.dll + tlib gds32.lib +- gdsalias.o + $(MV) gds32.lib source\interbase\lib + $(MV) gds32_ms.lib source\interbase\lib + $(MV) gds32.dll source/interbase/bin + $(RM) gds32.dll gds32.lib gds32_ms.lib + $(TOUCH) gds32_nt_ms.dll + +gds32_nt_ms_ss.dll: $(WHY_O) $(JRD_OBJECTS) gdsalias.o + -$(RM) gds32_ss.dll gds32_ss.lib gds32mss.lib + $(IMPLIB) -out:gds_temp_ss.lib $(WHY_O) $(JRD_OBJECTS) + $(IMPLIB) -out:gds_temp_ss.lib gds_temp_ss.lib $(DSQL_MISC) $(LOCK_MISC) $(REMOTE_MISC) $(WAL_MISC) \ + $(SECURITY_MISC) + $(IMPLIB) -out:gds32_ss.lib -def:gds.bind gds_temp_ss.lib + $(LINK) $(LD_OPTS) -out:gds32_ss.dll -dll -entry:_CRT_INIT$(DLLENTRY) gds_temp_ss.lib gds32_ss.exp $(CONLIBSDLL) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) + $(RM) gds_temp_ss.lib + $(RM) gds32_ss.exp + $(MV) gds32_ss.lib gds32mss.lib + $(RM) gds32_ss.lib + implib gds32_ss.lib gds32_ss.dll + tlib gds32_ss.lib +- gdsalias.o + $(MV) gds32_ss.dll source/interbase/bin + $(RM) gds32.dll + $(TOUCH) gds32_nt_ms_ss.dll + +gdsalias.o: gdsalias.asm + tasm32 gdsalias.asm + +gds32_nt_bc4.dll: $(WHY_O) $(JRD_OBJECTS) + -$(RM) gds32.dll gds32.lib tmp.bind + sed -e 's/DATA READ WRITE/DATA MULTIPLE/' -e 's/LIBRARY gds32/LIBRARY gds32 INITINSTANCE/' gds.bind > tmp.bind + $(LINK) -Tpd -ap -c $(LD_OPTS) -w-inq -x /Lc:\bc4\lib c0d32 @gds.rsp,gds32.dll,,import32 cw32mt,tmp.bind + implib gds32.lib gds32.dll + $(MV) gds32.lib source\interbase\lib + $(MV) gds32.dll source/interbase/bin + $(RM) gds32.dll gds32.lib tmp.bind + $(TOUCH) gds32_nt_bc4.dll + +gds32_os2_bc4.dll: $(WHY_O) $(JRD_OBJECTS) + -$(RM) gds32.dll gds32.lib tmp.bind + sed -e 's/DATA READ WRITE/DATA MULTIPLE NONSHARED/' -e 's/LIBRARY gds32/LIBRARY gds32 INITINSTANCE/' -e 's/\ \ \ \ /\ \ \ \ _/' gds.bind > tmp.bind + $(LINK) -Tod -ap -c $(LD_OPTS) -x /Lc:\bcos2\lib;c:\tcpip\lib c02d @gds.rsp,gds32.dll,,os2 c2mt so32dll tcp32dll,tmp.bind + implib gds32.lib gds32.dll + $(MV) gds32.lib ..\interbase\lib + $(MV) gds32.dll ..\interbase\bin + $(RM) gds32.dll gds32.lib tmp.bind + $(TOUCH) gds32_os2_bc4.dll + +gds32_os2_ibm.dll: $(WHY_O) $(JRD_OBJECTS) + -$(RM) gds32.dll gds32.lib bind.tmp + sed -e 's/DATA READ WRITE/DATA MULTIPLE NONSHARED/' -e 's/LIBRARY gds32/LIBRARY gds32 INITINSTANCE/' gds.bind > bind.tmp + $(LINK) $(LD_OPTS) @gds.rsp,gds32.dll,,so32dll tcp32dll,bind.tmp + c:\toolkt21\os2bin\implib gds32.lib gds32.dll + $(MV) gds32.lib ..\interbase\lib + $(MV) gds32.dll ..\interbase\bin + $(RM) gds32.dll gds32.lib bind.tmp + $(TOUCH) gds32_os2_ibm.dll + +event_print: print.o $(GDSLIB_BACKEND) + $(CC) $(LINK_OPTS) -g print.o -o event_print $(GDSLIB_LINK) + +event_print.exe: print.o + $(CC) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)event_print print.o $(GDSLIB_LINK) + +gds.a: $(HEAD_OBJECTS) $(NOLINK_MACHINES) + -$(RM) gds.a + $(AR) gds.a $(HEAD_OBJECTS) + -ranlib gds.a + $(CHMOD_6) gds.a + $(MV) gds.a $(HEAD_LIB) + $(TOUCH) gds.a + $(CHMOD_6) gds.a + +# Solaris specific shared library that invokes a pipe-server interface +# to isolate clients that might use signals from threads. +# Note that its internal library name is libgds.so for compatibility +# with existing applications. +gdspipe.so.0: $(HEAD_J_OBJECTS) + -$(RM) gdspipe.so.0 + -$(RM) gds.so.0 + ld $(LD_OPTS) libgds.so.0 $(HEAD_J_OBJECTS) $(LD_LIBS_J) \ + -o gds.so.0 + $(CHMOD_6) gds.so.0 + $(MV) gds.so.0 $(PIPE_GDSSHR) + $(TOUCH) gdspipe.so.0 + $(CHMOD_6) gdspipe.so.0 + +# The Solaris version of gds.a uses the .j objects as they have +# been compiled in non-Thread mode. The .j objects are PIC code +# which isn't optimal, but will function fine. +gds.a.solaris: $(HEAD_J_OBJECTS) + -$(RM) gds.a.solaris + $(AR) gds.a $(HEAD_J_OBJECTS) + -ranlib gds.a + $(CHMOD_6) gds.a + $(MV) gds.a $(HEAD_LIB) + $(TOUCH) gds.a.solaris + $(CHMOD_6) gds.a.solaris + +# JMB MERGE_MISC (merge.o) is already in the shlib with REMOTE_P_OBJECTS. +# allp.bin already in the shared library. ($(ALLP_OBJECT)) +# So don't link in with executable. +gds_pipe: $(FOOT_OBJECTS) $(WHYPS_O) $(GDSSHR) \ + $(GDSLIB_BACKEND) $(NOLINK_MACHINES) + -$(RM) gds_pipe gdsshr_pipe + $(CC) $(LINK_OPTS) $(FOOT_OBJECT) \ + $(T_SWITCH) $(T_SWITCH) \ + $(WHYPS_O) -o gds_pipe $(SERVER_LINK) + $(CHMOD_7) gds_pipe + $(MV) gds_pipe $(FOOT) + $(TOUCH) gds_pipe + $(CHMOD_6) gds_pipe + +bridge.unix: gds_pipe + -$(RM) gds_pipe5 + $(CC) $(LINK_OPTS) $(FOOT_OBJECTS) -o gds_pipe5 $(GDSLIB_LINK) + $(CHMOD_7) gds_pipe5 + +gds_pipe.a: $(FOOT_OBJECTS) $(NOLINK_MACHINES) + -$(RM) gds_pipe.a + $(AR) gds_pipe.a $(FOOT_OBJECTS) + -ranlib gds_pipe.a + $(CHMOD_6) gds_pipe.a + $(MV) gds_pipe.a $(FOOT_LIB) + $(TOUCH) gds_pipe.a + $(CHMOD_6) gds_pipe.a + +gds_boot.a: $(BOOT_OBJECTS) + -$(RM) gds_boot.a + $(AR) gds_boot.a $(BOOT_OBJECTS) + -ranlib gds_boot.a + $(CHMOD_6) gds_boot.a + +includes.msg: $(OBJS)/msgs/indicator.incl + -$(RM) includes.msg + $(TOUCH) includes.msg + $(CHMOD_6) includes.msg + +super_server_objects: force + $(CD) $(OBJS)/dsql && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" dsql_objects + $(CD) $(OBJS)/lock && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" lock + $(CD) $(OBJS)/remote && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" rem_objects + $(CD) $(OBJS)/wail && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" wal_objects + +super_client_objects: $(JRD_CLIENT_P_OBJECTS) + -$(RM) super_client_objects + $(TOUCH) super_client_objects + $(CHMOD_6) super_client_objects + +debug_objects: grammar.o dbg.o dbt.o dmp.o + +nolink_machines: source/pipe/allp.c source/pipe/foot.c source/pipe/head.c + $(CP) $? . + -$(RM) nolink_machines + $(TOUCH) nolink_machines + $(CHMOD_6) nolink_machines + +run_codes: $(CODES_FILES) +# We should be compiling and running codes here, but we will do that +# later!!! +# -$(SH) '$(CMP) $(OBJS)/jrd/iberror.h $(OBJS)/firebird/include/iberror.h; if [ $$? != 0 ]; then $(CP) $(SOURCE)/jrd/iberror.h $(OBJS)/firebird/include/iberror.h; fi' + +$(CODES_FILES): + touch $@ + -$(CP) boot_codes/$(@F) $@ + + +# This target just forces those who depend on it, to execute their actions +force: + +codes: codes.o $(STDIO) + -$(RM) codes + $(CXX) $(LINK_OPTS) $(CXX_INCLUDE_DIRS) -o codes codes.o $(STDIO) $(GDSSHR_LINK) + $(CHMOD_7) codes +codes.exe: codes.o + -$(RM) codes.exe + $(CXX) $(LINK_OPTS) $(CXX_INCLUDE_DIRS) $(O_EXE_SWITCH)codes codes.o $(GDSSHR_LINK) + $(CHMOD_7) codes.exe +blrtable.h: blrtable.cpp $(STDIO) + $(CXX) $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $(LINK_OPTS) blrtable.c $(STDIO) $(LD_LIBS) -o blrtable + -./blrtable > blrtable.h + -$(RM) blrtable +ids.h: ids.m relations.h + $(CP) $(VPATH)/relations.h . + m4 $< > ids.h + +# JRD + +ail.o: ail.cpp $(JRD_H) ods.h jrn.h tra.h pag.h pio.h dsc.h \ + flags.h sdw.h sbm.h lls.h \ + all_proto.h cch_proto.h $(ERR_PROTO_DEP) err_proto.h \ + jrn_proto.h met_proto.h misc_proto.h mov_proto.h pag_proto.h \ + pio_proto.h rec_proto.h sbm_proto.h $(THD_PROTO_H) tra_proto.h \ + $(SOURCE)/wal/wal.h $(SOURCE)/wal/wal_proto.h \ + $(SOURCE)/wal/walc_proto.h $(SOURCE)/wal/walf_proto.h +all.o: all.cpp $(JRD_HEADERS) blk.h all_proto.h $(ERR_PROTO_DEP) err_proto.h \ + gds_proto.h mov_proto.h $(THD_PROTO_H) +alt.o: alt.cpp \ + gds_proto.h utl_proto.h why_proto.h +alt.o.ps1: alt.cpp \ + gds_proto.h utl_proto.h why_proto.h + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DPHASE_1 $< -o $@ +alt.bin.ps1: alt.cpp \ + gds_proto.h utl_proto.h why_proto.h + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DPHASE_1 $< -o $@ + +apollo.o: apollo.cpp $(JRD_H) pio.h cch.h ods.h lck.h $(SOURCE)/lock/plserver.h +bookmark.o: bookmark.cpp $(JRD_H) $(EXE_H) $(RSE_H) \ + all_proto.h bookmark.h $(ERR_PROTO_DEP) err_proto.h evl_proto.h \ + mov_proto.h $(THD_PROTO_H) +blb.o: blb.cpp $(JRD_H) blb.h tra.h $(VAL_H) $(EXE_H) req.h ods.h lls.h \ + blob_filter.h sdl.h ibsetjmp.h $(INTL_H) cch.h constants.h \ + all_proto.h blb_proto.h blf_proto.h cch_proto.h \ + dpm_proto.h $(ERR_PROTO_DEP) err_proto.h evl_proto.h filte_proto.h \ + gds_proto.h jrd_proto.h met_proto.h mov_proto.h \ + pag_proto.h sdl_proto.h +blob_filter.cpp: $(VPATH)/blob_filter.epp + $(EXPAND_DBNAME) $(VPATH)/blob_filter.epp + $(GPRE_BOOT) -lang_internal -n -manual -raw -O $< > $@ + $(COMPRESS_DBNAME) blob_filter.epp +blob_filter.o: blob_filter.cpp $(JRD_H) blob_filter.h constants.h gdsassert.h \ + blf_proto.h filte_proto.h flu_proto.h \ + gds_proto.h inf_proto.h intl_proto.h +btr.o: btr.cpp $(JRD_H) ods.h btr.h $(VAL_H) req.h tra.h $(INTL_H) jrn.h \ + lck.h cch.h sbm.h ibsetjmp.h \ + all_proto.h btr_proto.h $(BTR_PROTO_DEP)$ cch_proto.h dpm_proto.h \ + $(ERR_PROTO_DEP) err_proto.h evl_proto.h intl_proto.h met_proto.h \ + mov_proto.h $(NAV_PROTO_H) pag_proto.h pcmet_proto.h \ + sbm_proto.h sort_proto.h $(THD_PROTO_H) tra_proto.h +builtin.o: builtin.cpp \ + flu_proto.h gds_proto.h +cch.o: cch.cpp $(JRD_H) cch.h que.h lck.h ods.h jrn.h lls.h \ + req.h pio.h sdw.h tra.h isc.h $(THD_H) blk.h \ + dsc.h sbm.h ibsetjmp.h \ + all_proto.h cch_proto.h \ + $(ERR_PROTO_DEP) err_proto.h gds_proto.h isc_proto.h jrd_proto.h \ + $(LCK_PROTO_H) mov_proto.h pag_proto.h pio_proto.h \ + sdw_proto.h shut_proto.h $(THD_PROTO_H) source/wal/wal_proto.h \ + iberr.h iberr_proto.h err_proto.h +cmp.o: cmp.cpp $(JRD_H) req.h $(VAL_H) align.h lls.h $(EXE_H) $(RSE_H) scl.h \ + tra.h all.h lck.h license.h $(INTL_H) relations.h irq.h drq.h\ + rng.h btr.h constants.h \ + all_proto.h $(CMP_PROTO_DEP) cmp_proto.h dsc_proto.h $(ERR_PROTO_DEP) err_proto.h \ + exe_proto.h fun_proto.h gds_proto.h $(IDX_PROTO_H) \ + $(LCK_PROTO_H) opt_proto.h par_proto.h rng_proto.h \ + sbm_proto.h scl_proto.h $(THD_PROTO_H) met_proto.h \ + dsc_proto.h +codes.cpp: codes.epp + $(EXPAND_DBNAME) codes.epp + $(GPRE_BOOT) -lang_internal -n -manual -raw -string codes.epp + $(COMPRESS_DBNAME) codes.epp + $(TOUCH) codes.cpp +codes.o: codes.cpp gds.h +cvt.o: cvt.cpp $(JRD_H) $(VAL_H) $(INTL_H) gdsassert.h $(QUAD_H) \ + $(ERR_PROTO_DEP) err_proto.h cvt_proto.h gds_proto.h intl_proto.h intlobj.h + $(SPECIAL_OPT) $(COPT_JRD_CVT) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +cvt2.o: cvt2.cpp $(JRD_H) $(VAL_H) $(INTL_H) gdsassert.h \ + all_proto.h cvt_proto.h cvt2_proto.h intl_proto.h intlobj.h + $(SPECIAL_OPT) $(COPT_JRD_CVT2) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +dbg.o: dbg.cpp $(JRD_H) cch.h dbg.h $(VAL_H) all.h $(EXE_H) req.h $(RSE_H)\ + btr.h sort.h lck.h ods.h \ + cch_proto.h dbg_proto.h +dbt.o: dbt.cpp $(JRD_HEADERS) dbg.h blk.h +delta_stubs.o: delta_stubs.cpp +dfw.cpp: dfw.epp +dfw.o: dfw.cpp $(JRD_H) $(VAL_H) irq.h tra.h btr.h req.h $(EXE_H) scl.h \ + blb.h $(MET_H) lck.h sdw.h flags.h all.h $(INTL_H) align.h \ + constants.h relations.h $(SOURCE)/intl/charsets.h ibsetjmp.h \ + all_proto.h blb_proto.h cch_proto.h \ + $(CMP_PROTO_DEP) cmp_proto.h dfw_proto.h dpm_proto.h dsc_proto.h $(ERR_PROTO_DEP) err_proto.h \ + event_proto.h exe_proto.h gds_proto.h grant_proto.h \ + $(IDX_PROTO_H) intl_proto.h isc_f_proto.h $(LCK_PROTO_H) \ + met_proto.h mov_proto.h pag_proto.h pcmet_proto.h \ + pio_proto.h scl_proto.h sdw_proto.h $(THD_PROTO_H) +divorce.o: divorce.cpp +dls.o: dls.cpp sort.h dls_proto.h gds_proto.h +dmp.o: dmp.cpp $(JRD_H) cch.h pag.h ods.h $(VAL_H) btr.h tra.h lck.h \ + ibsetjmp.h\ + cch_proto.h dmp_proto.h gds_proto.h +dpm.cpp: dpm.epp +dpm.o: dpm.cpp $(JRD_H) ods.h req.h sqz.h irq.h blb.h tra.h lls.h \ + cch.h jrn.h pag.h sbm.h $(RSE_H) lck.h vio_debug.h ibsetjmp.h\ + all_proto.h cch_proto.h $(CMP_PROTO_DEP) cmp_proto.h dpm_proto.h \ + $(ERR_PROTO_DEP) err_proto.h exe_proto.h met_proto.h mov_proto.h \ + pag_proto.h sqz_proto.h $(THD_PROTO_H) +dsc.o: dsc.cpp dsc.h constants.h $(INTL_H) \ + dsc_proto.h +dyn.cpp: dyn.epp +dyn.o: dyn.cpp $(JRD_H) tra.h scl.h drq.h flags.h lls.h all.h $(INTL_H) \ + $(MET_H) btr.h ibsetjmp.h license.h\ + all_proto.h blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h \ + dyn_proto.h $(ERR_PROTO_DEP) err_proto.h exe_proto.h gds_proto.h \ + inf_proto.h intl_proto.h isc_f_proto.h $(THD_PROTO_H) \ + dyn_df_proto.h dyn_dl_proto.h dyn_md_proto.h dyn_ut_proto.h dyn.h \ + vio_proto.h nlm_thd.h + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +dyn_def.cpp: dyn_def.epp +dyn_def.o: dyn_def.cpp dyn_util.cpp $(JRD_H) tra.h scl.h drq.h flags.h lls.h all.h $(INTL_H) \ + $(MET_H) btr.h ibsetjmp.h \ + all_proto.h blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h \ + dyn_proto.h $(ERR_PROTO_DEP) err_proto.h exe_proto.h gds_proto.h \ + inf_proto.h intl_proto.h isc_f_proto.h $(THD_PROTO_H) \ + dyn_df_proto.h dyn_dl_proto.h dyn_md_proto.h dyn_ut_proto.h dyn.h \ + vio_proto.h nlm_thd.h + sed -f $(VPATH)/dyn_def.sed $< > dyn_def.cpp.tmp + $(MV) dyn_def.cpp.tmp dyn_def.cpp + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +dyn_del.cpp: dyn_del.epp +dyn_del.o: dyn_del.cpp $(JRD_H) tra.h scl.h drq.h flags.h lls.h all.h $(INTL_H) \ + $(MET_H) btr.h ibsetjmp.h \ + all_proto.h blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h \ + dyn_proto.h $(ERR_PROTO_DEP) err_proto.h exe_proto.h gds_proto.h \ + inf_proto.h intl_proto.h isc_f_proto.h $(THD_PROTO_H) \ + dyn_df_proto.h dyn_dl_proto.h dyn_md_proto.h dyn_ut_proto.h dyn.h \ + vio_proto.h nlm_thd.h + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +dyn_mod.cpp: dyn_mod.epp +dyn_mod.o: dyn_mod.cpp $(JRD_H) tra.h scl.h drq.h flags.h lls.h all.h $(INTL_H) \ + $(MET_H) btr.h ibsetjmp.h \ + all_proto.h blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h \ + dyn_proto.h $(ERR_PROTO_DEP) err_proto.h exe_proto.h gds_proto.h \ + inf_proto.h intl_proto.h isc_f_proto.h $(THD_PROTO_H) \ + dyn_df_proto.h dyn_dl_proto.h dyn_ut_proto.h dyn_md_proto.h dyn.h \ + vio_proto.h nlm_thd.h + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +dyn_util.cpp: dyn_util.epp +dyn_util.o: dyn_util.cpp $(JRD_H) tra.h scl.h drq.h flags.h lls.h all.h $(INTL_H) \ + $(MET_H) btr.h ibsetjmp.h \ + all_proto.h blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h \ + dyn_proto.h $(ERR_PROTO_DEP) err_proto.h exe_proto.h gds_proto.h \ + inf_proto.h intl_proto.h isc_f_proto.h $(THD_PROTO_H) \ + dyn_df_proto.h dyn_ut_proto.h dyn_dl_proto.h dyn_md_proto.h dyn.h \ + vio_proto.h nlm_thd.h + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +enc.o: enc.cpp enc_proto.h +err.o: err.cpp $(JRD_H) pio.h $(VAL_H) btr.h req.h tra.h iberr.h ibsetjmp.h \ + all_proto.h cch_proto.h $(ERR_PROTO_DEP) err_proto.h met_proto.h gds_proto.h +event.o: event.cpp $(EVENT_H_DEP) event.h $(THD_H) \ + event_proto.h gds_proto.h isc_proto.h + $(SPECIAL_OPT) $(COPT_JRD_EVENT) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +evl.o: evl.cpp $(JRD_H) $(VAL_H) req.h $(EXE_H) sbm.h blb.h scl.h lck.h \ + $(INTL_H) intlobj.h $(RSE_H) gdsassert.h evl_like.cpp $(QUAD_H) \ + sort.h gdsassert.h constants.h \ + all_proto.h bookmark.h blb_proto.h dpm_proto.h \ + dsc_proto.h $(ERR_PROTO_DEP) err_proto.h evl_proto.h exe_proto.h \ + fun_proto.h intl_proto.h $(LCK_PROTO_H) mov_proto.h \ + pag_proto.h rlck_proto.h rse_proto.h sbm_proto.h \ + $(SCH_PROTO_H) scl_proto.h $(THD_PROTO_H) sort_proto.h +exe.o: exe.cpp $(JRD_H) req.h $(VAL_H) $(EXE_H) tra.h btr.h $(RSE_H) \ + lck.h $(INTL_H) blb.h ods.h rng.h sbm.h blr.h ibsetjmp.h \ + all_proto.h bookmark.h blb_proto.h btr_proto.h $(BTR_PROTO_DEP) \ + $(CMP_PROTO_DEP) cmp_proto.h dfw_proto.h dpm_proto.h $(ERR_PROTO_DEP) err_proto.h \ + evl_proto.h exe_proto.h ext_proto.h gds_proto.h \ + $(IDX_PROTO_H) jrd_proto.h $(LCK_PROTO_H) met_proto.h \ + mov_proto.h opt_proto.h par_proto.h rlck_proto.h \ + rse_proto.h rng_proto.h $(THD_PROTO_H) vio_proto.h +ext.o: ext.cpp $(JRD_H) req.h $(VAL_H) $(EXE_H) $(RSE_H) ext.h tra.h \ + all_proto.h $(ERR_PROTO_DEP) err_proto.h ext_proto.h met_proto.h \ + mov_proto.h $(THD_PROTO_H) vio_proto.h +extvms.o: extvms.cpp $(JRD_H) req.h $(VAL_H) $(EXE_H) $(RSE_H) ext.h \ + tra.h btr.h +filters.o: filters.cpp $(JRD_H) acl.h $(VAL_H) $(MET_H) blob_filter.h $(INTL_H) \ + intlobj.h gdsassert.h \ + filte_proto.h gds_proto.h intl_proto.h \ + $(SOURCE)/intl/charsets.h +flu.o: flu.cpp +fun.cpp: fun.epp +fun.o: fun.cpp $(JRD_H) $(VAL_H) $(EXE_H) req.h lls.h blb.h irq.h nlm_thd.h \ + ibsetjmp.h \ + all_proto.h blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h dsc_proto.h $(ERR_PROTO_DEP) err_proto.h \ + evl_proto.h exe_proto.h flu_proto.h fun_proto.h \ + gds_proto.h mov_proto.h sym_proto.h $(THD_PROTO_H) \ + $(SCH_PROTO_H) +functions.o: functions.cpp +gds.h: ibase.h gdsold.h + $(CAT) $(SOURCE)/jrd/ibase.h $(SOURCE)/jrd/gdsold.h > gds.h +gds.o: gds.cpp sql_code.h blr.h msg.h fil.h msgs.h blp.h $(THD_H) \ + ibsetjmp.h \ + gds_proto.h isc_proto.h + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(CARBONCORE_DIR_FLAG) $(VERSION_FLAG) $< + +gds.bin: gds.cpp + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(CARBONCORE_DIR_FLAG) $(VERSION_FLAG) \ + -o $*.bin $< + +grammar.c: grammar.y +grammar.o: grammar.c dbg.h jlx.c +grammar.bin: grammar.c dbg.h jlx.c + $(CC) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -o $*.bin $< +grant.cpp: grant.epp +grant.o: grant.cpp $(JRD_H) scl.h acl.h blb.h irq.h req.h tra.h \ + $(VAL_H) $(INTL_H) $(MET_H) nlm_thd.h \ + blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h dfw_proto.h dpm_proto.h \ + exe_proto.h gds_proto.h grant_proto.h jrd_proto.h \ + met_proto.h scl_proto.h +iberr.o: iberr.cpp iberr.h ibsetjmp.h \ + gds_proto.h iberr_proto.h +ib_stdio.o: ib_stdio.cpp ib_stdio.h +idx.o: idx.cpp $(JRD_H) $(VAL_H) req.h ods.h btr.h sort.h lls.h tra.h \ + sbm.h $(EXE_H) scl.h lck.h \ + all_proto.h btr_proto.h $(BTR_PROTO_DEP) cch_proto.h $(CMP_PROTO_DEP) cmp_proto.h \ + dpm_proto.h $(ERR_PROTO_DEP) err_proto.h evl_proto.h $(IDX_PROTO_H) \ + $(LCK_PROTO_H) met_proto.h mov_proto.h sbm_proto.h $(SCH_PROTO_H) \ + sort_proto.h $(THD_PROTO_H) vio_proto.h +inf.o: inf.cpp gds.h $(JRD_H) blb.h tra.h req.h $(VAL_H) $(EXE_H) pio.h ods.h \ + lck.h cch.h license.h cch_proto.h pag_proto.h pio_proto.h \ + tra_proto.h source/wal/wal.h +ini.cpp: ini.epp +ini.o: ini.cpp $(JRD_H) $(VAL_H) btr.h ids.h tra.h trig.h dflt.h \ + ods.h $(INI_H) idx.h $(INTL_H) constants.h \ + all_proto.h blb_proto.h cch_proto.h $(CMP_PROTO_DEP) cmp_proto.h dfw_proto.h \ + dpm_proto.h exe_proto.h gds_proto.h $(IDX_PROTO_H) \ + ini_proto.h jrd_proto.h met_proto.h $(THD_PROTO_H) + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $(CFLAGS_JRD_INI) $< +intl.o: intl.cpp btr.h gdsassert.h $(INTL_H) intlobj.h $(JRD_H) req.h $(VAL_H) \ + license.h \ + all_proto.h cvt_proto.h $(ERR_PROTO_DEP) err_proto.h evl_proto.h \ + flu_proto.h fun_proto.h gds_proto.h iberr_proto.h \ + intl_proto.h isc_proto.h \ + source/intl/charsets.h source/intl/country_codes.h +inuse.o: inuse.cpp $(JRD_H) \ + gds_proto.h inuse_proto.h $(THD_PROTO_H) +isc.o: isc.cpp isc.h flu_proto.h gds_proto.h isc_proto.h +isc_file.o: isc_file.cpp flu_proto.h gds_proto.h isc_proto.h isc_f_proto.h +isc_ipc.o: isc_ipc.cpp isc.h gds_proto.h isc_proto.h isc_i_proto.h \ + $(ISC_S_PROTO_H) +isc_sync.o: isc_sync.cpp isc.h gds_proto.h isc_proto.h isc_i_proto.h \ + $(ISC_S_PROTO_H) + $(SPECIAL_OPT) $(COPT_JRD_ISC) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +jio.o: jio.cpp $(JRD_H) jrn.h +jrd.o: jrd.cpp $(JRD_H) drq.h irq.h req.h tra.h blb.h lck.h scl.h \ + license.h pio.h ods.h $(EXE_H) $(VAL_H) $(RSE_H) jrn.h log.h \ + fil.h svc.h all.h sbm.h sdw.h lls.h cch.h nlm_thd.h ibsetjmp.h \ + all_proto.h blb_proto.h \ + cch_proto.h $(CMP_PROTO_DEP) cmp_proto.h dyn_proto.h $(ERR_PROTO_DEP) err_proto.h \ + event_proto.h exe_proto.h ext_proto.h flu_proto.h fun_proto.h \ + gds_proto.h inf_proto.h ini_proto.h intl_proto.h \ + inuse_proto.h isc_f_proto.h jrd_proto.h jrn_proto.h \ + $(LCK_PROTO_H) log_proto.h met_proto.h mov_proto.h \ + old_proto.h pag_proto.h par_proto.h \ + pio_proto.h sbm_proto.h $(SCH_PROTO_H) scl_proto.h sdw_proto.h \ + shut_proto.h sort_proto.h svc_proto.h $(THD_PROTO_H) tra_proto.h \ + val_proto.h + $(SPECIAL_OPT) $(COPT_JRD_JRD) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +jrn.o: jrn.cpp $(JRD_H) ods.h jrn.h \ + iberr_proto.h gds_proto.h jrn_proto.h +lck.o: lck.cpp $(JRD_H) lck.h +lck_dummy.o: lck_dummy.cpp +llio.o: llio.cpp llio.h \ + iberr_proto.h llio_proto.h +log.o: log.cpp $(JRD_H) log.h arg.h ods.h \ + all_proto.h gds_proto.h log_proto.h pag_proto.h +map.o: map.cpp rdb_codes.h msgs.h +mblr.o: mblr.cpp mblr.h +met.cpp: met.epp +met.o: met.cpp $(JRD_H) irq.h all.h req.h $(EXE_H) scl.h blb.h \ + $(VAL_H) tra.h $(INTL_H) sdw.h lck.h pio.h $(MET_H) flags.h jrn.h \ + btr.h lls.h align.h gdsassert.h relations.h \ + ibsetjmp.h \ + all_proto.h blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h dfw_proto.h \ + $(ERR_PROTO_DEP) err_proto.h exe_proto.h ext_proto.h flu_proto.h \ + gds_proto.h $(IDX_PROTO_H) ini_proto.h $(LCK_PROTO_H) \ + met_proto.h par_proto.h pcmet_proto.h pio_proto.h \ + scl_proto.h sdw_proto.h $(THD_PROTO_H) dsc_proto.h \ + $(SOURCE)/intl/charsets.h $(SCH_PROTO_H) +misc.o: misc.cpp $(MISC_H) dsc.h \ + gds_proto.h misc_proto.h +mov.o: mov.cpp $(JRD_H) $(VAL_H) $(INTL_H) \ + cvt_proto.h cvt2_proto.h $(ERR_PROTO_DEP) err_proto.h gds_proto.h +mpexl.o: mpexl.cpp $(JRD_H) pio.h cch.h ods.h lck.h +nav.o: nav.cpp $(JRD_H) ods.h btr.h $(VAL_H) req.h $(EXE_H) sbm.h $(RSE_H) rng.h \ + lck.h cch.h blr.h ibsetjmp.h \ + all_proto.h btr_proto.h $(BTR_PROTO_DEP) cch_proto.h mov_proto.h $(NAV_PROTO_H) \ + rng_proto.h rse_proto.h sbm_proto.h $(THD_PROTO_H) vio_proto.h \ + evl_proto.h +nodebug.o nodebug.bin $(OBJS)/jrd/nodebug.bin: nodebug.cpp dbg_proto.h +old.o: old.cpp $(JRD_H) pio.h ods.h pag.h jrn.h old.h llio.h \ + cch_proto.h $(ERR_PROTO_DEP) err_proto.h gds_proto.h \ + isc_f_proto.h jrn_proto.h llio_proto.h misc_proto.h \ + mov_proto.h old_proto.h pag_proto.h $(THD_PROTO_H) \ + source/wal/wal.h +opt.o: opt.cpp $(JRD_H) align.h $(VAL_H) req.h $(EXE_H) lls.h btr.h \ + sort.h $(RSE_H) $(INTL_H) ods.h \ + all_proto.h btr_proto.h $(BTR_PROTO_DEP) cch_proto.h $(CMP_PROTO_DEP) cmp_proto.h \ + dpm_proto.h $(ERR_PROTO_DEP) err_proto.h ext_proto.h intl_proto.h \ + $(LCK_PROTO_H) met_proto.h mov_proto.h opt_proto.h \ + par_proto.h sbm_proto.h $(THD_PROTO_H) +os2.o: os2.cpp $(JRD_H) pio.h cch.h ods.h lck.h +pag.o: pag.cpp $(JRD_H) pag.h ods.h pio.h license.h jrn.h lck.h \ + sdw.h cch.h tra.h llio.h all.h vio_debug.h ibsetjmp.h \ + cch_proto.h dpm_proto.h \ + $(ERR_PROTO_DEP) err_proto.h $(LCK_PROTO_H) llio_proto.h met_proto.h \ + mov_proto.h pag_proto.h pio_proto.h +par.o: par.cpp $(JRD_H) $(VAL_H) align.h $(EXE_H) lls.h blb.h scl.h \ + all.h req.h blrtable.h codetext.h $(INTL_H) $(MET_H) \ + all_proto.h $(CMP_PROTO_DEP) cmp_proto.h $(ERR_PROTO_DEP) err_proto.h fun_proto.h \ + gds_proto.h met_proto.h par_proto.h + $(SPECIAL_OPT) $(COPT_JRD_PAR) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +pcmet.cpp: pcmet.epp +pcmet.o: pcmet.cpp $(JRD_H) irq.h tra.h $(VAL_H) btr.h all.h req.h $(EXE_H) $(MET_H) \ + ods.h lck.h \ + all_proto.h $(CMP_PROTO_DEP) cmp_proto.h dfw_proto.h exe_proto.h gds_proto.h \ + $(IDX_PROTO_H) $(LCK_PROTO_H) met_proto.h mov_proto.h pcmet_proto.h +perf.o: perf.cpp perf.h \ + gds_proto.h perf_proto.h +print.o: print.cpp $(EVENT_H_DEP) event.h +pwd.o: pwd.cpp pwd.h $(JRD_H) \ + enc_proto.h $(ERR_PROTO_DEP) err_proto.h gds_proto.h pwd_proto.h +#qatest.o: qatest.cpp $(JRD_H) sdw.h pio.h $(ERR_PROTO_DEP) err_proto.h flu_proto.h +rdb.o: rdb.cpp rdb.h mblr.h rdbcodes.h +rdbg.o: rdbg.cpp +rdbgpas.o: rdbgpas.cpp rdb.h rdbcodes.h +rdbint.o: rdbint.cpp +rec.o: rec.cpp $(JRD_H) ods.h btr.h jrn.h cch.h \ + all_proto.h cch_proto.h dpm_proto.h $(ERR_PROTO_DEP) err_proto.h \ + gds_proto.h misc_proto.h mov_proto.h pag_proto.h \ + rec_proto.h sbm_proto.h \ + $(SOURCE)/wal/wal.h \ + $(SOURCE)/wal/walr_proto.h +rlck.o: rlck.cpp $(JRD_H) tra.h lck.h req.h all.h \ + all_proto.h $(ERR_PROTO_DEP) err_proto.h isc_proto.h \ + $(LCK_PROTO_H) rlck_proto.h $(THD_PROTO_H) vio_proto.h +rng.o: rng.cpp $(JRD_H) req.h $(VAL_H) $(EXE_H) $(RSE_H) lck.h cch.h \ + rng.h all.h $(INTL_H) ods.h sbm.h \ + event_proto.h evl_proto.h $(LCK_PROTO_H) mov_proto.h \ + rlck_proto.h rng_proto.h $(THD_PROTO_H) tra_proto.h +rse.o: rse.cpp $(JRD_H) req.h $(VAL_H) $(EXE_H) $(RSE_H) sbm.h sort.h \ + lls.h $(INTL_H) btr.h ods.h lck.h \ + all_proto.h bookmark.h $(ERR_PROTO_DEP) err_proto.h evl_proto.h \ + exe_proto.h ext_proto.h intl_proto.h jrd_proto.h \ + met_proto.h mov_proto.h $(NAV_PROTO_H) rlck_proto.h \ + rse_proto.h sbm_proto.h $(SCH_PROTO_H) sort_proto.h \ + $(THD_PROTO_H) vio_proto.h +sbm.o: sbm.cpp $(JRD_H) req.h sbm.h all.h \ + all_proto.h sbm_proto.h $(THD_PROTO_H) +sch.o: sch.cpp $(THD_H) isc.h \ + gds_proto.h isc_proto.h $(SCH_PROTO_H) $(THD_PROTO_H) +scl.cpp: scl.epp +scl.o: scl.cpp $(JRD_H) scl.h acl.h blb.h irq.h req.h tra.h pwd.h \ + nlm_thd.h \ + all_proto.h blb_proto.h $(CMP_PROTO_DEP) cmp_proto.h enc_proto.h \ + $(ERR_PROTO_DEP) err_proto.h exe_proto.h gds_proto.h isc_proto.h \ + met_proto.h pwd_proto.h scl_proto.h $(THD_PROTO_H) +sco_stubs.o: sco_stubs.cpp +sdl.o: sdl.cpp $(JRD_H) $(VAL_H) sdl.h $(INTL_H) \ + gds_proto.h sdl_proto.h + $(SPECIAL_OPT) $(COPT_JRD_SDL) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +sdw.o: sdw.cpp $(JRD_H) cch.h que.h lck.h ods.h jrn.h lls.h \ + req.h pio.h all.h sdw.h flags.h sbm.h ibsetjmp.h \ + all_proto.h cch_proto.h $(ERR_PROTO_DEP) err_proto.h gds_proto.h \ + isc_proto.h $(LCK_PROTO_H) met_proto.h pag_proto.h \ + pio_proto.h sdw_proto.h $(THD_PROTO_H) + $(SPECIAL_OPT) $(COPT_JRD_SDW) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +shut.o: shut.cpp $(JRD_H) scl.h ods.h \ + $(CMP_PROTO_DEP) cmp_proto.h $(ERR_PROTO_DEP) err_proto.h $(LCK_PROTO_H) \ + rlck_proto.h rng_proto.h $(SCH_PROTO_H) shut_proto.h \ + tra_proto.h cch_proto.h +sort.o: sort.cpp sort.h fil.h \ + $(ERR_PROTO_DEP) err_proto.h gds_proto.h sort_proto.h +sqz.o: sqz.cpp $(JRD_H) sqz.h req.h \ + all_proto.h $(ERR_PROTO_DEP) err_proto.h sqz_proto.h $(THD_PROTO_H) + $(SPECIAL_OPT) $(COPT_JRD_SQZ) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +stats.cpp: stats.epp +stats.o: stats.cpp +status.o status.bin: status.cpp status.h +$(OBJS)/jrd/sun_ftn.o: $(OBJS)/jrd/sun_ftn.cpp perf.h +sun_ftn.o: sun_ftn.cpp perf.h +source/jrd/sun_ftn.j: sun_ftn.o +sun_ftn.j: sun_ftn.o +svc.o: svc.cpp $(JRD_H) svc.h ibsetjmp.h license.h \ + $(ERR_PROTO_DEP) err_proto.h gds_proto.h inf_proto.h isc_proto.h \ + mov_proto.h pwd_proto.h $(SCH_PROTO_H) svc_proto.h +sym.o: sym.cpp $(JRD_H) $(VAL_H) \ + sym_proto.h +thd.o: thd.cpp $(THD_H) isc.h +tpc.o: tpc.cpp $(JRD_H) tpc.h ods.h tra.h lck.h pag.h \ + all_proto.h cch_proto.h $(LCK_PROTO_H) mov_proto.h \ + $(THD_PROTO_H) tpc_proto.h tra_proto.h +tra.o: tra.cpp $(JRD_H) tra.h ods.h pag.h lck.h jrn.h lls.h \ + all.h req.h $(EXE_H) $(RSE_H) ibsetjmp.h \ + all_proto.h blb_proto.h cch_proto.h \ + $(CMP_PROTO_DEP) cmp_proto.h dfw_proto.h dpm_proto.h $(ERR_PROTO_DEP) err_proto.h \ + exe_proto.h ext_proto.h gds_proto.h isc_proto.h \ + $(LCK_PROTO_H) met_proto.h mov_proto.h rlck_proto.h \ + $(THD_PROTO_H) tpc_proto.h tra_proto.h vio_proto.h \ + $(LCK_PROTO_H) + $(SPECIAL_OPT) $(COPT_JRD_TRA) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +unix.o: unix.cpp $(JRD_H) pio.h cch.h ods.h lck.h \ + all_proto.h cch_proto.h $(ERR_PROTO_DEP) err_proto.h isc_proto.h \ + $(LCK_PROTO_H) mov_proto.h pio_proto.h $(THD_PROTO_H) +utl.o: utl.cpp $(JRD_H) blr.h inf.h msg.h \ + gds_proto.h utl_proto.h blb_proto.h +val.o: val.cpp $(JRD_H) ods.h pag.h $(VAL_H) btr.h all.h cch.h \ + lck.h ibsetjmp.h \ + all_proto.h btr_proto.h $(BTR_PROTO_DEP) cch_proto.h dpm_proto.h \ + $(ERR_PROTO_DEP) err_proto.h met_proto.h sbm_proto.h tra_proto.h \ + val_proto.h +vio.o: vio.cpp $(JRD_H) $(VAL_H) req.h tra.h ids.h lls.h scl.h \ + flags.h btr.h relations.h ods.h $(EXE_H) $(RSE_H) rng.h \ + all.h \ + all_proto.h blb_proto.h cch_proto.h dfw_proto.h \ + dpm_proto.h $(ERR_PROTO_DEP) err_proto.h evl_proto.h $(IDX_PROTO_H) \ + jrd_proto.h met_proto.h mov_proto.h rng_proto.h \ + sbm_proto.h scl_proto.h sqz_proto.h tra_proto.h +vms.o: vms.cpp $(JRD_H) pio.h cch.h ods.h lck.h +vmsevent.o: vmsevent.cpp$(THD_H) +why.o: why.c acl.h inf.h blob_filter.h $(THD_H) isc.h entry.h \ + flu_proto.h gds_proto.h isc_proto.h isc_f_proto.h \ + $(THD_PROTO_H) blf_proto.h $(SOURCE)/dsql/sqlda.h \ + $(SOURCE)/dsql/dsql_proto.h $(SOURCE)/dsql/prepa_proto.h +winnt.o: winnt.cpp $(JRD_H) pio.h cch.h ods.h lck.h + +# BACKEND + +whybk.c: why.c + -$(RM) whybk.c + $(CP) why.c whybk.c +whybk.o: whybk.c + $(CC) -c $(CFLAGS) $(VERSION_FLAG) -DBACKEND $< + +# Special compiles of modules to omit parts not needed for pipe access + +utlp.cpp: utl.cpp + -$(RM) utlp.cpp + $(CP) utl.cpp utlp.cpp +utlp.o: utlp.cpp + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DPIPE_CLIENT $< +utlp.j: utlp.o + $(CXX) -c $(PIC_J_CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DPIPE_CLIENT utlp.cpp -o utlp_j.o + $(MV) utlp_j.o utlp.j +whyp.c: why.c + -$(RM) whyp.c + $(CP) why.c whyp.c +whyp.o: whyp.c + $(CC) -c $(CFLAGS) $(VERSION_FLAG) -DPIPE_CLIENT $< +whyp.j: whyp.o + $(CC) -c $(PIC_J_CFLAGS) $(VERSION_FLAG) -DPIPE_CLIENT whyp.c -o whyp_j.o + $(MV) whyp_j.o whyp.j + +# whyps.o is used for machines that have a gds_pipe executable with the +# full backend linked in. It omits an interface to the V3 bridge, which +# is included with the pipe client and not needed in the pipe server. +whyps.o: why.o + -$(RM) whyps.c + $(CP) why.c whyps.c + $(CC) -c $(CFLAGS) $(VERSION_FLAG) -DPIPE_SERVER_YVALUE whyps.c + +# SHARED BRIDGE + +iscb.o: isc.cpp isc.o + -$(RM) iscb.cpp + $(CP) $< iscb.cpp + $(SPECIAL_OPT) $(COPT_JRD_ISC) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DBRIDGE iscb.cpp +iscb.bin: isc.cpp isc.bin + $(CP) $< iscbfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_ISC) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DBRIDGE iscbfoo.cpp + $(MV) iscbfoo.o iscb.bin + -$(RM) iscbfoo.cpp iscbfoo.o + +# External objects + +$(CSI_MISC) $(CSI_P_MISC) csi_dummy: + $(CD) $(OBJS)/csv && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(DSQL_MISC) $(DSQL_P_MISC): + $(CD) $(OBJS)/dsql && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(INTL_MISC) $(INTL_P_MISC) intl_dummy: + $(CD) $(OBJS)/intl && $(MAKE) CFLAGS="$(CFLAGS) -D$(SYSTEM)" SYSTEM="$(SYSTEM)" intl +$(LOCK_MISC_REAL) $(LOCK_P_MISC_REAL): + $(CD) $(OBJS)/lock && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(PYXIS_MISC) $(PYXIS_P_MISC): + $(CD) $(OBJS)/pyxis && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(REGISTER_MISC): + $(CD) $(OBJS)/register && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(REMOTE_MISC) $(REMOTE_P_MISC) $(MERGE_MISC): + $(CD) $(OBJS)/remote && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(SECURITY_MISC) $(SECURITY_P_MISC) $(GSEC_MISC) $(GSTAT_MISC) $(UTIL_MISC): + $(CD) $(OBJS)/utilities && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(ALICE_MISC): + $(CD) $(OBJS)/alice && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(BURP_MISC): + $(CD) $(OBJS)/burp && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(WAL_MISC) $(WAL_P_MISC): + $(CD) $(OBJS)/wal && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +source/msgs/indicator.incl: + $(CD) $(OBJS)/msgs && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) +$(OBJS)/pipe/%: + $(CD) $(OBJS)/pipe && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) + +alt.j: alt.bin +cvt.bin: + $(CP) $(VPATH)/cvt.cpp cvtfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_CVT) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) cvtfoo.cpp + $(MV) cvtfoo.o cvt.bin + -$(RM) cvtfoo.cpp cvtfoo.o +cvt2.bin: + $(CP) $(VPATH)/cvt2.cpp cvt2foo.cpp + $(SPECIAL_OPT) $(COPT_JRD_CVT2) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) cvt2foo.cpp + $(MV) cvt2foo.o cvt2.bin + -$(RM) cvt2foo.cpp cvt2foo.o +dyn.bin: dyn.cpp + $(CP) dyn.cpp dynfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) dynfoo.cpp + $(MV) dynfoo.o dyn.bin + -$(RM) dynfoo.cpp dynfoo.o +dyn_def.bin: dyn_def.cpp dyn_def.sed + sed -f $(VPATH)/dyn_def.sed $< > dyn_deffoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) dyn_deffoo.cpp + $(MV) dyn_deffoo.o dyn_def.bin + -$(RM) dyn_deffoo.cpp dyn_deffoo.o +dyn_del.bin: dyn_del.cpp + $(CP) $< dyn_delfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) dyn_delfoo.cpp + $(MV) dyn_delfoo.o dyn_del.bin + -$(RM) dyn_delfoo.cpp dyn_delfoo.o +dyn_mod.bin: dyn_mod.cpp + $(CP) $< dyn_modfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) dyn_modfoo.cpp + $(MV) dyn_modfoo.o dyn_mod.bin + -$(RM) dyn_modfoo.cpp dyn_modfoo.o +dyn_util.bin: dyn_util.cpp + $(CP) $< dyn_utilfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_DYN) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) dyn_utilfoo.cpp + $(MV) dyn_utilfoo.o dyn_util.bin + -$(RM) dyn_utilfoo.cpp dyn_utilfoo.o +event.bin: event.cpp + $(CP) $< eventfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_EVENT) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) eventfoo.cpp + $(MV) eventfoo.o event.bin + -$(RM) eventfoo.cpp eventfoo.o +flu_non_dl.bin: + $(CP) flu.cpp flu_non_dl.cpp + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DNON_DL_COMPATIBLE flu_non_dl.cpp + $(MV) flu_non_dl.o flu_non_dl.bin + -$(RM) flu_non_dl.cpp +gds.j: gds.bin +head5.bin: head.cpp + $(CP) $< headfoo.cpp + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DGDS_PIPE=\"bin/gds_pipe5\" headfoo.cpp + $(MV) headfoo.o head5.bin + -$(RM) headfoo.cpp headfoo.o +ib_stdio.bin: + $(CP) ib_stdio.cpp ib_stdiofoo.cpp + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) ib_stdiofoo.cpp + $(MV) ib_stdiofoo.o ib_stdio.bin + -$(RM) ib_stdiofoo.cpp ib_stdiofoo.o +ini.bin: ini.cpp + $(CP) $< inifoo.cpp + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $(CFLAGS_JRD_INI) inifoo.cpp + $(MV) inifoo.o ini.bin + -$(RM) inifoo.cpp inifoo.o +isc.j: isc.bin +isc_file.j: isc_file.bin +isc_ipc.j: isc_ipc.bin +isc_sync.bin: isc_sync.cpp + $(CP) $< iscfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_ISC) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) iscfoo.cpp + $(MV) iscfoo.o isc_sync.bin + -$(RM) iscfoo.cpp iscfoo.o +isc_sync.j: isc_sync.bin + $(CP) isc_sync.cpp iscfoo_j.cpp + $(SPECIAL_OPT) $(COPT_JRD_ISC) \ + $(CXX) -c $(PIC_J_CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) iscfoo_j.cpp + $(MV) iscfoo_j.o isc_sync.j + -$(RM) iscfoo_j.cpp iscfoo_j.o +isc_sync.j: isc_sync.bin +jrd.bin: jrd.cpp + $(CP) $< jrdfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_JRD) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) jrdfoo.cpp + $(MV) jrdfoo.o jrd.bin + -$(RM) jrdfoo.cpp jrdfoo.o +par.bin: par.cpp + $(CP) $< parfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_PAR) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) parfoo.cpp + $(MV) parfoo.o par.bin + -$(RM) parfoo.cpp parfoo.o +perf.j: perf.bin +sdl.bin: sdl.cpp + $(CP) $< sdlfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_SDL) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) sdlfoo.cpp + $(MV) sdlfoo.o sdl.bin + -$(RM) sdlfoo.cpp sdlfoo.o +sdw.bin: sdw.cpp + $(CP) $< sdwfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_SDW) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) sdwfoo.cpp + $(MV) sdwfoo.o sdw.bin + -$(RM) sdwfoo.cpp sdwfoo.o +shrfinit.bin: shrfinit.cpp +shrinit.bin: shrinit.cpp +sqz.bin: sqz.cpp + $(CP) $< sqzfoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_SQZ) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) sqzfoo.cpp + $(MV) sqzfoo.o sqz.bin + -$(RM) sqzfoo.cpp sqzfoo.o +tra.bin: tra.cpp + $(CP) $< trafoo.cpp + $(SPECIAL_OPT) $(COPT_JRD_TRA) \ + $(CXX) -c $(PIC_FLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) trafoo.cpp + $(MV) trafoo.o tra.bin + -$(RM) trafoo.cpp trafoo.o + +# Dependancy for jrd/divorce.cpp == lock/divorce.cpp == wal/divorce.cpp +# == remote/divorce.cpp +$(SOURCE)/lock/divorce.cpp: divorce.cpp + $(CP) divorce.cpp $(SOURCE)/lock/divorce.cpp + +$(SOURCE)/remote/divorce.cpp: divorce.cpp + $(CP) divorce.cpp $(SOURCE)/remote/divorce.cpp + +$(SOURCE)/wal/divorce.cpp: divorce.cpp + $(CP) divorce.cpp $(SOURCE)/wal/divorce.cpp + +# Dependancies for include files. Inserted as a group as it is +# easy to update them together. +BTR_PROTO_DEP= btr.h +# btr_proto.h: $(BTR_PROTO_DEP) +# $(TOUCH) $@ + +CMP_PROTO_DEP= req.h +# cmp_proto.h: $(CMP_PROTO_DEP) +# $(TOUCH) $@ + +ERR_PROTO_DEP= $(JRD_H) btr.h +#err_proto.h: $(ERR_PROTO_DEP) +# # $(TOUCH) $@ + +EVENT_H_DEP= isc.h file_params.h +#event.h: $(EVENT_H_DEP) +# $(TOUCH) $@ + +EVERYTHING_H_DEP= $(JRD_H) lck.h ods.h cch.h all.h pio.h pag.h \ + $(VAL_H) $(EXE_H) req.h lls.h $(RSE_H) sbm.h tra.h \ + sqz.h blb.h btr.h jrn.h scl.h ext.h $(MET_H) \ + sdw.h log.h $(INTL_H) intlobj.h fil.h tpc.h \ + rng.h svc.h +#everything.h: $(EVERYTHING_H_DEP) +# $(TOUCH) $@ + +EXE_H= exe.h nod.h dsc.h +# exe.h: nod.h dsc.h +# $(TOUCH) $@ +IDX_PROTO_H= idx_proto.h btr.h +#idx_proto.h: btr.h +# $(TOUCH) $@ + +INI_H= ini.h $(INTL_H) names.h fields.h relations.h types.h \ + intlnames.h \ + $(SOURCE)/intl/country_codes.h $(SOURCE)/intl/charsets.h +#ini.h: intl.h names.h fields.h relations.h types.h \ +# $(TOUCH) $@ +INTL_H= intl.h $(SOURCE)/intl/charsets.h +#intl.h: $(SOURCE)/intl/charsets.h +# $(TOUCH) $@ + +ISC_S_PROTO_H= isc_s_proto.h isc.h +#isc_s_proto.h: isc.h +# $(TOUCH) $@ +JRD_H= jrd.h dsc.h $(THD_H) isc.h blk.h +#jrd.h: dsc.h $(THD_H) isc.h blk.h +# $(TOUCH) $@ +LCK_PROTO_H= lck_proto.h lck.h +#lck_proto.h: lck.h +# $(TOUCH) $@ +MET_H= met.h obj.h +#met.h: obj.h +# $(TOUCH) $@ +MISC_H= misc.h dsc.h +#misc.h: dsc.h +# $(TOUCH) $@ +NAV_PROTO_H= nav_proto.h rse.h +#nav_proto.h: rse.h +# $(TOUCH) $@ +QUAD_H= quad.h quad_proto.h +#quad.h: quad_proto.h +# $(TOUCH) $@ +RSE_H= rse.h dsc.h +#rse.h: dsc.h +# $(TOUCH) $@ +SCH_PROTO_H= sch_proto.h isc.h +#sch_proto.h: isc.h +# $(TOUCH) $@ +THD_H= thd.h isc.h +#thd.h: isc.h +# $(TOUCH) $@ +THD_PROTO_H= thd_proto.h isc.h +#thd_proto.h: isc.h +# $(TOUCH) $@ +VAL_H= val.h dsc.h +#val.h: dsc.h +# $(TOUCH) $@ + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - jrd" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/jrd/::g"\ + depends.out |sort|uniq > depends.out.1 + -$(CAT) depends.out.1 >> depends.mak + sed -e "s:\.o\::\.bin\::g" depends.out.1 >> depends.mak + -$(RM) depends.out depends.out.1 + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.lock b/src/makefiles/sfx.lock new file mode 100644 index 0000000000..f6bb14f645 --- /dev/null +++ b/src/makefiles/sfx.lock @@ -0,0 +1,137 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/lock +VPATH= $(SOURCE)/lock +CXX= @CXX@ + + +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT) +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) +LOCK_PRINT= $(OBJS)/firebird/bin/gds_lock_print$(EXEC_EXT) +MANAGER= $(OBJS)/firebird/bin/gds_lock_mgr$(EXEC_EXT) +DROP= $(OBJS)/firebird/bin/gds_drop$(EXEC_EXT) +DROP_FLAGS= -s + +JRD_LINK2= $(OBJS)/jrd/isc.o $(OBJS)/jrd/dls.o $(OBJS)/jrd/isc_ipc.o \ + $(OBJS)/jrd/isc_sync.o $(OBJS)/jrd/gds.o +JRD_LINK= $(JRD_LINK2) $(LOCK_JRD_MISC) + +all: lock lock_print$(EXEC_EXT) lock_driver$(EXEC_EXT) + +lock: lock.o + -$(RM) lock_objects + $(TOUCH) lock_objects + $(CHMOD_6) lock_objects + +lock_print: print.o $(JRD_LINK) $(V3PRINTER) + -$(RM) lock_print + $(CXX) $(LINK_OPTS) print.o $(V3PRINTER) $(JRD_LINK) $(GDSSHR_LINK) \ + -o lock_print $(SCO_SOCKET_LIB) $(SO_THREAD_LIB) $(NSL_LIB) + $(CHMOD_7) lock_print + $(MV) lock_print $(LOCK_PRINT) + $(TOUCH) lock_print + $(CHMOD_6) lock_print + +lock_print.exe: print.o $(JRD_LINK) $(OBJS)/jrd/thd.o + -$(RM) lock_print.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)lock_print \ + print.o $(JRD_LINK) $(OBJS)/jrd/thd.o $(CONLIBSDLL) $(ADVAPILIB) + $(MV) lock_print.exe $(LOCK_PRINT) + $(RM) lock_print.exe + $(TOUCH) lock_print.exe + +lock_driver: driver.o $(JRD_LINK) lock.o + -$(RM) lock_driver + $(CXX) $(LINK_OPTS) driver.o $(JRD_LINK) lock.o $(B_ELF) -o lock_driver + +lock_driver.exe: driver.o + -$(RM) lock_driver.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)lock_driver \ + driver.o $(JRD_LINK) lock.o $(CONLIBSDLL) $(ADVAPILIB) + +manager: manager.o lock.o divorce.o $(JRD_LINK2) + -$(RM) manager + $(CXX) $(LINK_OPTS) manager.o lock.o divorce.o $(JRD_LINK2) \ + -o manager $(NSL_LIB) $(SCO_SOCKET_LIB) $(SO_THREAD_LIB) \ + $(COREFOUNDATION_LINK) + $(CHMOD_S7) manager + $(DROP) $(DROP_FLAGS) + $(MV) manager $(MANAGER) + $(TOUCH) manager + $(CHMOD_6) manager + +divorce.cpp: $(SOURCE)/jrd/divorce.cpp + $(CP) $< $@ +divorce.o: divorce.cpp $(SOURCE)/jrd/divorce.h +driver.o: driver.cpp lock.h $(SOURCE)/jrd/isc.h + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $(CFLAGS_LOCK) $< +lock.h: $(SOURCE)/jrd/file_params.h +lock.o: lock.cpp lock.h \ + lock_proto.h \ + $(SOURCE)/jrd/thd.h $(SOURCE)/jrd/isc.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_proto.h \ + $(SOURCE)/jrd/thd_proto.h + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $(CFLAGS_LOCK) $< -o $@ +manager.o: manager.cpp lock_proto.h $(SOURCE)/jrd/jrd.h $(SOURCE)/jrd/lck.h +print.o: print.cpp lock.h $(SOURCE)/jrd/jrd.h $(SOURCE)/jrd/lck.h $(SOURCE)/jrd/isc.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_proto.h \ + $(SOURCE)/jrd/time.h prtv3_proto.h + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $(CFLAGS_LOCK) $< -o $@ +printv3.o $(OBJS)/lock/printv3.o: printv3.cpp lockv3.h prtv3_proto.h + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $(CFLAGS_LOCK) $< -o $@ +printv3s4.o: printv3s4.cpp lockv3s4.h prtv3_proto.h + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $(CFLAGS_LOCK) $< -o $@ + +lock.bin: lock.o + +$(OBJS)/jrd/%: + $(CD) $(OBJS)/jrd && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CXX) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - lock" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/lock/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.main b/src/makefiles/sfx.main new file mode 100644 index 0000000000..cc939a5145 --- /dev/null +++ b/src/makefiles/sfx.main @@ -0,0 +1 @@ +# The main make file diff --git a/src/makefiles/sfx.msgs b/src/makefiles/sfx.msgs new file mode 100644 index 0000000000..fe1332164e --- /dev/null +++ b/src/makefiles/sfx.msgs @@ -0,0 +1,199 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@SET_MAKE@ +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/msgs +VPATH= $(SOURCE)/msgs +CXX= @CXX@ + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_STATIC) $(GPRE_FLAGS) $< $@ + +unexport ISC_USER +unexport ISC_PASSWORD + +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT) + +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- +GPRE_FLAGS= -r -m -z -n +LOCALES= + +all: build_file$(EXEC_EXT) check_messages$(EXEC_EXT) \ + enter_messages$(EXEC_EXT) modify_messages$(EXEC_EXT) \ + change_messages$(EXEC_EXT) + +interbase.msg: build_file$(EXEC_EXT) check_messages$(EXEC_EXT) indicator.msg + -$(RM) interbase.msg $(OBJS)/firebird/interbase.msg + ./build_file -d $(MSGSDIR)master_msg_db -f $(OBJS)/firebird/interbase.msg + $(TOUCH) interbase.msg + $(CHMOD_6) interbase.msg $(OBJS)/firebird/interbase.msg + +locales.msg: $(LOCALES) + -$(RM) locales.msg + $(TOUCH) locales.msg + $(CHMOD_6) locales.msg + +fr_FR.msg: build_file$(EXEC_EXT) indicator.msg indicator.loc + -$(RM) fr_FR.msg $(OBJS)/ifirebird/intl/fr_FR.msg + ./build_file -d $(MSGSDIR)master_msg_db \ + -l fr_FR \ + -p $(OBJS)/firebird/intl + $(TOUCH) fr_FR.msg + $(CHMOD_6) fr_FR.msg $(OBJS)/firebird/intl/fr_FR.msg + +de_DE.msg: build_file$(EXEC_EXT) indicator.msg indicator.loc + -$(RM) de_DE.msg source/interbase/intl/de_DE.msg + ./build_file -d $(MSGSDIR)master_msg_db \ + -l de_DE \ + -p source/interbase/intl + $(TOUCH) de_DE.msg + $(CHMOD_6) de_DE.msg source/interbase/intl/de_DE.msg + +ja_JP_EUC.msg: build_file$(EXEC_EXT) indicator.msg indicator.loc + -$(RM) ja_JP_EUC.msg source/interbase/intl/ja_JP_EUC.msg + ./build_file -d $(MSGSDIR)master_msg_db \ + -l ja_JP.EUC \ + -p source/interbase/intl + $(TOUCH) ja_JP_EUC.msg + $(CHMOD_6) ja_JP_EUC.msg source/interbase/intl/ja_JP_EUC.msg + +indicator.msg indicator.incl: force + ./check_messages -d $(MSGSDIR)master_msg_db + +indicator.loc: force + ./check_messages -d $(MSGSDIR)master_msg_db -l + +build_file: build_file.o + -$(RM) build_file + $(CXX) $(LINK_OPTS) build_file.o -o build_file $(GDSSHR_LINK) + $(CHMOD_7) build_file + +check_messages: check_msgs.o + -$(RM) check_messages + $(CXX) $(LINK_OPTS) check_msgs.o -o check_messages $(GDSSHR_LINK) + $(CHMOD_7) check_messages + +enter_messages: enter_msgs.o $(GDSSHR) + -$(RM) enter_messages + $(CXX) $(LINK_OPTS) enter_msgs.o -o enter_messages $(GDSSHR_LINK) + $(CHMOD_7) enter_messages + +modify_messages: modify_msgs.o $(GDSSHR) + -$(RM) modify_messages + $(CXX) $(LINK_OPTS) modify_msgs.o -o modify_messages $(GDSSHR_LINK) + $(CHMOD_7) modify_messages + +change_messages: change_msgs.o $(GDSSHR) + -$(RM) change_messages + $(CXX) $(LINK_OPTS) change_msgs.o -o change_messages $(GDSSHR_LINK) + $(CHMOD_7) change_messages + +build_file.exe: build_file.o + -$(RM) build_file.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)build_file build_file.o $(GDSSHR_LINK) + $(CHMOD_7) build_file.exe + +check_messages.exe: check_msgs.o + -$(RM) check_messages.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)check_messages check_msgs.o $(GDSSHR_LINK) + $(CHMOD_7) check_messages.exe + +enter_messages.exe: enter_msgs.o + -$(RM) enter_messages.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)enter_messages enter_msgs.o $(GDSSHR_LINK) + $(CHMOD_7) enter_messages.exe + +modify_messages.exe: modify_msgs.o + -$(RM) modify_messages.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)modify_messages modify_msgs.o $(GDSSHR_LINK) + $(CHMOD_7) modify_messages.exe + +change_messages.exe: change_msgs.o + -$(RM) change_messages.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)change_messages change_msgs.o $(GDSSHR_LINK) + $(CHMOD_7) change_messages.exe + +do_check: check_messages + ./check_messages -d $(MSGSDIR)master_msg_db -l + +debug: build_file.o check_msgs.o enter_msgs.o modify_msgs.o change_msgs.o $(GDSLIB) + $(CXX) $(LINK_OPTS) -g build_file.o -o build_file $(GDSLIB_LINK) + $(CXX) $(LINK_OPTS) -g check_msgs.o -o check_messages $(GDSLIB_LINK) + $(CXX) $(LINK_OPTS) -g enter_msgs.o -o enter_messages $(GDSLIB_LINK) + $(CXX) $(LINK_OPTS) -g modify_msgs.o -o modify_messages $(GDSLIB_LINK) + $(CXX) $(LINK_OPTS) -g change_msgs.o -o change_messages $(GDSLIB_LINK) + +force: + $(ECHO) force + +build_file.cpp: msg.gdb build_file.epp +build_file.o: build_file.cpp source/jrd/msg.h \ + source/jrd/gds_proto.h +check_msgs.cpp: msg.gdb check_msgs.epp +check_msgs.o: check_msgs.cpp source/jrd/gds_proto.h +enter_msgs.cpp: msg.gdb enter_msgs.epp +enter_msgs.o: enter_msgs.cpp +load.c: msg.gdb load.epp +load.o: load.cpp +modify_msgs.cpp: msg.gdb modify_msgs.epp +modify_msgs.o: modify_msgs.cpp +change_msgs.cpp: msg.gdb change_msgs.epp +change_msgs.o: change_msgs.cpp + +msg.gdb: $(OBJS)/dbs/msg.gdb.dummy + ln -fs $(OBJS)/dbs/msg.gdb msg.gdb + ln -fs $(OBJS)/dbs/msg.gdb master_msg_db + +$(OBJS)/dbs/msg.gdb.dummy: force + $(CD) $(OBJS)/dbs && $(MAKE) msg.gdb.dummy + +$(GDSSHR) $(GDSLIB_BACKEND): + $(CD) $(OBJS)/jrd && $(MAKE) $(@F) + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - msgs" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/msgs/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + +force: diff --git a/src/makefiles/sfx.pipe b/src/makefiles/sfx.pipe new file mode 100644 index 0000000000..e1f2aeb2a5 --- /dev/null +++ b/src/makefiles/sfx.pipe @@ -0,0 +1,59 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# $Id: sfx.pipe,v 1.1 2001-07-12 06:32:04 bellardo Exp $ +# +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/pipe +VPATH= $(SOURCE)/pipe +CXX= @CXX@ +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + + +all: allp.o allp.bin foot.o foot.bin head.o head.bin head5.bin head5.o + +# This target just forces those who depend on it, to execute their actions +force: + $(ECHO) force + +# PIPE + +allp.o allp.bin: allp.cpp pipe.h blk.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/pipe/allp_proto.h +allp.j: allp.o +foot.o foot.bin: foot.cpp pipe.h $(SOURCE)/jrd/license.h \ + $(SOURCE)/jrd/gds_proto.h allp_proto.h \ + $(SOURCE)/remote/merge_proto.h +head.o: head.cpp pipe.h $(SOURCE)/jrd/license.h $(SOURCE)/jrd/inf.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_proto.h \ + allp_proto.h head_proto.h \ + $(SOURCE)/remote/merge_proto.h +head.j: head.o +head5.cpp: head.cpp + -$(RM) head5.cpp + $(CP) $< head5.cpp +head5.o: head5.cpp + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DGDS_PIPE=\"bin/gds_pipe5\" head5.cpp +head5.j: head5.o + $(CXX) -c $(PIC_J_CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) -DGDS_PIPE=\"bin/gds_pipe5\" \ + head5.cpp -o head5_j.o + $(MV) head5_j.o head5.j + +# pipe.h: blk.h +# $(TOUCH) pipe.h diff --git a/src/makefiles/sfx.pyxis b/src/makefiles/sfx.pyxis new file mode 100644 index 0000000000..cb41a8f462 --- /dev/null +++ b/src/makefiles/sfx.pyxis @@ -0,0 +1,200 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/pyxis +VPATH= $(SOURCE)/pyxis +CXX= @CXX@ + +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + +unexport ISC_USER +unexport ISC_PASSWORD + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_STATIC) $(GPRE_FLAGS) $< $@ + + +override CFLAGS += $(CFLAGS_PYXIS) +# override PIC_FLAGS += $(CFLAGS_PYXIS) + +GPRE= $(OBJS)/firebird/bin/gpre +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT) +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT) +GPRE_FLAGS= -r -m -z -n +LIBPYXIS= $(OBJS)/firebird/lib/gds_pyxis.a + +# Forces library build for boot TMC 082100 +PYXIS_LIBRARY= libpyxis.a + +JRD_LINK= + +PYXIS_HEADERS= $(PYXIS_H) all.h scr.h blk.h +PHASE2_OBJECTS= allp.o altp.o debug.o edit.o menu.o movp.o phase2.o \ + phase3.o picstr.o pyxis.o save.o scr.o \ + $(PYXIS_MISC_OBJECTS) +PYXIS_P_OBJECTS= allp.bin altp.bin cdm.bin debug.bin edit.bin \ + menu.bin movp.bin phase2.bin phase3.bin picstr.bin \ + pyxis.bin save.bin scr.bin vt100.bin + +objects: $(PYXIS_OBJS) $(PYXIS_P_OBJS) $(PYXIS_LIBRARY) + +pyxis_objects: $(PHASE2_OBJECTS) + -$(RM) pyxis_objects + $(TOUCH) pyxis_objects + $(CHMOD_6) pyxis_objects + +pyx_p_objects: $(PYXIS_P_OBJECTS) + -$(RM) pyxis_objects pyx_p_objects + $(TOUCH) pyxis_objects pyx_p_objects + $(CHMOD_6) pyxis_objects pyx_p_objects + +pyxlib.o: $(PHASE2_OBJECTS) + -$(RM) pyxlib.o + ld -r $(PHASE2_OBJECTS) $(SCREEN_LIBS) -o pyxlib.o + $(CHMOD_6) pyxlib.o + +pyxislib: $(PHASE2_OBJECTS) + -$(RM) pyxislib + /com/bind qli.rsp + $(ECHO) $(ISC_FILE_LINK) $(GPRE_LINK) $(WALF_LINK) \ + $(LLIO_LINK) $(MISC_LINK) $(IBERR_LINK) $(DSC_LINK) >> qli.rsp + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)qli \ + @qli.rsp $(GDSSHR_LINK) $(ADVAPILIB) $(MPRLIB) + $(MV) qli.exe $(QLI) + $(RM) qli.exe qli.rsp + $(TOUCH) qli.exe + +qlilib.a: $(QLI_OBJECTS) $(JRD_LINK_OBJECTS) $(GPRE_LINK) + -$(RM) qlilib.a + $(AR) qlilib.a $(QLI_OBJECTS) $(SCO_OBJS_QLILIB) $(GPRE_LINK) + -ranlib qlilib.a + $(CHMOD_6) qlilib.a + +libqlilib.a: qlilib.a + -$(RM) libqlilib.a + $(CP) qlilib.a $(OBJS)/firebird/lib/qlilib.a + $(TOUCH) libqlilib.a + $(CHMOD_6) libqlilib.a + +qlilib.lib: $(QLI_OBJECTS) + -$(RM) qlilib.lib + $(IMPLIB) -out:qlilib.lib $(QLI_OBJECTS) + $(TOUCH) qlilib.lib + +qli_help: help.gdb + mkdir -p $(OBJS)/firebird/help + $(GBAK_STATIC) -b help.gdb $(OBJS)/firebird/help/help.gbak + -$(RM) help.gdb $(OBJS)/dbs/help.gdb $(OBJS)/dbs/help.gdb.dummy + + +debug: $(QLI_OBJECTS) $(GPRE_LINK) $(GDSLIB_BACKEND) + $(CXX) $(LINK_OPTS) -g $(QLI_OBJECTS) $(GPRE_LINK) -o qli_dbg $(GDSLIB_LINK) + +debug_nt: qlilib.lib + $(CXX) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)qli_dbg $(QLI_OBJECTS) $(GPRE_LINK) $(GDSLIB_LINK) + +all.o: all.cpp $(QLI_HEADERS) all_proto.h $(SOURCE)/jrd/gds_proto.h +command.o: command.cpp $(DTR_H) $(PARSE_H) compile.h exe.h \ + all_proto.h err_proto.h exe_proto.h proc_proto.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/gds_proto.h +compile.o: compile.cpp $(DTR_H) compile.h exe.h report.h form.h \ + all_proto.h compi_proto.h forma_proto.h $(SOURCE)/jrd/intl.h \ + $(SOURCE)/jrd/dsc_proto.h +DTR_H= dtr.h blk.h all_proto.h $(SOURCE)/jrd/dsc.h +#dtr.h: blk.h all_proto.h $(SOURCE)/jrd/dsc.h +# $(TOUCH) dtr.h +dtr.o: dtr.cpp $(DTR_H) $(PARSE_H) compile.h \ + all_proto.h compi_proto.h err_proto.h exe_proto.h \ + expan_proto.h gener_proto.h lex_proto.h parse_proto.h \ + $(SOURCE)/jrd/perf.h $(SOURCE)/jrd/license.h $(SOURCE)/jrd/gds_proto.h +err.o: err.cpp $(DTR_H) $(PARSE_H) err_proto.h $(SOURCE)/jrd/gds_proto.h +eval.o: eval.cpp $(DTR_H) exe.h err_proto.h eval_proto.h exe_proto.h \ + form_proto.h mov_proto.h $(SOURCE)/jrd/gds_proto.h +exe.o: exe.cpp $(DTR_H) exe.h err_proto.h eval_proto.h exe_proto.h \ + form_proto.h mov_proto.h repor_proto.h $(SOURCE)/jrd/gds_proto.h +expand.o: expand.cpp $(DTR_H) $(PARSE_H) compile.h exe.h report.h form.h \ + all_proto.h compi_proto.h err_proto.h expan_proto.h \ + form_proto.h show_proto.h +form.o: form.cpp $(DTR_H) exe.h form.h \ + all_proto.h err_proto.h eval_proto.h exe_proto.h \ + form_proto.h hsh_proto.h proc_proto.h \ + $(SOURCE)/pyxis/phase1.h $(SOURCE)/pyxis/phase2.h +format.o: format.cpp $(DTR_H) exe.h compile.h report.h format.h \ + all_proto.h eval_proto.h exe_proto.h forma_proto.h \ + mov_proto.h err_proto.h picst_proto.h +gener.o: gener.cpp $(DTR_H) exe.h compile.h report.h \ + all_proto.h compi_proto.h err_proto.h gener_proto.h \ + $(SOURCE)/jrd/align.h +help.cpp: help.gdb help.epp +help.o: help.cpp $(DTR_H) compile.h err_proto.h help_proto.h + $(SPECIAL_OPT) $(COPT_QLI_HELP) \ + $(CXX) -c $(CFLAGS) $(CXX_INCLUDE_DIRS) $(VERSION_FLAG) $< +hsh.o: hsh.cpp $(DTR_H) $(PARSE_H) words.h \ + all_proto.h err_proto.h hsh_proto.h +lex.o: lex.cpp $(DTR_H) $(PARSE_H) $(DTR_H) $(PARSE_H) \ + all_proto.h err_proto.h hsh_proto.h \ + lex_proto.h proc_proto.h $(SOURCE)/jrd/gds_proto.h +meta.cpp: yachts.lnk meta.epp +meta.o: meta.cpp $(DTR_H) compile.h exe.h reqs.h \ + all_proto.h err_proto.h gener_proto.h hsh_proto.h \ + meta_proto.h $(SOURCE)/jrd/gds_proto.h \ + $(SOURCE)/wal/walf_proto.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/flags.h +mov.o: mov.cpp $(DTR_H) err_proto.h mov_proto.h $(SOURCE)/pyxis/pyxis.h \ + $(SOURCE)/jrd/intl.h $(SOURCE)/jrd/gds_proto.h +noform.o: noform.cpp $(DTR_H) exe.h form.h +PARSE_H= parse.h symbols.h +#parse.h: symbols.h +# $(TOUCH) parse.h +parse.o: parse.cpp $(DTR_H) exe.h $(PARSE_H) compile.h report.h \ + all_proto.h err_proto.h lex_proto.h parse_proto.h +picstr.o: picstr.cpp $(DTR_H) format.h all_proto.h err_proto.h \ + picst_proto.h mov_proto.h $(SOURCE)/jrd/gds_proto.h \ + $(SOURCE)/pyxis/pyxis.h +proc.cpp: yachts.lnk proc.epp +proc.o: proc.cpp $(DTR_H) $(PARSE_H) compile.h procddl1.h procddl2.h \ + procddl3.h procddl4.h \ + err_proto.h lex_proto.h meta_proto.h proc_proto.h +report.o: report.cpp $(DTR_H) exe.h compile.h report.h \ + all_proto.h eval_proto.h exe_proto.h repor_proto.h +show.cpp: yachts.lnk show.epp +show.o: show.cpp $(DTR_H) $(PARSE_H) compile.h reqs.h \ + all_proto.h err_proto.h proc_proto.h show_proto.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/flags.h $(SOURCE)/jrd/gds_proto.h + +$(GDSSHR) $(GDSLIB_BACKEND) $(JRD_LINK_OBJECTS): + $(CD) $(OBJS)/jrd && $(MAKE) $@ + +$(GPRE_LINK): + $(CD) $(OBJS)/gpre && $(MAKE) $(@F) + +yachts.lnk: $(OBJS)/dbs/metadata.gdb.dummy + ln -fs $(OBJS)/dbs/metadata.gdb yachts.lnk + +$(OBJS)/dbs/metadata.gdb.dummy: force + $(CD) $(OBJS)/dbs && $(MAKE) metadata.gdb.dummy + +help.gdb: $(OBJS)/dbs/help.gdb.dummy + ln -fs $(OBJS)/dbs/help.gdb help.gdb + +$(OBJS)/dbs/help.gdb.dummy: force + $(CD) $(OBJS)/dbs && $(MAKE) help.gdb.dummy + + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - qli" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/qli/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + + +force: diff --git a/src/makefiles/sfx.remote b/src/makefiles/sfx.remote new file mode 100644 index 0000000000..75cfa5ec36 --- /dev/null +++ b/src/makefiles/sfx.remote @@ -0,0 +1,312 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@SET_MAKE@ + +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/remote +VPATH= $(SOURCE)/remote +CXX= @CXX@ + + +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT) +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) + +DEBUG_INET_INSTALL=$(OBJS)/firebird/bin/inet_dbg$(EXEC_EXT) + +JRD_LINK= $(OBJS)/jrd/isc.o $(OBJS)/jrd/isc_sync.o \ + $(OBJS)/jrd/sdl.o $(OBJS)/jrd/thd.o $(OBJS)/jrd/iberr.o +JRD_LINK2= $(OBJS)/jrd/isc_file.o + +REMOTE_OBJECTS= allr.o inet.o merge.o parser.o protocol.o remote.o \ + $(NET_OBJECTS) +INTERFACE_OBJECTS= interface.o $(REMOTE_OBJECTS) +#JMB - SERVER_OBJECTS= divorce.o server.o +SERVER_OBJECTS= server.o +INTERFACE_P_OBJECTS= interface.bin allr.bin inet.bin merge.bin parser.bin \ + protocol.bin remote.bin $(NET_P_OBJECTS) +REMOTE_J_OBJECTS= merge.j + +REMOTE_CLIENT_P_OBJECTS= allr.bin inet.bin interface.bin merge.bin \ + parser.bin protocol.bin \ + remote.bin $(NET_P_OBJECTS) + +all: rem_objects $(REMOTE_P_OBJS) inet_server$(EXEC_EXT) \ + $(INET_LIBRARY) $(DNET_SERVER) $(AMBX_SERVER) $(WNET_SERVER) \ + rem_$(SPECIAL_OBJECTS)_objects + + +remotelib: $(INTERFACE_OBJECTS) $(JRD_LINK) + -$(RM) remotelib + /com/bind remote.rsp + $(CC) $(LINK_OPTS) $(O_EXE_SWITCH)inet_server \ + @remote.rsp $(GDSSHR_LINK) $(WSOCKLIB) $(ADVAPILIB) $(MPRLIB) + $(MV) inet_server.exe $(INET_SERVER_DEST) + $(RM) inet_server.exe remote.rsp + $(TOUCH) inet_server.exe + +dnet_server: dnet_server.o $(SERVER_OBJECTS) $(REMOTE_OBJECTS) \ + $(JRD_LINK) $(REMOTE_GDSSHR) + -$(RM) dnet_server + $(CC) $(LINK_OPTS) dnet_server.o $(SERVER_OBJECTS) \ + -o dnet_server $(REMOTE_GDSSHR_LINK) + $(CHMOD_S7) dnet_server + $(MV) dnet_server $(DNET_SERVER_DEST) + $(TOUCH) dnet_server + $(CHMOD_6) dnet_server + +gds_server: ambx_server.o $(SERVER_OBJECTS) $(REMOTE_OBJECTS) \ + $(JRD_LINK) $(REMOTE_GDSSHR) + -$(RM) gds_server + $(CC) $(LINK_OPTS) ambx_server.o $(SERVER_OBJECTS) \ + -o gds_server $(REMOTE_GDSSHR_LINK) + $(CHMOD_7) gds_server + $(MV) gds_server $(AMBX_SERVER_DEST) + $(TOUCH) gds_server + $(CHMOD_6) gds_server + +nt_server.exe: nt_server.o server.o cntl.o $(REMOTE_OBJECTS) $(JRD_LINK) + -$(RM) nt_server.exe + $(CC) $(LINK_OPTS) $(O_EXE_SWITCH)nt_server \ + nt_server.o server.o cntl.o $(REMOTE_GDSSHR_LINK) + $(MV) nt_server.exe $(NT_SERVER_DEST) + $(RM) nt_server.exe + $(TOUCH) nt_server.exe + +inet_server.a: inet_server.o $(SERVER_OBJECTS) $(SCO_OBJS_REMLIB) + -$(RM) inet_server.a + $(AR) inet_server.a inet_server.o $(SERVER_OBJECTS) $(SCO_OBJS_REMLIB) + -ranlib inet_server.a + $(CHMOD_6) inet_server.a + $(MV) inet_server.a $(INET_LIB_DEST) + $(TOUCH) inet_server.a + $(CHMOD_6) inet_server.a + +dnet_server.a: dnet_server.o $(SERVER_OBJECTS) + -$(RM) dnet_server.a + $(AR) dnet_server.a dnet_server.o $(SERVER_OBJECTS) + -ranlib dnet_server.a + $(CHMOD_6) dnet_server.a + $(MV) dnet_server.a $(DNET_LIB_DEST) + $(TOUCH) dnet_server.a + $(CHMOD_6) dnet_server.a + +debug_PROD: + +debug_DEV: debug_inet_server + -$(RM) debug_DEV + -$(RM) $(DEBUG_INET_INSTALL) + -$(MV) inet_dbg $(DEBUG_INET_INSTALL) + -$(CHMOD_S7) $(DEBUG_INET_INSTALL) + $(TOUCH) debug_DEV + $(CHMOD_6) debug_DEV + +debug: debug_inet_server debug_$(DNET_SERVER) debug_$(AMBX_SERVER) + +debug_inet_server: inet_server.o $(SERVER_OBJECTS) $(INTERFACE_OBJECTS) \ + $(JRD_LINK) $(GDSLIB_BACKEND) + -$(RM) debug_inet_server + $(CC) $(LINK_OPTS) -g inet_server.o $(SERVER_OBJECTS) $(INTERFACE_OBJECTS) \ + -o inet_dbg $(GDSLIB_LINK) $(COREFOUNDATION_LINK) + $(TOUCH) debug_inet_server + $(CHMOD_6) debug_inet_server + +debug_dnet_server: dnet_server.o $(SERVER_OBJECTS) $(REMOTE_OBJECTS) \ + $(JRD_LINK) $(GDSLIB_BACKEND) + $(CC) $(LINK_OPTS) -g dnet_server.o $(SERVER_OBJECTS) \ + -o dnet_dbg $(GDSLIB_LINK) + +debug_gds_server: ambx_server.o $(SERVER_OBJECTS) $(GDSLIB_BACKEND) + $(CC) $(LINK_OPTS) ambx_server.o $(SERVER_OBJECTS) \ + -o server_dbg $(GDSLIB_LINK) + +debug_nt: + $(CC) $(DEBUG_LINK_OPTS) $(O_EXE_SWITCH)nt_dbg nt_server.o server.o cntl.o $(REMOTE_OBJECTS) $(GDSLIB_LINK) + +debug_: + +allr.o: allr.cpp remote.h $(SOURCE)/jrd/blk.h $(SOURCE)/jrd/ibsetjmp.h \ + allr_proto.h $(SOURCE)/jrd/gds_proto.h +ambx.o: ambx.cpp remote.h $(SOURCE)/jrd/thd.h +ambx_server.o: ambx_server.cpp remote.h $(SOURCE)/jrd/license.h +cntl.o: cntl.cpp remote.h $(SOURCE)/jrd/thd.h +decnet.o: decnet.cpp remote.h $(SOURCE)/jrd/thd.h +decnet_server.o: decnet_server.cpp remote.h $(SOURCE)/jrd/license.h $(SOURCE)/jrd/thd.h +dnet.o: dnet.cpp remote.h +divorce.o: divorce.cpp +inet.o: inet.cpp remote.h inet_proto.h remot_proto.h \ + $(SOURCE)/jrd/thd.h $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_proto.h +inet_server.o: inet_server.cpp remote.h \ + allr_proto.h inet_proto.h serve_proto.h \ + $(SOURCE)/jrd/license.h $(SOURCE)/jrd/thd.h \ + $(SOURCE)/jrd/gds_proto.h +interface.o: interface.cpp remote.h $(SOURCE)/jrd/ibsetjmp.h \ + inet_proto.h inter_proto.h merge_proto.h parse_proto.h \ + remot_proto.h \ + $(SOURCE)/jrd/thd.h $(SOURCE)/jrd/license.h \ + $(SOURCE)/jrd/cvt_proto.h $(SOURCE)/jrd/enc_proto.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_f_proto.h \ + $(SOURCE)/jrd/sdl_proto.h +ipc.o: ipc.cpp remote.h ipc.h $(SOURCE)/jrd/thd.h +ipc_server.o: ipc_server.cpp remote.h ipc.h $(SOURCE)/jrd/license.h +merge.o: merge.cpp remote.h \ + allr_proto.h merge_proto.h \ + $(SOURCE)/jrd/gds_proto.h +mgr.o: mgr.cpp remote.h $(SOURCE)/jrd/license.h +mslan.o: mslan.cpp remote.h lanentry.h $(SOURCE)/jrd/thd.h +mslansrv.o: mslansrv.cpp remote.h lanman.h $(SOURCE)/jrd/license.h +nt_server.o: nt_server.cpp remote.h $(SOURCE)/jrd/license.h $(SOURCE)/jrd/thd.h +parser.o: parser.cpp remote.h \ + allr_proto.h parse_proto.h \ + $(SOURCE)/jrd/align.h +protocol.o: protocol.cpp remote.h \ + allr_proto.h parse_proto.h proto_proto.h remot_proto.h \ + $(SOURCE)/jrd/sdl.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/sdl_proto.h +remote.h: protocol.h $(SOURCE)/jrd/blk.h xdr.h allr_proto.h \ + $(SOURCE)/jrd/dsc.h $(SOURCE)/jrd/thd.h +remote.o: remote.cpp remote.h allr_proto.h remot_proto.h \ + $(SOURCE)/jrd/gds_proto.h +server.o: server.cpp remote.h $(SOURCE)/jrd/ibsetjmp.h \ + allr_proto.h merge_proto.h parse_proto.h remot_proto.h \ + serve_proto.h \ + $(SOURCE)/jrd/thd.h $(SOURCE)/jrd/isc.h $(SOURCE)/jrd/license.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_proto.h \ + $(SOURCE)/jrd/sch_proto.h \ + $(SOURCE)/jrd/thd_proto.h +xdr.h: types.h in.h +winvx.o: winvx.cpp types.h in.h +wnet.o: wnet.cpp remote.h $(SOURCE)/jrd/license.h $(SOURCE)/jrd/thd.h +xdr.o: xdr.cpp xdr.h + +$(OBJS)/jrd/%: force + $(CD) $(OBJS)/jrd && $(MAKE) $(@F) + +$(REMOTE_GDSSHR): force + $(CD) $(OBJS)/jrd && $(MAKE) $(REMOTE_GDSSHR) + +# This target just forces those who depend on it, to execute their actions +force: + $(ECHO) force + +# .j objects are a special SOLARIS make +merge.j: merge.o + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - remote" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/remote/::g"\ + depends.out |sort|uniq > depends.out.1 + -$(CAT) depends.out.1 >> depends.mak + sed -e "s:\.o\::\.bin\::g" depends.out.1 >> depends.mak + -$(RM) depends.out depends.out.1 + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/sfx.utilities b/src/makefiles/sfx.utilities new file mode 100644 index 0000000000..490ec330a0 --- /dev/null +++ b/src/makefiles/sfx.utilities @@ -0,0 +1,274 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +@SET_MAKE@ + +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/utilities +VPATH= $(SOURCE)/utilities +CXX= @CXX@ + +.SUFFIXES: .cpp .epp +.epp.cpp: + $(GPRE_STATIC) $(GPRE_FLAGS) $< $@ + +unexport ISC_USER +unexport ISC_PASSWORD + +GPRE_STATIC= $(OBJS)/firebird/bin/gpre_static$(EXEC_EXT) +GBAK_STATIC= $(OBJS)/firebird/bin/gbak_static$(EXEC_EXT) +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + +GPRE_FLAGS= -r -m -z -n + +DBA= $(OBJS)/firebird/bin/gstat$(EXEC_EXT) +DROP= $(OBJS)/firebird/bin/gds_drop$(EXEC_EXT) +GSEC= $(OBJS)/firebird/bin/gsec$(EXEC_EXT) +GUARD= $(OBJS)/firebird/bin/ibguard$(EXEC_EXT) +IBMGR= $(OBJS)/firebird/bin/ibmgr.bin +REBUILD= $(OBJS)/firebird/bin/gds_rebuild$(EXEC_EXT) +RELAY= $(OBJS)/firebird/bin/gds_relay$(EXEC_EXT) +INSTALL_REG= $(OBJS)/firebird/bin/gds_install$(EXEC_EXT) +INSTALL_SVC= $(OBJS)/firebird/bin/gds_install_service$(EXEC_EXT) +CREATE_DB= $(OBJS)/firebird/bin/create_db$(EXEC_EXT) +ISC_GDB= $(OBJS)/firebird/isc4.gdb +ISC_GBAK= $(OBJS)/firebird/bin/isc4.gbak + + +JRD_LINK= $(OBJS)/jrd/isc.o $(OBJS)/jrd/isc_ipc.o $(OBJS)/jrd/isc_sync.o \ + $(OBJS)/jrd/gds.o $(OBJS)/jrd/dls.o +JRD_LINK2= $(ISC_LINK) $(ISC_FILE_LINK) $(ISC_SYNC_LINK) +ISC_LINK= $(OBJS)/jrd/isc.o +ISC_FILE_LINK= $(OBJS)/jrd/isc_file.o +ISC_SYNC_LINK= $(OBJS)/jrd/isc_sync.o +ENC_LINK= $(OBJS)/jrd/enc.o +LOCK_LINK= $(OBJS)/lock/lock.o + +all: dba$(EXEC_EXT) drop$(EXEC_EXT) \ + gsec$(EXEC_EXT) relay$(EXEC_EXT) + +super_server_targets: ibguard$(EXEC_EXT) ibmgr$(EXEC_EXT) + +create_db: create_db.o + -$(RM) create_db + $(CXX) $(LINK_OPTS) create_db.o \ + $(OBJS)/jrd/jrd_static.a \ + $(COREFOUNDATION_LINK) \ + -o create_db $(DROP_LINK) + $(CHMOD_7) create_db + $(MV) create_db $(CREATE_DB) + $(TOUCH) create_db + $(CHMOD_6) create_db + + +dba: dba.o ppg.o $(GDSSHR) + -$(RM) dba + $(CXX) $(LINK_OPTS) dba.o ppg.o $(ENC_LINK) $(STDIO) -o dba $(GDSSHR_LINK) + $(CHMOD_7) dba + $(MV) dba $(DBA) + $(TOUCH) dba + $(CHMOD_6) dba + +dba.exe: dba.o ppg.o + -$(RM) dba.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)dba dba.o ppg.o $(ENC_LINK) $(GDSSHR_LINK) + $(MV) dba.exe $(DBA) + $(RM) dba.exe + $(TOUCH) dba.exe + +drop: drop.o dropv3.o $(JRD_LINK) $(LOCK_LINK) + -$(RM) drop + $(CXX) $(LINK_OPTS) drop.o dropv3.o $(JRD_LINK) $(LOCK_LINK) \ + $(STDIO) -o drop $(SCO_SOCKET_LIB) $(SO_THREAD_LIB) $(NSL_LIB) \ + $(COREFOUNDATION_LINK) $(DROP_LINK) + $(CHMOD_S7) drop + $(MV) drop $(DROP) + $(TOUCH) drop + $(CHMOD_6) drop + +ibguard: guard.o util.o $(GDSSHR) + -$(RM) ibguard + $(CXX) $(LINK_OPTS) guard.o util.o $(STDIO) -o ibguard $(GDSSHR_LINK) + $(CHMOD_7) ibguard + $(MV) ibguard $(GUARD) + $(TOUCH) ibguard + $(CHMOD_6) ibguard + +ibmgr: ibmgr.o srvrmgr.o $(GDSSHR) + -$(RM) ibmgr + $(CXX) $(LINK_OPTS) ibmgr.o srvrmgr.o $(STDIO) -o ibmgr $(GDSSHR_LINK) + $(CHMOD_7) ibmgr + $(MV) ibmgr $(IBMGR) + $(TOUCH) ibmgr + $(CHMOD_6) ibmgr + +# JMB $(ENC_LINK) already in shared library +# JMB security.o already in shared library +gsec: gsec.o $(GDSSHR) + -$(RM) gsec + $(CXX) $(LINK_OPTS) gsec.o $(STDIO) -o gsec $(GDSSHR_LINK) + $(CHMOD_7) gsec + $(MV) gsec $(GSEC) + $(TOUCH) gsec + $(CHMOD_6) gsec + +gsec.exe: gsec.o security.o $(ENC_LINK) $(ISC_LINK) + -$(RM) gsec.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)gsec gsec.o security.o $(ENC_LINK) $(ISC_LINK) $(GDSSHR_LINK) $(ADVAPILIB) + $(MV) gsec.exe $(GSEC) + $(RM) gsec.exe + $(TOUCH) gsec.exe + +rebuild: rebuild.o rstore.o rmet.o $(OBJS)/jrd/dmp.o + -$(RM) rebuild + $(CXX) $(LINK_OPTS) rebuild.o $(OBJS)/jrd/dmp.o rstore.o rmet.o \ + $(STDIO) -o rebuild $(GDSSHR_LINK) + $(CHMOD_7) rebuild + $(MV) rebuild $(REBUILD) + $(TOUCH) rebuild + $(CHMOD_6) rebuild + +rebuild.exe: rebuild.o rstore.o rmet.o $(OBJS)/jrd/dmp.o + -$(RM) rebuild.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)rebuild \ + rebuild.o $(OBJS)/jrd/dmp.o rstore.o rmet.o $(GDSSHR_LINK) + $(MV) rebuild.exe $(REBUILD) + $(RM) rebuild.exe + $(TOUCH) rebuild.exe + +relay: relay.o + -$(RM) relay + $(CXX) $(LINK_OPTS) relay.o $(STDIO) -o relay $(SCO_SOCKET_LIB) + $(CHMOD_S7) relay + $(MV) relay $(RELAY) + $(TOUCH) relay + $(CHMOD_6) relay + +install_reg.exe: install_reg.o registry.o + -$(RM) install_reg.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)install_reg install_reg.o registry.o $(CONLIBSDLL) $(ADVAPILIB) + $(MV) install_reg.exe $(INSTALL_REG) + $(RM) install_reg.exe + $(TOUCH) install_reg.exe + +install_svc.exe: install_svc.o services.o + -$(RM) install_svc.exe + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)install_svc install_svc.o services.o $(CONLIBSDLL) $(ADVAPILIB) + $(MV) install_svc.exe $(INSTALL_SVC) + $(RM) install_svc.exe + $(TOUCH) install_svc.exe + +isc4.gdb isc.gdb: $(SOURCE)/utilities/isc4.sql $(SOURCE)/utilities/isc4.gdl force + -$(RM) $(ISC_GDB) isc4.gdb isc.gdb + $(OBJS)/firebird/bin/isql -z -i $(SOURCE)/utilities/isc4.sql + $(OBJS)/firebird/bin/gdef -z $(SOURCE)/utilities/isc4.gdl + $(CP) isc4.gdb $(ISC_GDB) + ln -sf $(ISC_GDB) isc.gdb + +sysdba_user: gsec + -$(OBJS)/firebird/bin/gsec -da isc4.gdb -delete $(ISC_USER) + $(OBJS)/firebird/bin/gsec -da isc4.gdb -add $(ISC_USER) -pw $(ISC_PASSWORD) + $(RM) $(ISC_GDB) + mv isc4.gdb $(ISC_GDB) + $(GBAK_STATIC) -z $(ISC_GDB) $(ISC_GBAK) + $(CHMOD_6) $(ISC_GBAK) $(ISC_GDB) + ln -sf $(ISC_GDB) isc4.gdb + +$(GDSSHR): force + $(CD) $(OBJS)/jrd && $(MAKE) $(GDSSHR) + +create_db.o: create_db.cpp +dba.cpp: yachts.lnk dba.epp +dba.o: dba.cpp ppg_proto.h \ + $(SOURCE)/jrd/ods.h $(SOURCE)/jrd/license.h \ + $(SOURCE)/jrd/gds_proto.h + +ppg.o: ppg.cpp ppg_proto.h \ + $(SOURCE)/jrd/ods.h $(SOURCE)/jrd/gds_proto.h + +drop.o: drop.cpp $(SOURCE)/jrd/license.h $(SOURCE)/jrd/file_params.h \ + drpv3_proto.h $(SOURCE)/lock/lock.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/isc_proto.h + +dropv3.o: dropv3.cpp $(SOURCE)/jrd/common.h $(SOURCE)/jrd/isc.h \ + drpv3_proto.h $(SOURCE)/jrd/license.h $(SOURCE)/jrd/isc_proto.h \ + $(SOURCE)/jrd/isc_s_proto.h $(SOURCE)/lock/fparamv3.h + +gsec.o: gsec.cpp gsec.h $(SOURCE)/jrd/license.h secur_proto.h +security.cpp: security.epp + $(GPRE_STATIC) $(GPRE_FLAGS) $< $@ +security.o: security.cpp gsec.h $(SOURCE)/jrd/pwd.h secur_proto.h \ + $(SOURCE)/jrd/enc_proto.h $(SOURCE)/jrd/gds_proto.h + +install_reg.o: install_reg.cpp $(SOURCE)/jrd/license.h $(SOURCE)/utilities/install_nt.h +install_svc.o: install_svc.cpp $(SOURCE)/jrd/license.h $(SOURCE)/utilities/install_nt.h +services.o: services.cpp $(SOURCE)/jrd/license.h $(SOURCE)/utilities/install_nt.h +registry.o: registry.cpp $(SOURCE)/jrd/license.h $(SOURCE)/utilities/install_nt.h + +rebuild.h: $(SOURCE)/jrd/ods.h +rebuild.o: rebuild.cpp rebuild.h $(SOURCE)/jrd/jrd.h $(SOURCE)/jrd/pag.h \ + $(SOURCE)/jrd/tra.h +rmet.o: rmet.cpp $(SOURCE)/jrd/jrd.h $(SOURCE)/jrd/tra.h $(SOURCE)/jrd/pag.h \ + rebuild.h +rmet.cpp: rmet.epp +rstore.o: rstore.cpp rebuild.h +rstore.cpp: rstore.epp + +relay.o: relay.cpp $(SOURCE)/jrd/license.h + +$(OBJS)/jrd/%: + $(CD) $(OBJS)/jrd && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) + +yachts.lnk: $(OBJS)/dbs/empty.gdb.dummy + ln -fs $(OBJS)/dbs/empty.gdb yachts.lnk + +$(OBJS)/dbs/empty.gdb.dummy: force + $(CD) $(OBJS)/dbs && $(MAKE) empty.gdb.dummy + + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - utilities" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/utilities/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + + +force: diff --git a/src/makefiles/sfx.wal b/src/makefiles/sfx.wal new file mode 100644 index 0000000000..cf1c723128 --- /dev/null +++ b/src/makefiles/sfx.wal @@ -0,0 +1,169 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. + +SOURCE= source +OBJS= objs + +srcdir= $(SOURCE)/wal +VPATH= $(SOURCE)/wal +CXX= @CXX@ + +GPRE= $(OBJS)/firebird/bin/gpre$(EXEC_EXT) +GPRE_BOOT= $(OBJS)/firebird/bin/gpre_boot$(EXEC_EXT) +CXX_INCLUDE_DIRS= -I. -Isource/jrd -I- + + +WAL_OBJECTS= wal.o walc.o walf.o walr.o wstatus.o +WALW_OBJECTS= walc.o walf.o walw.o walw_main.o +WAL_P_OBJECTS= wal.bin walc.bin walf.bin walr.bin + +JRD_OBJECTS= $(OBJS)/jrd/gds.o $(OBJS)/jrd/iberr.o \ + $(OBJS)/jrd/isc.o $(OBJS)/jrd/isc_file.o $(OBJS)/jrd/isc_ipc.o \ + $(OBJS)/jrd/isc_sync.o $(OBJS)/jrd/llio.o $(OBJS)/jrd/misc.o + +WAL_WRITER= $(OBJS)/firebird/bin/gds_wal_writer$(EXEC_EXT) +WAL_PRINT= $(OBJS)/firebird/bin/gds_wal_print$(EXEC_EXT) + +all: wal_objects $(WAL_P_OBJS) wal_writer$(EXEC_EXT) + +wal_objects: $(WAL_OBJECTS) + -$(RM) wal_objects + $(TOUCH) wal_objects + $(CHMOD_6) wal_objects + +wal_p_objects: $(WAL_P_OBJECTS) + -$(RM) wal_p_objects + $(TOUCH) wal_p_objects + $(CHMOD_6) wal_p_objects + +wal_print: wal_prnt.o $(WAL_OBJECTS) $(JRD_OBJECTS) + -$(RM) wal_print + $(CXX) $(LINK_OPTS) wal_prnt.o $(WAL_OBJECTS) $(JRD_OBJECTS) \ + -o wal_print $(SCO_SOCKET_LIB) $(SO_THREAD_LIB) $(NSL_LIB) + $(CHMOD_7) wal_print + $(MV) wal_print $(WAL_PRINT) + $(TOUCH) wal_print + $(CHMOD_6) wal_print + +wal_print.exe: wal_prnt.o $(WAL_OBJECTS) $(JRD_OBJECTS) $(OBJS)/jrd/thd.o + -$(RM) wal_print.exe wal.rsp + $(ECHO) wal_prnt.o $(WAL_OBJECTS) $(JRD_OBJECTS) $(OBJS)/jrd/thd.o > wal.rsp + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)wal_print \ + @wal.rsp $(CONLIBSDLL) $(ADVAPILIB) $(MPRLIB) + $(MV) wal_print.exe $(WAL_PRINT) + $(RM) wal_print.exe wal.rsp + $(TOUCH) wal_print.exe + +wal_writer: $(WALW_OBJECTS) divorce.o $(JRD_OBJECTS) $(OBJS)/jrd/jrn.o + -$(RM) wal_writer + $(CXX) $(LINK_OPTS) $(WALW_OBJECTS) divorce.o $(JRD_OBJECTS) $(OBJS)/jrd/jrn.o \ + -o wal_writer $(SO_SOCKET_LIB) \ + $(SCO_SOCKET_LIB) $(SO_THREAD_LIB) $(SOCKET_LIB) + $(CHMOD_S7) wal_writer + $(MV) wal_writer $(WAL_WRITER) + $(TOUCH) wal_writer + $(CHMOD_6) wal_writer + +wal_writer.exe: $(WALW_OBJECTS) $(JRD_OBJECTS) $(OBJS)/jrd/jrn.o $(OBJS)/jrd/thd.o + -$(RM) wal_writer.exe wal.rsp + $(ECHO) $(WALW_OBJECTS) $(JRD_OBJECTS) $(OBJS)/jrd/jrn.o $(OBJS)/jrd/thd.o > wal.rsp + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)wal_writer \ + @wal.rsp $(CONLIBSDLL) $(ADVAPILIB) $(MPRLIB) + $(MV) wal_writer.exe $(WAL_WRITER) + $(RM) wal_writer.exe wal.rsp + $(TOUCH) wal_writer.exe + +driver: driver.o $(WAL_OBJECTS) $(JRD_OBJECTS) + -$(RM) driver + $(CXX) $(LINK_OPTS) driver.o $(WAL_OBJECTS) $(JRD_OBJECTS) \ + -o driver $(SCO_SOCKET_LIB) $(SO_THREAD_LIB) $(NSL_LIB) + $(CHMOD_7) driver + +driver.exe: driver.o $(WAL_OBJECTS) $(JRD_OBJECTS) $(OBJS)/jrd/thd.o + -$(RM) driver.exe wal.rsp + $(ECHO) driver.o $(WAL_OBJECTS) $(JRD_OBJECTS) $(OBJS)/jrd/thd.o > wal.rsp + $(CXX) $(LINK_OPTS) $(O_EXE_SWITCH)driver \ + @wal.rsp $(CONLIBSDLL) $(ADVAPILIB) $(MPRLIB) + $(RM) wal.rsp + +divorce.cpp: $(SOURCE)/jrd/divorce.cpp + $(CP) $< divorce.cpp +divorce.o divorce.bin: divorce.cpp $(SOURCE)/jrd/divor_proto.h +driver.o driver.bin: driver.cpp wal.h $(SOURCE)/jrd/jrd.h $(SOURCE)/jrd/flags.h \ + $(SOURCE)/jrd/dsc.h $(SOURCE)/jrd/jrn.h +wal_prnt.o wal_prnt.bin: wal_prnt.cpp wal.h +wal.o wal.bin: wal.cpp wal.h wal_proto.h walc_proto.h \ + $(SOURCE)/jrd/jrd.h $(SOURCE)/jrd/jrn.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/iberr_proto.h \ + $(SOURCE)/jrd/isc_proto.h +wal.h: $(SOURCE)/jrd/misc.h $(SOURCE)/jrd/isc.h $(SOURCE)/jrd/common.h +# $(TOUCH) wal.h +walc.o walc.bin: walc.cpp wal.h walc_proto.h walf_proto.h \ + $(SOURCE)/jrd/jrd.h $(SOURCE)/jrd/file_params.h \ + $(SOURCE)/jrd/jrn.h $(SOURCE)/jrd/flags.h $(SOURCE)/jrd/isc.h \ + $(SOURCE)/jrd/llio.h $(SOURCE)/jrd/isc_signal.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/iberr_proto.h \ + $(SOURCE)/jrd/isc_proto.h $(SOURCE)/jrd/llio_proto.h +walf.o walf.bin: walf.cpp wal.h walf_proto.h \ + $(SOURCE)/jrd/dsc.h $(SOURCE)/jrd/llio.h $(SOURCE)/jrd/gds_proto.h \ + $(SOURCE)/jrd/iberr_proto.h $(SOURCE)/jrd/llio_proto.h \ + $(SOURCE)/jrd/misc_proto.h +walr.o walr.bin: walr.cpp wal.h walf_proto.h walr_proto.h \ + $(SOURCE)/jrd/llio.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/iberr_proto.h \ + $(SOURCE)/jrd/llio_proto.h +walw.o walw.bin: walw.cpp wal.h \ + wal_proto.h walc_proto.h walf_proto.h walw_proto.h \ + $(SOURCE)/jrd/jrd.h $(SOURCE)/jrd/dsc.h $(SOURCE)/jrd/isc.h \ + $(SOURCE)/jrd/jrn.h $(SOURCE)/jrd/iberr.h $(SOURCE)/jrd/llio.h \ + $(SOURCE)/jrd/gds_proto.h $(SOURCE)/jrd/iberr_proto.h \ + $(SOURCE)/jrd/isc_proto.h $(SOURCE)/jrd/jrn_proto.h \ + $(SOURCE)/jrd/llio_proto.h $(SOURCE)/jrd/misc_proto.h +wstatus.o wstatus.bin: wstatus.cpp wal.h wstat_proto.h walc_proto.h + +$(OBJS)/jrd/%: + $(CD) $(OBJS)/jrd && $(MAKE) CFLAGS="$(CFLAGS)" SYSTEM="$(SYSTEM)" $(@F) + +# This entry is used to programatically update the include file dependencies +# for all *.c files in the current directory. +# +# Note that it is specific to Solaris by using the -xM1 compiler option. +# This option has CC generate dependency lines for the makefile - but +# does not generate object files. +# It is likely that a similar option exists on other platforms. +# +# It is recommended that depends.mak be created on a platform +# that supports such an option. depends.mak is not platform dependent, it uses +# the standard makefile output format, as can be copied to platforms +# that don't have a -xM1 feature in the c compiler. +# +depends.mak: + -$(RM) depends.out + -$(CC) $(CFLAGS) -xM1 *.c 1>&2 > depends.out + -$(RM) depends.mak + $(ECHO) "# depends.mak - wal" > depends.mak + $(ECHO) "# Created by 'make depends.mak'" >> depends.mak + date "+# Created on %Y-%m-%d" >> depends.mak + sed -e "s:source/[a-z/]*/source:source:g" -e "s:source/wal/::g"\ + depends.out |sort|uniq >> depends.mak + -$(RM) depends.out + +# In the event that a platform does not support the make directive "include" - +# concatenate "depends.mak" with the makefile. +# +include depends.mak + diff --git a/src/makefiles/site_variables b/src/makefiles/site_variables new file mode 100644 index 0000000000..f67c255933 --- /dev/null +++ b/src/makefiles/site_variables @@ -0,0 +1,116 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +: +# @(#) site_vars 1.6 Dec 16, 1991 +# +# Copyright (C) 1989 The Santa Cruz Operation Inc. All Rights Reserved +# This Module contains Proprietary Information of +# The Santa Cruz Operation Inc, and should be treated as Confidential. +# + +# +# CHANGE THESE FOR EACH PRODUCT +# +# Full name of the product, for example, "SCO Xsight" +PRODSET="InterBase" +# PRD Value for product. The prd value is arbitrary. It should be +# unique and 8 or less lowercase alpha/numeric characters. example: "xsight" +PRODPRD=intrbase +# Machine type which defines the products software/hardware requirements +PRODTYP=u386 +# Product release: [major rev].[functionality rev].[bugfix rev][dev group rev] +# standard convention is to start with 1.0.0a +PRODREL=V.4.0A +# Target Operating System for the product. Must be UNIX or XENIX +TARGET_OS=UNIX +# Variables used by mkperm (invoked by docut) to get package information +# for a product with one major package, if it is not given by other +# means (eg. by docut -p ) +# BASEPACKDIR is the directory under which the files are. (eg ./source) +BASEPACKDIR=source +# BASEPACKNAME is the package name (eg MAIN) +BASEPACKNAME=INTRBASE +# BASEPACKDESC is the description of this pkg. (eg. "SCO Mastering Tools") +# This should be a quoted string. +BASEPACKDESC="Interbase" + +# +# CHANGE THESE FOR EACH MEDIA TYPE +# +# device name for archiving distribution +# For 5 1/4 inch devices: +# DEVICE=/dev/rfd096ds15 +# or, for a 5 1/4 on the second floppy: +DEVICE=/dev/rfd196ds15 +# 3 1/2 inch floppy on drive 0. +# This is the first 3 1/2 inch 1.44 floppy drive +#DEVICE=/dev/rfd0135ds18 + +# size of each distribution volume - 1200k for 96dshd floppies, +# 1440k for 135dshd floppies. 1200k will work for either floppy type + +VOLSIZE=1200k +# blocking factor if required +BLOCKING=10 +# complete command needed to format a volume +FORMAT="format $DEVICE" +# pathnames of any files not to be archived +NOTAR='' + +# +# SPECIAL PURPOSE VALUES. MODIFIED UNDER SPECIAL CIRCUMSTANCES +# +# NOCOMPRESS: used to indicate _packages_ in the product which are +# not to be compressed when the -c option is used with docut or mkcuts +# If NOCOMPRESS is not set, the only file not compressed is the permlist. +NOCOMPRESS="PERM" +# +# Used for products designed to use custom update functionality. +# To be used in conjunction with doupdate. Reference custom update definition +# before using. Used ONLY for updates, example: "UA" +PRODUPD= +# For INTERNAL SCO use only. vols that require prefixes (B's,X's,D's) +VOLPREFIX= +# Only for products using SCO serialization. +# Serialization key for serialization - optional, only if branding files +SERIALKEY= +# Only for products using SCO serialization. +# Pathnames to any serialization files - optional, only if branding files +SERIALIZE='' +# For INTERNAL SCO use only. Special volumes that exist in non-default +# locations. Default location is ./tmp/perms/$PRODPRD[.$PRODUPD] +# If set this pathname must be relative to DISTDIR. +PERMLIST= + +# +# STANDARD VALUES. GENERALLY, NON-MODIFIED +# +# the "root" directory of the distribution hierarchy +DISTDIR=`pwd`/dist +# distribution misc directory, relative to DISTDIR +# used to store list of files corresponding to volumes +MISCDIR=../misc +# the "root" directory of the compressed hierarchy +CDISTDIR=`pwd`/cdist +# string which unknown media types should be referred to as +# (known media is 96ds15, 96ds9, 135ds18, 135ds9, 96ds8, 48ds9, rct0, rctmini) +# suggested non standard setting is OTHER_MEDIA=`basename $DEVICE` +OTHER_MEDIA="unknown" +# Image directory where media images are stored +IMAGEDIR=`pwd`/Images +# Sums directory where individual file sums of media are stored +SUMDIR=`pwd`/Sums diff --git a/src/makefiles/special_opt b/src/makefiles/special_opt new file mode 100644 index 0000000000..8ff39d5294 --- /dev/null +++ b/src/makefiles/special_opt @@ -0,0 +1,84 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to perform special optimization functions. It can +# force optimization, prevent optimization, or do nothing. +if [ "$1" = '?' ]; then + echo 'Usage: special_opt [YES] compile_line' + echo ' [NO ]' +fi +# +SYSTEM=$(SYSTEM) +# +# Set default optimize and debug flags +FLAGS_OPT=-O +FLAGS_DEBUG=-g +# +# Set system specific optimize and debug flags +if [ "$SYSTEM" = 'NXT' ]; then +# On NeXT, optimization and debugging are NOT mutually exclusive + FLAGS_DEBUG= +fi +if [ "$SYSTEM" = 'WIN_NT' -o "$SYSTEM" = 'OS2' -o "$SYSTEM" = 'WIN_NTS' ]; then + PATH="$PATH;$Path" + export PATH +# On Windows NT, optimization and debugging are NOT mutually exclusive + FLAGS_OPT=-Ob2gtp + FLAGS_DEBUG= +fi +# +# If the first argument isn't YES or NO, just execute the command, as is +if [ "$1" != 'YES' -a "$1" != 'NO' ]; then + set -x + $@ + exit $? +fi +# +OPTIMIZE_CASE=$1 +shift 1 +# +if [ "$OPTIMIZE_CASE" = 'YES' ]; then + REMOVE=$FLAGS_DEBUG + INCLUDE=$FLAGS_OPT +else + REMOVE=$FLAGS_OPT + INCLUDE= +fi +# +COMPILE_LINE= +PRIOR= +INCLUDED=0 +for i +do + COMPILE_LINE="$COMPILE_LINE $PRIOR" + if [ "$i" != "$REMOVE" ]; then + PRIOR=$i + if [ "$i" = "$INCLUDE" ]; then + INCLUDED=1 + fi + else + PRIOR= + fi +done +# +if [ $INCLUDED -eq 1 ]; then + INCLUDE= +fi +COMPILE_LINE="$COMPILE_LINE $INCLUDE $PRIOR" +set -x +eval $COMPILE_LINE +exit $? diff --git a/src/makefiles/special_opt.c b/src/makefiles/special_opt.c new file mode 100644 index 0000000000..7bf2430e8f --- /dev/null +++ b/src/makefiles/special_opt.c @@ -0,0 +1,127 @@ +/* + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ +#include + +/* The purpose of this program is to simulate the actions of + the special_opt shell script. It can be used on brain dead + systems that don't have a reasonable scripting language. */ + +#ifdef WIN_NT +#define FLAGS_OPT "-Ob2gtp" +#else +#define FLAGS_OPT "-O" +#endif +#ifdef NeXT +#define FLAGS_DEBUG " " +#else +#define FLAGS_DEBUG "-g" +#endif + +main (argc, argv) + int argc; + char *argv []; +{ +int i, length, included; +char *compile_line, *remove, *include, *prior; + +if (argc < 2) + { + usage(); + exit (1); + } + +/* Determine the potential length of the command and allocate enough + space to hold it. */ + +for (i = 1, length = 0; i < argc;) + length += strlen (argv [i++]) + 1; + +compile_line = malloc (length); +*compile_line = 0; + +/* If the first argument isn't YES or NO, just execute the command, as is. */ + +if (strcmp (argv [1], "YES") && strcmp (argv [1], "NO")) + { + for (i = 1; i < argc;) + { + strcat (compile_line, argv [i++]); + strcat (compile_line, " "); + } + + printf ("%s\n", compile_line); + system (compile_line); + exit (0); + } + +if (!strcmp (argv [1], "YES")) + { + remove = FLAGS_DEBUG; + include = FLAGS_OPT; + } +else + { + remove = FLAGS_OPT; + include = " "; + } + +prior = NULL; +included = 0; + +for (i = 2; i < argc; i++) + { + if (prior) + { + strcat (compile_line, prior); + strcat (compile_line, " "); + } + if (strcmp (argv [i], remove)) + { + prior = argv [i]; + if (!strcmp (argv [i], include)) + included = 1; + } + else + prior = NULL; + } + +if (!included) + { + strcat (compile_line, include); + strcat (compile_line, " "); + } + +if (prior) + { + strcat (compile_line, prior); + strcat (compile_line, " "); + } + +printf ("%s\n", compile_line); +system (compile_line); + +exit (0); +} + +usage () +{ + +fprintf (stderr, "Usage: special_opt [YES] compile_line"); +fprintf (stderr, " [NO ]"); +} diff --git a/src/makefiles/sys.conf.isc.apollo b/src/makefiles/sys.conf.isc.apollo new file mode 100644 index 0000000000..7b873aeb8f --- /dev/null +++ b/src/makefiles/sys.conf.isc.apollo @@ -0,0 +1,22 @@ +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# +# InterBase Globally Known Libraries +# +lib /interbase/lib/gdslib, optional +lib /interbase/lib/dsqllib, optional +lib /interbase/lib/pyxislib, optional diff --git a/src/makefiles/unset_prot b/src/makefiles/unset_prot new file mode 100644 index 0000000000..f7564dfc5e --- /dev/null +++ b/src/makefiles/unset_prot @@ -0,0 +1,254 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to unset the protections on files in +# the installation directory +PATH=$PATH:/etc:/bin:/usr/ucb +export PATH +if [ $# != 1 -a $# != 2 ]; then + echo 'Usage: unset_prot {user} [group]' + exit 1 +fi +if [ $# = 1 ]; then + GROUP=gds +else + GROUP=$2 +fi + +if [ ! -d SCO -a ! -d DELTA -a ! -d DG -a ! -d SCO_EV ]; then + RUNNER=`whoami` + if [ ! -z "$RUNNER" ]; then + if [ "$RUNNER" != "root" -a "$RUNNER" != $1 ]; then + echo 'unset_prot must be run as "root" or super user' + exit 1 + fi + else + echo 'unset_prot must be run as "root" or super user' + exit 1 + fi +fi +set -x +cd source/interbase +chown $1 \ + . \ + bin examples examples/v3 examples/v4 examples/v5 help include intl lib \ + bin/* \ + examples/v3/* \ + examples/v4/* \ + examples/v5/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + inetd.conf.isc \ + install \ + interbase.msg \ + isc4.gdb \ + services.isc + +chgrp $GROUP \ + . \ + bin examples examples/v3 examples/v4 examples/v5 help include intl lib \ + bin/* \ + examples/v3/* \ + examples/v4/* \ + examples/v5/* \ + help/* \ + include/* \ + intl/* \ + lib/* \ + inetd.conf.isc \ + install \ + interbase.msg \ + isc4.gdb \ + services.isc + +if [ -d Firebird.framework ] + chown -R $1 Firebird.framework + chgrp -R $GROUP Firebird.framework +fi + + +chmod ug=rwx install bin/* lib/* intl/* + +chmod ug=rw \ + examples/v3/* \ + examples/v4/* \ + examples/v5/* \ + help/* \ + include/* \ + inetd.conf.isc \ + interbase.msg \ + services.isc + +if [ -d Firebird.framework ]; then + chmod 775 \ + Firebird.framework \ + Firebird.framework/Versions \ + Firebird.framework/Versions/A \ + Firebird.framework/Versions/A/Resources \ + Firebird.framework/Versions/A/Resources/bin \ + Firebird.framework/Versions/A/Resources/examples \ + Firebird.framework/Versions/A/Resources/examples/v3 \ + Firebird.framework/Versions/A/Resources/examples/v4 \ + Firebird.framework/Versions/A/Resources/examples/v5 \ + Firebird.framework/Versions/A/Resources/English.lproj \ + Firebird.framework/Versions/A/Resources/English.lproj/var +fi + +chmod ug=rwx bin examples examples/v3 examples/v4 examples/v5 include intl lib + +chown root bin/gds_relay +chmod u+s,g+s bin/gds_relay +if [ -d Firebird.framework ]; then + chown root Firebird.framework/Resources/bin/gds_relay + chmod u+s,g+s Firebird.framework/Resources/bin/gds_relay +fi + + +chown root bin/gds_wal_writer +chmod u+s,g+s bin/gds_wal_writer +if [ -d Firebird.framework ]; then + chown root Firebird.dramework/Resources/bin/gds_wal_writer + chmod u+s,g+s Firebird.dramework/Resources/bin/gds_wal_writer +fi + + +if [ -f bin/gds_inet_srvr ]; then + chown root bin/gds_inet_srvr + chmod u+s,g+s bin/gds_inet_srvr + if [ -d Firebird.framework ]; then + chown root Firebird.framework/Resources/bin/gds_inet_srvr + chmod u+s,g+s Firebird.framework/Resources/bin/gds_inet_srvr + fi +else + chown root bin/gds_inet_server + chmod u+s,g+s bin/gds_inet_server + if [ -d Firebird.framework ]; then + chown root Firebird.framework/Resources/bin/gds_inet_server + chmod u+s,g+s Firebird.framework/Resources/bin/gds_inet_server + fi +fi + +if [ -f bin/inet_dbg ]; then + chown root bin/inet_dbg + chmod u+s,g+s bin/inet_dbg + if [ -d Firebird.framework ]; then + chown root Firebird.framework/Resources/bin/inet_dbg + chmod u+s,g+s Firebird.framework/Resources/bin/inet_dbg + fi +fi + +if [ -f isc_ins.hlp ]; then + chown $1 isc_ins.hlp + chgrp $GROUP isc_ins.hlp + chmod ug=rw isc_ins.hlp +else + chown $1 isc_ins_hlp.dat + chgrp $GROUP isc_ins_hlp.dat + chmod ug=rw isc_ins_hlp.dat +fi + +if [ -f isc_config ]; then + chown $1 isc_config + chgrp $GROUP isc_config + chmod ug=rw isc_config +fi +if [ -d Firebird.framework -a -f isc_config ]; then + chown $1 Firebird.framework/Resources/English.lproj/var/isc_config + chgrp $GROUP Firebird.framework/Resources/English.lproj/var/isc_config + chmod ug=rw Firebird.framework/Resources/English.lproj/var/isc_config +fi + +if [ -f lock_header_t ]; then + chown $1 lock_header_t + chgrp $GROUP lock_header_t + chmod ug=rw lock_header_t +else + chown $1 lock_header_template + chgrp $GROUP lock_header_template + chmod ug=rw lock_header_template +fi + +if [ -f servers.isc ]; then + chown $1 servers.isc + chgrp $GROUP servers.isc + chmod ug=rw servers.isc +fi +if [ -d Firebird.framework -a -f servers.isc ]; then + chown $1 Firebird.framework/Resources/English.lproj/var/servers.isc + chgrp $GROUP Firebird.framework/Resources/English.lproj/var/servers.isc + chmod ug=rw Firebird.framework/Resources/English.lproj/var/servers.isc +fi + +if [ -f bin/gds_dnet_server ]; then + chown root bin/gds_dnet_server + chmod u+s,g+s bin/gds_dnet_server +fi +if [ -d Firebird.framework -a -f bin/gds_dnet_server ]; then + chown root Firebird.framework/Resources/bin/gds_dnet_server + chmod u+s,g+s Firebird.framework/Resources/bin/gds_dnet_server +fi + +if [ -f bin/gds_lock_mgr ]; then + chown root bin/gds_lock_mgr + chmod u+s,g+s bin/gds_lock_mgr +fi +if [ -d Firebird.framework -a -f bin/gds_lock_mgr ]; then + chown root Firebird.framework/Resources/bin/gds_lock_mgr + chmod u+s,g+s Firebird.framework/Resources/bin/gds_lock_mgr +fi + + +if [ -f bin/gds_lock_manager ]; then + chown root bin/gds_lock_manager + chmod u+s,g+s bin/gds_lock_manager +fi +if [ -d Firebird.framework -a -f bin/gds_lock_manager ]; then + chown root Firebird.framework/Resources/bin/gds_lock_manager + chmod u+s,g+s Firebird.framework/Resources/bin/gds_lock_manager +fi + +if [ -f bin/gds_drop ]; then + chown root bin/gds_drop + chmod u+s,g+s bin/gds_drop +fi +if [ -d Firebird.framework -a -f bin/gds_drop ]; then + chown root Firebird.framework/Resources/bin/gds_drop + chmod u+s,g+s Firebird.framework/Resources/bin/gds_drop +fi + + +if [ -f bin/gds_drop5 ]; then + chown root bin/gds_drop5 + chmod u+s,g+s bin/gds_drop5 +fi +if [ -d Firebird.framework -a -f bin/gds_drop5 ]; then + chown root Firebird.framework/Resources/bin/gds_drop5 + chmod u+s,g+s Firebird.framework/Resources/bin/gds_drop5 +fi + + +if [ -f lib/gdslib ]; then + chmod +w \ + * \ + com/* \ + examples/* \ + include/* \ + intl/* \ + lib/* +fi diff --git a/src/makefiles/v3compat b/src/makefiles/v3compat new file mode 100644 index 0000000000..e9ae9c4ad3 --- /dev/null +++ b/src/makefiles/v3compat @@ -0,0 +1,70 @@ +#!/bin/sh +# The contents of this file are subject to the Interbase Public +# License Version 1.0 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy +# of the License at http://www.Inprise.com/IPL.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express +# or implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code was created by Inprise Corporation +# and its predecessors. Portions created by Inprise Corporation are +# Copyright (C) Inprise Corporation. +# +# All Rights Reserved. +# Contributor(s): ______________________________________. +# Shell script to unset the protections on files in +# the installation directory +PATH=$PATH:/etc:/bin:/usr/ucb +export PATH +if [ $# != 1 ]; then + echo 'Usage: v3compat v3_sourcedir' + exit 1 +fi +if [ -d SCO -o -d DELTA -o -d DG ]; then + RUNNER=`who am i | awk '{print $1}'` +else + RUNNER=`whoami` +fi +if [ ! -z "$RUNNER" ]; then + if [ "$RUNNER" != "root" ]; then + echo 'set_prot must be run as "root" or super user' + exit 1 + fi +else + echo 'set_prot must be run as "root" or super user' + exit 1 +fi +set -x +cp $1/interbase/bin/gds_drop interbase/bin/gds_drop5 +chown root interbase/bin/gds_drop5 +chgrp bin interbase/bin/gds_drop5 +chmod 06555 interbase/bin/gds_drop5 + +cp $1/interbase/bin/gds_lock_print interbase/bin/gds_lock_prnt5 +chown root interbase/bin/gds_lock_prnt5 +chgrp bin interbase/bin/gds_lock_prnt5 +chmod 555 interbase/bin/gds_lock_prnt5 + +if [ -f $1/interbase/bin/gds_lock_manager ]; then + cp $1/interbase/bin/gds_lock_manager interbase/bin/gds_lock_manager + chown root interbase/bin/gds_lock_manager + chgrp bin interbase/bin/gds_lock_manager + chmod 06555 interbase/bin/gds_lock_manager +fi + +if [ -f $1/interbase/lock_header_template ]; then + cp $1/interbase/lock_header_template interbase/lock_header_template + chown root interbase/lock_header_template + chgrp bin interbase/lock_header_template + chmod 444 interbase/lock_header_template +fi + +if [ -f $1/interbase/lock_header_t ]; then + cp $1/interbase/lock_header_t interbase/lock_header_t + chown root interbase/lock_header_t + chgrp bin interbase/lock_header_t + chmod 444 interbase/lock_header_t +fi diff --git a/src/msgs/build_file.e b/src/msgs/build_file.epp similarity index 97% rename from src/msgs/build_file.e rename to src/msgs/build_file.epp index 37d4dc123d..41598e5e87 100644 --- a/src/msgs/build_file.e +++ b/src/msgs/build_file.epp @@ -29,6 +29,10 @@ #include "../jrd/msg.h" #include "../jrd/gds_proto.h" +#ifdef HAVE_UNISTD_H +#include +#endif + #define MAX_LEVELS 4 DATABASE DB = "msg.gdb"; @@ -305,7 +309,7 @@ static USHORT do_msgs( TEXT * filename, TEXT * locale, USHORT sw_warning) header.msghdr_major_version = MSG_MAJOR_VERSION; header.msghdr_minor_version = MSG_MINOR_VERSION; header.msghdr_bucket_size = MSG_BUCKET; - write_bucket(&header, sizeof(header)); + write_bucket((MSGNOD) &header, sizeof(header)); /* Write out messages building B-tree */ @@ -341,7 +345,7 @@ static USHORT do_msgs( TEXT * filename, TEXT * locale, USHORT sw_warning) } if (leaf_node->msgrec_text + l >= end_leaf) { - position = write_bucket(leaf, n); + position = write_bucket((MSGNOD) leaf, n); propogate(buckets, nodes, prior_code, position); leaf_node = leaf; } @@ -366,7 +370,7 @@ static USHORT do_msgs( TEXT * filename, TEXT * locale, USHORT sw_warning) if (leaf_node->msgrec_text + l >= end_leaf) { n = (SCHAR *) leaf_node - (SCHAR *) leaf; - position = write_bucket(leaf, n); + position = write_bucket((MSGNOD) leaf, n); propogate(buckets, nodes, prior_code, position); leaf_node = leaf; } @@ -375,7 +379,7 @@ static USHORT do_msgs( TEXT * filename, TEXT * locale, USHORT sw_warning) leaf_node->msgrec_length = 0; leaf_node->msgrec_flags = 0; n = (SCHAR *) leaf_node - (SCHAR *) leaf; - position = write_bucket(leaf, n); + position = write_bucket((MSGNOD) leaf, n); /* Finish off upper levels of tree */ @@ -393,7 +397,7 @@ static USHORT do_msgs( TEXT * filename, TEXT * locale, USHORT sw_warning) /* Re-write header record and finish */ - lseek(file, (SLONG) 0, 0); + lseek(file, LSEEK_OFFSET_CAST 0, 0); write(file, &header, sizeof(header)); close(file); file = -1; diff --git a/src/msgs/change_msgs.e b/src/msgs/change_msgs.epp similarity index 94% rename from src/msgs/change_msgs.e rename to src/msgs/change_msgs.epp index 28ad29abcf..26d74cd699 100644 --- a/src/msgs/change_msgs.e +++ b/src/msgs/change_msgs.epp @@ -25,6 +25,8 @@ #include "../jrd/gds.h" #include "../jrd/common.h" +#include + DATABASE DB = "msg.gdb"; #define FAC_SQL_POSITIVE 14 @@ -84,7 +86,7 @@ void main( int argc, char **argv) break; count = 0; msg_number = 0; - ascii_str_upper(facility); + ascii_str_upper((UCHAR*) facility); FOR X IN FACILITIES WITH X.FACILITY = facility count++; for (;;) { @@ -152,9 +154,9 @@ void main( int argc, char **argv) Y.FAC_CODE EQ X.FAC_CODE AND Y.NUMBER EQ msg_number; MODIFY Y USING if (module[0]) - strcpy(Y.MODULE, module); + strcpy(Y.MODULE, (char*) module); if (routine[0]) - strcpy(Y.ROUTINE, routine); + strcpy(Y.ROUTINE, (char*) routine); if (text[0]) while (!translate (text, Y.TEXT, sizeof(Y.TEXT))) { @@ -164,7 +166,7 @@ void main( int argc, char **argv) (void) mustget(text); } if (symbol[0]) - strcpy(Y.SYMBOL, symbol); + strcpy(Y.SYMBOL, (char*) symbol); END_MODIFY; END_FOR; @@ -172,13 +174,13 @@ void main( int argc, char **argv) Z.FAC_CODE EQ X.FAC_CODE AND Z.NUMBER EQ msg_number; MODIFY Z USING if (symbol[0]) - strcpy(Z.GDS_SYMBOL, symbol); + strcpy(Z.GDS_SYMBOL, (char*) symbol); if (sql_number != 0) Z.SQL_CODE = sql_number; if (sql_class[0]) - strcpy(Z.SQL_CLASS, sql_class); + strcpy(Z.SQL_CLASS, (char*) sql_class); if (sql_sub_class[0]) - strcpy(Z.SQL_SUBCLASS, sql_sub_class); + strcpy(Z.SQL_SUBCLASS, (char*) sql_sub_class); END_MODIFY; END_FOR; } @@ -305,8 +307,8 @@ static int get_sql_class( UCHAR * sql_class) while (1) { ib_printf(" SQLCLASS: "); - gets(sql_class); - length = strlen(sql_class); + gets((char*) sql_class); + length = strlen((char*) sql_class); if (!length) break; @@ -337,8 +339,8 @@ static int get_sql_subclass( UCHAR * sql_sub_class) while (1) { ib_printf("SQLSUBCLASS: "); - gets(sql_sub_class); - length = strlen(sql_sub_class); + gets((char*) sql_sub_class); + length = strlen((char*) sql_sub_class); if (!length) break; @@ -369,8 +371,8 @@ static int get_symbol( UCHAR * symbol) while (TRUE) { ib_fprintf(ib_stderr, "Symbols are required for system errors!\n"); ib_printf(" Symbol: "); - gets(symbol); - if (strlen(symbol)) + gets((char*) symbol); + if (strlen((char*) symbol)) return TRUE; } } @@ -390,7 +392,7 @@ static SSHORT mustget( SCHAR * s) * **************************************/ - if (!gets(s)) + if (!gets((char*) s)) return FALSE; return (s[0] != 0); diff --git a/src/msgs/check_msgs.e b/src/msgs/check_msgs.epp similarity index 92% rename from src/msgs/check_msgs.e rename to src/msgs/check_msgs.epp index 584698a9a9..29a43dcc1d 100644 --- a/src/msgs/check_msgs.e +++ b/src/msgs/check_msgs.epp @@ -37,6 +37,13 @@ #include "../jrd/gds.h" #include "../jrd/gds_proto.h" +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_TIME_H +#include +#endif + DATABASE DB = "msg.gdb"; @@ -98,7 +105,7 @@ int CLIB_ROUTINE main( int argc, char *argv[]) if (ind_jrd = ib_fopen(INCLUDE_INDICATOR, "r")) { if (!fstat(ib_fileno(ind_jrd), &file_stat)) { - gds__encode_date(localtime(&file_stat.st_mtime), &date_jrd); + gds__encode_date(localtime(&file_stat.st_mtime), (GDS__QUAD*) &date_jrd); flag_jrd = FALSE; } ib_fclose(ind_jrd); @@ -106,7 +113,7 @@ int CLIB_ROUTINE main( int argc, char *argv[]) if (ind_msg = ib_fopen(MESSAGE_INDICATOR, "r")) { if (!fstat(ib_fileno(ind_msg), &file_stat)) { - gds__encode_date(localtime(&file_stat.st_mtime), &date_msg); + gds__encode_date(localtime(&file_stat.st_mtime), (GDS__QUAD*) &date_msg); flag_msg = FALSE; } ib_fclose(ind_msg); @@ -116,7 +123,7 @@ int CLIB_ROUTINE main( int argc, char *argv[]) flag_loc = TRUE; if (ind_loc = ib_fopen(LOCALE_INDICATOR, "r")) { if (!fstat(ib_fileno(ind_loc), &file_stat)) { - gds__encode_date(localtime(&file_stat.st_mtime), &date_loc); + gds__encode_date(localtime(&file_stat.st_mtime),(GDS__QUAD*) &date_loc); flag_loc = FALSE; } /* Earlier the following ib_fclose was closing ind_msg again, due to which diff --git a/src/msgs/enter_msgs.e b/src/msgs/enter_msgs.epp similarity index 88% rename from src/msgs/enter_msgs.e rename to src/msgs/enter_msgs.epp index c7a0eca295..42c3eccd02 100644 --- a/src/msgs/enter_msgs.e +++ b/src/msgs/enter_msgs.epp @@ -25,6 +25,17 @@ #include "../jrd/gds.h" #include "../jrd/common.h" +#ifdef HAVE_STRING_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_CTYPE_H +#include +#endif +#include + DATABASE DB = "msg.gdb"; static void ascii_str_upper(UCHAR *); @@ -33,6 +44,7 @@ static int get_sql_code(SSHORT *); static int get_sql_subclass(UCHAR *); static int store_sql_msg(void); static int translate(UCHAR *, UCHAR *, SSHORT); +static int get_symbol( UCHAR *); #define FAC_SQL_POSITIVE 14 #define FAC_SQL_NEGATIVE 13 @@ -66,7 +78,7 @@ void main( int argc, char **argv) UCHAR *p, *q; SSHORT count; SSHORT sql_num, sign; - BOOLEAN public; + BOOLEAN public_msg; /* Setup the 'strings' so that element 0 is really 0 */ memset(facility, 0, sizeof(facility)); @@ -94,7 +106,7 @@ void main( int argc, char **argv) for (;;) { ib_printf("Facility: "); - if (!gets(facility)) + if (!gets((char*) facility)) break; ascii_str_upper(facility); count = 0; @@ -109,13 +121,13 @@ void main( int argc, char **argv) MODIFY X USING for (;;) { ib_printf(" Module: "); - if (!gets(module)) + if (!gets((char*) module)) break; ib_printf(" Routine: "); - if (!gets(routine)) + if (!gets((char*) routine)) break; ib_printf(" Text: "); - if (!gets(text)) + if (!gets((char*) text)) break; symbol[0] = 0; @@ -123,20 +135,20 @@ void main( int argc, char **argv) * in a component other than JRD */ if (X.FAC_CODE != 0) { ib_printf("Public [y/n]: "); - gets(pub); + gets((char*) pub); if (*pub == 'Y' || *pub == 'y') - public = TRUE; + public_msg = TRUE; else - public = FALSE; + public_msg = FALSE; } else - public = TRUE; + public_msg = TRUE; ib_printf(" Symbol: "); - if (!gets(symbol)) + if (!gets((char*) symbol)) break; - if (public) { + if (public_msg) { if (!symbol[0]) if (!get_symbol(symbol)) break; @@ -156,15 +168,15 @@ void main( int argc, char **argv) S.SQL_CODE = sql_num; - strcpy(S.GDS_SYMBOL, symbol); + strcpy(S.GDS_SYMBOL, (char*) symbol); if (sql_class[0]) { - strcpy(S.SQL_CLASS, sql_class); + strcpy(S.SQL_CLASS, (char*) sql_class); S.SQL_CLASS.NULL = FALSE; } else S.SQL_CLASS.NULL = TRUE; if (sql_sub_class[0]) { - strcpy(S.SQL_SUBCLASS, sql_sub_class); + strcpy(S.SQL_SUBCLASS, (char*) sql_sub_class); S.SQL_SUBCLASS.NULL = FALSE; } else @@ -176,10 +188,10 @@ void main( int argc, char **argv) STORE Y IN MESSAGES USING Y.FAC_CODE = X.FAC_CODE; Y.NUMBER = X.MAX_NUMBER; - strcpy(Y.MODULE, module); - strcpy(Y.ROUTINE, routine); - strcpy(Y.SYMBOL, symbol); - if (!translate(text, Y.TEXT, sizeof(Y.TEXT))) { + strcpy(Y.MODULE, (char*) module); + strcpy(Y.ROUTINE, (char*) routine); + strcpy(Y.SYMBOL, (char*) symbol); + if (!translate(text, (UCHAR*) Y.TEXT, sizeof(Y.TEXT))) { ib_printf ("Message too long: max length: %d\n", sizeof(Y.TEXT)); @@ -230,7 +242,7 @@ static void ascii_str_upper( UCHAR * str) } -static get_sql_class( UCHAR * sql_class) +static int get_sql_class( UCHAR * sql_class) { /************************************** * @@ -247,8 +259,8 @@ static get_sql_class( UCHAR * sql_class) while (1) { ib_printf(" SQLCLASS: "); - gets(sql_class); - length = strlen(sql_class); + gets((char*) sql_class); + length = strlen((char*) sql_class); if (length == 0 || !isalnum(sql_class[0])) break; @@ -286,7 +298,7 @@ static int get_sql_code( SSHORT * sql_code) ret = FALSE; while (1) { ib_printf(" SQLCODE: "); - if (!gets(nstring)) + if (!gets((char*) nstring)) break; p = nstring; sign = 1; @@ -310,7 +322,7 @@ static int get_sql_code( SSHORT * sql_code) /* and if anything is left, convert to a number .. */ if (*p && isdigit(*p)) { - sql_num = sign * atoi(p); + sql_num = sign * atoi((char*) p); *sql_code = sql_num; ret = TRUE; break; @@ -366,8 +378,8 @@ static int get_sql_subclass( UCHAR * sql_sub_class) while (1) { ib_printf(" SQLSUBCLASS: "); - gets(sql_sub_class); - length = strlen(sql_sub_class); + gets((char*) sql_sub_class); + length = strlen((char*) sql_sub_class); if (length == 0 || !isalnum(sql_sub_class[0])) break; @@ -402,8 +414,8 @@ static int get_symbol( UCHAR * symbol) while (1) { ib_fprintf(ib_stderr, "Symbols are required for system errors!\n"); ib_printf(" Symbol: "); - gets(symbol); - if (!strlen(symbol) || !isalnum(symbol[0])) + gets((char*) symbol); + if (!strlen((char*) symbol) || !isalnum(symbol[0])) return FALSE; else return TRUE; @@ -431,12 +443,12 @@ static int store_sql_msg(void) for (;;) { ib_printf("Enter the sqlcode: "); - if (!gets(nstring)) + if (!gets((char*) nstring)) break;; - sql_num = atoi(nstring); + sql_num = atoi((char*) nstring); ib_printf(" Text: "); - if (!gets(text)) + if (!gets((char*) text)) break; STORE Y IN MESSAGES USING @@ -451,7 +463,7 @@ static int store_sql_msg(void) /* translate escape sequences to single bytes */ - if (!translate(text, Y.TEXT, sizeof(Y.TEXT))) { + if (!translate(text, (UCHAR*) Y.TEXT, sizeof(Y.TEXT))) { ib_printf("Message too long: max length: %d\n", sizeof(Y.TEXT)); return 0; @@ -463,7 +475,7 @@ static int store_sql_msg(void) } -static translate( UCHAR * source, UCHAR * target, SSHORT length) +static int translate( UCHAR * source, UCHAR * target, SSHORT length) { /************************************** * diff --git a/src/msgs/include.e b/src/msgs/include.epp similarity index 100% rename from src/msgs/include.e rename to src/msgs/include.epp diff --git a/src/msgs/load.e b/src/msgs/load.epp similarity index 100% rename from src/msgs/load.e rename to src/msgs/load.epp diff --git a/src/msgs/modify_msgs.e b/src/msgs/modify_msgs.epp similarity index 99% rename from src/msgs/modify_msgs.e rename to src/msgs/modify_msgs.epp index 6e7e89b20c..f72ae00ccc 100644 --- a/src/msgs/modify_msgs.e +++ b/src/msgs/modify_msgs.epp @@ -25,6 +25,8 @@ #include "../jrd/gds.h" #include "../jrd/common.h" +#include + DATABASE DB = "msg.gdb"; static int explicit_print(TEXT *); diff --git a/src/pyxis/fred.e b/src/pyxis/fred.epp similarity index 99% rename from src/pyxis/fred.e rename to src/pyxis/fred.epp index f212492f59..a86fe9f5c9 100644 --- a/src/pyxis/fred.e +++ b/src/pyxis/fred.epp @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: fred.e,v 1.1.1.1 2001-05-23 13:26:33 tamlin Exp $ + * $Id: fred.epp,v 1.1 2001-07-12 06:32:04 bellardo Exp $ * Revision 1.2 2000/11/28 15:09:01 fsg * Changed fred.e to go through 6.0 gpre * diff --git a/src/pyxis/phase3.h b/src/pyxis/phase3.h new file mode 100644 index 0000000000..470f638b90 --- /dev/null +++ b/src/pyxis/phase3.h @@ -0,0 +1,32 @@ +#ifndef _PYXIS_PHASE3_H_ +#define _PYXIS_PHASE3_H_ + +extern int pyxis__compile_map(STATUS *, OBJ *, MAP *, USHORT *, SCHAR *); +extern int pyxis__compile_menu(WIN *, MENU *, USHORT *, TEXT *); +extern int pyxis__compile_sub_map(STATUS *, MAP *, MAP *, USHORT *, SCHAR *); +extern int pyxis__create_window(WIN *, USHORT *, TEXT *, USHORT *, USHORT *); +extern int pyxis__delete(OBJ *); +extern int pyxis__delete_window(SLONG *); +extern int pyxis__drive_form(STATUS *, SLONG **, SLONG *, WIN *, MAP *, + UCHAR *, UCHAR *); +extern int pyxis__drive_menu(WIN *, MENU *, USHORT *, SCHAR *, USHORT *, + TEXT *, USHORT *, USHORT *, TEXT *, SLONG *); +extern int pyxis__fetch(STATUS *, SLONG **, SLONG *, MAP *, UCHAR *); +extern int pyxis__get_entree(MENU *, USHORT *, TEXT *, SLONG *, USHORT *); +extern int pyxis__initialize_menu(MENU *); +extern int pyxis__insert(STATUS *, SLONG **, SLONG *, MAP *, UCHAR *); +extern int pyxis__load_form(STATUS *, SLONG *, SLONG *, SLONG *, SSHORT *, + SCHAR *); +extern OBJ pyxis__menu(WIN *, MENU *, USHORT *, TEXT *); +extern int pyxis__menu_d(WIN *, MENU *, USHORT *, TEXT *, OBJ *); +#ifdef __cplusplus +extern "C" int pyxis__pop_window(WIN *); +#else +extern int pyxis__pop_window(WIN *); +#endif +extern int pyxis__put_entree(MENU *, USHORT *, TEXT *, SLONG *); +extern int pyxis__reset_form(STATUS *, MAP *); +extern int pyxis__suspend_window(SLONG *); + + +#endif diff --git a/src/pyxis/picstr.cpp b/src/pyxis/picstr.cpp new file mode 100644 index 0000000000..88ca0eb63b --- /dev/null +++ b/src/pyxis/picstr.cpp @@ -0,0 +1,1444 @@ +/* + * PROGRAM: JRD Command Oriented Query Language + * MODULE: picstr.c + * DESCRIPTION: Picture String Handler + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +#include "../jrd/ib_stdio.h" +#include +#ifndef PYXIS +#include "../qli/dtr.h" +#include "../qli/format.h" +#include "../qli/all_proto.h" +#include "../qli/err_proto.h" +#include "../qli/picst_proto.h" +#include "../qli/mov_proto.h" +#else +#include "../pyxis/everything.h" +#endif +#include "../jrd/time.h" +#if (defined JPN_SJIS || defined JPN_EUC) +#include "../jrd/kanji.h" +#endif +#include "../jrd/gds_proto.h" +#include "../jrd/val.h" + +#define PRECISION 10000 + +static TEXT *cvt_to_ascii (SLONG, TEXT *, int); +static TEXT *default_edit_string (DSC *, TEXT *); +static void edit_alpha (DSC *, PIC, TEXT **, USHORT); +static void edit_date (DSC *, PIC, TEXT **); +static void edit_float (DSC *, PIC, TEXT **); +static void edit_numeric (DSC *, PIC, TEXT **); +static int generate (PIC); +static void literal (PIC, TEXT, TEXT **); + +extern BLK PYXIS_alloc(PLB , UCHAR , int ); +extern void MOVP_move( DSC *, DSC *); +extern int MOVP_get_string( DSC * , TEXT ** , VARY * , USHORT ); + +#ifdef PYXIS +#define PIC_analyze PICSTR_analyze +#define PIC_edit PICSTR_edit +#define default_edit_string PICSTR_default_edit_string + +#define MOVQ_get_double MOVP_get_double +#define MOVQ_get_string MOVP_get_string +#define MOVQ_move MOVP_move + +extern double PASCAL_ROUTINE MOVQ_get_double(DSC*); +#endif + +#ifdef PYXIS +TEXT *PICSTR_default_edit_string(DSC *, TEXT*); +#endif + +static TEXT *alpha_weekdays [] = + { + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + }, + *alpha_months [] = + { + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + }; + +PIC PIC_analyze ( + TEXT *string, + DSC *desc) +{ +/************************************** + * + * P I C _ a n a l y z e + * + ************************************** + * + * Functional description + * Analyze a picture in preparation for formatting. + * + **************************************/ +PIC picture; +TEXT c, d, *p, debit; +USHORT length; + +if (!string) + if (!desc) + return NULL; + else + string = default_edit_string (desc, NULL); + +debit = 0; + +picture = (PIC) ALLOCD (type_pic); +picture->pic_string = picture->pic_pointer = string; + +/* Make a first pass just counting characters */ + +while ((c = generate (picture)) && c != '?') + { +#ifdef JPN_SJIS + + /* Be sure to lex double byte sjis characters correctly */ + + if SJIS1(c) + { + ++picture->pic_literals; + picture->pic_flags |= PIC_literal; + if (generate (picture)) + { + ++picture->pic_literals; + picture->pic_flags &= ~PIC_literal; + continue; + } + else + { + picture->pic_flags &= ~PIC_literal; + break; + } + } +#endif + + c = UPPER (c); + switch (c) + { + case 'X': + case 'A': + ++picture->pic_chars; + break; + + case '9': + case 'Z': + case '*': + /* Count all digits; + count them as fractions only after a decimal pt and + before an E */ + ++picture->pic_digits; + if (picture->pic_decimals && !picture->pic_exponents) + ++picture->pic_fractions; + break; + + case 'H': + ++picture->pic_hex_digits; + break; + + case '.': + ++picture->pic_decimals; + break; + + case '-': + case '+': + picture->pic_flags |= PIC_signed; + case '$': + if (picture->pic_chars || picture->pic_exponents) + ++picture->pic_literals; + else if (picture->pic_floats) + ++picture->pic_digits; + else + ++picture->pic_floats; + break; + + case 'M': + ++picture->pic_months; + break; + + case 'D': + /* DB is ambiguous, could be Day Blank or DeBit... */ + d = UPPER (*picture->pic_pointer); + if (d == 'B') + { + ++picture->pic_pointer; + ++picture->pic_literals; + ++debit; + } + ++picture->pic_days; + break; + + case 'Y': + ++picture->pic_years; + break; + + case 'J': + ++picture->pic_julians; + break; + + case 'W': + ++picture->pic_weekdays; + break; + + case 'N': + ++picture->pic_nmonths; + break; + + case 'E': + ++picture->pic_exponents; + break; + + case 'G': + ++picture->pic_float_digits; + break; + + case '(': + case ')': + picture->pic_flags |= PIC_signed; + ++picture->pic_brackets; + break; + + case '\'': + case '"': + picture->pic_flags |= PIC_literal; + while ((d = generate (picture)) && d != c) + ++picture->pic_literals; + picture->pic_flags &= ~PIC_literal; + break; + + case '\\': + ++picture->pic_literals; + picture->pic_flags |= PIC_literal; + generate (picture); + picture->pic_flags &= ~PIC_literal; + break; + + case 'C': + case 'R': + picture->pic_flags |= PIC_signed; + ++picture->pic_brackets; + if (d = generate (picture)) + ++picture->pic_brackets; + else + ++picture->pic_count; + break; + + case 'P': + ++picture->pic_meridian; + break; + + case 'T': + if (picture->pic_hours < 2) + ++picture->pic_hours; + else if (picture->pic_minutes < 2) + ++picture->pic_minutes; + else + ++picture->pic_seconds; + break; + + case 'B': + case '%': + case ',': + case '/': + default: + ++picture->pic_literals; + break; + } + } + +if (c == '?') + picture->pic_missing = PIC_analyze (picture->pic_pointer, (DSC*) NULL_PTR); + +/* if a DB showed up, and the string is numeric, treat the DB as DeBit */ + +if (debit && (picture->pic_digits || picture->pic_hex_digits)) + { + --picture->pic_days; + --picture->pic_literals; + picture->pic_flags |= PIC_signed; + ++picture->pic_brackets; + ++picture->pic_brackets; + } + +picture->pic_print_length = + picture->pic_digits + + picture->pic_hex_digits + + picture->pic_chars + + picture->pic_floats + + picture->pic_literals + + picture->pic_decimals + + picture->pic_months + + picture->pic_days + + picture->pic_weekdays + + picture->pic_years + + picture->pic_nmonths + + picture->pic_julians + + picture->pic_brackets + + picture->pic_exponents + + picture->pic_float_digits + + picture->pic_hours + + picture->pic_minutes + + picture->pic_seconds + + picture->pic_meridian; + + +if (picture->pic_missing) + { + picture->pic_length = + MAX (picture->pic_print_length, picture->pic_missing->pic_print_length); + picture->pic_missing->pic_length = picture->pic_length; + } +else + picture->pic_length = picture->pic_print_length; + +if (picture->pic_days || + picture->pic_weekdays || + picture->pic_months || + picture->pic_nmonths || + picture->pic_years || + picture->pic_hours || + picture->pic_julians) + picture->pic_type = pic_date; +else if (picture->pic_exponents || picture->pic_float_digits) + picture->pic_type = pic_float; +else if (picture->pic_digits || picture->pic_hex_digits) + picture->pic_type = pic_numeric; +else + picture->pic_type = pic_alpha; + +return picture; +} + +int PIC_edit ( + DSC *desc, + PIC picture, + TEXT **output, + USHORT max_length) +{ +/************************************** + * + * P I C _ e d i t + * + ************************************** + * + * Functional description + * Edit data from a descriptor through an edit string to a running + * output pointer. For text strings, check that we don't overflow + * the output buffer. + * + **************************************/ + +switch (picture->pic_type) + { + case pic_alpha: edit_alpha (desc, picture, output, max_length); return 0; + case pic_numeric: edit_numeric (desc, picture, output); return 0; + case pic_date: edit_date (desc, picture, output); return 0; + case pic_float: edit_float (desc, picture, output); return 0; + default: +#ifndef PYXIS + BUGCHECK ( 68 ); /* Msg 68 PIC_edit: class not yet implemented */ +#else + BUGCHECK ("PIC_edit: class not yet implemented"); +#endif + } +} + +#ifndef PYXIS +void PIC_missing ( + CON constant, + PIC picture) +{ +/************************************** + * + * P I C _ m i s s i n g + * + ************************************** + * + * Functional description + * Create a literal picture string from + * a descriptor for a missing value so + * we can print the missing value + * + **************************************/ +STR scratch; +int l; +TEXT *p; +PIC missing_picture; +DSC *desc; + +desc = &constant->con_desc; + +l = MAX (desc->dsc_length, picture->pic_length); + +scratch = (STR) ALLOCDV (type_str, l + 3); +p = scratch->str_data; +*p++ = '\"'; + +PIC_edit (desc, picture, &p, l); +*p++ = '\"'; +*p = 0; + +picture->pic_missing = missing_picture = PIC_analyze (scratch->str_data, desc); +picture->pic_length = + MAX (picture->pic_print_length, missing_picture->pic_print_length); +missing_picture->pic_length = picture->pic_length; +} +#endif + +static TEXT *cvt_to_ascii ( + SLONG number, + TEXT *pointer, + int length) +{ +/************************************** + * + * c v t _ t o _ a s c i i + * + ************************************** + * + * Functional description + * Convert a number to a number of ascii digits (plus terminating + * null), updating pointer. + * + **************************************/ +TEXT *p; + +pointer += length + 1; +p = pointer; +*--p = 0; + +while (--length >= 0) + { + *--p = (number % 10) + '0'; + number /= 10; + } + +return pointer; +} + +#ifndef PYXIS +static TEXT *default_edit_string ( +#else +TEXT *PICSTR_default_edit_string ( +#endif + DSC *desc, + TEXT *buff) +{ +/************************************** + * + * d e f a u l t _ e d i t _ s t r i n g + * + ************************************** + * + * Functional description + * Given a skeletal descriptor, generate a default edit string. + * + **************************************/ +TEXT buffer [32]; +STR string; +SSHORT scale; + +if (!buff) + buff = buffer; + +scale = desc->dsc_scale; + +switch (desc->dsc_dtype) + { + case dtype_text: + sprintf (buff, "X(%d)", desc->dsc_length); + break; + + case dtype_cstring: + sprintf (buff, "X(%d)", desc->dsc_length - 1); + break; + + case dtype_varying: + sprintf (buff, "X(%d)", desc->dsc_length - 2); + break; + + case dtype_short: + if (!scale) + return "-(5)9"; + if (scale < 0 && scale > -5) + sprintf (buff, "-(%d).9(%d)", 6 + scale, -scale); + else if (scale < 0) + sprintf (buff, "-.9(%d)", -scale); + else + sprintf (buff, "-(%d)9", 5 + scale); + break; + + case dtype_long: + if (!scale) + return "-(10)9"; + if (scale < 0 && scale > -10) + sprintf (buff, "-(%d).9(%d)", 10 + scale, -scale); + else if (scale < 0) + sprintf (buff, "-.9(%d)", -scale); + else + sprintf (buff, "-(%d)9", 11 + scale); + break; + +#if ( (defined JPN_SJIS || defined JPN_EUC) && defined JPN_DATE) + + /* For Japanese the default date format is "YYYY.NN.DD" */ + + case dtype_sql_date: + case dtype_timestamp: + return "YYYY.NN.DD"; + +#else + + case dtype_sql_date: + case dtype_timestamp: + return "DD-MMM-YYYY"; + +#endif + case dtype_sql_time: + return "TT:TT:TT.TTTT"; + + case dtype_real: + return "G(8)"; + + case dtype_double: + return "G(16)"; + + default: + return "X(11)"; + } + +if (buff == buffer) + { + string = (STR) ALLOCDV (type_str, strlen (buff)); + strcpy (string->str_data, buff); + buff = string->str_data; + } + +return buff; +} + +static void edit_alpha ( + DSC *desc, + PIC picture, + TEXT **output, + USHORT max_length) +{ +/************************************** + * + * e d i t _ a l p h a + * + ************************************** + * + * Functional description + * Edit data from a descriptor through an edit string to a running + * output pointer. + * + **************************************/ +TEXT c, d, *p, *out, *end, temp [512], *q, date [32]; +USHORT l, i; + +l = MOVQ_get_string (desc, &p, (VARY*)temp, (USHORT) sizeof (temp)); +end = p + l; +picture->pic_pointer = picture->pic_string; +picture->pic_count = 0; +out = *output; + +while (p < end) + { + if ((out - *output) >= max_length) + break; + c = generate (picture); + if (!c || c == '?') + break; + +#if (defined JPN_SJIS || defined JPN_EUC) + + /* Be sure to group double byte characters correctly */ + + if KANJI1(c) + { + *out++ = c; + picture->pic_flags |= PIC_literal; + c = generate(picture); + + /* Make sure it is not a truncated kanji else punt */ + + if (!c) + IBERROR (69); + + /* Try to put the second byte in the output buffer + If both bytes dont fit in, put a single space and break*/ + + if ((out - *output) >= max_length) + { + *(out -1) = ' '; + break; + } + else + { + *out++ = c; + picture->pic_flags &= ~PIC_literal; + continue; + } + } +#endif + + c = UPPER (c); + switch (c) + { + case 'X': +#if (defined JPN_SJIS || defined JPN_EUC) + + *out++ = *p++; + + /* Make sure double bytes are handled correctly */ + + if (KANJI1(*(out-1))) + { + c = generate(picture); + if (!c || (out - *output) >= max_length) + { + *(out -1) = ' '; + *output = out; + return; + } + if (c != 'X' || p == end) + { + IBERROR (69); + } + *out++ = *p++; + } + break; +#endif + +#ifdef PYXIS + case 'A': +#endif + *out++ = *p++; + break; + +#ifndef PYXIS + case 'A': + if ((*p >= 'a' && *p <='z') || + (*p >= 'A' && *p <='Z')) + *out++ = *p++; + else + IBERROR ( 69 ); /* Msg 69 conversion error */ + break; +#endif + + case 'B': + *out++ = ' '; + break; + + case '"': + case '\'': + case '\\': + literal (picture, c, &out); + break; + + default: + *out++ = c; + break; + } + } + +*output = out; +} + +static void edit_date ( + DSC *desc, + PIC picture, + TEXT **output) +{ +/************************************** + * + * e d i t _ d a t e + * + ************************************** + * + * Functional description + * Edit data from a descriptor through an edit string to a running + * output pointer. + * + **************************************/ +SLONG date [2], rel_day, seconds; +DSC temp_desc; +TEXT c, d, *p, *out, *month, *weekday, *year, *nmonth, *day, + *hours, temp [256], *meridian, *julians; +USHORT l, sig_day, blank; +struct tm times; + +temp_desc.dsc_dtype = dtype_timestamp; +temp_desc.dsc_scale = 0; +temp_desc.dsc_sub_type = 0; +temp_desc.dsc_length = sizeof (date); +temp_desc.dsc_address = (UCHAR*) date; +MOVQ_move (desc, &temp_desc); + +#ifdef PYXIS +if (!date [0] && !date [1]) + return; +#endif + +isc_decode_date ((GDS_QUAD*) date, ×); +p = temp; + +nmonth = p; +p = cvt_to_ascii ((SLONG) times.tm_mon + 1, p, picture->pic_nmonths); + +day = p; +p = cvt_to_ascii ((SLONG) times.tm_mday, p, picture->pic_days); + +year = p; +p = cvt_to_ascii ((SLONG) times.tm_year + 1900, p, picture->pic_years); + +julians = p; +p = cvt_to_ascii ((SLONG) times.tm_yday + 1, p, picture->pic_julians); + +if (picture->pic_meridian) + { + if (times.tm_hour >= 12) + { + meridian = "PM"; + if (times.tm_hour > 12) + times.tm_hour -= 12; + } + else + meridian = "AM"; + } +else + meridian = ""; + +seconds = date[1] % (60 * PRECISION); + +hours = p; +p = cvt_to_ascii ((SLONG) times.tm_hour, p, picture->pic_hours); +p = cvt_to_ascii ((SLONG) times.tm_min, --p, picture->pic_minutes); +p = cvt_to_ascii ((SLONG) seconds, --p, 6); + +if (*hours == '0') + *hours = ' '; + +if ((rel_day = (date [0] + 3) % 7) < 0) + rel_day += 7; +weekday = alpha_weekdays [rel_day]; +month = alpha_months [times.tm_mon]; + +picture->pic_pointer = picture->pic_string; +picture->pic_count = 0; +out = *output; +sig_day = FALSE; +blank = TRUE; + +for (;;) + { + c = generate (picture); + if (!c || c == '?') + break; +#if (defined JPN_SJIS || defined JPN_EUC) + + if KANJI1(c) + { + + /* group double byte characters correctly */ + + *out++ = c; + picture->pic_flags |= PIC_literal; + c = generate(picture); + + /* Make sure it is not a truncated kanji else punt */ + + if (!c) + IBERROR (69); + + *out++ = c; + picture->pic_flags &= ~PIC_literal; + continue; + } +#endif + + c = UPPER (c); + + switch (c) + { + case 'Y': + *out++ = *year++; + break; + + case 'M': + if (*month) + *out++ = *month++; + break; + + case 'N': + *out++ = *nmonth++; + break; + + case 'D': + d = *day++; + if (!sig_day && d == '0' && blank) + *out++ = ' '; + else + { + sig_day = TRUE; + *out++ = d; + } + break; + + case 'J': + if (*julians) + *out++ = *julians++; + break; + + case 'W': + if (*weekday) + *out++ = *weekday++; + break; + + case 'B': + *out++ = ' '; + break; + + case 'P': + if (*meridian) + *out++ = *meridian++; + break; + + case 'T': + if (*hours) + *out++ = *hours++; + break; + + case '"': + case '\'': + case '\\': + literal (picture, c, &out); + break; + + default: + *out++ = c; + break; + } + if (c != 'B') + blank = FALSE; + } + +*output = out; +} + +static void edit_float ( + DSC *desc, + PIC picture, + TEXT **output) +{ +/************************************** + * + * e d i t _ f l o a t + * + ************************************** + * + * Functional description + * Edit data from a descriptor through an edit string to a running + * output pointer. + * + **************************************/ +TEXT c, d, e, *p, *out, temp [512]; +BOOLEAN negative, is_signed; +USHORT l, width, decimal_digits, w_digits, f_digits; +double number; + +#ifdef VMS +BOOLEAN hack_for_vms_flag; +#endif +#ifdef WIN_NT +BOOLEAN hack_for_nt_flag; +#endif + +negative = is_signed = FALSE; +#ifdef VMS +hack_for_vms_flag = FALSE; +#endif +#ifdef WIN_NT +hack_for_nt_flag = FALSE; +#endif +number = MOVQ_get_double (desc); +if (number < 0) + { + negative = TRUE; + number = -number; + } + +/* If exponents are explicitly requested (E-format edit_string), generate them. + Otherwise, the rules are: if the number in f-format will fit into the allotted + space, print it in f-format; otherwise print it in e-format. + (G-format is untrustworthy.) */ + +if (picture->pic_exponents) + { + width = picture->pic_print_length - picture->pic_floats - picture->pic_literals; + decimal_digits = picture->pic_fractions; + sprintf (temp, "%*.*e", width, decimal_digits, number); +#ifdef VMS + if (!decimal_digits) + hack_for_vms_flag = TRUE; +#endif +#ifdef WIN_NT + hack_for_nt_flag = TRUE; +#endif + } +else if (number == 0) + sprintf (temp, "%.0f", number); +else + { + width = picture->pic_float_digits - 1 + picture->pic_floats; + f_digits = (width > 2) ? width - 2 : 0; + sprintf (temp, "%.*f", f_digits, number); + w_digits = strlen (temp); + if (f_digits) + { + p = temp + w_digits; /* find the end */ + w_digits = w_digits - (f_digits + 1); + while (*--p == '0') + --f_digits; + if (*p != '.') + ++p; + *p = 0; /* move the end */ + } + if ((w_digits > width) || (!f_digits && w_digits == 1 && temp[0] == '0')) + { + /* if the number doesn't fit in the default window, revert + to exponential notation; displaying the maximum number of + mantissa digits. */ + + if (number < 1e100) + decimal_digits = (width > 6) ? width - 6 : 0; + else + decimal_digits = (width > 7) ? width - 7 : 0; + sprintf (temp, "%.*e", decimal_digits, number); +#ifdef VMS + if (!decimal_digits) + hack_for_vms_flag = TRUE; +#endif +#ifdef WIN_NT + hack_for_nt_flag = TRUE; +#endif + } + } + +#ifdef VMS +/* If precision of 0 is specified to e- or f-format in VMS, the dec point + is printed regardless. On no other platform is this the case; so take + it out here. When/if this is ever fixed, ALL LINES IN THIS ROUTINE + THAT RELATED TO 'hack_for_vms_flag' MAY BE DELETED. */ + +if (hack_for_vms_flag) + { + p = temp; + while (*p != '.') ++p; + while (*p = *(p + 1)) ++p; + } +#endif +#ifdef WIN_NT +/* On Windows NT exponents have three digits regardless of the magnitude + of the number being formatted. To maintain compatiblity with other + platforms, if the first digit of the exponent is '0', shift the other + digits one to the left. */ + +if (hack_for_nt_flag) + { + p = temp; + while (*p != 'e' && *p != 'E') ++p; + p += 2; + if (*p == '0') + while (*p = *(p + 1)) ++p; + } +#endif + +p = temp; +picture->pic_pointer = picture->pic_string; +picture->pic_count = 0; +out = *output; + +for (l = picture->pic_length - picture->pic_print_length; l > 0; --l) + *out++ = ' '; + +for (;;) + { + c = e = generate (picture); + if (!c || c == '?') + break; +#if (defined JPN_SJIS || defined JPN_EUC) + + if KANJI1(c) + { + /* group double byte characters correctly */ + + *out++ = c; + picture->pic_flags |= PIC_literal; + c = generate (picture); + + /* Make sure it is not a truncated kanji else punt */ + + if (!c) + IBERROR (69); + + *out++ = c; + picture->pic_flags &= ~PIC_literal; + continue; + } +#endif + + c = UPPER (c); + switch (c) + { + case 'G': + if (!is_signed) + { + if (negative) + *out++ = '-'; + else + *out++ = ' '; + is_signed = TRUE; + } + else if (*p) + *out++ = *p++; + break; + + case 'B': + *out++ = ' '; + break; + + case '"': + case '\'': + case '\\': + literal (picture, c, &out); + break; + + case '9': + case 'Z': + if (!(*p) || *p > '9' || *p < '0') + break; + d = *p++; + if (c == '9' && d == ' ') + d = '0'; + else if (c == 'Z' && d == '0') + d = ' '; + *out++ = d; + break; + + case '.': + *out++ = (*p == c) ? *p++ : c; + break; + + case 'E': + if (!(*p)) + break; + *out++ = e; + if (UPPER (*p) == c) + ++p; + break; + + case '+': + case '-': + if (!(*p)) + break; + if (*p != '+' && *p != '-') + { + if (is_signed) + *out++ = c; + else if (c == '-' && !negative) + *out++ = ' '; + else if (c == '+' && negative) + *out++ = '-'; + else + *out++ = c; + is_signed = TRUE; + } + else if (*p == '-' || c == '+') + *out++ = *p++; + else + { + *out++ = ' '; + p++; + } + break; + + default: + *out++ = c; + break; + } + } + +*output = out; +} + +static void edit_numeric ( + DSC *desc, + PIC picture, + TEXT **output) +{ +/************************************** + * + * e d i t _ n u m e r i c + * + ************************************** + * + * Functional description + * Edit data from a descriptor through an edit string to a running + * output pointer. + * + **************************************/ +TEXT c, d, float_char, temp [512], *p, *float_ptr, *out, *hex, *digits; +USHORT power, negative, signif, hex_overflow, overflow, l; +SSHORT scale; +SLONG n; +double check, number; + +out = *output; +float_ptr = NULL; +negative = signif = FALSE; +hex_overflow = overflow = FALSE; + +number = MOVQ_get_double (desc); +if (number < 0) + { + number = -number; + negative = TRUE; + if (!(picture->pic_flags & PIC_signed)) + overflow = TRUE; + } + +if (scale = picture->pic_fractions) + if (scale < 0) + do number /= 10.; while (++scale); + else if (scale > 0) + do number *= 10.; while (--scale); + +digits = p = temp; + +if (picture->pic_digits && !overflow) + { + for (check = number, power = picture->pic_digits; power; --power) + check /= 10.; + if (check >= 1) + overflow = TRUE; + else + { + sprintf (digits, "%0*.0f", picture->pic_digits, number); + p = digits + strlen (digits); + } + } + +picture->pic_pointer = picture->pic_string; +if (picture->pic_hex_digits) + { + hex = p; + p += picture->pic_hex_digits; + for (check = number, power = picture->pic_hex_digits; power; --power) + check /= 16.; + if (check >= 1) + hex_overflow = TRUE; + else + { + n = number; + while (p-- > hex) + { + *p = "0123456789abcdef" [n & 15]; + n >>= 4; + } + } + } + +for (l = picture->pic_length - picture->pic_print_length; l-- > 0;) + *out++ = ' '; + +n = (number + 0.5 < 1) ? 0 : 1; + +for (;;) + { + c = generate (picture); + if (!c || c == '?') + break; +#if (defined JPN_SJIS || defined JPN_EUC) + + if KANJI1(c) + { + /* group double byte characters correctly */ + + *out++ = c; + picture->pic_flags |= PIC_literal; + c = generate (picture); + + /* Make sure it is not a truncated kanji else punt */ + + if (!c) + IBERROR (69); + + *out++ = c; + picture->pic_flags &= ~PIC_literal; + continue; + } +#endif + + c = UPPER (c); + if (overflow && c != 'H') + { + *out++ = '*'; + continue; + } + switch (c) + { + case '9': + signif = TRUE; + *out++ = *digits++; + break; + + case 'H': + if (hex_overflow) + { + *out++ = '*'; + continue; + } + case '*': + case 'Z': + d = (c == 'H') ? *hex++ : *digits++; + if (signif || d != '0') + { + *out++ = d; + signif = TRUE; + } + else + *out++ = (c == '*') ? '*' : ' '; + break; + + case '+': + case '-': + case '$': + if (c == '+' && negative) + c = '-'; + else if (c == '-' && !negative) + c = ' '; + float_char = c; + if (!float_ptr) + { + float_ptr = out; + *out++ = (n) ? c : ' '; + break; + } + d = *digits++; + if (signif || d != '0') + { + *out++ = d; + signif = TRUE; + break; + } + *float_ptr = ' '; + float_ptr = out; + *out++ = (n) ? c : ' '; + break; + + case '(': + case ')': + *out++ = (negative) ? c : ' '; + break; + + case 'C': + case 'D': + d = generate (picture); + if (negative) + { + *out++ = c; + *out++ = UPPER (d); + } + else if (d) + { + *out++ = ' '; + *out++ = ' '; + } + break; + + case '.': + signif = TRUE; + *out++ = c; + break; + + case 'B': + *out++ = ' '; + break; + + case '"': + case '\'': + case '\\': + literal (picture, c, &out); + break; + + case ',': + if (signif) + *out++ = c; + else if (float_ptr) + { + *float_ptr = ' '; + float_ptr = out; + *out++ = float_char; + } + else + *out++ = ' '; + break; + + default: + *out++ = c; + break; + } + if (picture->pic_flags & PIC_suppress_blanks && + out [-1] == ' ') + --out; + } + +*output = out; +} + +static int generate ( + PIC picture) +{ +/************************************** + * + * g e n e r a t e + * + ************************************** + * + * Functional description + * Generate the next character from a picture string. + * + **************************************/ +TEXT c, *p; + +for (;;) + { + /* If we're in a repeat, pass it back */ + + if (picture->pic_count > 0) + { + --picture->pic_count; + return picture->pic_character; + } + + /* Get the next character. If null, we're done */ + + c = *picture->pic_pointer++; + + /* If we're in literal mode, just return the character */ + + if (picture->pic_flags & PIC_literal) + break; + + /* If the next character is also a paren, it is a debit indicating + bracket. If so, swallow the second. */ + + if ((c == ')' || c == '(') && *picture->pic_pointer == c) + { + picture->pic_pointer++; + return (picture->pic_character = c); + } + + /* If the character is null and not a repeat count, we're done */ + + if (!c || c != '(') + break; + + /* We're got a potential repeat count. If real, extract it. */ + + p = picture->pic_pointer; + while (*p >= '0' && *p <= '9') + picture->pic_count = picture->pic_count * 10 + *p++ - '0'; + + if (p == picture->pic_pointer) + { + c = '('; + break; + } + + if (*p == ')') + ++p; + + picture->pic_pointer = p; + + /* Someone may have done something very stupid, like specify a repeat + count of zero. It's too late, as we've already gen'd one instance + of the edit character -- but let's not access violate, shall we? */ + + if (picture->pic_count) + --picture->pic_count; + } + +return (picture->pic_character = c); +} + +static void literal ( + PIC picture, + TEXT c, + TEXT **ptr) +{ +/************************************** + * + * l i t e r a l + * + ************************************** + * + * Functional description + * Handle a literal string in a picture string. + * + **************************************/ +TEXT *p, d; + +p = *ptr; +picture->pic_flags |= PIC_literal; + +if (c == '\\') + *p++ = generate (picture); +else + while ((d = generate (picture)) && d != c) + *p++ = d; + +*ptr = p; +picture->pic_flags &= ~PIC_literal; +} diff --git a/src/pyxis/pyxis_proto.h b/src/pyxis/pyxis_proto.h new file mode 100644 index 0000000000..d2f8c0950b --- /dev/null +++ b/src/pyxis/pyxis_proto.h @@ -0,0 +1,211 @@ +/* + * PROGRAM: PYXIS Form Package + * MODULE: pyxis.h + * DESCRIPTION: General header module + * + * The contents of this file are subject to the Interbase Public + * License Version 1.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy + * of the License at http://www.Inprise.com/IPL.html + * + * Software distributed under the License is distributed on an + * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express + * or implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code was created by Inprise Corporation + * and its predecessors. Portions created by Inprise Corporation are + * Copyright (C) Inprise Corporation. + * + * All Rights Reserved. + * Contributor(s): ______________________________________. + */ + +#ifndef _PYXIS_PYXIS_PROTO_H_ +#define _PYXIS_PYXIS_PROTO_H_ + +/* Attribute block names, types, and block */ + +typedef struct att { + struct blk att_header; + struct att *att_next; /* next attribute in object */ + struct att *att_prior; /* prior attribute in object */ + ATT_T att_type; /* attribute type */ + ATT_N att_name; /* attribute name */ + struct p_obj *att_value; + USHORT att_length; /* Allocated length for string */ + UCHAR att_data[2]; /* room for data */ +} *ATT; + +/* Menus */ + +typedef struct menx { + UCHAR *menx_string; + USHORT menx_entree; +} *MENX; + +typedef struct p_obj { + struct blk obj_header; + struct p_obj *obj_parent; + USHORT obj_reference_count; + ATT obj_attributes; /* list of attributes */ + ATT obj_end_attributes; /* end of attribute list */ + ATT obj_display_attribute; /* attribute for display (if any) */ + USHORT obj_flags; /* misc stuff */ + SSHORT obj_x; /* absolute position */ + SSHORT obj_y; /* absoute position */ + SSHORT obj_scroll_x; /* scrolled delta */ + SSHORT obj_scroll_y; /* scrolled delta */ + SSHORT obj_rel_x; /* relative position */ + SSHORT obj_rel_y; /* relative position */ + USHORT obj_width; /* displayed width */ + USHORT obj_height; /* displayed height */ + USHORT obj_occluded; + USHORT *obj_display_address; + USHORT obj_display_length; + USHORT obj_display_height; + USHORT obj_border; /* Size of border, if any */ + USHORT obj_index; /* Index in repeating group */ +} *OBJ; + +#define OBJ_changed 1 /* object has been updated */ +#define OBJ_displayed 2 /* object is currently displayed */ +#define OBJ_inactive 4 /* don't display object */ +#define OBJ_reverse_video 8 /* reverse video */ +#define OBJ_insert_right 16 /* (10) insert from right (numeric) */ +#define OBJ_bold 32 /* (20) field is bold */ +#define OBJ_underline 64 /* (40) field is underlined */ +#define OBJ_box 128 /* (80) draw box around object */ +#define OBJ_blank 256 /* (100) blank fill before drawing */ +#define OBJ_updatable_flag 512 /* (200) object may be updated*/ +#define OBJ_wakeup_flag 1024 /* (400) object will trigger wakeup*/ +#define OBJ_reverse_for_update 2048 /* (800) when updatable, set reverse video*/ +#define OBJ_menu_horizontal 4096 /* (1000) menu is horizontal*/ + + +/* Window definition */ + +/* Key names for special keys. */ + +typedef struct knm { + UCHAR knm_keycode; + SCHAR *knm_keyname; +} *KNM; + +typedef struct win { + struct blk win_header; /* Block header */ + struct win *win_parent; /* Parent window */ + struct win *win_sibling; /* Next sibling window */ + struct scr *win_logical; /* Logical screen */ + struct scr *win_physical; /* Physical screen */ + USHORT win_flags; + USHORT win_x; + USHORT win_y; + USHORT win_width; + USHORT win_height; + USHORT win_pending_char; /* "returned" character */ + OBJ win_form; + int *win_input; + int *win_output; + int *win_trace_in; + int *win_trace_out; + int win_current_x; + int win_current_y; + int win_current_mode; + int (*win_clear)(); + int (*win_disable)(); + int (*win_fini)(); + int (*win_getchar)(); + int (*win_text)(struct win*,UCHAR*, SSHORT, SSHORT, SSHORT, USHORT); + int (*win_update)(); + KNM win_keyname_table; +} *WIN; + +#define WIN_disabled 1 /* Forms are diabled */ +#define WIN_reset_80 2 /* Reset 80 column mode at end */ +#define WIN_synthesized 4 /* Input char was synthesized from mouse movement */ +#define WIN_sensitive 8 /* Mouse movement is sensitive */ + +/* Program wide globals */ + +#ifdef PYXIS_SOURCE +struct plb *PYXIS_default_pool = 0; +struct plb *PYXIS_permanent_pool = 0; +#else +#ifndef FRED_SOURCE +extern struct plb *PYXIS_default_pool; +extern struct plb *PYXIS_permanent_pool; +#endif +#endif + +/* Descriptor format */ + +#include "../jrd/dsc.h" + +/* Picture string handling block */ + +#include "../qli/format.h" + +/* Phase 3 record <-> form map */ + +/* Menu block */ + +typedef struct menu { + struct blk menu_header; + OBJ menu_object; + USHORT menu_flags; + ATT menu_current_entree; /* current entree in dynamic menu */ +} *MENU; + +/* #define MENU_horizontal 1 moved to object block */ +#define MENU_transparent 2 + +#ifdef __cplusplus +extern "C" { +#endif + +extern int PYXIS_bugcheck(TEXT *); +extern int PYXIS_error(TEXT *); +extern OBJ PYXIS_get_attribute_value(OBJ , ATT_N ); +extern ATT PYXIS_replace_attribute(OBJ , ATT_N , ATT_T , OBJ ); +extern ATT PYXIS_put_attribute(OBJ , ATT_N , ATT_T , OBJ ); +extern ATT PYXIS_find_object(OBJ , ATT , ATT_N , USHORT ); +extern ATT PYXIS_navigate(OBJ , ATT , ATT_N , USHORT); +extern OBJ PYXIS_create_object(TEXT *, ATT_N ); +extern int PYXIS_compute_size(OBJ , USHORT *, USHORT *); +extern int PYXIS_scroll_reset(OBJ ); +extern int PYXIS_get_char(WIN, OBJ, int, int); +extern int PYXIS_delete_attribute(OBJ , ATT ); +extern int PYXIS_set_display_attribute(OBJ , ATT ); +extern OBJ PYXIS_clone(OBJ ); +extern int PYXIS_delete_named_attribute(OBJ , ATT_N ); +extern ATT PYXIS_get_attribute(OBJ , ATT_N ); +extern int PYXIS_get_data(WIN , OBJ , ATT_N , OBJ , USHORT *); +extern WIN PYXIS_create_window(USHORT , USHORT ); +extern int PYXIS_delete_object(OBJ ); +extern int PYXIS_delete_window(WIN ); +extern int PYXIS_push_tag(WIN , OBJ ); +extern int PYXIS_push_form(WIN , OBJ , USHORT ); +extern int PYXIS_update_window(WIN , OBJ , int , int ); +extern int PYXIS_position(OBJ , USHORT , USHORT ); +extern int PYXIS_pop_form(WIN ); +extern int PYXIS_init(); +extern int PYXIS_disable_window(WIN ); +extern int PYXIS_push_handler( int (*)() ); +extern int PYXIS_pop_handler( int (*)() ); +extern int PYXIS_return_char(WIN , USHORT ); +extern int PYXIS_top_form(WIN ); +extern int PYXIS_reference(OBJ ); +extern ATT PYXIS_find_enumeration(OBJ , ATT , USHORT ); +extern SCHAR *PYXIS_get_keyname(WIN , UCHAR ); +extern int PYXIS_move(OBJ , OBJ ); +extern int PYXIS_pop_handler( int (*handler)() ); +extern int PYXIS_push_handler( int (*handler)() ); +extern OBJ PYXIS_get_value(ATT ); + +#ifdef __cplusplus +}; +#endif + + +#endif /* _PYXIS_PYXIS_H_ */ diff --git a/src/pyxis/save.e b/src/pyxis/save.epp similarity index 82% rename from src/pyxis/save.e rename to src/pyxis/save.epp index abf9f6d465..ee20271ead 100644 --- a/src/pyxis/save.e +++ b/src/pyxis/save.epp @@ -23,14 +23,26 @@ #include "../jrd/gds.h" #include "../pyxis/pyxis.h" +#include "../pyxis/all.h" +#include "../jrd/gds_proto.h" +#include "../jrd/utl_proto.h" +#include #define HANDLES 10 #define PYXIS_RELATION "PYXIS$FORMS" #define BUF_LEN 256 -extern PIC PICSTR_analyze(); -extern OBJ PYXIS_create_object(), PYXIS_clone(), PYXIS_get_attribute_value(); -extern ATT PYXIS_get_attribute(), PYXIS_put_attribute(), PYXIS_find_object(); +extern PIC PICSTR_analyze(TEXT*, DSC*); +extern TEXT *PICSTR_default_edit_string(DSC *, TEXT*); +extern int PYXIS_box(int object); +extern BLK PYXIS_alloc(PLB , UCHAR , int ); +extern int PYXIS_release(register FRB); +extern ATT PYXIS_create_entree(OBJ , TEXT *, int , BLK ); +extern int PYXIS_format_form(OBJ , USHORT , USHORT ); +extern void MOVP_fast( register SCHAR * , register SCHAR * , register ULONG ); + +static int zap_string(TEXT *string); + DATABASE DB = STATIC "yachts.lnk"; @@ -64,9 +76,8 @@ static ATT_N special_attributes[] = { }; - -PYXIS_define_forms_relation(dbb) - SLONG **dbb; +extern "C" +int PYXIS_define_forms_relation(SLONG **dbb) { /************************************** * @@ -93,11 +104,11 @@ PYXIS_define_forms_relation(dbb) success = TRUE; END_FOR; - gds__release_request(status_vector, GDS_REF(handle)); + gds__release_request(status_vector, (void**) GDS_REF(handle)); if (!success && gds__ddl(status_vector, GDS_REF(DB), - GDS_REF(transaction), sizeof(ddl), ddl)) { + (void**) GDS_REF(transaction), sizeof(ddl), ddl)) { gds__print_status(status_vector); success = FALSE; ROLLBACK transaction; @@ -110,9 +121,7 @@ PYXIS_define_forms_relation(dbb) } -OBJ PYXIS_delete_form(dbb, transaction, form_name) - SLONG **dbb, **transaction; - TEXT *form_name; +OBJ PYXIS_delete_form(SLONG **dbb, SLONG **transaction, TEXT *form_name) { /************************************** * @@ -127,7 +136,7 @@ OBJ PYXIS_delete_form(dbb, transaction, form_name) int *handle; DB = *dbb; - gds__trans = *transaction; + gds_trans = *transaction; handle = NULL; FOR(REQUEST_HANDLE handle) @@ -135,15 +144,13 @@ OBJ PYXIS_delete_form(dbb, transaction, form_name) ERASE X; END_FOR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds_status, (void**) GDS_REF(handle)); return NULL; } -PYXIS_dump(object, ptr) - OBJ object; - TEXT **ptr; +int PYXIS_dump(OBJ object, TEXT **ptr) { /************************************** * @@ -212,8 +219,7 @@ PYXIS_dump(object, ptr) } -PYXIS_dump_length(object) - OBJ object; +int PYXIS_dump_length(OBJ object) { /************************************** * @@ -242,7 +248,7 @@ PYXIS_dump_length(object) length += strlen(buffer); switch (attribute->att_type) { case attype_string: - length += strlen(attribute->att_value) + 3; + length += strlen((char*)attribute->att_value) + 3; break; case attype_numeric: @@ -271,8 +277,8 @@ PYXIS_dump_length(object) } -PYXIS_field_defaults(field) - OBJ field; +extern "C" +int PYXIS_field_defaults(OBJ field) { /************************************** * @@ -381,8 +387,8 @@ PYXIS_field_defaults(field) display_length + 2); REPLACE_ATTRIBUTE(field, att_height, attype_numeric, 6); if (!GET_VALUE(field, att_prototype)) { - PYXIS_box(field); - prototype = PYXIS_create_object(NULL_PTR, 0); + PYXIS_box((int) field); + prototype = PYXIS_create_object((TEXT*)NULL_PTR,(enum att_n) 0); REPLACE_ATTRIBUTE(prototype, att_width, attype_numeric, display_length); REPLACE_ATTRIBUTE(prototype, att_reverse_for_update, @@ -453,12 +459,12 @@ PYXIS_field_defaults(field) if (string) { attribute = PUT_ATTRIBUTE(field, att_fill_string, attype_string, - string->str_data); - PYXIS_release(string); + (OBJ) string->str_data); + PYXIS_release((FRB) string); } else attribute = - PUT_ATTRIBUTE(field, att_fill_string, attype_string, buffer); + PUT_ATTRIBUTE(field, att_fill_string, attype_string, (OBJ) buffer); } PYXIS_set_display_attribute(field, attribute); @@ -470,8 +476,7 @@ PYXIS_field_defaults(field) } -OBJ PYXIS_forms(dbb, transaction) - SLONG **dbb, **transaction; +extern "C" OBJ PYXIS_forms(SLONG **dbb, SLONG **transaction) { /************************************** * @@ -487,24 +492,23 @@ OBJ PYXIS_forms(dbb, transaction) int *handle; DB = *dbb; - gds__trans = *transaction; - menu = PYXIS_create_object(NULL_PTR, 0); + gds_trans = *transaction; + menu = PYXIS_create_object((TEXT*) NULL_PTR, (enum att_n) 0); handle = NULL; FOR(REQUEST_HANDLE handle) X IN PYXIS$FORMS SORTED BY X.PYXIS$FORM_NAME zap_string(X.PYXIS$FORM_NAME); - PYXIS_create_entree(menu, X.PYXIS$FORM_NAME, 0, NULL_PTR); + PYXIS_create_entree(menu, X.PYXIS$FORM_NAME, 0, (BLK) NULL_PTR); END_FOR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds_status, (void**) GDS_REF(handle)); return menu; } -OBJ PYXIS_load(ptr) - TEXT **ptr; +extern "C" OBJ PYXIS_load(TEXT **ptr) { /************************************** * @@ -523,7 +527,7 @@ OBJ PYXIS_load(ptr) TEXT *p, c, verb, *s, *string, *new_buf, *buf_end, buffer[1024]; p = *ptr; - object = PYXIS_create_object(NULL_PTR, 0); + object = PYXIS_create_object((TEXT*) NULL_PTR, (enum att_n) 0); for (;;) { name = 0; @@ -551,7 +555,7 @@ OBJ PYXIS_load(ptr) } } *s = 0; - attribute = PUT_ATTRIBUTE(object, name, attype_string, string); + attribute = PUT_ATTRIBUTE(object, (enum att_n) name, attype_string, (OBJ) string); if (verb == 'D') PYXIS_set_display_attribute(object, attribute); p++; @@ -567,11 +571,11 @@ OBJ PYXIS_load(ptr) n = n * 10 + c - '0'; if (negate) n = -n; - PUT_ATTRIBUTE(object, name, attype_numeric, n); + PUT_ATTRIBUTE(object, (enum att_n) name, attype_numeric, (OBJ) n); break; case 'O': - PUT_ATTRIBUTE(object, name, attype_object, PYXIS_load(&p)); + PUT_ATTRIBUTE(object, (enum att_n) name, attype_object, PYXIS_load(&p)); break; case 'E': @@ -585,13 +589,8 @@ OBJ PYXIS_load(ptr) } -OBJ PYXIS_load_form(status_vector, dbb, transaction, - form_handle, form_name_length, form_name) - int *status_vector; - SLONG **dbb, **transaction; - OBJ *form_handle; - USHORT *form_name_length; - TEXT *form_name; +extern "C" OBJ PYXIS_load_form(int *status_vector, SLONG **dbb, SLONG **transaction, + OBJ *form_handle, USHORT *form_name_length, TEXT *form_name) { /************************************** * @@ -611,7 +610,7 @@ OBJ PYXIS_load_form(status_vector, dbb, transaction, SLONG size; DB = *dbb; - gds__trans = *transaction; + gds_trans = *transaction; *form_handle = NULL; handle = NULL; ptr = NULL; @@ -637,13 +636,13 @@ OBJ PYXIS_load_form(status_vector, dbb, transaction, break; END_ERROR; - if (gds__blob_size(&B, &size, &seg_count, &max_seg)) + if (gds__blob_size((SLONG*) &B, &size, &seg_count, &max_seg)) if (size > sizeof(buffer)) buff = ptr = (TEXT *) gds__alloc(size + 2); while (size > 0) { buf_len = MIN(buf_len, size); - if (code = gds__get_segment(gds__status, + if (code = gds__get_segment(gds_status, GDS_REF(B), GDS_REF(out_size), buf_len, GDS_VAL(buff))) @@ -652,9 +651,9 @@ OBJ PYXIS_load_form(status_vector, dbb, transaction, /* segment and segstr_eof codes are benign; otherwise, we have an internal error */ - if (code == gds__segstr_eof) + if (code == gds_segstr_eof) break; - if (code != gds__segment) + if (code != gds_segment) BUGCHECK("Unable to load form"); } @@ -670,14 +669,14 @@ OBJ PYXIS_load_form(status_vector, dbb, transaction, ON_ERROR END_ERROR; - gds__release_request(temp_vector, GDS_REF(handle)); + gds__release_request(temp_vector, (void**) GDS_REF(handle)); /* If something failed and there isn't a status vector, blow away user */ if (!status_vector && !*form_handle) { - if (gds__status[1]) - gds__print_status(gds__status); + if (gds_status[1]) + gds__print_status(gds_status); else { sprintf(buffer, "form %s not found\n", form_name); gds__put_error(buffer); @@ -691,15 +690,14 @@ OBJ PYXIS_load_form(status_vector, dbb, transaction, /* Copy status vector */ if (status_vector) - MOVP_fast(gds__status, status_vector, 20 * sizeof(STATUS)); + MOVP_fast((SCHAR*) gds_status, (SCHAR*) status_vector, 20 * sizeof(STATUS)); - return (OBJ) gds__status[1]; + return (OBJ) gds_status[1]; } -OBJ PYXIS_relation_fields(dbb, transaction, relation_name) - SLONG **dbb, **transaction; - TEXT *relation_name; +extern "C" +OBJ PYXIS_relation_fields(SLONG **dbb, SLONG **transaction, TEXT *relation_name) { /************************************** * @@ -720,8 +718,8 @@ OBJ PYXIS_relation_fields(dbb, transaction, relation_name) DSC desc; DB = *dbb; - gds__trans = *transaction; - form = PYXIS_create_object(NULL_PTR, 0); + gds_trans = *transaction; + form = PYXIS_create_object((TEXT*) NULL_PTR, (enum att_n) 0); handle = NULL; FOR(REQUEST_HANDLE handle) @@ -795,16 +793,16 @@ OBJ PYXIS_relation_fields(dbb, transaction, relation_name) desc.dsc_length = 8; if (segment_length = FLD.RDB$SEGMENT_LENGTH) PUT_ATTRIBUTE(field, att_segment_length, attype_numeric, - segment_length); + (OBJ) segment_length); break; } - PYXIS_put_attribute(field, att_dtype, attype_numeric, desc.dsc_dtype); + PYXIS_put_attribute(field, att_dtype, attype_numeric, (OBJ) desc.dsc_dtype); PYXIS_put_attribute(field, att_length, attype_numeric, - desc.dsc_length); + (OBJ) desc.dsc_length); if (desc.dsc_scale) PYXIS_put_attribute(field, att_scale, attype_numeric, - desc.dsc_scale); + (OBJ) desc.dsc_scale); if (desc.dsc_dtype != dtype_blob) { edit_string = RFR.RDB$EDIT_STRING; @@ -812,22 +810,20 @@ OBJ PYXIS_relation_fields(dbb, transaction, relation_name) edit_string = FLD.RDB$EDIT_STRING; if (*edit_string && *edit_string != ' ') PUT_ATTRIBUTE(field, att_edit_string, attype_string, - edit_string); + (OBJ) edit_string); } - PUT_ATTRIBUTE(field, att_inactive, attype_numeric, TRUE); - PYXIS_create_entree(form, RFR.RDB$FIELD_NAME, attype_object, field); + PUT_ATTRIBUTE(field, att_inactive, attype_numeric, (OBJ) TRUE); + PYXIS_create_entree(form, RFR.RDB$FIELD_NAME, attype_object, (BLK) field); END_FOR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds_status, (void**) GDS_REF(handle)); return form; } - -OBJ PYXIS_relation_form(window, fields) - WIN window; - OBJ fields; +extern "C" +OBJ PYXIS_relation_form(WIN window, OBJ fields) { /************************************** * @@ -843,7 +839,7 @@ OBJ PYXIS_relation_form(window, fields) OBJ form, field, label; TEXT *name; - form = PYXIS_create_object(NULL_PTR, 0); + form = PYXIS_create_object((TEXT*) NULL_PTR, (enum att_n) 0); for (attribute = NULL; attribute = PYXIS_find_object(fields, attribute, att_entree, TRUE);) @@ -866,8 +862,8 @@ OBJ PYXIS_relation_form(window, fields) } -OBJ PYXIS_relations(dbb, transaction) - SLONG **dbb, **transaction; +extern "C" +OBJ PYXIS_relations(SLONG **dbb, SLONG **transaction) { /************************************** * @@ -883,28 +879,26 @@ OBJ PYXIS_relations(dbb, transaction) int *handle; DB = *dbb; - gds__trans = *transaction; - menu = PYXIS_create_object(NULL_PTR, 0); + gds_trans = *transaction; + menu = PYXIS_create_object((TEXT*) NULL_PTR, (enum att_n) 0); handle = NULL; FOR(REQUEST_HANDLE handle) X IN RDB$RELATIONS WITH X.RDB$SYSTEM_FLAG == 0 SORTED BY X.RDB$RELATION_NAME zap_string(X.RDB$RELATION_NAME); - PYXIS_create_entree(menu, X.RDB$RELATION_NAME, 0, NULL_PTR); + PYXIS_create_entree(menu, X.RDB$RELATION_NAME, 0, (BLK) NULL_PTR); END_FOR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds_status, (void**) GDS_REF(handle)); return menu; } -PYXIS_store_form(dbb, transaction, form_name, form) - SLONG **dbb, **transaction; - TEXT *form_name; - OBJ form; +extern "C" +int PYXIS_store_form(SLONG **dbb, SLONG **transaction, TEXT *form_name, OBJ form) { /************************************** * @@ -922,9 +916,9 @@ PYXIS_store_form(dbb, transaction, form_name, form) USHORT seg_len; DB = *dbb; - gds__trans = *transaction; + gds_trans = *transaction; handle = NULL; - ptr = NULL_PTR; + ptr = (TEXT*) NULL_PTR; seg_len = sizeof(buffer); /* If local buffer is big enough use it; otherwise allocate buffer big enough */ @@ -949,24 +943,24 @@ PYXIS_store_form(dbb, transaction, form_name, form) CREATE_BLOB B IN X.PYXIS$FORM; while (size > 0) { seg_len = MIN(seg_len, size); - if (gds__put_segment(gds__status, + if (gds__put_segment(gds_status, GDS_REF(B), seg_len, GDS_VAL(buff))) break; buff += seg_len; size -= seg_len; } - if (gds__status[1]) - gds__print_status(gds__status); + if (gds_status[1]) + gds__print_status(gds_status); CLOSE_BLOB B; END_MODIFY; if (ptr) gds__free(ptr); - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds_status, (void**) GDS_REF(handle)); return SUCCESS; /* gpre generates a gds__send call after this which can never be reached; but it's ok */ END_FOR; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds_status, (void**) GDS_REF(handle)); /* Form doesn't exist -- store a new record */ @@ -977,25 +971,24 @@ PYXIS_store_form(dbb, transaction, form_name, form) CREATE_BLOB B IN X.PYXIS$FORM; while (size > 0) { seg_len = MIN(seg_len, size); - if (gds__put_segment(gds__status, + if (gds__put_segment(gds_status, GDS_REF(B), seg_len, GDS_VAL(buff))) break; buff += seg_len; size -= seg_len; } - if (gds__status[1]) - gds__print_status(gds__status); + if (gds_status[1]) + gds__print_status(gds_status); CLOSE_BLOB B; END_STORE; - gds__release_request(gds__status, GDS_REF(handle)); + gds__release_request(gds_status, (void**) GDS_REF(handle)); if (ptr) gds__free(ptr); } -static zap_string(string) - TEXT *string; +static int zap_string(TEXT *string) { /************************************** * diff --git a/src/pyxis/save.h b/src/pyxis/save.h new file mode 100644 index 0000000000..705f15191f --- /dev/null +++ b/src/pyxis/save.h @@ -0,0 +1,17 @@ +#ifndef _PYXIS_SAVE_H_ +#define _PYXIS_SAVE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +OBJ PYXIS_load_form(int *, SLONG **, SLONG **, OBJ *, USHORT * , TEXT *); +OBJ PYXIS_relation_fields(SLONG **, SLONG **, TEXT *); +int PYXIS_store_form(SLONG **, SLONG **, TEXT *, OBJ); + +#ifdef __cplusplus +}; +#endif + + +#endif diff --git a/src/pyxis/save_proto.h b/src/pyxis/save_proto.h new file mode 100644 index 0000000000..0f1d91f4bf --- /dev/null +++ b/src/pyxis/save_proto.h @@ -0,0 +1,18 @@ +#ifndef _PYXIS_SAVE_PROTO_H +#define _PYXIS_SAVE_PROTO_H + +#ifdef __cplusplus +extern "C" { +#endif + +OBJ PYXIS_relation_fields(SLONG **, SLONG **, TEXT *); +OBJ PYXIS_relation_form(WIN , OBJ ); +int PYXIS_store_form(SLONG **, SLONG **, TEXT *, OBJ ); +int PYXIS_define_forms_relation(SLONG **); + +#ifdef __cplusplus +}; +#endif + + +#endif diff --git a/src/qli/help.e b/src/qli/help.epp similarity index 99% rename from src/qli/help.e rename to src/qli/help.epp index 571c5d116e..d202fc7c5f 100644 --- a/src/qli/help.e +++ b/src/qli/help.epp @@ -98,7 +98,7 @@ void HELP_help( SYN node) gds__prefix(target, TARGET); READY ON_ERROR - ERRQ_database_error(NULL_PTR, gds__status); + ERRQ_database_error((struct dbb*) NULL_PTR, gds_status); END_ERROR; START_TRANSACTION; } @@ -142,7 +142,7 @@ static int additional_topics( TEXT * parent, TEXT * banner, TEXT * string) FOR X IN TOPICS WITH X.PARENT EQ parent SORTED BY X.TOPIC if (QLI_abort) - return; + return 0; p = X.TOPIC; while (*p && *p != ' ') p++; diff --git a/src/qli/meta.e b/src/qli/meta.epp similarity index 87% rename from src/qli/meta.e rename to src/qli/meta.epp index 6007e45c5b..6c212bda80 100644 --- a/src/qli/meta.e +++ b/src/qli/meta.epp @@ -45,6 +45,10 @@ #include "../jrd/utl_proto.h" #include "../wal/walf_proto.h" +#ifdef HAVE_UNISTD_H +#include +#endif + DATABASE DB = FILENAME "yachts.lnk"; DATABASE DB1 = FILENAME "yachts.lnk"; @@ -85,17 +89,17 @@ static void stuff_priv(RLB, USHORT, TEXT *, USHORT, TEXT *, TEXT *); static int truncate_string(TEXT *); static void wal_info(UCHAR *, SLONG *, SCHAR *, SLONG *); -static CONST UCHAR tpb[] = { gds__tpb_version1, gds__tpb_write }; -static CONST UCHAR db_info[] = { gds__info_implementation, gds__info_end }; +static CONST UCHAR tpb[] = { gds_tpb_version1, gds_tpb_write }; +static CONST UCHAR db_info[] = { gds_info_implementation, gds_info_end }; static UCHAR parm_buffer[256]; static CONST UCHAR db_log_info[] = - { gds__info_logfile, gds__info_cur_logfile_name, - gds__info_cur_log_part_offset }; + { gds_info_logfile, gds_info_cur_logfile_name, + gds_info_cur_log_part_offset }; /* -static CONST UCHAR dpb_trace [] = { gds__dpb_version1, gds__dpb_trace, 1, 1 }; -static CONST UCHAR dpb_num_buffers [ ] = { gds__dpb_version1, gds__dpb_num_buffers, 1, 1 }; +static CONST UCHAR dpb_trace [] = { gds_dpb_version1, gds_dpb_trace, 1, 1 }; +static CONST UCHAR dpb_num_buffers [ ] = { gds_dpb_version1, gds_dpb_num_buffers, 1, 1 }; */ #define STUFF_STRING(str) put_dyn_string (rlb, str) @@ -198,7 +202,7 @@ void MET_define_field( DBB database, FLD field) database = setup_update(database); - if (check_global_field(database, NULL_PTR, field->fld_name->sym_string)) { + if (check_global_field(database, (FLD) NULL_PTR, field->fld_name->sym_string)) { rollback_update(database); ERRQ_print_error(233, field->fld_name->sym_string, NULL, NULL, NULL, NULL); /* Msg233 global field %s already exists */ } @@ -243,7 +247,7 @@ void MET_define_index( SYN node) ERRQ_print_error(235, symbol->sym_string, NULL, NULL, NULL, NULL); /* Msg235 Index %s already exists */ END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; STORE(REQUEST_HANDLE database->dbb_requests[REQ_def_index2]) @@ -259,7 +263,7 @@ void MET_define_index( SYN node) END_STORE ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; @@ -274,12 +278,12 @@ void MET_define_index( SYN node) ERASE X ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; END_FOR ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; @@ -313,7 +317,7 @@ void MET_define_index( SYN node) END_STORE ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; } @@ -364,7 +368,7 @@ void MET_define_relation( REL relation, REL source) END_STORE ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (source) @@ -395,7 +399,7 @@ void MET_define_relation( REL relation, REL source) HSH_insert(symbol); END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; delete_fields(relation); @@ -430,17 +434,17 @@ void MET_define_sql_relation( REL relation) ERRQ_print_error(237, symbol->sym_string, NULL, NULL, NULL, NULL); /* Msg237 Relation %s already exists */ END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; rlb = NULL; rlb = CHECK_RLB(rlb); - STUFF(gds__dyn_version_1); - STUFF(gds__dyn_begin); - STUFF(gds__dyn_def_rel); + STUFF(gds_dyn_version_1); + STUFF(gds_dyn_begin); + STUFF(gds_dyn_def_rel); STUFF_STRING(symbol->sym_string); - STUFF(gds__dyn_rel_sql_protection); + STUFF(gds_dyn_rel_sql_protection); STUFF_WORD(2); STUFF_WORD(1); @@ -448,9 +452,9 @@ void MET_define_sql_relation( REL relation) field = field->fld_next, position++) add_sql_field(relation, field, position, rlb); - STUFF(gds__dyn_end); - STUFF(gds__dyn_end); - STUFF(gds__dyn_eoc); + STUFF(gds_dyn_end); + STUFF(gds_dyn_end); + STUFF(gds_dyn_eoc); execute_dynamic_ddl(database, rlb); MET_meta_commit(database); @@ -475,7 +479,7 @@ void MET_define_sql_relation( REL relation) HSH_insert(symbol); END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; delete_fields(relation); @@ -529,17 +533,17 @@ void MET_delete_database( DBB dbb) } dpb = p = parm_buffer; - *p++ = gds__dpb_version1; + *p++ = gds_dpb_version1; if (user_length) { - *p++ = gds__dpb_user_name; + *p++ = gds_dpb_user_name; *p++ = user_length; while (user_length--) *p++ = *user++; } if (password_length) { - *p++ = gds__dpb_password; + *p++ = gds_dpb_password; *p++ = password_length; while (password_length--) *p++ = *password++; @@ -555,12 +559,12 @@ void MET_delete_database( DBB dbb) GDS_VAL(dbb->dbb_filename), GDS_REF(dbb->dbb_handle), dpb_length, - GDS_VAL(dpb))) + (char*) GDS_VAL(dpb))) ERRQ_database_error(dbb, status_vector); log_stack = stack = NULL; - gds__trans = MET_transaction(nod_start_trans, dbb); + gds_trans = MET_transaction(nod_start_trans, dbb); DB = dbb->dbb_handle; FOR F IN DB.RDB$FILES SORTED BY F.RDB$FILE_START @@ -569,7 +573,7 @@ void MET_delete_database( DBB dbb) strcpy(string->str_data, F.RDB$FILE_NAME); END_FOR ON_ERROR - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); END_ERROR; /* Get write ahead log information */ @@ -577,22 +581,22 @@ void MET_delete_database( DBB dbb) if (gds__database_info(status_vector, GDS_REF(DB), sizeof(db_log_info), - db_log_info, + (char*) db_log_info, sizeof(db_info_buffer), db_info_buffer)) ERRQ_database_error(dbb, status_vector); /* extract info from buffer */ - wal_info(db_info_buffer, &log, cur_log, &part_offset); + wal_info((UCHAR*) db_info_buffer, &log, cur_log, &part_offset); if (log) get_log_names_serial(&log_stack); MET_transaction(nod_commit, dbb); - if (gds__detach_database(gds__status, GDS_REF(dbb->dbb_handle))) - gds__print_status(gds__status); + if (gds__detach_database(gds_status, GDS_REF(dbb->dbb_handle))) + gds__print_status(gds_status); for (database = QLI_databases; database; database = next) { next = database->dbb_next; @@ -648,7 +652,7 @@ void MET_delete_field( DBB database, NAM name) count++; END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (count) @@ -660,22 +664,22 @@ void MET_delete_field( DBB database, NAM name) rlb = NULL; rlb = CHECK_RLB(rlb); - STUFF(gds__dyn_version_1); - STUFF(gds__dyn_delete_dimensions); + STUFF(gds_dyn_version_1); + STUFF(gds_dyn_delete_dimensions); STUFF_STRING(FLD.RDB$FIELD_NAME); - STUFF(gds__dyn_end); - STUFF(gds__dyn_eoc); + STUFF(gds_dyn_end); + STUFF(gds_dyn_eoc); execute_dynamic_ddl(database, rlb); ERASE FLD ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; count++; END_FOR ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (!count) @@ -709,12 +713,12 @@ void MET_delete_index( DBB database, NAM name) ERASE IDX ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; END_FOR ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (!count) @@ -726,12 +730,12 @@ void MET_delete_index( DBB database, NAM name) ERASE SEG ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; END_FOR ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; MET_meta_commit(database); @@ -758,11 +762,11 @@ void MET_delete_relation( REL relation) symbol = relation->rel_symbol; rlb = NULL; rlb = CHECK_RLB(rlb); - STUFF(gds__dyn_version_1); - STUFF(gds__dyn_delete_rel); + STUFF(gds_dyn_version_1); + STUFF(gds_dyn_delete_rel); STUFF_STRING(symbol->sym_string); - STUFF(gds__dyn_end); - STUFF(gds__dyn_eoc); + STUFF(gds_dyn_end); + STUFF(gds_dyn_eoc); setup_update(relation->rel_database); execute_dynamic_ddl(relation->rel_database, rlb); @@ -798,7 +802,7 @@ int MET_dimensions( DBB database, TEXT * field_name) dimensions = F.RDB$DIMENSIONS; END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; return dimensions; @@ -887,19 +891,19 @@ void MET_fields( REL relation) if (!RFL.RDB$MISSING_VALUE.NULL) field->fld_missing = - missing_value(&RFL.RDB$MISSING_VALUE, field->fld_name); + missing_value((SLONG*) &RFL.RDB$MISSING_VALUE, field->fld_name); if (!(field->fld_edit_string = make_string(RFR.RDB$EDIT_STRING, sizeof(RFR.RDB$EDIT_STRING)))) field->fld_edit_string = make_string(RFL.RDB$EDIT_STRING, sizeof(RFL.RDB$EDIT_STRING)); field->fld_validation = - parse_blr_blob(&RFL.RDB$VALIDATION_BLR, field->fld_name); + parse_blr_blob((SLONG*) &RFL.RDB$VALIDATION_BLR, field->fld_name); if (MET_dimensions(database, RFL.RDB$FIELD_NAME) > 0) field->fld_flags |= FLD_array; END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; } @@ -933,8 +937,8 @@ void MET_finish( DBB dbb) while (function = dbb->dbb_functions) { dbb->dbb_functions = function->fun_next; HSH_remove(function->fun_symbol); - ALL_release(function->fun_symbol); - ALL_release(function); + ALL_release((FRB) function->fun_symbol); + ALL_release((FRB) function); } /* Get rid of any forms */ @@ -949,7 +953,7 @@ void MET_finish( DBB dbb) if (dbb->dbb_symbol) { HSH_remove(dbb->dbb_symbol); - ALL_release(dbb->dbb_symbol); + ALL_release((FRB) dbb->dbb_symbol); } for (count = 0, ptr = &QLI_databases; *ptr; ptr = &(*ptr)->dbb_next) @@ -957,7 +961,7 @@ void MET_finish( DBB dbb) if (*ptr == dbb) { *ptr = dbb->dbb_next; - ALL_release(dbb); + ALL_release((FRB) dbb); count++; if (!*ptr) { break; @@ -969,7 +973,7 @@ void MET_finish( DBB dbb) BUGCHECK(231); /* Msg231 database block not found for removal */ if (status_vector[1]) - ERRQ_database_error(NULL_PTR, status_vector); + ERRQ_database_error((struct dbb*) NULL_PTR, status_vector); } @@ -1060,12 +1064,12 @@ void MET_index_info( END_FOR ON_ERROR - ERRQ_database_error(NULL, gds__status); + ERRQ_database_error(NULL, gds_status); END_ERROR; if (request_handle) - if (gds__release_request(gds__status, GDS_REF(request_handle))) - ERRQ_database_error(NULL, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(request_handle))) + ERRQ_database_error(NULL, gds_status); /* back up over the last space and finish off */ @@ -1130,7 +1134,7 @@ SLONG *MET_meta_transaction(DBB database, int update_flag) * * Functional description * Setup transaction for meta-data operation. Set up - * DB and gds__trans, and return meta-data transaction + * DB and gds_trans, and return meta-data transaction * handle for yucks. If we're doing metadata updates, * and lookups we'll use the metadat date transaction, * unless this is an rdb database or gateway in which @@ -1149,8 +1153,8 @@ SLONG *MET_meta_transaction(DBB database, int update_flag) if (!database) IBERROR(243); /* Msg243 no active database for operation */ - transaction = (database->dbb_capabilities & DBB_cap_multi_trans) ? - database->dbb_meta_trans : NULL; + transaction = (SLONG*) ((database->dbb_capabilities & DBB_cap_multi_trans) ? + database->dbb_meta_trans : NULL); DB = database->dbb_handle; @@ -1162,7 +1166,7 @@ SLONG *MET_meta_transaction(DBB database, int update_flag) !(database->dbb_capabilities & DBB_cap_single_trans))) { if (gds__start_transaction(status_vector, - GDS_REF(transaction), + (void**) GDS_REF(transaction), 1, GDS_REF(database->dbb_handle), sizeof(tpb), @@ -1178,21 +1182,21 @@ SLONG *MET_meta_transaction(DBB database, int update_flag) /* If we already have a meta-data transaction, there's more nothing to do */ - gds__trans = transaction; + gds_trans = transaction; /* If we only support a single transaction, use the data transaction */ - if (!gds__trans && (database->dbb_capabilities & DBB_cap_single_trans)) + if (!gds_trans && (database->dbb_capabilities & DBB_cap_single_trans)) { if (update_flag) IBERROR(244); /* Msg244 Interactive metadata updates are not available on Rdb */ - if (!(gds__trans = database->dbb_transaction)) - gds__trans = MET_transaction(nod_start_trans, database); + if (!(gds_trans = database->dbb_transaction)) + gds_trans = MET_transaction(nod_start_trans, database); } /* otherwise make one more effort to start the transaction */ - else if (!gds__trans) + else if (!gds_trans) { START_TRANSACTION ON_ERROR @@ -1200,8 +1204,8 @@ SLONG *MET_meta_transaction(DBB database, int update_flag) END_ERROR; } - database->dbb_meta_trans = gds__trans; - return gds__trans; + database->dbb_meta_trans = gds_trans; + return (SLONG*) gds_trans; } @@ -1260,13 +1264,13 @@ void MET_modify_field( DBB database, FLD field) END_MODIFY ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; } END_FOR ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (flag <= 0) @@ -1306,7 +1310,7 @@ void MET_modify_field( DBB database, FLD field) } END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; } @@ -1353,13 +1357,13 @@ void MET_modify_index( SYN node) END_MODIFY ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; count++; END_FOR ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (!count) @@ -1402,12 +1406,12 @@ void MET_modify_relation( REL relation, FLD fields) ERASE X ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; END_FOR ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (!count) { rollback_update(database); @@ -1458,39 +1462,39 @@ void MET_ready( SYN node, USHORT create_flag) /* Always generate a dpb and populate it with the language info. */ - *p++ = gds__dpb_version1; - *p++ = gds__dpb_interp; + *p++ = gds_dpb_version1; + *p++ = gds_dpb_interp; *p++ = 2; *p++ = QLI_interp % 256; *p++ = QLI_interp / 256; #else - *p++ = gds__dpb_version1; + *p++ = gds_dpb_version1; #endif if ((lc_ctype = QLI_charset) && (length = strlen(lc_ctype))) { - *p++ = gds__dpb_lc_ctype; + *p++ = gds_dpb_lc_ctype; *p++ = length; while (*lc_ctype) *p++ = *lc_ctype++; } if (QLI_trace) { - *p++ = gds__dpb_trace; + *p++ = gds_dpb_trace; *p++ = 1; *p++ = 1; } if (sw_buffers) { - *p++ = gds__dpb_num_buffers; + *p++ = gds_dpb_num_buffers; *p++ = 2; *p++ = sw_buffers % 256; *p++ = sw_buffers / 256; } if (temp->dbb_pagesize) { - *p++ = gds__dpb_page_size; + *p++ = gds_dpb_page_size; *p++ = 2; *p++ = temp->dbb_pagesize % 256; *p++ = temp->dbb_pagesize / 256; @@ -1508,7 +1512,7 @@ void MET_ready( SYN node, USHORT create_flag) length = strlen(QLI_default_user); } if (length) { - *p++ = gds__dpb_user_name; + *p++ = gds_dpb_user_name; *p++ = length; while (length--) *p++ = *q++; @@ -1525,7 +1529,7 @@ void MET_ready( SYN node, USHORT create_flag) length = strlen(QLI_default_password); } if (length) { - *p++ = gds__dpb_password; + *p++ = gds_dpb_password; *p++ = length; while (length--) *p++ = *q++; @@ -1550,13 +1554,13 @@ void MET_ready( SYN node, USHORT create_flag) 0, GDS_VAL(dbb->dbb_filename), GDS_REF(dbb->dbb_handle), - dpb_length, GDS_VAL(dpb), 0); + dpb_length, (char*) GDS_VAL(dpb), 0); else gds__attach_database(status_vector, 0, GDS_VAL(dbb->dbb_filename), GDS_REF(dbb->dbb_handle), - dpb_length, GDS_VAL(dpb)); + dpb_length, (char*) GDS_VAL(dpb)); if (status_vector[1]) break; } @@ -1565,7 +1569,7 @@ void MET_ready( SYN node, USHORT create_flag) if (ptr < end) { for (ptr2 = node->syn_arg; ptr2 < ptr; ptr2++) - detach(gds__status, *ptr2); + detach(gds_status, (DBB) *ptr2); ERRQ_database_error(dbb, status_vector); } @@ -1573,7 +1577,7 @@ void MET_ready( SYN node, USHORT create_flag) /* Databases are up and running. Install each. */ for (ptr = node->syn_arg; ptr < end; ptr++) - install(*ptr); + install((DBB) *ptr); } @@ -1626,7 +1630,7 @@ void MET_sql_alter_table( REL relation, FLD fields) count++; END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (!count) ERRQ_print_error(414, symbol->sym_string, NULL, NULL, NULL, NULL); /* Msg237 Relation %s is lost */ @@ -1635,24 +1639,24 @@ void MET_sql_alter_table( REL relation, FLD fields) rlb = NULL; rlb = CHECK_RLB(rlb); - STUFF(gds__dyn_version_1); - STUFF(gds__dyn_begin); - STUFF(gds__dyn_mod_rel); + STUFF(gds_dyn_version_1); + STUFF(gds_dyn_begin); + STUFF(gds_dyn_mod_rel); STUFF_STRING(symbol->sym_string); for (field = fields; field; field = field->fld_next) { if (field->fld_flags & FLD_add) add_sql_field(relation, field, 0, rlb); else if (field->fld_flags & FLD_drop) { - STUFF(gds__dyn_delete_local_fld); + STUFF(gds_dyn_delete_local_fld); STUFF_STRING(field->fld_name->sym_string); - STUFF(gds__dyn_end); + STUFF(gds_dyn_end); } } - STUFF(gds__dyn_end); - STUFF(gds__dyn_end); - STUFF(gds__dyn_eoc); + STUFF(gds_dyn_end); + STUFF(gds_dyn_end); + STUFF(gds_dyn_eoc); execute_dynamic_ddl(database, rlb); MET_meta_commit(database); @@ -1687,16 +1691,16 @@ void MET_sql_cr_view( SYN node) rlb = NULL; rlb = CHECK_RLB(rlb); - STUFF(gds__dyn_version_1); - STUFF(gds__dyn_begin); + STUFF(gds_dyn_version_1); + STUFF(gds_dyn_begin); - STUFF(gds__dyn_def_view); + STUFF(gds_dyn_def_view); STUFF_STRING(symbol->sym_string); /* The meat of the blr generation will go here */ - STUFF(gds__dyn_end); - STUFF(gds__dyn_eoc); + STUFF(gds_dyn_end); + STUFF(gds_dyn_eoc); execute_dynamic_ddl(database, rlb); MET_meta_commit(database); @@ -1716,7 +1720,7 @@ void MET_sql_grant( SYN node) * **************************************/ - sql_grant_revoke(node, gds__dyn_grant); + sql_grant_revoke(node, gds_dyn_grant); } @@ -1733,7 +1737,7 @@ void MET_sql_revoke( SYN node) * **************************************/ - sql_grant_revoke(node, gds__dyn_revoke); + sql_grant_revoke(node, gds_dyn_revoke); } @@ -1785,7 +1789,7 @@ SLONG *MET_transaction( NOD_T node_type, DBB database) if (status_vector[1]) ERRQ_database_error(database, status_vector); - return (database->dbb_transaction); + return (SLONG*) (database->dbb_transaction); } @@ -1822,7 +1826,7 @@ static void add_field( REL relation, FLD field, USHORT position) relation_name->sym_string, NULL, NULL, NULL); /* Msg251 Field %s already exists in relation %s */ END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; /* Check global field. Define it if it doesn't exist. */ @@ -1865,7 +1869,7 @@ static void add_field( REL relation, FLD field, USHORT position) END_STORE ON_ERROR rollback_update(relation->rel_database); - ERRQ_database_error(relation->rel_database, gds__status); + ERRQ_database_error(relation->rel_database, gds_status); END_ERROR; } @@ -1903,18 +1907,18 @@ static void add_sql_field( REL relation, FLD field, USHORT position, RLB rlb) relation_name->sym_string, NULL, NULL, NULL); /* Msg251 Field %s already exists in relation %s */ END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; - STUFF(gds__dyn_def_sql_fld); + STUFF(gds_dyn_def_sql_fld); STUFF_STRING(field->fld_name->sym_string); - STUFF(gds__dyn_fld_type); + STUFF(gds_dyn_fld_type); STUFF_WORD(2); STUFF_WORD(blr_dtypes[field->fld_dtype]); - STUFF(gds__dyn_fld_length); + STUFF(gds_dyn_fld_length); STUFF_WORD(2); l = (field->fld_dtype == @@ -1922,12 +1926,12 @@ static void add_sql_field( REL relation, FLD field, USHORT position, RLB rlb) sizeof(SSHORT) : field->fld_length; STUFF_WORD(l); - STUFF(gds__dyn_fld_scale); + STUFF(gds_dyn_fld_scale); STUFF_WORD(2); STUFF_WORD(field->fld_scale); if (position) { - STUFF(gds__dyn_fld_position); + STUFF(gds_dyn_fld_position); STUFF_WORD(2); STUFF_WORD(position); } @@ -1935,7 +1939,7 @@ static void add_sql_field( REL relation, FLD field, USHORT position, RLB rlb) rlb = CHECK_RLB(rlb); if (field->fld_flags & FLD_not_null) { - STUFF(gds__dyn_fld_validation_blr); + STUFF(gds_dyn_fld_validation_blr); STUFF_WORD(8); STUFF(blr_version4); STUFF(blr_not); @@ -1947,7 +1951,7 @@ static void add_sql_field( REL relation, FLD field, USHORT position, RLB rlb) STUFF(blr_eoc); } - STUFF(gds__dyn_end); + STUFF(gds_dyn_end); } @@ -1979,12 +1983,12 @@ static int blob_copy( RLB rlb, REL source, SLONG * source_blob_id) if (gds__open_blob(status_vector, GDS_REF(DB), GDS_REF(source_dbb->dbb_meta_trans), - GDS_REF(source_blob), GDS_VAL(source_blob_id))) { - rollback_update(DB); + (void**) GDS_REF(source_blob), (GDS__QUAD*) GDS_VAL(source_blob_id))) { + rollback_update((DBB) DB); ERRQ_database_error(source_dbb, status_vector); } - gds__blob_size(&source_blob, &size, &segment_count, &max_segment); + gds__blob_size((SLONG*) &source_blob, (SLONG*) &size, &segment_count, &max_segment); #if JPN_EUC max_segment *= 2; /* prepare for SJIS->EUC expansion */ @@ -2002,7 +2006,7 @@ static int blob_copy( RLB rlb, REL source, SLONG * source_blob_id) STUFF_WORD((USHORT) size); while (!gds__get_segment(status_vector, - GDS_REF(source_blob), + (void**) GDS_REF(source_blob), GDS_REF(length), buffer_length, GDS_VAL(buffer))) { while (rlb->rlb_limit - rlb->rlb_data < length) @@ -2012,8 +2016,8 @@ static int blob_copy( RLB rlb, REL source, SLONG * source_blob_id) STUFF(*p++); } - if (status_vector[1] != gds__segstr_eof) { - rollback_update(DB); + if (status_vector[1] != gds_segstr_eof) { + rollback_update((DBB) DB); if (buffer != fixed_buffer) gds__free(buffer); ERRQ_database_error(source_dbb, status_vector); @@ -2022,8 +2026,8 @@ static int blob_copy( RLB rlb, REL source, SLONG * source_blob_id) if (buffer != fixed_buffer) gds__free(buffer); - if (gds__close_blob(status_vector, GDS_REF(source_blob))) { - rollback_update(DB); + if (gds__close_blob(status_vector, (void**) GDS_REF(source_blob))) { + rollback_update((DBB) DB); ERRQ_database_error(source_dbb, status_vector); } @@ -2059,7 +2063,7 @@ static void change_field( REL relation, FLD field) if (global_field && - !(check_global_field(database, NULL_PTR, global_field->sym_string))) { + !(check_global_field(database, (FLD) NULL_PTR, global_field->sym_string))) { rollback_update(database); ERRQ_print_error(253, global_field->sym_string, NULL, NULL, NULL, NULL); /* Msg253 global field %s does not exist */ } @@ -2082,12 +2086,12 @@ static void change_field( REL relation, FLD field) END_MODIFY ON_ERROR rollback_update(relation->rel_database); - ERRQ_database_error(relation->rel_database, gds__status); + ERRQ_database_error(relation->rel_database, gds_status); END_ERROR; END_FOR ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; if (!count) { @@ -2172,7 +2176,7 @@ static int check_global_field( DBB database, FLD field, TEXT * name) previously_defined = TRUE; END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; return previously_defined; @@ -2196,7 +2200,7 @@ static int check_relation( REL relation) previously_defined = FALSE; - spare = DB; + spare = (SLONG*) DB; DB = relation->rel_database->dbb_handle; FOR(REQUEST_HANDLE relation->rel_database->dbb_requests[REQ_relation_def] @@ -2205,7 +2209,7 @@ static int check_relation( REL relation) previously_defined = TRUE; END_FOR ON_ERROR - ERRQ_database_error(relation->rel_database, gds__status); + ERRQ_database_error(relation->rel_database, gds_status); END_ERROR; DB = spare; @@ -2241,12 +2245,12 @@ static int clone_fields( REL target, REL source) SSHORT count; req1 = req2 = NULL; - s_trans = t_trans = gds__trans; + s_trans = t_trans = (SLONG*) gds_trans; DB = DB1 = target->rel_database->dbb_handle; if (target->rel_database != source->rel_database) { MET_meta_transaction(source->rel_database, FALSE); - s_trans = gds__trans; + s_trans = (SLONG*) gds_trans; } if (target->rel_database != source->rel_database) @@ -2255,8 +2259,8 @@ static int clone_fields( REL target, REL source) rlb = NULL; rlb = CHECK_RLB(rlb); - STUFF(gds__dyn_version_1); - STUFF(gds__dyn_begin); + STUFF(gds_dyn_version_1); + STUFF(gds_dyn_begin); FOR(REQUEST_HANDLE req1 TRANSACTION_HANDLE s_trans) @@ -2269,62 +2273,62 @@ static int clone_fields( REL target, REL source) (strncmp("RDB$", Y.RDB$FIELD_NAME, 4)) && (!(strncmp("RDB$", F.RDB$FIELD_NAME, 4)))) { - STUFF(gds__dyn_def_sql_fld); + STUFF(gds_dyn_def_sql_fld); STUFF_STRING(Y.RDB$FIELD_NAME); - STUFF(gds__dyn_fld_type); + STUFF(gds_dyn_fld_type); STUFF_WORD(2); STUFF_WORD(F.RDB$FIELD_TYPE); - STUFF(gds__dyn_fld_length); + STUFF(gds_dyn_fld_length); STUFF_WORD(2); STUFF_WORD(F.RDB$FIELD_LENGTH); - STUFF(gds__dyn_fld_scale); + STUFF(gds_dyn_fld_scale); STUFF_WORD(2); STUFF_WORD(F.RDB$FIELD_SCALE); if (!F.RDB$VALIDATION_BLR.NULL) { - STUFF(gds__dyn_fld_validation_blr); - blob_copy(rlb, source, &F.RDB$VALIDATION_BLR); + STUFF(gds_dyn_fld_validation_blr); + blob_copy(rlb, source, (SLONG*) &F.RDB$VALIDATION_BLR); } } else { - STUFF(gds__dyn_def_local_fld); + STUFF(gds_dyn_def_local_fld); STUFF_STRING(Y.RDB$FIELD_NAME); - STUFF(gds__dyn_fld_source); + STUFF(gds_dyn_fld_source); STUFF_STRING(Y.RDB$FIELD_SOURCE); } - STUFF(gds__dyn_rel_name); + STUFF(gds_dyn_rel_name); STUFF_STRING(target->rel_symbol->sym_string); if (!Y.RDB$FIELD_POSITION.NULL) { - STUFF(gds__dyn_fld_position); + STUFF(gds_dyn_fld_position); STUFF_WORD(2); STUFF_WORD(Y.RDB$FIELD_POSITION); } if (!Y.RDB$QUERY_NAME.NULL) { - STUFF(gds__dyn_fld_query_name); + STUFF(gds_dyn_fld_query_name); STUFF_STRING(Y.RDB$QUERY_NAME); } if (!Y.RDB$EDIT_STRING.NULL) { #if (! (defined JPN_SJIS || defined JPN_EUC) ) - STUFF(gds__dyn_fld_edit_string); + STUFF(gds_dyn_fld_edit_string); #else - STUFF(gds__dyn_fld_edit_string2); + STUFF(gds_dyn_fld_edit_string2); STUFF_WORD(QLI_interp); #endif STUFF_STRING(Y.RDB$EDIT_STRING); } if (!Y.RDB$UPDATE_FLAG.NULL) { - STUFF(gds__dyn_update_flag); + STUFF(gds_dyn_update_flag); STUFF_WORD(2); STUFF_WORD(Y.RDB$UPDATE_FLAG); } @@ -2332,35 +2336,35 @@ static int clone_fields( REL target, REL source) if (!Y.RDB$QUERY_HEADER.NULL) { #if (! (defined JPN_SJIS || defined JPN_EUC) ) - STUFF(gds__dyn_fld_query_header); + STUFF(gds_dyn_fld_query_header); #else - STUFF(gds__dyn_fld_query_header2); + STUFF(gds_dyn_fld_query_header2); STUFF_WORD(QLI_interp); #endif - blob_copy(rlb, source, &Y.RDB$QUERY_HEADER); + blob_copy(rlb, source, (SLONG*) &Y.RDB$QUERY_HEADER); } if (!Y.RDB$DESCRIPTION.NULL) { #if (! (defined JPN_SJIS || defined JPN_EUC) ) - STUFF(gds__dyn_description); + STUFF(gds_dyn_description); #else - STUFF(gds__dyn_description2); + STUFF(gds_dyn_description2); STUFF_WORD(QLI_interp); #endif - blob_copy(rlb, source, &Y.RDB$DESCRIPTION); + blob_copy(rlb, source, (SLONG*) &Y.RDB$DESCRIPTION); } if (!Y.RDB$DEFAULT_VALUE.NULL) { - STUFF(gds__dyn_fld_default_value); - blob_copy(rlb, source, &Y.RDB$DEFAULT_VALUE); + STUFF(gds_dyn_fld_default_value); + blob_copy(rlb, source, (SLONG*) &Y.RDB$DEFAULT_VALUE); } if ((source->rel_database->dbb_capabilities & DBB_cap_rfr_sys_flag) && @@ -2371,75 +2375,75 @@ static int clone_fields( REL target, REL source) S_RFR.RDB$FIELD_NAME = Y.RDB$FIELD_NAME AND S_RFR.RDB$RELATION_NAME = Y.RDB$RELATION_NAME if (!S_RFR.RDB$SYSTEM_FLAG.NULL) { - STUFF(gds__dyn_system_flag); + STUFF(gds_dyn_system_flag); STUFF_WORD(2); STUFF_WORD(S_RFR.RDB$SYSTEM_FLAG); } END_FOR ON_ERROR rollback_update(target->rel_database); - ERRQ_database_error(source->rel_database, gds__status); + ERRQ_database_error(source->rel_database, gds_status); END_ERROR; if (!F.RDB$COMPUTED_BLR.NULL) { - STUFF(gds__dyn_fld_computed_blr); - blob_copy(rlb, source, &F.RDB$COMPUTED_BLR); + STUFF(gds_dyn_fld_computed_blr); + blob_copy(rlb, source, (SLONG*) &F.RDB$COMPUTED_BLR); #if (! (defined JPN_SJIS || defined JPN_EUC) ) - STUFF(gds__dyn_fld_computed_source); + STUFF(gds_dyn_fld_computed_source); #else - STUFF(gds__dyn_fld_computed_source2); + STUFF(gds_dyn_fld_computed_source2); STUFF_WORD(QLI_interp); #endif - blob_copy(rlb, source, &F.RDB$COMPUTED_SOURCE); + blob_copy(rlb, source, (SLONG*) &F.RDB$COMPUTED_SOURCE); - STUFF(gds__dyn_fld_type); + STUFF(gds_dyn_fld_type); STUFF_WORD(2); STUFF_WORD(F.RDB$FIELD_TYPE); - STUFF(gds__dyn_fld_length); + STUFF(gds_dyn_fld_length); STUFF_WORD(2); STUFF_WORD(F.RDB$FIELD_LENGTH); if (!F.RDB$FIELD_SCALE.NULL) { - STUFF(gds__dyn_fld_scale); + STUFF(gds_dyn_fld_scale); STUFF_WORD(2); STUFF_WORD(F.RDB$FIELD_SCALE); } if (!F.RDB$FIELD_SUB_TYPE.NULL) { - STUFF(gds__dyn_fld_sub_type); + STUFF(gds_dyn_fld_sub_type); STUFF_WORD(2); STUFF_WORD(F.RDB$FIELD_SUB_TYPE); } } - STUFF(gds__dyn_end); + STUFF(gds_dyn_end); END_FOR ON_ERROR rollback_update(source->rel_database); - ERRQ_database_error(source->rel_database, gds__status); + ERRQ_database_error(source->rel_database, gds_status); END_ERROR; - STUFF(gds__dyn_end); - STUFF(gds__dyn_eoc); + STUFF(gds_dyn_end); + STUFF(gds_dyn_eoc); execute_dynamic_ddl(target->rel_database, rlb); if (req1) - if (gds__release_request(gds__status, GDS_REF(req1))) - ERRQ_database_error(source->rel_database, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(req1))) + ERRQ_database_error(source->rel_database, gds_status); if (req2) - if (gds__release_request(gds__status, GDS_REF(req2))) - ERRQ_database_error(source->rel_database, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(req2))) + ERRQ_database_error(source->rel_database, gds_status); return TRUE; } -static clone_global_fields( REL target, REL source) +static int clone_global_fields( REL target, REL source) { /************************************** * @@ -2472,8 +2476,8 @@ static clone_global_fields( REL target, REL source) RLB rlb; req1 = req2 = req3 = NULL; - s_trans = source->rel_database->dbb_meta_trans; - t_trans = target->rel_database->dbb_meta_trans; + s_trans = (SLONG*) source->rel_database->dbb_meta_trans; + t_trans = (SLONG*) target->rel_database->dbb_meta_trans; DB = source->rel_database->dbb_handle; DB1 = target->rel_database->dbb_handle; @@ -2513,7 +2517,7 @@ static clone_global_fields( REL target, REL source) predefined = TRUE; END_FOR ON_ERROR - ERRQ_database_error(target->rel_database, gds__status); + ERRQ_database_error(target->rel_database, gds_status); END_ERROR; if (predefined) @@ -2521,58 +2525,58 @@ static clone_global_fields( REL target, REL source) if (first_field) { rlb = CHECK_RLB(rlb); - STUFF(gds__dyn_version_1); - STUFF(gds__dyn_begin); + STUFF(gds_dyn_version_1); + STUFF(gds_dyn_begin); first_field = FALSE; } - STUFF(gds__dyn_def_global_fld); + STUFF(gds_dyn_def_global_fld); STUFF_STRING(Y.RDB$FIELD_NAME); - STUFF(gds__dyn_fld_type); + STUFF(gds_dyn_fld_type); STUFF_WORD(2); STUFF_WORD(Y.RDB$FIELD_TYPE); - STUFF(gds__dyn_fld_length); + STUFF(gds_dyn_fld_length); STUFF_WORD(2); STUFF_WORD(Y.RDB$FIELD_LENGTH); if (!Y.RDB$FIELD_SCALE.NULL) { - STUFF(gds__dyn_fld_scale); + STUFF(gds_dyn_fld_scale); STUFF_WORD(2); STUFF_WORD(Y.RDB$FIELD_SCALE); } if (!Y.RDB$FIELD_SUB_TYPE.NULL) { - STUFF(gds__dyn_fld_sub_type); + STUFF(gds_dyn_fld_sub_type); STUFF_WORD(2); STUFF_WORD(Y.RDB$FIELD_SUB_TYPE); } if (!Y.RDB$SEGMENT_LENGTH.NULL) { - STUFF(gds__dyn_fld_segment_length); + STUFF(gds_dyn_fld_segment_length); STUFF_WORD(2); STUFF_WORD(Y.RDB$SEGMENT_LENGTH); } if (!Y.RDB$SYSTEM_FLAG.NULL) { - STUFF(gds__dyn_system_flag); + STUFF(gds_dyn_system_flag); STUFF_WORD(2); STUFF_WORD(Y.RDB$SYSTEM_FLAG); } if (!Y.RDB$QUERY_NAME.NULL) { - STUFF(gds__dyn_fld_query_name); + STUFF(gds_dyn_fld_query_name); STUFF_STRING(Y.RDB$QUERY_NAME); } if (!Y.RDB$EDIT_STRING.NULL) { #if (! (defined JPN_SJIS || defined JPN_EUC) ) - STUFF(gds__dyn_fld_edit_string); + STUFF(gds_dyn_fld_edit_string); #else - STUFF(gds__dyn_fld_edit_string2); + STUFF(gds_dyn_fld_edit_string2); STUFF_WORD(QLI_interp); #endif @@ -2581,62 +2585,62 @@ static clone_global_fields( REL target, REL source) } if (!Y.RDB$MISSING_VALUE.NULL) { - STUFF(gds__dyn_fld_missing_value); - blob_copy(rlb, source, &Y.RDB$MISSING_VALUE); + STUFF(gds_dyn_fld_missing_value); + blob_copy(rlb, source, (SLONG*) &Y.RDB$MISSING_VALUE); } if (!Y.RDB$DEFAULT_VALUE.NULL) { - STUFF(gds__dyn_fld_default_value); - blob_copy(rlb, source, &Y.RDB$DEFAULT_VALUE); + STUFF(gds_dyn_fld_default_value); + blob_copy(rlb, source, (SLONG*) &Y.RDB$DEFAULT_VALUE); } if (!Y.RDB$QUERY_HEADER.NULL) { #if (! (defined JPN_SJIS || defined JPN_EUC) ) - STUFF(gds__dyn_fld_query_header); + STUFF(gds_dyn_fld_query_header); #else - STUFF(gds__dyn_fld_query_header2); + STUFF(gds_dyn_fld_query_header2); STUFF_WORD(QLI_interp); #endif - blob_copy(rlb, source, &Y.RDB$QUERY_HEADER); + blob_copy(rlb, source, (SLONG*) &Y.RDB$QUERY_HEADER); } if (!Y.RDB$DESCRIPTION.NULL) { #if (! (defined JPN_SJIS || defined JPN_EUC) ) - STUFF(gds__dyn_description); + STUFF(gds_dyn_description); #else - STUFF(gds__dyn_description2); + STUFF(gds_dyn_description2); STUFF_WORD(QLI_interp); #endif - blob_copy(rlb, source, &Y.RDB$DESCRIPTION); + blob_copy(rlb, source, (SLONG*) &Y.RDB$DESCRIPTION); } if (!Y.RDB$VALIDATION_BLR.NULL) { - STUFF(gds__dyn_fld_validation_blr); - blob_copy(rlb, source, &Y.RDB$VALIDATION_BLR); + STUFF(gds_dyn_fld_validation_blr); + blob_copy(rlb, source, (SLONG*) &Y.RDB$VALIDATION_BLR); } if (!Y.RDB$VALIDATION_SOURCE.NULL) { #if (! (defined JPN_SJIS || defined JPN_EUC) ) - STUFF(gds__dyn_fld_validation_source); + STUFF(gds_dyn_fld_validation_source); #else - STUFF(gds__dyn_fld_validation_source2); + STUFF(gds_dyn_fld_validation_source2); STUFF_WORD(QLI_interp); #endif - blob_copy(rlb, source, &Y.RDB$VALIDATION_SOURCE); + blob_copy(rlb, source, (SLONG*) &Y.RDB$VALIDATION_SOURCE); } if ((target->rel_database->dbb_capabilities & DBB_cap_dimensions) && @@ -2650,59 +2654,59 @@ static clone_global_fields( REL target, REL source) if (first_dimension) { first_dimension = FALSE; - STUFF(gds__dyn_fld_dimensions); + STUFF(gds_dyn_fld_dimensions); STUFF_WORD(2); STUFF_WORD(F.RDB$DIMENSIONS); } - STUFF(gds__dyn_def_dimension); + STUFF(gds_dyn_def_dimension); STUFF_WORD(2); STUFF_WORD(D.RDB$DIMENSION); if (!D.RDB$LOWER_BOUND.NULL) { - STUFF(gds__dyn_dim_lower); + STUFF(gds_dyn_dim_lower); STUFF_WORD(2); STUFF_WORD(D.RDB$LOWER_BOUND); } if (!D.RDB$UPPER_BOUND.NULL) { - STUFF(gds__dyn_dim_upper); + STUFF(gds_dyn_dim_upper); STUFF_WORD(2); STUFF_WORD(D.RDB$UPPER_BOUND); } - STUFF(gds__dyn_end); + STUFF(gds_dyn_end); END_FOR ON_ERROR if (target->rel_database->dbb_meta_trans) rollback_update(target->rel_database); - rollback_update(source->rel_database->dbb_meta_trans); - ERRQ_database_error(source->rel_database, gds__status); + rollback_update((DBB) source->rel_database->dbb_meta_trans); + ERRQ_database_error(source->rel_database, gds_status); END_ERROR; } - STUFF(gds__dyn_end); + STUFF(gds_dyn_end); END_FOR ON_ERROR rollback_update(source->rel_database); if (target->rel_database->dbb_meta_trans) rollback_update(target->rel_database); - ERRQ_database_error(source->rel_database, gds__status); + ERRQ_database_error(source->rel_database, gds_status); END_ERROR; if (rlb) { - STUFF(gds__dyn_end); - STUFF(gds__dyn_eoc); + STUFF(gds_dyn_end); + STUFF(gds_dyn_eoc); execute_dynamic_ddl(target->rel_database, rlb); } if (req1) - if (gds__release_request(gds__status, GDS_REF(req1))) - ERRQ_database_error(source->rel_database, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(req1))) + ERRQ_database_error(source->rel_database, gds_status); if (req2) - if (gds__release_request(gds__status, GDS_REF(req2))) - ERRQ_database_error(target->rel_database, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(req2))) + ERRQ_database_error(target->rel_database, gds_status); if (req3) - if (gds__release_request(gds__status, GDS_REF(req3))) - ERRQ_database_error(source->rel_database, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(req3))) + ERRQ_database_error(source->rel_database, gds_status); return TRUE; } @@ -2756,7 +2760,7 @@ static void define_global_field( DBB database, FLD field, SYM name) END_STORE ON_ERROR rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; } @@ -2777,10 +2781,10 @@ static void delete_fields( REL relation) while (field = relation->rel_fields) { relation->rel_fields = field->fld_next; - ALL_release(field->fld_name); + ALL_release((FRB) field->fld_name); if (field->fld_query_name) - ALL_release(field->fld_query_name); - ALL_release(field); + ALL_release((FRB) field->fld_query_name); + ALL_release((FRB) field); } relation->rel_flags &= ~REL_fields; @@ -2845,14 +2849,14 @@ static int execute_dynamic_ddl( DBB database, RLB rlb) length = (UCHAR *) rlb->rlb_data - (UCHAR *) rlb->rlb_base; if (QLI_blr) - PRETTY_print_dyn(rlb->rlb_base, (FPTR_INT) ib_printf, "%4d %s\n", 0); + PRETTY_print_dyn((SCHAR*) rlb->rlb_base, (FPTR_INT) ib_printf, "%4d %s\n", 0); - if (gds__ddl(gds__status, + if (gds__ddl(gds_status, GDS_REF(database->dbb_handle), GDS_REF(database->dbb_meta_trans), - length, GDS_VAL(rlb->rlb_base))) { + length, (char*) GDS_VAL(rlb->rlb_base))) { rollback_update(database); - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); } RELEASE_RLB; @@ -2917,24 +2921,24 @@ static void get_database_type( DBB new_dbb) gds__database_info(status_vector, GDS_REF(new_dbb->dbb_handle), - sizeof(db_info), db_info, sizeof(buffer), buffer); + sizeof(db_info), (char*) db_info, sizeof(buffer), (char*) buffer); if (status_vector[1]) - ERRQ_database_error(new_dbb, gds__status); + ERRQ_database_error(new_dbb, gds_status); p = buffer; - while (*p != gds__info_end && p < buffer + sizeof(buffer)) { + while (*p != gds_info_end && p < buffer + sizeof(buffer)) { item = *p++; l = gds__vax_integer(p, 2); p += 2; switch (item) { - case gds__info_implementation: + case gds_info_implementation: q = p; count = *q++; while (count--) { new_dbb->dbb_type = *q++; - if (*q++ == gds__info_db_class_access) + if (*q++ == gds_info_db_class_access) break; } break; @@ -2980,9 +2984,9 @@ static void get_log_names( while (TRUE) { loop++; if (WALF_get_linked_logs_info - (gds__status, db_name, cur_log, part_offset, &log_count, next_log, + (gds_status, db_name, cur_log, part_offset, &log_count, next_log, &next_offset, &last_log_flag, ¬_archived) != SUCCESS) - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); if ((!not_archived) || force) break; @@ -3012,7 +3016,7 @@ static void get_log_names( part_offset = next_offset; while (log_count) { - ret_val = WALF_get_next_log_info(gds__status, + ret_val = WALF_get_next_log_info(gds_status, db_name, cl, part_offset, nl, &next_offset, @@ -3020,7 +3024,7 @@ static void get_log_names( &last_log_flag, 1); if (ret_val == FAILURE) - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); if (ret_val < 0) break; @@ -3114,12 +3118,12 @@ static TEXT *get_query_header( DBB database, SLONG blob_id[2]) #if (defined JPN_EUC || defined JPN_SJIS) if (gds__open_blob2(status_vector, GDS_REF(database->dbb_handle), - GDS_REF(gds__trans), + GDS_REF(gds_trans), GDS_REF(blob), GDS_VAL(blob_id), bpb_length, bpb)) #else if (gds__open_blob(status_vector, GDS_REF(database->dbb_handle), - GDS_REF(gds__trans), GDS_REF(blob), GDS_VAL(blob_id))) + GDS_REF(gds_trans), (void**) GDS_REF(blob), (GDS__QUAD*) GDS_VAL(blob_id))) #endif /* (defined JPN_EUC || defined JPN_SJIS) */ ERRQ_database_error(database, status_vector); @@ -3127,9 +3131,9 @@ static TEXT *get_query_header( DBB database, SLONG blob_id[2]) for (;;) { status = gds__get_segment(status_vector, - GDS_REF(blob), + (void**) GDS_REF(blob), GDS_REF(length), sizeof(buffer), buffer); - if (status && status != gds__segment) + if (status && status != gds_segment) break; if (length && buffer[length - 1] == '\n') --length; @@ -3147,8 +3151,8 @@ static TEXT *get_query_header( DBB database, SLONG blob_id[2]) } } - if (gds__close_blob(status_vector, GDS_REF(blob))) - ERRQ_database_error(database, gds__status); + if (gds__close_blob(status_vector, (void**) GDS_REF(blob))) + ERRQ_database_error(database, gds_status); *p = 0; if (!strcmp(header, "\" \"")) { @@ -3213,7 +3217,7 @@ static void install( DBB old_dbb) HSH_insert(symbol); } - gds__trans = MET_transaction(nod_start_trans, new_dbb); + gds_trans = MET_transaction(nod_start_trans, new_dbb); /* Find out whose database this is so later we don't ask Rdb/VMS or its pals to do any unnatural acts. While we're at it get @@ -3248,12 +3252,12 @@ static void install( DBB old_dbb) relation->rel_flags |= REL_view; END_FOR ON_ERROR - ERRQ_database_error(new_dbb, gds__status); + ERRQ_database_error(new_dbb, gds_status); END_ERROR; if (request) - if (gds__release_request(gds__status, GDS_REF(request))) - ERRQ_database_error(new_dbb, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(request))) + ERRQ_database_error(new_dbb, gds_status); /* Pick up functions, if appropriate */ @@ -3277,7 +3281,7 @@ static void install( DBB old_dbb) function->fun_return.dsc_scale = Y.RDB$FIELD_SCALE; END_FOR ON_ERROR - ERRQ_database_error(new_dbb, gds__status); + ERRQ_database_error(new_dbb, gds_status); END_ERROR; if (!function->fun_return.dsc_dtype) { function->fun_return.dsc_dtype = dtype_text; @@ -3298,14 +3302,14 @@ static void install( DBB old_dbb) } END_FOR ON_ERROR - ERRQ_database_error(new_dbb, gds__status); + ERRQ_database_error(new_dbb, gds_status); END_ERROR; if (request) - if (gds__release_request(gds__status, GDS_REF(request))) - ERRQ_database_error(new_dbb, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(request))) + ERRQ_database_error(new_dbb, gds_status); if (request2) - if (gds__release_request(gds__status, GDS_REF(request2))) - ERRQ_database_error(new_dbb, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(request2))) + ERRQ_database_error(new_dbb, gds_status); } } @@ -3433,7 +3437,7 @@ static SYN parse_blr( UCHAR ** ptr, SYM symbol) **************************************/ SYN node, *arg; CON constant; - NOD_T operator; + NOD_T operatr; NAM name; UCHAR *p, *blr; SSHORT args, dtype, scale, length, l, op; @@ -3455,80 +3459,80 @@ static SYN parse_blr( UCHAR ** ptr, SYM symbol) return NULL; case blr_eql: - operator = nod_eql; + operatr = nod_eql; break; case blr_neq: - operator = nod_neq; + operatr = nod_neq; break; case blr_gtr: - operator = nod_gtr; + operatr = nod_gtr; break; case blr_geq: - operator = nod_geq; + operatr = nod_geq; break; case blr_lss: - operator = nod_lss; + operatr = nod_lss; break; case blr_leq: - operator = nod_leq; + operatr = nod_leq; break; case blr_containing: - operator = nod_containing; + operatr = nod_containing; break; case blr_starting: - operator = nod_starts; + operatr = nod_starts; break; case blr_matching: - operator = nod_matches; + operatr = nod_matches; break; case blr_matching2: - operator = nod_sleuth; + operatr = nod_sleuth; break; case blr_like: - operator = nod_like; + operatr = nod_like; break; case blr_and: - operator = nod_and; + operatr = nod_and; break; case blr_or: - operator = nod_or; + operatr = nod_or; break; case blr_add: - operator = nod_add; + operatr = nod_add; break; case blr_subtract: - operator = nod_subtract; + operatr = nod_subtract; break; case blr_multiply: - operator = nod_multiply; + operatr = nod_multiply; break; case blr_divide: - operator = nod_divide; + operatr = nod_divide; break; case blr_upcase: - operator = nod_upcase; + operatr = nod_upcase; break; case blr_null: - operator = nod_null; + operatr = nod_null; break; case blr_between: - operator = nod_between; + operatr = nod_between; args = 3; break; case blr_not: - operator = nod_not; + operatr = nod_not; args = 1; break; case blr_negate: - operator = nod_negate; + operatr = nod_negate; args = 1; break; case blr_missing: - operator = nod_missing; + operatr = nod_missing; args = 1; break; @@ -3558,7 +3562,7 @@ static SYN parse_blr( UCHAR ** ptr, SYM symbol) case blr_function: length = BLR_BYTE; node = make_node(nod_function, s_fun_count); - node->syn_arg[s_fun_function] = (SYN) HSH_lookup(blr, length); + node->syn_arg[s_fun_function] = (SYN) HSH_lookup((SCHAR*) blr, length); blr += length; args = BLR_BYTE; node->syn_arg[s_fun_args] = make_node(nod_list, args); @@ -3603,7 +3607,7 @@ static SYN parse_blr( UCHAR ** ptr, SYM symbol) if (KANJI_euc_len(blr, length_specified_in_blr, &length)) { ERRQ_print_error(258, (TEXT *) op, NULL, NULL, NULL, NULL); - /* Msg258 don't understand BLR operator %d */ + /* Msg258 don't understand BLR operatr %d */ } } else if (QLI_interp == gds__interp_jpn_sjis && @@ -3611,12 +3615,12 @@ static SYN parse_blr( UCHAR ** ptr, SYM symbol) if (KANJI_sjis_len(blr, length_specified_in_blr, &length)) { ERRQ_print_error(258, (TEXT *) op, NULL, NULL, NULL, NULL); - /* Msg258 don't understand BLR operator %d */ + /* Msg258 don't understand BLR operatr %d */ } } else { ERRQ_print_error(258, (TEXT *) op, NULL, NULL, NULL, NULL); - /* Msg258 don't understand BLR operator %d */ + /* Msg258 don't understand BLR operatr %d */ } #endif break; @@ -3697,7 +3701,7 @@ static SYN parse_blr( UCHAR ** ptr, SYM symbol) (blr, length_specified_in_blr, p, length, &length)) { ERRQ_print_error(258, (TEXT *) op, NULL, NULL, NULL, NULL); - /* Msg258 don't understand BLR operator %d */ + /* Msg258 don't understand BLR operatr %d */ } constant->con_desc.dsc_length = length; blr += length_specified_in_blr; @@ -3709,14 +3713,14 @@ static SYN parse_blr( UCHAR ** ptr, SYM symbol) (blr, length_specified_in_blr, p, length, &length)) { ERRQ_print_error(258, (TEXT *) op, NULL, NULL, NULL, NULL); - /* Msg258 don't understand BLR operator %d */ + /* Msg258 don't understand BLR operatr %d */ } constant->con_desc.dsc_length = length; blr += length_specified_in_blr; } else { ERRQ_print_error(258, (TEXT *) op, NULL, NULL, NULL, NULL); - /* Msg258 don't understand BLR operator %d */ + /* Msg258 don't understand BLR operatr %d */ } } #endif @@ -3734,11 +3738,11 @@ static SYN parse_blr( UCHAR ** ptr, SYM symbol) break; default: - ERRQ_print_error(258, (TEXT *) op, NULL, NULL, NULL, NULL); /* Msg258 don't understand BLR operator %d */ + ERRQ_print_error(258, (TEXT *) op, NULL, NULL, NULL, NULL); /* Msg258 don't understand BLR operatr %d */ } if (!node) { - node = make_node(operator, args); + node = make_node(operatr, args); arg = node->syn_arg; while (--args >= 0) if (!(*arg++ = parse_blr(&blr, symbol))) @@ -3776,8 +3780,8 @@ static SYN parse_blr_blob( SLONG * blob_id, SYM symbol) if (gds__open_blob(status_vector, GDS_REF(DB), - GDS_REF(gds__trans), - GDS_REF(handle), GDS_VAL(blob_id))) return NULL; + GDS_REF(gds_trans), + (void**) GDS_REF(handle), (GDS__QUAD*) GDS_VAL(blob_id))) return NULL; ptr = buffer; @@ -3785,12 +3789,12 @@ static SYN parse_blr_blob( SLONG * blob_id, SYM symbol) if (!(length = buffer + sizeof(buffer) - ptr)) break; if (gds__get_segment(status_vector, - GDS_REF(handle), - GDS_REF(length), length, GDS_VAL(ptr))) break; + (void**) GDS_REF(handle), + GDS_REF(length), length, (char*) GDS_VAL(ptr))) break; ptr += length; } - if (gds__close_blob(status_vector, GDS_REF(handle))) + if (gds__close_blob(status_vector, (void**) GDS_REF(handle))) return NULL; if (ptr == buffer) @@ -3840,14 +3844,14 @@ static void purge_relation(REL relation) while (field = relation->rel_fields) { relation->rel_fields = field->fld_next; - ALLQ_release(field->fld_name); + ALLQ_release((FRB) field->fld_name); if (symbol = field->fld_query_name) { - ALLQ_release(symbol); + ALLQ_release((FRB) symbol); } - ALLQ_release(field); + ALLQ_release((FRB) field); } - ALL_release(relation); + ALL_release((FRB) relation); } @@ -3893,13 +3897,13 @@ static void rollback_update( DBB database) **************************************/ STATUS alt_vector[20]; - if (gds__trans == database->dbb_meta_trans && + if (gds_trans == database->dbb_meta_trans && (database->dbb_capabilities & DBB_cap_multi_trans)) gds__rollback_transaction(alt_vector, GDS_REF(database->dbb_meta_trans)); /* Note: No message given if rollback fails */ - gds__trans = NULL; + gds_trans = NULL; } @@ -3937,13 +3941,13 @@ static void set_capabilities( DBB database) database->dbb_capabilities |= rel_field_table->bit_mask; END_FOR ON_ERROR - ERRQ_database_error(database, gds__status); + ERRQ_database_error(database, gds_status); END_ERROR; } if (req) - if (gds__release_request(gds__status, GDS_REF(req))) - ERRQ_database_error(database, gds__status); + if (gds__release_request(gds_status, (void**) GDS_REF(req))) + ERRQ_database_error(database, gds_status); } @@ -4003,8 +4007,8 @@ static void sql_grant_revoke( SYN node, USHORT type) rlb = NULL; rlb = CHECK_RLB(rlb); - STUFF(gds__dyn_version_1); - STUFF(gds__dyn_begin); + STUFF(gds_dyn_version_1); + STUFF(gds_dyn_begin); /* For each user create a separate grant string */ /* For each specified field create a separate grant string */ @@ -4022,10 +4026,10 @@ static void sql_grant_revoke( SYN node, USHORT type) } else stuff_priv(rlb, type, relation_name, privileges, - (*name)->nam_string, NULL_PTR); + (*name)->nam_string, (TEXT*) NULL_PTR); - STUFF(gds__dyn_end); - STUFF(gds__dyn_eoc); + STUFF(gds_dyn_end); + STUFF(gds_dyn_eoc); execute_dynamic_ddl(database, rlb); MET_meta_commit(database); @@ -4110,24 +4114,24 @@ static void stuff_priv( if (privileges & PRV_update) STUFF('U'); - STUFF(gds__dyn_rel_name); + STUFF(gds_dyn_rel_name); STUFF_STRING(relation); - STUFF(gds__dyn_grant_user); + STUFF(gds_dyn_grant_user); STUFF_STRING(user); if (field) { - STUFF(gds__dyn_fld_name); + STUFF(gds_dyn_fld_name); STUFF_STRING(field); } if (privileges & PRV_grant_option) { - STUFF(gds__dyn_grant_options); + STUFF(gds_dyn_grant_options); STUFF_WORD(2); STUFF_WORD(TRUE); } - STUFF(gds__dyn_end); + STUFF(gds_dyn_end); } @@ -4154,16 +4158,16 @@ static void wal_info( *part_offset = 0; cur_log[0] = 0; - while ((item = *p++) != gds__info_end) { + while ((item = *p++) != gds_info_end) { length = gds__vax_integer(p, 2); p += 2; switch (item) { - case gds__info_logfile: + case gds_info_logfile: *log = gds__vax_integer(p, length); p += length; break; - case gds__info_cur_logfile_name: + case gds_info_cur_logfile_name: d = p; p += length; length = *d++; @@ -4171,7 +4175,7 @@ static void wal_info( cur_log[length] = 0; break; - case gds__info_cur_log_part_offset: + case gds_info_cur_log_part_offset: *part_offset = gds__vax_integer(p, length); p += length; break; diff --git a/src/qli/proc.e b/src/qli/proc.epp similarity index 90% rename from src/qli/proc.e rename to src/qli/proc.epp index fd0084f722..4ce12d002b 100644 --- a/src/qli/proc.e +++ b/src/qli/proc.epp @@ -43,8 +43,8 @@ static void create_qli_procedures(DBB); static void probe(DBB, TEXT *); static int upcase_name(TEXT *, TEXT *); -static UCHAR tpb[] = { gds__tpb_version1, gds__tpb_write, - gds__tpb_concurrency +static UCHAR tpb[] = { gds_tpb_version1, gds_tpb_write, + gds_tpb_concurrency }; static UCHAR dyn_gdl1[] = { @@ -178,11 +178,11 @@ void PRO_copy_procedure( GDS_REF(new_blob), GDS_REF(NEW.QLI$PROCEDURE), bpb_length, - bpb)) + (char*) bpb)) ERRQ_database_error(new_database, status_vector); while (!(gds__get_segment(status_vector, GDS_REF(old_blob), - GDS_REF(length), + (USHORT*) GDS_REF(length), sizeof(buffer), GDS_VAL(buffer)))) { buffer[length] = 0; if (gds__put_segment(status_vector, GDS_REF(new_blob), @@ -194,7 +194,7 @@ void PRO_copy_procedure( END_STORE; /* Release the FOR and STORE requests */ - gds__release_request(gds__status, GDS_REF(store_request)); + gds__release_request(gds_status, GDS_REF(store_request)); PRO_commit(new_database); } @@ -259,11 +259,11 @@ void PRO_create( DBB database, TEXT * name) if (gds__create_blob2(status_vector, GDS_REF(database->dbb_handle), - GDS_REF(gds__trans), + GDS_REF(gds_trans), GDS_REF(blob), GDS_REF(X.QLI$PROCEDURE), bpb_length, - bpb)) + (char*) bpb)) ERRQ_database_error(database, status_vector); while (!MATCH(KW_END_PROCEDURE)) { if (QLI_token->tok_type == tok_eof) @@ -324,7 +324,7 @@ int PRO_delete_procedure( DBB database, TEXT * name) count++; END_FOR; - gds__release_request(gds__status, GDS_REF(request)); + gds__release_request(gds_status, GDS_REF(request)); /* Commit the procedure transaction, if there is one */ @@ -356,10 +356,10 @@ void PRO_edit_procedure( DBB database, TEXT * name) MODIFY X USING #if (defined JPN_EUC || defined JPN_SJIS) if (!BLOB_edit2(&X.QLI$PROCEDURE, database->dbb_handle, - gds__trans, name, 1)) + gds_trans, name, 1)) #else if (!BLOB_edit(&X.QLI$PROCEDURE, database->dbb_handle, - gds__trans, name)) + gds_trans, name)) #endif /* (defined JPN_EUC || defined JPN_SJIS) */ return; END_MODIFY @@ -368,13 +368,13 @@ void PRO_edit_procedure( DBB database, TEXT * name) END_FOR STORE(REQUEST_HANDLE database->dbb_edit_store) X IN DB.QLI$PROCEDURES - X.QLI$PROCEDURE = gds__blob_null; + X.QLI$PROCEDURE = gds_blob_null; #if (defined JPN_EUC || defined JPN_SJIS) if (!BLOB_edit2(&X.QLI$PROCEDURE, database->dbb_handle, - gds__trans, name, 1)) + gds_trans, name, 1)) #else if (!BLOB_edit(&X.QLI$PROCEDURE, database->dbb_handle, - gds__trans, name)) + gds_trans, name)) #endif /* (defined JPN_EUC || defined JPN_SJIS) */ return; gds__vtof(name, X.QLI$PROCEDURE_NAME, sizeof(X.QLI$PROCEDURE_NAME)); @@ -409,7 +409,7 @@ void *PRO_fetch_procedure( DBB database, TEXT * proc) FOR(REQUEST_HANDLE database->dbb_lookup_blob) X IN DB.QLI$PROCEDURES WITH X.QLI$PROCEDURE_NAME EQ name - blob = PRO_open_blob(database, &X.QLI$PROCEDURE); + blob = (int*) PRO_open_blob(database, (SLONG*) &X.QLI$PROCEDURE); END_FOR return blob; @@ -436,7 +436,7 @@ int PRO_get_line( void *blob, TEXT * buffer, USHORT size) gds__get_segment(status_vector, GDS_REF(blob), GDS_REF(length), size, GDS_VAL(buffer)); - if (status_vector[1] && status_vector[1] != gds__segment) + if (status_vector[1] && status_vector[1] != gds_segment) return FALSE; p = buffer + length; @@ -485,7 +485,7 @@ void PRO_invoke( DBB database, TEXT * name) ERRQ_print_error(72, name, NULL, NULL, NULL, NULL); /* Msg 72 procedure \"%s\" is undefined */ - LEX_procedure(database, blob); + LEX_procedure((struct dbb*) database, (int*) blob); LEX_token(); } @@ -526,9 +526,9 @@ void *PRO_open_blob( DBB database, SLONG * blob_id) GDS_REF(database->dbb_handle), GDS_REF(database->dbb_proc_trans), GDS_REF(blob), - GDS_VAL(blob_id), + (GDS__QUAD*) GDS_VAL(blob_id), bpb_length, - bpb)) ERRQ_database_error(database, status_vector); + (char*) bpb)) ERRQ_database_error(database, status_vector); return blob; } @@ -563,12 +563,12 @@ int PRO_rename_procedure( DBB database, TEXT * old_name, TEXT * new_name) gds__vtof(new_name, X.QLI$PROCEDURE_NAME, sizeof(X.QLI$PROCEDURE_NAME)); END_MODIFY ON_ERROR - gds__release_request(gds__status, GDS_REF(request)); + gds__release_request(gds_status, GDS_REF(request)); ERRQ_database_error(database, status_vector); END_ERROR; END_FOR; - gds__release_request(gds__status, GDS_REF(request)); + gds__release_request(gds_status, GDS_REF(request)); /* Commit the procedure transaction, if there is one */ @@ -597,7 +597,7 @@ void PRO_rollback( DBB database) gds__rollback_transaction(status_vector, GDS_REF(database->dbb_proc_trans)); - gds__trans = NULL; + gds_trans = NULL; } } @@ -625,8 +625,8 @@ void PRO_scan( DBB database, void (*routine) (), void *arg) while (*p && *p != ' ') { p++; } - (*routine) (arg, X.QLI$PROCEDURE_NAME, - strlen(X.QLI$PROCEDURE_NAME), database, &X.QLI$PROCEDURE); + (* (void(*)(void*, TEXT *, USHORT, DBB, SLONG *)) routine) (arg, X.QLI$PROCEDURE_NAME, + strlen(X.QLI$PROCEDURE_NAME), database, (SLONG*) &X.QLI$PROCEDURE); END_FOR } @@ -653,14 +653,14 @@ void PRO_setup( DBB dbb) /* If we don't have a QLI$PROCEDURES relation, and can't get one, punt */ - if (dbb->dbb_type == gds__info_db_impl_rdb_vms && + if (dbb->dbb_type == gds_info_db_impl_rdb_vms && !(dbb->dbb_flags & DBB_procedures)) IBERROR(78); /* Msg 78 QLI$PROCEDURES relation must be created with RDO in Rdb/VMS databases */ DB = dbb->dbb_handle; if (dbb->dbb_flags & DBB_procedures) { - gds__trans = PRO_transaction(dbb, FALSE); + gds_trans = PRO_transaction(dbb, FALSE); return; } @@ -668,7 +668,7 @@ void PRO_setup( DBB dbb) create_qli_procedures(dbb); - gds__trans = PRO_transaction(dbb, FALSE); + gds_trans = PRO_transaction(dbb, FALSE); } @@ -719,29 +719,29 @@ void *PRO_transaction( DBB database, int update_flag) /* If we already have a procedure transaction, there's more nothing to do */ - gds__trans = transaction; + gds_trans = transaction; /* If we only support a single transaction, use the data transaction */ - if (!gds__trans && (database->dbb_capabilities & DBB_cap_single_trans)) { + if (!gds_trans && (database->dbb_capabilities & DBB_cap_single_trans)) { if (update_flag) IBERROR(249); /* Msg249 Interactive metadata updates are not available on Rdb */ - if (!(gds__trans = database->dbb_transaction)) - gds__trans = MET_transaction(nod_start_trans, database); + if (!(gds_trans = database->dbb_transaction)) + gds_trans = MET_transaction(nod_start_trans, database); } /* otherwise make one more effort to start the transaction */ - else if (!gds__trans) { + else if (!gds_trans) { START_TRANSACTION ON_ERROR ERRQ_database_error(database, status_vector); END_ERROR; } - database->dbb_proc_trans = gds__trans; + database->dbb_proc_trans = gds_trans; - return gds__trans; + return gds_trans; } @@ -776,7 +776,7 @@ static int clear_out_qli_procedures( DBB dbb) END_FOR ON_ERROR gds__release_request(status_vector, GDS_REF(req)); - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); END_ERROR; gds__release_request(status_vector, GDS_REF(req)); @@ -793,7 +793,7 @@ static int clear_out_qli_procedures( DBB dbb) END_FOR ON_ERROR gds__release_request(status_vector, GDS_REF(req)); - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); END_ERROR; gds__release_request(status_vector, GDS_REF(req)); @@ -803,7 +803,7 @@ static int clear_out_qli_procedures( DBB dbb) END_FOR ON_ERROR gds__release_request(status_vector, GDS_REF(req)); - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); END_ERROR; gds__release_request(status_vector, GDS_REF(req)); @@ -815,9 +815,9 @@ static int clear_out_qli_procedures( DBB dbb) END_FOR ON_ERROR gds__release_request(status_vector, GDS_REF(req)); - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); END_ERROR; - gds__release_request(gds__status, GDS_REF(req)); + gds__release_request(gds_status, GDS_REF(req)); FOR(REQUEST_HANDLE req) X IN DB.RDB$FIELDS WITH X.RDB$FIELD_NAME = "QLI$PROCEDURE_NAME" OR @@ -827,9 +827,9 @@ static int clear_out_qli_procedures( DBB dbb) END_FOR ON_ERROR gds__release_request(status_vector, GDS_REF(req)); - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); END_ERROR; - gds__release_request(gds__status, GDS_REF(req)); + gds__release_request(gds_status, GDS_REF(req)); FOR(REQUEST_HANDLE req) X IN DB.RDB$RELATIONS WITH X.RDB$RELATION_NAME = "QLI$PROCEDURES" @@ -838,9 +838,9 @@ static int clear_out_qli_procedures( DBB dbb) END_FOR ON_ERROR gds__release_request(status_vector, GDS_REF(req)); - ERRQ_database_error(dbb, gds__status); + ERRQ_database_error(dbb, gds_status); END_ERROR; - gds__release_request(gds__status, GDS_REF(req)); + gds__release_request(gds_status, GDS_REF(req)); return count; } @@ -862,43 +862,43 @@ static void create_qli_procedures( DBB dbb) * **************************************/ - gds__trans = PRO_transaction(dbb, TRUE); + gds_trans = PRO_transaction(dbb, TRUE); if (clear_out_qli_procedures(dbb)) { PRO_commit(dbb); - gds__trans = PRO_transaction(dbb, TRUE); + gds_trans = PRO_transaction(dbb, TRUE); } if (dbb->dbb_flags & DBB_procedures) return; - if (gds__ddl(gds__status, + if (gds__ddl(gds_status, GDS_REF(DB), - GDS_REF(gds__trans), sizeof(dyn_gdl1), dyn_gdl1)) { + GDS_REF(gds_trans), sizeof(dyn_gdl1), (char*) dyn_gdl1)) { PRO_rollback(dbb); IBERROR(73); /* Msg 73 Could not create QLI$PROCEDURE_NAME field */ } - if (gds__ddl(gds__status, + if (gds__ddl(gds_status, GDS_REF(DB), - GDS_REF(gds__trans), sizeof(dyn_gdl2), dyn_gdl2)) { + GDS_REF(gds_trans), sizeof(dyn_gdl2), (char*) dyn_gdl2)) { PRO_rollback(dbb); IBERROR(74); /* Msg 74 Could not create QLI$PROCEDURE field */ } - if (gds__ddl(gds__status, + if (gds__ddl(gds_status, GDS_REF(DB), - GDS_REF(gds__trans), sizeof(dyn_gdl3), dyn_gdl3)) { + GDS_REF(gds_trans), sizeof(dyn_gdl3), (char*) dyn_gdl3)) { PRO_rollback(dbb); IBERROR(75); /* Msg 75 Could not create QLI$PROCEDURES relation */ } - if (gds__ddl(gds__status, + if (gds__ddl(gds_status, GDS_REF(DB), - GDS_REF(gds__trans), sizeof(dyn_gdl4), dyn_gdl4)) { + GDS_REF(gds_trans), sizeof(dyn_gdl4), (char*) dyn_gdl4)) { PRO_rollback(dbb); IBERROR(409); /* msg 409 Could not create QLI$PROCEDURES index */ diff --git a/src/qli/show.e b/src/qli/show.epp similarity index 92% rename from src/qli/show.e rename to src/qli/show.epp index 33a7a094e1..500411d97f 100644 --- a/src/qli/show.e +++ b/src/qli/show.epp @@ -103,18 +103,18 @@ static int truncate_string(TEXT *); static void view_info(DBB, TEXT *, TEXT *, SSHORT, SSHORT); static CONST SCHAR db_items[] = - { gds__info_page_size, isc_info_db_size_in_pages, gds__info_end }; + { gds_info_page_size, isc_info_db_size_in_pages, gds_info_end }; static CONST UCHAR #if (defined JPN_EUC || defined JPN_SJIS) - text_bpb[] = { gds__bpb_version1, gds__bpb_target_interp, 2, + text_bpb[] = { gds_bpb_version1, gds_bpb_target_interp, 2, (HOST_INTERP & 0xff), (HOST_INTERP >> 8) }, #endif /* (defined JPN_EUC || defined JPN_SJIS) */ acl_bpb[] = { -gds__bpb_version1, gds__bpb_source_type, 1, 3, +gds_bpb_version1, gds_bpb_source_type, 1, 3, - gds__bpb_target_type, 1, 1}, blr_bpb[] = { -gds__bpb_version1, gds__bpb_source_type, 1, 2, gds__bpb_target_type, 1, 1}; + gds_bpb_target_type, 1, 1}, blr_bpb[] = { +gds_bpb_version1, gds_bpb_source_type, 1, 2, gds_bpb_target_type, 1, 1}; #define NULL_BLOB(id) (!id [0] && !id [1]) @@ -159,7 +159,7 @@ void SHOW_stuff( SYN node) ptr = node->syn_arg; for (i = 0; i < node->syn_count; i++) { - sw = (ENUM show_t) * ptr++; + sw = (ENUM show_t) (int) * ptr++; value = *ptr++; if (sw != show_matching_language && sw != show_version && @@ -173,7 +173,7 @@ void SHOW_stuff( SYN node) relation = relation->rel_next) { if (!(relation->rel_flags & REL_system)) { show_rel(relation); - show_fields(relation, NULL_PTR); + show_fields(relation, (FLD) NULL_PTR); } if (QLI_abort) return; @@ -200,7 +200,7 @@ void SHOW_stuff( SYN node) relation = relation->rel_next) if (!(relation->rel_flags & REL_system)) { show_rel(relation); - show_fields(relation, NULL_PTR); + show_fields(relation,(FLD) NULL_PTR); } ib_printf("\n"); break; @@ -221,7 +221,7 @@ void SHOW_stuff( SYN node) relation = relation->rel_next) { if (!(relation->rel_flags & REL_system)) { show_rel(relation); - show_fields(relation, NULL_PTR); + show_fields(relation, (FLD) NULL_PTR); } if (QLI_abort) return; @@ -231,7 +231,7 @@ void SHOW_stuff( SYN node) case show_security_classes: count = 0; if (value) - count += show_security_classes_detail(value); + count += show_security_classes_detail((DBB) value); else for (dbb = QLI_databases; dbb; dbb = dbb->dbb_next) count += show_security_classes_detail(dbb); @@ -251,7 +251,7 @@ void SHOW_stuff( SYN node) case show_views: count = 0; if (value) - count += show_views_detail(value); + count += show_views_detail((DBB) value); else for (dbb = QLI_databases; dbb; dbb = dbb->dbb_next) count += show_views_detail(dbb); @@ -260,16 +260,16 @@ void SHOW_stuff( SYN node) break; case show_relation: - show_rel(value); - show_fields(value, NULL_PTR); - show_view(value); - show_rel_detail(value); + show_rel((REL) value); + show_fields((REL) value, (FLD) NULL_PTR); + show_view((REL) value); + show_rel_detail((REL) value); break; case show_indices: if (value) { - show_rel(value); - if (!show_indices_detail(value)) + show_rel((REL) value); + if (!show_indices_detail((REL) value)) ERRQ_msg_put(93, NULL, NULL, NULL, NULL, NULL); /* Msg93 No indices defined */ break; } @@ -302,12 +302,12 @@ void SHOW_stuff( SYN node) break; case show_filter: - show_filt(value); + show_filt((QFL) value); break; case show_filters: if (value) - show_filts(value); + show_filts((DBB) value); else for (dbb = QLI_databases; dbb; dbb = dbb->dbb_next) show_filts(dbb); @@ -315,19 +315,19 @@ void SHOW_stuff( SYN node) case show_forms: if (value) - show_forms_db(value); + show_forms_db((DBB) value); else for (dbb = QLI_databases; dbb; dbb = dbb->dbb_next) show_forms_db(dbb); break; case show_function: - show_func(value); + show_func((QFN) value); break; case show_functions: if (value) - show_funcs(value); + show_funcs((DBB) value); else for (dbb = QLI_databases; dbb; dbb = dbb->dbb_next) show_funcs(dbb); @@ -339,14 +339,14 @@ void SHOW_stuff( SYN node) case show_procedures: if (value) - show_procs(value); + show_procs((DBB) value); else for (dbb = QLI_databases; dbb; dbb = dbb->dbb_next) show_procs(dbb); break; case show_procedure: - show_proc(value); + show_proc((QPR) value); break; case show_version: @@ -354,7 +354,7 @@ void SHOW_stuff( SYN node) break; case show_variable: - show_var(value); + show_var((NAM) value); break; case show_variables: @@ -366,20 +366,20 @@ void SHOW_stuff( SYN node) break; case show_global_fields: - show_gbl_fields(value); + show_gbl_fields((DBB) value); break; case show_trigger: - show_trig(value); + show_trig((REL) value); break; case show_triggers: - show_trigs(value); + show_trigs((DBB) value); break; case show_system_triggers: if (value) - show_sys_trigs(value); + show_sys_trigs((DBB) value); else for (dbb = QLI_databases; dbb; dbb = dbb->dbb_next) show_sys_trigs(dbb); @@ -475,18 +475,18 @@ static void display_blob( if (gds__open_blob2(status_vector, GDS_REF(dbb->dbb_handle), GDS_REF(dbb->dbb_meta_trans), - GDS_REF(blob), - GDS_VAL(blob_id), + (void**) GDS_REF(blob), + (GDS__QUAD*) GDS_VAL(blob_id), bpb_length, - GDS_VAL(bpb))) + (char*) GDS_VAL(bpb))) ERRQ_database_error(dbb, status_vector); for (;;) { buffer_length = sizeof(buffer) - 1; status = gds__get_segment(status_vector, - GDS_REF(blob), + (void**) GDS_REF(blob), GDS_REF(length), buffer_length, buffer); - if (status && status != gds__segment) + if (status && status != gds_segment) break; buffer[length--] = 0; if (strip_line) { @@ -505,7 +505,7 @@ static void display_blob( ib_printf("%s%s\n", prefix, buffer); } - gds__close_blob(status_vector, GDS_REF(blob)); + gds__close_blob(status_vector, (void**) GDS_REF(blob)); } @@ -542,7 +542,7 @@ static void display_text( DBB dbb, SLONG blob_id[2], TEXT * prefix, int strip) #if (defined JPN_EUC || defined JPN_SJIS) display_blob(dbb, blob_id, prefix, sizeof(text_bpb), text_bpb, strip); #else - display_blob(dbb, blob_id, prefix, 0, NULL_PTR, strip); + display_blob(dbb, blob_id, prefix, 0, (UCHAR*) NULL_PTR, strip); #endif /* (defined JPN_EUC || defined JPN_SJIS) */ } @@ -565,11 +565,11 @@ static void display_procedure( DBB database, UCHAR * name, int *blob) SSHORT length; UCHAR buffer[256]; - ERRQ_msg_put(96, name, /* Msg96 Procedure %s in database %s (%s) */ + ERRQ_msg_put(96, (TEXT*) name, /* Msg96 Procedure %s in database %s (%s) */ database->dbb_filename, database->dbb_symbol->sym_string, NULL, NULL); - while (PRO_get_line(blob, buffer, sizeof(buffer))) + while (PRO_get_line(blob, (TEXT*) buffer, sizeof(buffer))) ib_printf(" %s", buffer); PRO_close(database, blob); @@ -622,7 +622,7 @@ static void show_blob_info( } else { ERRQ_msg_put(msg_src, relation_name, NULL, NULL, NULL, NULL); - show_text_blob(database, "\t", 0, blob_src, 0, NULL_PTR, TRUE); + show_text_blob(database, "\t", 0, blob_src, 0, (SLONG*) NULL_PTR, TRUE); } } @@ -646,7 +646,7 @@ static void show_blr( **************************************/ if (source[0] || source[1]) - show_text_blob(database, "\t", source_msg, source, 0, NULL_PTR, + show_text_blob(database, "\t", source_msg, source, 0, (SLONG*) NULL_PTR, FALSE); else if (blr[0] || blr[1]) { if (blr_msg) @@ -825,12 +825,12 @@ static void show_dbb_parameters( DBB database) sizeof(db_items), db_items, sizeof(buffer), - buffer)) + (char*) buffer)) ERRQ_database_error(database, status_vector); page_size = allocation = 0; - for (d = buffer; *d != gds__info_end;) { + for (d = buffer; *d != gds_info_end;) { item = *d++; length = gds__vax_integer(d, 2); d += 2; @@ -839,11 +839,11 @@ static void show_dbb_parameters( DBB database) allocation = gds__vax_integer(d, length); break; - case (gds__info_page_size): + case (gds_info_page_size): page_size = gds__vax_integer(d, length); break; - case (gds__info_error): + case (gds_info_error): break; } d += length; @@ -857,16 +857,16 @@ static void show_dbb_parameters( DBB database) if (database->dbb_capabilities & DBB_cap_security) { FOR(REQUEST_HANDLE database->dbb_requests[REQ_show_dbb]) D IN RDB$DATABASE - show_string(260, D.RDB$SECURITY_CLASS, 0, NULL_PTR); - show_text_blob(database, "\t", 261, &D.RDB$DESCRIPTION, 0, - NULL_PTR, FALSE); + show_string(260, D.RDB$SECURITY_CLASS, 0, (TEXT*) NULL_PTR); + show_text_blob(database, "\t", 261, (SLONG*) &D.RDB$DESCRIPTION, 0, + (SLONG*) NULL_PTR, FALSE); END_FOR; } else { FOR(REQUEST_HANDLE database->dbb_requests[REQ_show_dbb]) D IN RDB$DATABASE - show_text_blob(database, "\t", 262, &D.RDB$DESCRIPTION, 0, - NULL_PTR, FALSE); + show_text_blob(database, "\t", 262, (SLONG*) &D.RDB$DESCRIPTION, 0, + (SLONG*) NULL_PTR, FALSE); END_FOR; } @@ -967,8 +967,8 @@ static int show_field_detail( RFR.RDB$VIEW_CONTEXT, 0); } - show_text_blob(database, "\t", 266, &RFR.RDB$DESCRIPTION, 339, - &F.RDB$DESCRIPTION, FALSE); + show_text_blob(database, "\t", 266, (SLONG*) &RFR.RDB$DESCRIPTION, 339, + (SLONG*) &F.RDB$DESCRIPTION, FALSE); ERRQ_msg_put(267, NULL, NULL, NULL, NULL, NULL); /* Msg267 Datatype information: */ ib_printf("\t"); @@ -978,15 +978,15 @@ static int show_field_detail( if (dimensions && !idx_node) array_dimensions(database, F.RDB$FIELD_NAME); ib_printf("\n"); - show_blr(database, 341, &F.RDB$COMPUTED_SOURCE, 341, - &F.RDB$COMPUTED_BLR); - show_blr(database, 342, &F.RDB$VALIDATION_SOURCE, 342, - &F.RDB$VALIDATION_BLR); - show_string(270, RFR.RDB$SECURITY_CLASS, 0, NULL_PTR); + show_blr(database, 341, (SLONG*)&F.RDB$COMPUTED_SOURCE, 341, + (SLONG*) &F.RDB$COMPUTED_BLR); + show_blr(database, 342, (SLONG*)&F.RDB$VALIDATION_SOURCE, 342, + (SLONG*) &F.RDB$VALIDATION_BLR); + show_string(270, RFR.RDB$SECURITY_CLASS, 0, (TEXT*) NULL_PTR); show_string(271, RFR.RDB$QUERY_NAME, 271, F.RDB$QUERY_NAME); show_string(273, RFR.RDB$EDIT_STRING, 273, F.RDB$EDIT_STRING); - show_text_blob(database, "\t", 275, &RFR.RDB$QUERY_HEADER, 275, - &F.RDB$QUERY_HEADER, FALSE); + show_text_blob(database, "\t", 275, (SLONG*) &RFR.RDB$QUERY_HEADER, 275, + (SLONG*) &F.RDB$QUERY_HEADER, FALSE); END_FOR; return count; @@ -1155,7 +1155,7 @@ static void show_filt( QFL filter) } -static show_filter_detail( DBB database, TEXT * filter_name) +static int show_filter_detail( DBB database, TEXT * filter_name) { /************************************** * @@ -1187,7 +1187,7 @@ static show_filter_detail( DBB database, TEXT * filter_name) ERRQ_msg_put(445, F.RDB$MODULE_NAME, NULL, NULL, NULL, NULL); /* Msg445 Filter library is %s */ ERRQ_msg_put(446, (TEXT *) F.RDB$INPUT_SUB_TYPE, NULL, NULL, NULL, NULL); /* Msg446 Input sub-type is %d */ ERRQ_msg_put(447, (TEXT *) F.RDB$OUTPUT_SUB_TYPE, NULL, NULL, NULL, NULL); /* Msg447 Output sub-type is %d */ - show_text_blob(database, "\t", 448, &F.RDB$DESCRIPTION, 0, NULL_PTR, + show_text_blob(database, "\t", 448, (SLONG*) &F.RDB$DESCRIPTION, 0, (SLONG*) NULL_PTR, FALSE); END_FOR; return count; @@ -1314,7 +1314,7 @@ static void show_fld( SYN field_node) if (database) { count += show_field_detail(database, string, - field_name->nam_string, NULL_PTR); + field_name->nam_string, (SYN) NULL_PTR); if (!count) ERRQ_msg_put(117, s, database->dbb_symbol->sym_string, NULL, NULL, NULL); /* Msg117 Field %s does not exist in database %s */ } @@ -1384,7 +1384,7 @@ static void show_func( QFN func) } -static show_func_detail( DBB database, TEXT * func_name) +static int show_func_detail( DBB database, TEXT * func_name) { /************************************** * @@ -1443,7 +1443,7 @@ static show_func_detail( DBB database, TEXT * func_name) ib_printf("\n"); END_FOR; - show_text_blob(database, "\t", 421, &F.RDB$DESCRIPTION, 0, NULL_PTR, + show_text_blob(database, "\t", 421, (SLONG*) &F.RDB$DESCRIPTION, 0, (SLONG*) NULL_PTR, FALSE); END_FOR; @@ -1567,8 +1567,8 @@ static int show_insecure_fields( RFR.RDB$VIEW_CONTEXT, 0); } - show_text_blob(database, "\t", 339, &RFR.RDB$DESCRIPTION, 339, - &F.RDB$DESCRIPTION, FALSE); + show_text_blob(database, "\t", 339, (SLONG*) &RFR.RDB$DESCRIPTION, 339, + (SLONG*) &F.RDB$DESCRIPTION, FALSE); ERRQ_msg_partial(340, NULL, NULL, NULL, NULL, NULL); /* Msg340 Datatype information: */ ib_printf("\t"); show_datatype(database, MET_get_datatype(F.RDB$FIELD_TYPE), @@ -1576,14 +1576,14 @@ static int show_insecure_fields( F.RDB$FIELD_SUB_TYPE, F.RDB$SEGMENT_LENGTH, MET_dimensions(database, F.RDB$FIELD_NAME)); ib_printf("\n"); - show_blr(database, 341, &F.RDB$COMPUTED_SOURCE, 341, - &F.RDB$COMPUTED_BLR); - show_blr(database, 342, &F.RDB$VALIDATION_SOURCE, 342, - &F.RDB$VALIDATION_BLR); + show_blr(database, 341, (SLONG*) &F.RDB$COMPUTED_SOURCE, 341, + (SLONG*) &F.RDB$COMPUTED_BLR); + show_blr(database, 342, (SLONG*) &F.RDB$VALIDATION_SOURCE, 342, + (SLONG*) &F.RDB$VALIDATION_BLR); show_string(343, RFR.RDB$QUERY_NAME, 343, F.RDB$QUERY_NAME); show_string(346, RFR.RDB$EDIT_STRING, 346, F.RDB$EDIT_STRING); - show_text_blob(database, "\t", 345, &RFR.RDB$QUERY_HEADER, 345, - &F.RDB$QUERY_HEADER, FALSE); + show_text_blob(database, "\t", 345, (SLONG*) &RFR.RDB$QUERY_HEADER, 345, + (SLONG*) &F.RDB$QUERY_HEADER, FALSE); END_FOR; return count; @@ -1731,7 +1731,7 @@ static int show_gbl_field_detail( DBB database, TEXT * field_name) ERRQ_msg_put(276, F.RDB$FIELD_NAME, database->dbb_symbol->sym_string, NULL, NULL, NULL); /* Msg276 Global field %s in database %s */ - show_text_blob(database, "\t", 277, &F.RDB$DESCRIPTION, 0, NULL_PTR, + show_text_blob(database, "\t", 277, (SLONG*) &F.RDB$DESCRIPTION, 0, (SLONG*) NULL_PTR, FALSE); ERRQ_msg_put(278, NULL, NULL, NULL, NULL, NULL); /* Msg278 Datatype information: */ ib_printf("\t"); @@ -1740,13 +1740,13 @@ static int show_gbl_field_detail( DBB database, TEXT * field_name) F.RDB$FIELD_SUB_TYPE, F.RDB$SEGMENT_LENGTH, MET_dimensions(database, F.RDB$FIELD_NAME)); ib_printf("\n"); - show_blr(database, 279, &F.RDB$COMPUTED_SOURCE, 341, - &F.RDB$COMPUTED_BLR); - show_blr(database, 280, &F.RDB$VALIDATION_SOURCE, 342, - &F.RDB$VALIDATION_BLR); - show_string(281, F.RDB$QUERY_NAME, 0, NULL_PTR); - show_string(282, F.RDB$EDIT_STRING, 0, NULL_PTR); - show_text_blob(database, "\t", 283, &F.RDB$QUERY_HEADER, 0, NULL_PTR, + show_blr(database, 279, (SLONG*) &F.RDB$COMPUTED_SOURCE, 341, + (SLONG*) &F.RDB$COMPUTED_BLR); + show_blr(database, 280, (SLONG*) &F.RDB$VALIDATION_SOURCE, 342, + (SLONG*) &F.RDB$VALIDATION_BLR); + show_string(281, F.RDB$QUERY_NAME, 0, (TEXT*) NULL_PTR); + show_string(282, F.RDB$EDIT_STRING, 0, (TEXT*) NULL_PTR); + show_text_blob(database, "\t", 283, (SLONG*) &F.RDB$QUERY_HEADER, 0, (SLONG*) NULL_PTR, FALSE); END_FOR; @@ -1828,7 +1828,7 @@ static int show_gbl_fields_detail( DBB database) F.RDB$FIELD_LENGTH, F.RDB$FIELD_SCALE, F.RDB$FIELD_SUB_TYPE, F.RDB$SEGMENT_LENGTH, MET_dimensions(database, F.RDB$FIELD_NAME)); - show_text_blob(database, "\t", 262, &F.RDB$DESCRIPTION, 0, NULL_PTR, + show_text_blob(database, "\t", 262, (SLONG*) &F.RDB$DESCRIPTION, 0, (SLONG*) NULL_PTR, FALSE); ib_printf("\n"); END_FOR; @@ -1874,9 +1874,9 @@ static int show_indices_detail( REL relation) *p = 0; ERRQ_msg_put(450, X.RDB$INDEX_NAME, - (X.RDB$UNIQUE_FLAG) ? " (unique)" : "", - (type == 1) ? " (descending)" : "", - (X.RDB$INDEX_INACTIVE) ? " (inactive)" : "", NULL); /* Msg450 Index %s%s%s%s */ + (X.RDB$UNIQUE_FLAG) ? (char*) " (unique)" : (char*) "", + (type == 1) ? (char*) " (descending)" : (char*) "", + (X.RDB$INDEX_INACTIVE) ? (char*) " (inactive)" : (char*) "", NULL); /* Msg450 Index %s%s%s%s */ FOR(REQUEST_HANDLE database->dbb_requests[REQ_show_index]) Y IN RDB$INDEX_SEGMENTS WITH @@ -1889,7 +1889,7 @@ static int show_indices_detail( REL relation) #ifdef PC_ENGINE /*** if (!X.RDB$EXPRESSION_SOURCE.NULL) - show_text_blob (database, "\t ", 0, &X.RDB$EXPRESSION_SOURCE, 0, NULL_PTR, TRUE); + show_text_blob (database, "\t ", 0, &X.RDB$EXPRESSION_SOURCE, 0, (SLONG*) NULL_PTR, TRUE); else if (!X.RDB$EXPRESSION_BLR.NULL) { ERRQ_msg_put (485, NULL, NULL, NULL, NULL, NULL); @@ -1909,7 +1909,7 @@ static int show_indices_detail( REL relation) for (p = X.RDB$INDEX_NAME; *p && *p != ' '; p++); *p = 0; ERRQ_msg_put(290, X.RDB$INDEX_NAME, - (X.RDB$UNIQUE_FLAG) ? " (unique)" : "", NULL, NULL, NULL); /* Msg290 Index %s%s */ + (X.RDB$UNIQUE_FLAG) ? (char*) " (unique)" : (char*) "", NULL, NULL, NULL); /* Msg290 Index %s%s */ FOR(REQUEST_HANDLE database->dbb_requests[REQ_show_index]) Y IN RDB$INDEX_SEGMENTS WITH Y.RDB$INDEX_NAME EQ X.RDB$INDEX_NAME @@ -1941,7 +1941,7 @@ static void show_matching(void) if (QLI_abort) return; if (QLI_matching_language) { - strncpy(buffer, QLI_matching_language->con_data, + strncpy(buffer, (char*) QLI_matching_language->con_data, QLI_matching_language->con_desc.dsc_length); buffer[QLI_matching_language->con_desc.dsc_length] = 0; ib_printf("\n\t%s\n", buffer); @@ -2009,8 +2009,8 @@ static void show_proc( QPR proc) name = proc->qpr_name; if (database = proc->qpr_database) { - if (blob = PRO_fetch_procedure(database, name->nam_string)) - display_procedure(database, name->nam_string, blob); + if (blob = (int*) PRO_fetch_procedure(database, (TEXT*) name->nam_string)) + display_procedure(database, (UCHAR*) name->nam_string, blob); else ERRQ_msg_put(126, /* Msg126 Procedure %s not found in database %s */ name->nam_string, database->dbb_symbol->sym_string, @@ -2019,8 +2019,8 @@ static void show_proc( QPR proc) } for (database = QLI_databases; database; database = database->dbb_next) - if (blob = PRO_fetch_procedure(database, name->nam_string)) { - display_procedure(database, name->nam_string, blob); + if (blob = (int*) PRO_fetch_procedure(database, (TEXT*) name->nam_string)) { + display_procedure(database, (UCHAR*) name->nam_string, blob); count++; } @@ -2105,14 +2105,14 @@ static void show_rel_detail( REL relation) FOR(REQUEST_HANDLE database->dbb_requests[REQ_show_rel_detail]) R IN RDB$RELATIONS WITH R.RDB$RELATION_NAME = relation_name - show_text_blob(database, "\t", 291, &R.RDB$DESCRIPTION, 0, - NULL_PTR, FALSE); + show_text_blob(database, "\t", 291, (SLONG*) &R.RDB$DESCRIPTION, 0, + (SLONG*) NULL_PTR, FALSE); if (database->dbb_capabilities & DBB_cap_security) FOR(REQUEST_HANDLE database->dbb_requests[REQ_show_rel_secur]) S IN RDB$RELATIONS WITH S.RDB$RELATION_NAME = R.RDB$RELATION_NAME AND S.RDB$SECURITY_CLASS NOT MISSING - show_string(292, S.RDB$SECURITY_CLASS, 0, NULL_PTR); + show_string(292, S.RDB$SECURITY_CLASS, 0, (TEXT*) NULL_PTR); END_FOR; if (database->dbb_capabilities & DBB_cap_extern_file) @@ -2222,7 +2222,7 @@ static int show_security_class_detail( DBB database, TEXT * name) S IN RDB$SECURITY_CLASSES WITH S.RDB$SECURITY_CLASS = name if (truncate_string(S.RDB$SECURITY_CLASS)) { ib_printf("\t%s:\n", S.RDB$SECURITY_CLASS); - display_acl(database, &S.RDB$ACL); + display_acl(database, (SLONG*) &S.RDB$ACL); } count++; END_FOR; @@ -2258,7 +2258,7 @@ static int show_security_classes_detail( DBB database) if (truncate_string(S.RDB$SECURITY_CLASS)) { ib_printf("\t%s:\n", S.RDB$SECURITY_CLASS); - display_acl(database, &S.RDB$ACL); + display_acl(database, (SLONG*) &S.RDB$ACL); } count++; END_FOR; @@ -2327,9 +2327,9 @@ static void show_sys_trigs( DBB database) ERRQ_msg_put(379, X.RDB$RELATION_NAME, NULL, NULL, NULL, NULL); /* Msg379 System Triggers */ show_trigger_header(X.RDB$TRIGGER_NAME, X.RDB$TRIGGER_TYPE, X.RDB$TRIGGER_SEQUENCE, - X.RDB$TRIGGER_INACTIVE, &X.RDB$DESCRIPTION, + X.RDB$TRIGGER_INACTIVE, (SLONG*) &X.RDB$DESCRIPTION, database, X.RDB$RELATION_NAME); - show_blob_info(&X.RDB$TRIGGER_BLR, &X.RDB$TRIGGER_SOURCE, 377, /* Msg377 Source for the trigger is not available. Trigger BLR: */ + show_blob_info((SLONG*) &X.RDB$TRIGGER_BLR, (SLONG*) &X.RDB$TRIGGER_SOURCE, 377, /* Msg377 Source for the trigger is not available. Trigger BLR: */ 376, /* Msg376 Source for the trigger */ database, X.RDB$RELATION_NAME); show_trigger_messages(database, X.RDB$TRIGGER_NAME); @@ -2434,9 +2434,9 @@ static int show_trigger_detail( DBB database, TEXT * relation_name) show_trigger_header(X.RDB$TRIGGER_NAME, X.RDB$TRIGGER_TYPE, X.RDB$TRIGGER_SEQUENCE, X.RDB$TRIGGER_INACTIVE, - &X.RDB$DESCRIPTION, database, + (SLONG*) &X.RDB$DESCRIPTION, database, relation_name); - show_blob_info(&X.RDB$TRIGGER_BLR, &X.RDB$TRIGGER_SOURCE, 377, /* Msg377 Source for the trigger is not available. Trigger BLR: */ + show_blob_info((SLONG*) &X.RDB$TRIGGER_BLR, (SLONG*) &X.RDB$TRIGGER_SOURCE, 377, /* Msg377 Source for the trigger is not available. Trigger BLR: */ 376, /* Msg376 Source for the trigger */ database, relation_name); show_trigger_messages(database, X.RDB$TRIGGER_NAME); @@ -2481,7 +2481,7 @@ SLONG * description, DBB database, TEXT * relation_name) *****************************************************/ show_trigger_status(name, type, inactive, sequence); - show_text_blob(database, "\t ", 375, description, 0, NULL_PTR, TRUE); + show_text_blob(database, "\t ", 375, description, 0, (SLONG*) NULL_PTR, TRUE); } @@ -2636,9 +2636,9 @@ static int show_triggers_detail( DBB database) show_trigger_header(X.RDB$TRIGGER_NAME, X.RDB$TRIGGER_TYPE, X.RDB$TRIGGER_SEQUENCE, X.RDB$TRIGGER_INACTIVE, - &X.RDB$DESCRIPTION, database, + (SLONG*) &X.RDB$DESCRIPTION, database, X.RDB$RELATION_NAME); - show_blob_info(&X.RDB$TRIGGER_BLR, &X.RDB$TRIGGER_SOURCE, 377, /* Msg377 Source for the trigger is not available. Trigger BLR: */ + show_blob_info((SLONG*) &X.RDB$TRIGGER_BLR, (SLONG*) &X.RDB$TRIGGER_SOURCE, 377, /* Msg377 Source for the trigger is not available. Trigger BLR: */ 376, /* Msg376 Source for the trigger */ database, X.RDB$RELATION_NAME); show_trigger_messages(database, X.RDB$TRIGGER_NAME); @@ -2722,7 +2722,7 @@ static void show_vars(void) **************************************/ ERRQ_msg_put(132, NULL, NULL, NULL, NULL, NULL); /* Msg132 Variables: */ - show_fields(NULL_PTR, QLI_variables); + show_fields((REL) NULL_PTR, QLI_variables); } @@ -2744,7 +2744,7 @@ static void show_versions(void) for (dbb = QLI_databases; dbb; dbb = dbb->dbb_next) { ERRQ_msg_put(134, dbb->dbb_filename, NULL, NULL, NULL, NULL); /* Msg134 Version(s) for database %s */ - gds__version(&dbb->dbb_handle, NULL_PTR, NULL_PTR); + gds__version(&dbb->dbb_handle, (FPTR_VOID) NULL_PTR, NULL_PTR); } } @@ -2774,12 +2774,12 @@ static void show_view( REL relation) if (X.RDB$VIEW_SOURCE.NULL) { ERRQ_msg_put(312, relation->rel_symbol->sym_string, NULL, NULL, NULL, NULL); /* Msg312 View source for relation %s is not available. View BLR: */ - display_blr(database, &X.RDB$VIEW_BLR); + display_blr(database, (SLONG*) &X.RDB$VIEW_BLR); } else { ERRQ_msg_put(313, relation->rel_symbol->sym_string, NULL, NULL, NULL, NULL); /* Msg313 Relation %s is a view defined as: */ - show_text_blob(database, "\t", 0, &X.RDB$VIEW_SOURCE, 0, NULL_PTR, + show_text_blob(database, "\t", 0, (SLONG*) &X.RDB$VIEW_SOURCE, 0, (SLONG*) NULL_PTR, FALSE); } END_FOR; @@ -2900,12 +2900,12 @@ static void view_info( ERRQ_msg_put(508, spaces, base_field, RFR.RDB$RELATION_NAME, NULL, NULL); /* Msg508 %s Based on field %s of view %s */ - show_text_blob(dbb, "\t", 349, &RFR.RDB$DESCRIPTION, 0, NULL_PTR, + show_text_blob(dbb, "\t", 349, (SLONG*) &RFR.RDB$DESCRIPTION, 0, (SLONG*) NULL_PTR, FALSE); if (!RFR.RDB$DESCRIPTION.NULL) { ERRQ_msg_put(349, spaces, base_field, NULL, NULL, NULL); /* Msg349 %sBase field description for %s: */ - show_text_blob(dbb, "\t\t", 0, &RFR.RDB$DESCRIPTION, 0, NULL_PTR, + show_text_blob(dbb, "\t\t", 0, (SLONG*) &RFR.RDB$DESCRIPTION, 0, (SLONG*) NULL_PTR, FALSE); } diff --git a/src/utilities/create_db.cpp b/src/utilities/create_db.cpp new file mode 100644 index 0000000000..299b82fece --- /dev/null +++ b/src/utilities/create_db.cpp @@ -0,0 +1,63 @@ +#include "../jrd/ibase.h" +#include + +int main(int argc, char **argv) +{ + ISC_STATUS sv[20]; + isc_db_handle db = 0; + isc_tr_handle tr = 0; + UCHAR dpb[128], *d; + SSHORT len; + + if (argc != 2) + { + printf("Usage: %s \n", argv[0]); + return -1; + } + + d = dpb; + *d++ = (UCHAR) isc_dpb_version1; + *d++ = (UCHAR) isc_dpb_set_db_readonly; + *d++ = 1; + *d++ = TRUE; + len = d - dpb; + + isc_create_database(sv, 0, argv[1], &db, 0, 0, 0); + if (sv[0] == 1 && sv[1] > 0) + { + isc_print_status(sv); + return -2; + } + isc_start_transaction(sv, &tr, 1, &db, 0, 0); + if (sv[0] == 1 && sv[1] > 0) + { + isc_print_status(sv); + return -3; + } + isc_commit_transaction(sv, &tr); + if (sv[0] == 1 && sv[1] > 0) + { + isc_print_status(sv); + return -3; + } + isc_detach_database(sv, &db); + if (sv[0] == 1 && sv[1] > 0) + { + isc_print_status(sv); + return -3; + } + isc_attach_database(sv, 0, argv[1], &db, len, (char*) dpb); + if (sv[0] == 1 && sv[1] > 0) + { + isc_print_status(sv); + return -4; + } + isc_detach_database(sv, &db); + if (sv[0] == 1 && sv[1] > 0) + { + isc_print_status(sv); + return -5; + } + + return 0; +} diff --git a/src/utilities/dba.e b/src/utilities/dba.epp similarity index 93% rename from src/utilities/dba.e rename to src/utilities/dba.epp index 5450c964e7..f2ab222ffa 100644 --- a/src/utilities/dba.e +++ b/src/utilities/dba.epp @@ -19,9 +19,6 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE" - * conditionals, as the engine now fully supports - * readonly databases. */ #include "../jrd/ib_stdio.h" @@ -48,6 +45,10 @@ #include "../utilities/cmd_util_proto.h" #endif +#ifdef HAVE_UNISTD_H +#include +#endif + #ifdef WIN_NT #include #include @@ -69,7 +70,7 @@ DATABASE DB = STATIC "yachts.lnk"; #if (defined WIN_NT) #include #else -#if !(defined linux || defined FREEBSD || defined NETBSD) +#if !(defined linux || defined FREEBSD || defined NETBSD || defined DARWIN) extern SCHAR *sys_errlist[]; #endif #endif @@ -225,7 +226,7 @@ static struct tdba *gddba; #endif #define EXIT(code) { tddba->exit_code = code; \ - LONGJMP(tddba->dba_env, 1); } + LONGJMP((jmp_buf) tddba->dba_env, 1); } #define GSTAT_MSG_FAC 21 @@ -484,10 +485,10 @@ int CLIB_ROUTINE main( int argc, char **argv) dba_error(1, 0, 0, 0, 0, 0); /* msg 1: found unknown switch */ } else if (in_sw_tab->in_sw == IN_SW_DBA_USERNAME) { - strcpy(username, *argv++); + strcpy((char*) username, *argv++); } else if (in_sw_tab->in_sw == IN_SW_DBA_PASSWORD) { - strcpy(password, *argv++); + strcpy((char*) password, *argv++); } else if (in_sw_tab->in_sw == IN_SW_DBA_SYSTEM) { sw_system = TRUE; @@ -573,7 +574,7 @@ int CLIB_ROUTINE main( int argc, char **argv) - current = db_open(name, strlen(name)); + current = db_open((UCHAR*) name, strlen(name)); tddba->page_size = sizeof(temp); tddba->global_buffer = (PAG) temp; tddba->page_number = -1; @@ -621,7 +622,7 @@ int CLIB_ROUTINE main( int argc, char **argv) page = HEADER_PAGE; do { if (page != HEADER_PAGE) - current = db_open(file_name, strlen(file_name)); + current = db_open((UCHAR*) file_name, strlen(file_name)); do { header = (HDR) db_read((SLONG) page); if (current != tddba->files) @@ -667,7 +668,7 @@ int CLIB_ROUTINE main( int argc, char **argv) current->fil_next) dba_print(8, current->fil_string, current->fil_next->fil_string, 0, 0, 0); /* msg 8: File %s continues as file %s */ dba_print(9, current->fil_string, - (current == tddba->files) ? "only" : "last", 0, 0, 0); /* msg 9: File %s is the %s file\n */ + (TEXT*)((current == tddba->files) ? "only" : "last"), 0, 0, 0); /* msg 9: File %s is the %s file\n */ /* print log page */ @@ -684,32 +685,32 @@ int CLIB_ROUTINE main( int argc, char **argv) /* Check to make sure that the user accessing the database is either * SYSDBA or owner of the database */ dpb = dpb_string; - *dpb++ = gds__dpb_version1; + *dpb++ = gds_dpb_version1; *dpb++ = isc_dpb_gstat_attach; *dpb++ = 0; if (*username) { - *dpb++ = gds__dpb_user_name; - *dpb++ = strlen(username); - strcpy(dpb, username); - dpb += strlen(username); + *dpb++ = gds_dpb_user_name; + *dpb++ = strlen((char*) username); + strcpy((char*) dpb, (char*) username); + dpb += strlen((char*) username); } if (*password) { #ifdef SUPERSERVER - *dpb++ = gds__dpb_password_enc; + *dpb++ = gds_dpb_password_enc; #else - *dpb++ = gds__dpb_password; + *dpb++ = gds_dpb_password; #endif - *dpb++ = strlen(password); - strcpy(dpb, password); - dpb += strlen(password); + *dpb++ = strlen((char*) password); + strcpy((char*) dpb, (char*) password); + dpb += strlen((char*) password); } dpb_length = dpb - dpb_string; isc_attach_database(status_vector, 0, GDS_VAL(name), &DB, dpb_length, - dpb_string); + (char*) dpb_string); if (status_vector[1]) EXIT(FINI_ERROR); @@ -753,7 +754,7 @@ int CLIB_ROUTINE main( int argc, char **argv) FOR(TRANSACTION_HANDLE transact1 REQUEST_HANDLE request2) Y IN RDB$PAGES WITH Y.RDB$RELATION_ID EQ relation->rel_id AND - Y.RDB$PAGE_SEQUENCE EQ 0 + Y.RDB$PAGE_SEQUENCE EQ 0 if (Y.RDB$PAGE_TYPE == pag_pointer) relation->rel_pointer_page = Y.RDB$PAGE_NUMBER; @@ -766,7 +767,7 @@ int CLIB_ROUTINE main( int argc, char **argv) if (sw_index) FOR(TRANSACTION_HANDLE transact1 REQUEST_HANDLE request3) Y IN RDB$INDICES WITH Y.RDB$RELATION_NAME EQ relation->rel_name - SORTED BY DESC Y.RDB$INDEX_NAME + SORTED BY DESC Y.RDB$INDEX_NAME if (Y.RDB$INDEX_INACTIVE) continue; index = (DBA_IDX) ALLOC(sizeof(struct dba_idx)); @@ -795,7 +796,8 @@ int CLIB_ROUTINE main( int argc, char **argv) ON_ERROR EXIT(FINI_ERROR); END_ERROR - FINISH; + /* FINISH; error! + FINISH ON_ERROR EXIT(FINI_ERROR); END_ERROR @@ -825,7 +827,7 @@ int CLIB_ROUTINE main( int argc, char **argv) average = (relation->rel_records) ? (double) relation->rel_record_space / relation->rel_records : 0.0; - sprintf(buf, "%.2f", average); + sprintf((char*) buf, "%.2f", average); FPRINTF(sw_outfile, " Average record length: %s, total records: %ld\n", buf, relation->rel_records); @@ -834,7 +836,7 @@ int CLIB_ROUTINE main( int argc, char **argv) average = (relation->rel_versions) ? (double) relation->rel_version_space / relation->rel_versions : 0.0; - sprintf(buf, "%.2f", average); + sprintf((char*) buf, "%.2f", average); FPRINTF(sw_outfile, " Average version length: %s, total versions: %ld, max versions: %ld\n", buf, relation->rel_versions, @@ -847,9 +849,9 @@ int CLIB_ROUTINE main( int argc, char **argv) (double) relation->rel_total_space * 100 / ((double) relation->rel_data_pages * (tddba->page_size - DPG_SIZE)) : 0; - sprintf(buf, "%.0f%%", average); - dba_print(12, relation->rel_data_pages, relation->rel_slots, - buf, 0, 0); /* msg 12: " Data pages: %ld, data page slots: %ld, average fill: %s */ + sprintf((char*) buf, "%.0f%%", average); + dba_print(12, (TEXT*) relation->rel_data_pages, (TEXT*) relation->rel_slots, + (TEXT*) buf, 0, 0); /* msg 12: " Data pages: %ld, data page slots: %ld, average fill: %s */ dba_print(13, 0, 0, 0, 0, 0); /* msg 13: " Fill distribution:" */ print_distribution("\t", relation->rel_fill_distribution); } @@ -862,9 +864,9 @@ int CLIB_ROUTINE main( int argc, char **argv) /* msg 15: \tDepth: %d, leaf buckets: %ld, nodes: %ld */ average = (index->idx_nodes) ? index->idx_data_length / index->idx_nodes : 0; - sprintf(buf, "%.2f", average); - dba_print(16, buf, index->idx_total_duplicates, - index->idx_max_duplicates, 0, 0); /* msg 16: \tAverage data length: %s, total dup: %ld, max dup: %ld" */ + sprintf((char*) buf, "%.2f", average); + dba_print(16, (TEXT*) buf, (TEXT*) index->idx_total_duplicates, + (TEXT*) index->idx_max_duplicates, 0, 0); /* msg 16: \tAverage data length: %s, total dup: %ld, max dup: %ld" */ dba_print(17, 0, 0, 0, 0, 0); /* msg 17: \tFill distribution: */ print_distribution("\t ", index->idx_fill_distribution); FPRINTF(sw_outfile, "\n"); @@ -896,7 +898,7 @@ static SCHAR *alloc( SLONG size) tddba = GET_THREAD_DATA; - block = p = malloc(size); + block = p = (SCHAR*) malloc(size); if (!p) { /* NOMEM: return error */ dba_error(31, 0, 0, 0, 0, 0); @@ -920,7 +922,7 @@ static SCHAR *alloc( SLONG size) tddba->head_of_mem_list = mem_list; } #else - block = p = gds__alloc(size); + block = p = (SCHAR*) gds__alloc(size); if (!p) { /* NOMEM: return error */ dba_error(31, 0, 0, 0, 0, 0); @@ -956,13 +958,13 @@ static void analyze_data( REL relation, BOOLEAN sw_record) for (next_pp = relation->rel_pointer_page; next_pp; next_pp = pointer_page->ppg_next) { - move(db_read(next_pp), pointer_page, tddba->page_size); + move((SCHAR*) db_read(next_pp), (SCHAR*) pointer_page, tddba->page_size); for (ptr = pointer_page->ppg_page, end = ptr + pointer_page->ppg_count; ptr < end; ptr++) { ++relation->rel_slots; if (*ptr) { ++relation->rel_data_pages; - if (!analyze_data_page(relation, db_read(*ptr), sw_record)) + if (!analyze_data_page(relation, (DPG) db_read(*ptr), sw_record)) dba_print(18, (TEXT *) * ptr, 0, 0, 0, 0); /* msg 18: " Expected data on page %ld" */ } } @@ -985,7 +987,7 @@ static BOOLEAN analyze_data_page( REL relation, DPG page, BOOLEAN sw_record) SSHORT bucket, space; RHDF header; TDBA tddba; - struct dpg_repeat *tail, *end; + struct dpg::dpg_repeat *tail, *end; tddba = GET_THREAD_DATA; @@ -993,11 +995,11 @@ static BOOLEAN analyze_data_page( REL relation, DPG page, BOOLEAN sw_record) return FALSE; if (sw_record) { - move(page, tddba->buffer2, tddba->page_size); + move((SCHAR*) page, (SCHAR*) tddba->buffer2, tddba->page_size); page = (DPG) tddba->buffer2; } - space = page->dpg_count * sizeof(struct dpg_repeat); + space = page->dpg_count * sizeof(struct dpg::dpg_repeat); for (tail = page->dpg_rpt, end = tail + page->dpg_count; tail < end; tail++) @@ -1054,7 +1056,7 @@ static ULONG analyze_fragments( REL relation, RHDF header) USHORT f_line; TDBA tddba; DPG page; - struct dpg_repeat *index; + struct dpg::dpg_repeat *index; tddba = GET_THREAD_DATA; space = 0; @@ -1109,7 +1111,7 @@ static void analyze_index( REL relation, DBA_IDX index) index->idx_depth = bucket->btr_level + 1; while (bucket->btr_level) { - move(bucket->btr_nodes[0].btn_number, &page, sizeof(page)); + move((SCHAR*) bucket->btr_nodes[0].btn_number, (SCHAR*) &page, sizeof(page)); bucket = (BTR) db_read(page); } @@ -1120,7 +1122,7 @@ static void analyze_index( REL relation, DBA_IDX index) ++index->idx_leaf_buckets; for (node = bucket->btr_nodes;; node = (BTN) (node->btn_data + node->btn_length)) { - move(node->btn_number, &number, sizeof(number)); + move((SCHAR*) node->btn_number, (SCHAR*) &number, sizeof(number)); #ifdef IGNORE_NULL_IDX_KEY /* ignore this node and go to the next one */ if (number == END_NON_NULL) @@ -1133,7 +1135,7 @@ static void analyze_index( REL relation, DBA_IDX index) index->idx_data_length += node->btn_length; l = node->btn_length + node->btn_prefix; if (node == bucket->btr_nodes) - dup = key_equality(key_length, key, node); + dup = key_equality(key_length, (SCHAR*) key, node); else dup = !node->btn_length && l == key_length; if (dup) { @@ -1192,7 +1194,7 @@ static ULONG analyze_versions( REL relation, RHDF header) USHORT b_line; TDBA tddba; DPG page; - struct dpg_repeat *index; + struct dpg::dpg_repeat *index; tddba = GET_THREAD_DATA; space = versions = 0; @@ -1291,7 +1293,7 @@ static DBA_FIL db_open( UCHAR * file_name, USHORT file_length) for (fil = tddba->files; fil->fil_next; fil = fil->fil_next); fil->fil_next = (DBA_FIL) ALLOC(sizeof(struct dba_fil) + - strlen(expanded_filename) + 1); + strlen((char*) expanded_filename) + 1); fil->fil_next->fil_min_page = fil->fil_max_page + 1; fil = fil->fil_next; } @@ -1299,14 +1301,14 @@ static DBA_FIL db_open( UCHAR * file_name, USHORT file_length) fil = tddba->files = (DBA_FIL) ALLOC(sizeof(struct dba_fil) + - strlen(expanded_filename) + 1); + strlen((char*) expanded_filename) + 1); MOVE_CLEAR(tddba_files, sizeof(struct dba_fil)); fil->fil_min_page = 0L; } fil->fil_next = NULL; - strcpy(fil->fil_string, expanded_filename); - fil->fil_length = strlen(expanded_filename); + strcpy((char*) fil->fil_string, (char*) expanded_filename); + fil->fil_length = strlen((char*) expanded_filename); fil->fil_fudge = 0; fil->fil_max_page = 0L; @@ -1470,20 +1472,20 @@ static DBA_FIL db_open( UCHAR * file_name, USHORT file_length) if (tddba->files) { for (fil = tddba->files; fil->fil_next; fil = fil->fil_next); fil->fil_next = - (DBA_FIL) ALLOC(sizeof(struct dba_fil) + strlen(file_name) + 1); + (DBA_FIL) ALLOC(sizeof(struct dba_fil) + strlen((char*) file_name) + 1); fil->fil_next->fil_min_page = fil->fil_max_page + 1; fil = fil->fil_next; } else { /* empty list */ fil = tddba->files = - (DBA_FIL) ALLOC(sizeof(struct dba_fil) + strlen(file_name) + 1); + (DBA_FIL) ALLOC(sizeof(struct dba_fil) + strlen((char*) file_name) + 1); fil->fil_min_page = 0L; } fil->fil_next = NULL; - strcpy(fil->fil_string, file_name); - fil->fil_length = strlen(file_name); + strcpy(fil->fil_string, (char*) file_name); + fil->fil_length = strlen((char*) file_name); fil->fil_fudge = 0; fil->fil_max_page = 0L; @@ -1661,24 +1663,24 @@ static DBA_FIL db_open( UCHAR * file_name, USHORT file_length) if (tddba->files) { for (fil = tddba->files; fil->fil_next; fil = fil->fil_next); fil->fil_next = - (DBA_FIL) ALLOC(sizeof(struct dba_fil) + strlen(file_name) + 1); + (DBA_FIL) ALLOC(sizeof(struct dba_fil) + strlen((char*) file_name) + 1); fil->fil_next->fil_min_page = fil->fil_max_page + 1; fil = fil->fil_next; } else { /* empty list */ fil = tddba->files = - (DBA_FIL) ALLOC(sizeof(struct dba_fil) + strlen(file_name) + 1); + (DBA_FIL) ALLOC(sizeof(struct dba_fil) + strlen((char*) file_name) + 1); fil->fil_min_page = 0L; } fil->fil_next = NULL; - strcpy(fil->fil_string, file_name); - fil->fil_length = strlen(file_name); + strcpy(fil->fil_string, (char*) file_name); + fil->fil_length = strlen((char*) file_name); fil->fil_fudge = 0; fil->fil_max_page = 0L; - if ((fil->fil_desc = open(file_name, O_RDONLY)) == -1) + if ((fil->fil_desc = open((char*)file_name, O_RDONLY)) == -1) { #ifdef SUPERSERVER CMD_UTIL_put_svc_status(tddba->dba_service_blk->svc_status, @@ -1922,4 +1924,4 @@ static void truncate_name( SCHAR * string) *string = 0; return; } -} \ No newline at end of file +} diff --git a/src/utilities/dba_full.e b/src/utilities/dba_full.epp similarity index 100% rename from src/utilities/dba_full.e rename to src/utilities/dba_full.epp diff --git a/src/utilities/rmet.e b/src/utilities/rmet.epp similarity index 100% rename from src/utilities/rmet.e rename to src/utilities/rmet.epp diff --git a/src/utilities/rstore.e b/src/utilities/rstore.epp similarity index 100% rename from src/utilities/rstore.e rename to src/utilities/rstore.epp diff --git a/src/utilities/security.e b/src/utilities/security.epp similarity index 100% rename from src/utilities/security.e rename to src/utilities/security.epp