diff --git a/src/gpre/gpre.h b/src/gpre/gpre.h index 761f72fac1..3d2fd2b739 100644 --- a/src/gpre/gpre.h +++ b/src/gpre/gpre.h @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: gpre.h,v 1.3 2002-01-04 11:34:15 skywalker Exp $ + * $Id: gpre.h,v 1.4 2002-02-16 03:27:31 seanleyne Exp $ * Revision 1.3 2000/11/27 09:26:13 fsg * Fixed bugs in gpre to handle PYXIS forms * and allow edit.e and fred.e to go through @@ -42,6 +42,8 @@ * in WHERE clauses for sql dialect 2 and 3. * (cause a core dump in a test case from C.R. Zamana) * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #ifndef _GPRE_GPRE_H_ @@ -196,17 +198,17 @@ typedef enum lang_t //___________________________________________________________________ // Test if input language is cpp based. // -// The lang_internal is used to compile some internal stuff without +// The lang_internal is used to compile some internal stuff without // reference to a database. Previously it was based on lang_c (but even then -// if you look carefully there are some areas where lang_c is specifically -// treated and lang_internal would be ignored). -// Now the base language used for lang_internal is cpp, so we have this -// inline function to tell if language is cpp. +// if you look carefully there are some areas where lang_c is specifically +// treated and lang_internal would be ignored). +// Now the base language used for lang_internal is cpp, so we have this +// inline function to tell if language is cpp. // Internally the sw_language variable is set to lang_cxx for the -// c++ source files, cxx, cpp, cplusplus, so we only need to test lang_cxx +// c++ source files, cxx, cpp, cplusplus, so we only need to test lang_cxx // and lang_internal. // -inline bool isLangCpp(LANG_T lang) { +inline bool isLangCpp(LANG_T lang) { if (lang == lang_cxx || lang == lang_internal) { return true; } @@ -386,7 +388,7 @@ typedef struct adl { #define ADL_LEN sizeof (struct adl) -/* Array information block. Used to hold info about an array field. +/* Array information block. Used to hold info about an array field. Note: the dimension (DIM) block used to hold dimension information. The preferred mechanism is the repeating tail on the array block. */ @@ -476,11 +478,11 @@ typedef struct cnstrt { struct lls *cnstrt_fields; /* list of fields */ USHORT cnstrt_fkey_def_type; /* extended foreign key definition */ struct str *cnstrt_referred_rel; /* referred relation, if foreign key */ - struct lls *cnstrt_referred_fields; /* optional list of fields from + struct lls *cnstrt_referred_fields; /* optional list of fields from referred relation */ struct cnstrt *cnstrt_next; /* next contraint for field or relation */ struct txt *cnstrt_text; /* source for CHECK constraints */ - struct nod *cnstrt_boolean; /* boolean expression, for CHECK + struct nod *cnstrt_boolean; /* boolean expression, for CHECK constraints */ USHORT cnstrt_flags; /* see below */ } *CNSTRT; @@ -659,7 +661,7 @@ typedef struct cmpf { #define CMPF_LEN sizeof (struct cmpf) -/* Dimension block, used for arrays +/* Dimension block, used for arrays * * Note: this structure is being phased out. Please use the * repeating tail on the ARY structure instead @@ -1537,10 +1539,10 @@ EXTERN INTLSYM text_subtypes; /* ada_flags fields definition */ -#define ADA_create_database 1 /* the flag is set when there is a +#define ADA_create_database 1 /* the flag is set when there is a create database SQL statement in - user program, and is used to - generate additional "with" and + user program, and is used to + generate additional "with" and "function" declarations */ EXTERN USHORT ada_flags; @@ -1565,23 +1567,13 @@ extern "C" { #endif #endif -/* IMP does'nt allow enums to be used in conditional operations that include ->, >= , <, <= etc. It only allows == for enums, hence the typecast */ - -#ifdef IMP -#define assert_IS_REQ(x) assert(!(x) || ((int)((x)->req_type) >= (int)0 && (int)((x)->req_type) < (int)REQ_LASTREQUEST)) -#define assert_IS_SYM(x) assert(!(x) || ((int)((x)->sym_type) >= (int)0 && (int)((x)->sym_type) < (int)SYM_LASTSYM)) -#define assert_IS_NOD(x) assert(!(x) || ((int)((x)->nod_type) >= (int)1 && (int)((x)->nod_type) < (int)nod_LASTNOD)) -#define assert_IS_ACT(x) assert(!(x) || ((int)((x)->act_type) >= (int)0 && (int)((x)->act_type) < (int)ACT_LASTACT)) -#else #define assert_IS_REQ(x) assert(!(x) || ((x)->req_type >= 0 && (x)->req_type < REQ_LASTREQUEST)) #define assert_IS_SYM(x) assert(!(x) || ((x)->sym_type >= 0 && (x)->sym_type < SYM_LASTSYM)) #define assert_IS_NOD(x) assert(!(x) || ((x)->nod_type >= 1 && (x)->nod_type < nod_LASTNOD)) #define assert_IS_ACT(x) assert(!(x) || ((x)->act_type >= 0 && (x)->act_type < ACT_LASTACT)) -#endif /** IMP **/ #ifdef __cplusplus } /* extern "C" */ #endif -#endif /* _GPRE_GPRE_H_ */ +#endif /* _GPRE_GPRE_H_ */ \ No newline at end of file diff --git a/src/include/gen/autoconfig_msvc.h b/src/include/gen/autoconfig_msvc.h index 3981ab3399..c0e8d9069e 100644 --- a/src/include/gen/autoconfig_msvc.h +++ b/src/include/gen/autoconfig_msvc.h @@ -1,7 +1,8 @@ /* * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "MAC" and "MAC_CP" defines - * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" define - * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" define + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port */ #ifndef AUTOCONFIG_H @@ -80,6 +81,5 @@ #undef M88K #undef UNIXWARE #undef NCR3000 -#undef IMP #endif \ No newline at end of file diff --git a/src/intl/langdrv.h b/src/intl/langdrv.h index cde149c00e..fe12bcef08 100644 --- a/src/intl/langdrv.h +++ b/src/intl/langdrv.h @@ -17,6 +17,7 @@ * Contributor(s): ______________________________________. * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" define + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ #ifndef _INTL_LANGDRV_H_ @@ -54,9 +55,6 @@ #ifdef NXT #define NON_DLINK_OS #endif -#ifdef IMP -#define NON_DLINK_OS -#endif #ifndef SGI #ifdef mips #define NON_DLINK_OS diff --git a/src/jrd/common.h b/src/jrd/common.h index ff9fc643a0..53bef50124 100644 --- a/src/jrd/common.h +++ b/src/jrd/common.h @@ -30,10 +30,11 @@ * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" define * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "XENIX" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ /* -$Id: common.h,v 1.10 2002-02-16 03:05:17 seanleyne Exp $ +$Id: common.h,v 1.11 2002-02-16 03:27:32 seanleyne Exp $ */ #ifndef JRD_COMMON_H @@ -955,28 +956,6 @@ typedef unsigned long DWORD; -#ifdef IMP -#define NO_PYXIS -#define SETPGRP setpgrp() -#define KILLER_SIGNALS -#define SYSV_SIGNALS -#define SYSV_SHMEM -#define SMALL_FILE_NAMES -#define vfork fork -#define UNIX 1 -#define CURSES_KEYPAD 1 -#define FB_ALIGN(n,b) ((n+1) & ~1) -#define ALIGNMENT 4 -#define DOUBLE_ALIGN 4 -#define IMPLEMENTATION 44 -#define IEEE -#define SHMEM_PICKY -#undef LINKS_EXIST -#define INTL -#define INTL_BACKEND -#endif - - #ifdef UNIX #define NO_CHECKSUM 1 #define SYS_ARG isc_arg_unix diff --git a/src/jrd/cvt.cpp b/src/jrd/cvt.cpp index 7db9c464e4..2b19dc7043 100644 --- a/src/jrd/cvt.cpp +++ b/src/jrd/cvt.cpp @@ -21,6 +21,7 @@ * Contributor(s): ______________________________________. * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -71,10 +72,6 @@ #define DBL_MAX_10_EXP 308 #endif -#ifdef IMP -#define DBL_MAX_10_EXP 308 -#endif - #ifdef SCO_UNIX #define DBL_MAX_10_EXP 308 #endif diff --git a/src/jrd/gds.cpp b/src/jrd/gds.cpp index ea5e2162b8..2491b3aa0c 100644 --- a/src/jrd/gds.cpp +++ b/src/jrd/gds.cpp @@ -19,6 +19,9 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #define IO_RETRY 20 @@ -114,7 +117,7 @@ #endif #ifdef SUPERSERVER -#define V4_THREADING /* RFM: 9/22/2000 fix from Inprise tree, +#define V4_THREADING /* RFM: 9/22/2000 fix from Inprise tree, Inprise bug 114840 */ #endif @@ -196,12 +199,6 @@ static CONST SCHAR *FAR_VARIABLE CONST messages[] = { 0 /* Null entry to terminate list */ }; -#ifdef IMP -typedef unsigned int mode_t; -typedef int pid_t; -#endif - - #ifdef M88K #define GETTIMEOFDAY(time,tz) gettimeofday (time) #endif diff --git a/src/jrd/isc.cpp b/src/jrd/isc.cpp index 83aba14b95..cce45556d6 100644 --- a/src/jrd/isc.cpp +++ b/src/jrd/isc.cpp @@ -24,7 +24,7 @@ * Solaris x86 changes - Konstantin Kuznetsov, Neil McCalden */ /* -$Id: isc.cpp,v 1.7 2002-02-16 03:05:17 seanleyne Exp $ +$Id: isc.cpp,v 1.8 2002-02-16 03:27:32 seanleyne Exp $ */ #ifdef DARWIN #define _STLP_CCTYPE @@ -153,11 +153,6 @@ static LKSB wake_lock; #include #endif -#ifdef IMP -typedef unsigned int mode_t; -typedef int pid_t; -#endif - #ifdef DARWIN #include #else diff --git a/src/jrd/isc_ipc.cpp b/src/jrd/isc_ipc.cpp index fef3375b27..a579a78ad2 100644 --- a/src/jrd/isc_ipc.cpp +++ b/src/jrd/isc_ipc.cpp @@ -21,12 +21,13 @@ * Contributor(s): ______________________________________. * Solaris x86 changes - Konstantin Kuznetsov, Neil McCalden * - * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" define + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ - /* $Id: isc_ipc.cpp,v 1.8 2002-02-16 03:05:17 seanleyne Exp $ */ + /* $Id: isc_ipc.cpp,v 1.9 2002-02-16 03:27:32 seanleyne Exp $ */ #ifdef SHLIB_DEFS #define LOCAL_SHLIB_DEFS @@ -166,12 +167,6 @@ static int process_id = 0; #define LOCAL_SEMAPHORES 4 -#ifdef IMP -typedef int pid_t; - -#define SHMEM_DELTA (1 << 25) -#endif - #ifdef SYSV_SIGNALS #define SIGVEC FPTR_INT #endif diff --git a/src/jrd/isc_sync.cpp b/src/jrd/isc_sync.cpp index 4a2a262121..de510114b3 100644 --- a/src/jrd/isc_sync.cpp +++ b/src/jrd/isc_sync.cpp @@ -22,6 +22,7 @@ * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "XENIX" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -145,13 +146,6 @@ static UCHAR *next_shared_memory; #define PRIV 0666 #define LOCAL_SEMAPHORES 4 -#ifdef IMP -typedef unsigned int mode_t; -typedef int pid_t; - -#define SHMEM_DELTA (1 << 25) -#endif - #ifdef SYSV_SIGNALS #define SIGVEC FPTR_INT #endif @@ -324,15 +318,9 @@ static void make_object_name(TEXT *, TEXT *, TEXT *); #define sbrk (*_libgds_sbrk) #define setitimer (*_libgds_setitimer) #define alarm (*_libgds_alarm) -#ifndef IMP #define sigprocmask (*_libgds_sigprocmask) #define sigsuspend (*_libgds_sigsuspend) #define sigaddset (*_libgds_sigaddset) -#else -#define sigsetmask (*_libgds_sigsetmask) -#define sigpause (*_libgds_sigpause) -#define sigblock (*_libgds_sigblock) -#endif extern int sprintf(); extern int strlen(); @@ -362,15 +350,9 @@ extern SCHAR *sbrk(); extern int setitimer(); extern int alarm(); extern SCHAR *shmat(); -#ifndef IMP extern int sigprocmask(); extern int sigsuspend(); extern int sigaddset(); -#else -extern int sigsetmask(); -extern int sigpause(); -extern int sigblock(); -#endif #endif @@ -1134,34 +1116,19 @@ int ISC_event_wait( if ((*events)->event_semid == -1) { ++inhibit_restart; -#ifdef IMP - oldmask = - sigblock(sigmask(SIGUSR1) | sigmask(SIGUSR2) | sigmask(SIGURG)); -#else sigprocmask(SIG_BLOCK, NULL, &oldmask); mask = oldmask; sigaddset(&mask, SIGUSR1); sigaddset(&mask, SIGUSR2); sigaddset(&mask, SIGURG); sigprocmask(SIG_BLOCK, &mask, NULL); -#endif for (;;) { if (!ISC_event_blocked(count, events, values)) { --inhibit_restart; -#ifdef IMP - sigsetmask(oldmask); -#else sigprocmask(SIG_SETMASK, &oldmask, NULL); -#endif return SUCCESS; } -#ifdef IMP - mask = sigsetmask(oldmask); - sigpause(0); - oldmask = sigsetmask(mask); -#else sigsuspend(&oldmask); -#endif } } @@ -2818,11 +2785,7 @@ UCHAR *ISC_map_file(STATUS * status_vector, #ifndef SYSV_SHMEM next_shared_memory = address + length; #else -#ifndef IMP next_shared_memory = address + length + SHMLBA; -#else - next_shared_memory = address + length + 0x100000; -#endif #endif #else address = (UCHAR *) shmat(shmid, NULL, 0); diff --git a/src/jrd/jrn.cpp b/src/jrd/jrn.cpp index 3e1779031e..8e3cfb8826 100644 --- a/src/jrd/jrn.cpp +++ b/src/jrd/jrn.cpp @@ -19,6 +19,9 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #ifdef SHLIB_DEFS @@ -119,11 +122,7 @@ extern int send(); extern int socket(); extern int recv(); extern uint sleep(); -#ifndef IMP extern void *memcpy(); -#else -extern SCHAR *memcpy(); -#endif #endif diff --git a/src/jrd/license.h b/src/jrd/license.h index ac96dad280..f2009b7ca5 100644 --- a/src/jrd/license.h +++ b/src/jrd/license.h @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: license.h,v 1.7 2002-02-16 03:05:17 seanleyne Exp $ + * $Id: license.h,v 1.8 2002-02-16 03:27:32 seanleyne Exp $ * Revision 1.5 2000/12/08 16:18:21 fsg * Preliminary changes to get IB_BUILD_NO automatically * increased on commits. @@ -38,6 +38,7 @@ * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "XENIX" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -119,10 +120,6 @@ #define FB_PLATFORM "PA" #endif -#ifdef IMP -#define FB_PLATFORM "IM" -#endif - #ifdef sgi #define FB_PLATFORM "SG" #endif diff --git a/src/jrd/llio.cpp b/src/jrd/llio.cpp index 8c5b91070d..1131bd8fca 100644 --- a/src/jrd/llio.cpp +++ b/src/jrd/llio.cpp @@ -22,6 +22,7 @@ * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" define * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -58,16 +59,14 @@ # ifndef WIN_NT # ifndef VMS # include -# ifndef IMP -# include -# endif +# include # else # include # endif # endif #endif -#if (defined IMP || defined sparc) +#ifdef sparc #include #endif diff --git a/src/jrd/pag.cpp b/src/jrd/pag.cpp index 71d4ad7172..da6c59fd0d 100644 --- a/src/jrd/pag.cpp +++ b/src/jrd/pag.cpp @@ -22,6 +22,7 @@ * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" define * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -165,10 +166,6 @@ static BOOLEAN find_type(SLONG, WIN *, PAG *, USHORT, USHORT, UCHAR **, #define CLASS 10 #endif -#ifdef IMP -#define CLASS 2 -#endif - #ifdef M88K #define CLASS 2 #endif diff --git a/src/jrd/perf.cpp b/src/jrd/perf.cpp index 7a9567d59d..01653cf46b 100644 --- a/src/jrd/perf.cpp +++ b/src/jrd/perf.cpp @@ -21,6 +21,7 @@ * Contributor(s): ______________________________________. * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -86,9 +87,6 @@ extern void ftime(); #endif #ifdef SHLIB_DEFS -#ifdef IMP -typedef SLONG clock_t; -#endif #define times (*_libgds_times) extern clock_t times(); diff --git a/src/jrd/shdef.h b/src/jrd/shdef.h index ceb576bbd1..9ce6907695 100644 --- a/src/jrd/shdef.h +++ b/src/jrd/shdef.h @@ -19,26 +19,22 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #ifndef _JRD_SHDEF_H_ #define _JRD_SHDEF_H_ #include "../jrd/ib_stdio.h" -#ifndef IMP #include -#endif #include #ifdef __cplusplus extern "C" { #endif -#ifdef IMP -typedef int pid_t; -typedef unsigned int mode_t; -#endif - #define setjmp (*_libgds_setjmp) #define sprintf (*_libgds_sprintf) #define strlen (*_libgds_strlen) @@ -117,11 +113,7 @@ extern IB_FILE _iob[]; extern int abort(); extern void *memset(); extern pid_t getpid(); -#ifndef IMP extern void *memcpy(); -#else -extern SCHAR *memcpy(); -#endif extern int shmdt(); extern int memcmp(); extern int ib_fprintf(); @@ -181,4 +173,4 @@ extern SLONG atol(); } /* extern "C" */ #endif -#endif /* _JRD_SHDEF_H */ +#endif /* _JRD_SHDEF_H */ \ No newline at end of file diff --git a/src/jrd/shrinit.cpp b/src/jrd/shrinit.cpp index fa961e012e..3a67ee5629 100644 --- a/src/jrd/shrinit.cpp +++ b/src/jrd/shrinit.cpp @@ -19,6 +19,9 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #include "firebird.h" @@ -35,12 +38,6 @@ #define LOCAL_SHLIB_DEFS #include "../jrd/common.h" -#ifdef IMP -typedef int pid_t; -typedef unsigned int mode_t; -typedef SLONG clock_t; -#endif - extern "C" { @@ -59,11 +56,7 @@ IB_FILE(*_libgds__iob) = 0; int (*_libgds_abort) () = 0; void *(*_libgds_memset) () = 0; pid_t(*_libgds_getpid) () = 0; -#ifndef IMP void *(*_libgds_memcpy) () = 0; -#else -SCHAR *(*_libgds_memcpy) () = 0; -#endif int (*_libgds_shmdt) () = 0; int (*_libgds_memcmp) () = 0; int (*_libgds_fprintf) () = 0; @@ -126,11 +119,7 @@ int (*_libgds_write) () = 0; mode_t(*_libgds_umask) () = 0; int (*_libgds_lockf) () = 0; int (*_libgds_shmget) () = 0; -#ifndef IMP void *(*_libgds_shmat) () = 0; -#else -SCHAR *(*_libgds_shmat) () = 0; -#endif int (*_libgds_shmctl) () = 0; key_t(*_libgds_ftok) () = 0; int (*_libgds_close) () = 0; @@ -210,11 +199,6 @@ SCHAR **(*_libgds_environ) () = 0; IB_FILE *(*_libgds_fdopen) () = 0; int (*_libgds_dup) () = 0; int (*_libgds_execle) () = 0; -#ifdef IMP -bool_t(*_libgds_xdr_float) () = 0; -bool_t(*_libgds_xdr_double) () = 0; -int (*_libgds_sbrk) () = 0; -#endif #ifdef SCO bool_t(*_libgds_xdr_float) () = 0; bool_t(*_libgds_xdr_double) () = 0; @@ -224,11 +208,7 @@ SCHAR *(*_libgds_strrchr) () = 0; #ifndef SCO int (*_libgds_fsync) () = 0; #endif -#ifdef IMP -int (*_libgds_wait) () = 0; -#else int (*_libgds_waitpid) () = 0; -#endif void (*_libgds__exit) () = 0; #ifdef SCO IB_FILE *(*_libgds_popen) () = 0; @@ -241,9 +221,7 @@ int (*_libgds_atol) () = 0; int (*_libgds_execvp) () = 0; int (*_libgds_nice) () = 0; int (*_libgds_putenv) () = 0; -#ifndef IMP int (*_libgds_xdr_free) () = 0; -#endif int (*_libgds_xdr_wrapstring) () = 0; int (*_libgds_vsprintf) () = 0; int (*_libgds_h_errno) = 0; @@ -255,15 +233,9 @@ int (*_libgds_access) () = 0; #ifdef SCO int (*_libgds_fsync) () = 0; #endif -#ifndef IMP int (*_libgds_sigsuspend) () = 0; int (*_libgds_sigprocmask) () = 0; int (*_libgds_sigaddset) () = 0; -#else -int (*_libgds_sigblock) () = 0; -int (*_libgds_sigsetmask) () = 0; -int (*_libgds_sigpause) () = 0; -#endif /* WARNING: The definition and initialization of new imported symbol pointers should be added at the end of the list ABOVE. At the same time, @@ -274,9 +246,6 @@ int (*_libgds_sigpause) () = 0; modify it accordingly. All new InterBase global data must be added at the end of the list BELOW. */ -#ifdef IMP -int _libgds_padding[465] = 0; -#endif #ifdef SCO int _libgds_padding[466] = { 0 }; #endif @@ -294,15 +263,4 @@ int* DSQL_hash_table = 0; void* gdbb = 0; int* internal_db_handles = 0; -#ifdef IMP -/**** - NOTE: The following variable was added because of an incompatibility - problem between the mkshlib and link utility in IMP. This is a - workaround and should be eliminated whenever IMP fixes the bug in - their utilities. -****/ -char __StRet[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; -#endif - - -} // extern "C" +} // extern "C" \ No newline at end of file diff --git a/src/jrd/svc.cpp b/src/jrd/svc.cpp index 3a3a9545f3..b91f150d70 100644 --- a/src/jrd/svc.cpp +++ b/src/jrd/svc.cpp @@ -21,6 +21,7 @@ * Contributor(s): ______________________________________. * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" define + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -407,7 +408,7 @@ static const serv services[] = /* The SERVER_CAPABILITIES_FLAG is used to mark architectural ** differences across servers. This allows applications like server -** manager to disable features as necessary. +** manager to disable features as necessary. */ #ifdef SUPERSERVER @@ -437,11 +438,7 @@ static const serv services[] = #ifdef SHLIB_DEFS #define pipe (*_libgds_pipe) -#ifdef IMP -#define wait (*_libgds_wait) -#else #define waitpid (*_libgds_waitpid) -#endif #define _exit (*_libgds__exit) #define dup (*_libgds_dup) #define ib_fdopen (*_libgds_fdopen) @@ -449,11 +446,7 @@ static const serv services[] = #define statistics (*_libgds_stat) extern int pipe(); -#ifdef IMP -extern pid_t wait(); -#else extern pid_t waitpid(); -#endif extern void _exit(); extern int dup(); extern IB_FILE *ib_fdopen(); @@ -644,8 +637,8 @@ SVC SVC_attach(USHORT service_length, if (options.spb_user_name) strcpy(service->svc_username, options.spb_user_name); -/* The password will be issued to the service threads on NT since - * there is no OS authentication. If the password is not yet +/* The password will be issued to the service threads on NT since + * there is no OS authentication. If the password is not yet * encrypted, then encrypt it before saving it (since there is no * decrypt function). */ @@ -661,7 +654,7 @@ SVC SVC_attach(USHORT service_length, strcpy(service->svc_enc_password, options.spb_password_enc); } -/* If an executable is defined for the service, try to fork a new process. +/* If an executable is defined for the service, try to fork a new process. * Only do this if we are working with a version 1 service */ #ifndef SUPERSERVER @@ -1027,7 +1020,7 @@ void SVC_putc(SVC service, UCHAR ch) #endif /* SERVER_SHUTDOWN */ /* The following 3 service commands (or items) stuff the response - buffer 'info' with values of environment variable INTERBASE, + buffer 'info' with values of environment variable INTERBASE, INTERBASE_LOCK or INTERBASE_MSG. If the environment variable is not set then default value is returned. */ @@ -1319,7 +1312,7 @@ void SVC_putc(SVC service, UCHAR ch) service_get(service, info + 3, end - (info + 4), get_flags, timeout, &length); - /* If the read timed out, return the data, if any, & a timeout + /* If the read timed out, return the data, if any, & a timeout item. If the input buffer was not large enough to store a read to eof, return the data that was read along with an indication that more is available. */ @@ -1495,7 +1488,7 @@ void SVC_query(SVC service, #endif /* SERVER_SHUTDOWN */ /* The following 3 service commands (or items) stuff the response - buffer 'info' with values of environment variable INTERBASE, + buffer 'info' with values of environment variable INTERBASE, INTERBASE_LOCK or INTERBASE_MSG. If the environment variable is not set then default value is returned. */ @@ -1828,7 +1821,7 @@ void SVC_query(SVC service, service_get(service, info + 3, end - (info + 4), get_flags, timeout, &length); - /* If the read timed out, return the data, if any, & a timeout + /* If the read timed out, return the data, if any, & a timeout item. If the input buffer was not large enough to store a read to eof, return the data that was read along with an indication that more is available. */ @@ -1884,7 +1877,7 @@ void *SVC_start(SVC service, USHORT spb_length, SCHAR * spb) /* NOTE: The parameter RESERVED must not be used * for any purpose as there are networking issues * involved (as with any handle that goes over the - * network). This parameter will be implemented at + * network). This parameter will be implemented at * a later date. */ @@ -1937,7 +1930,7 @@ void *SVC_start(SVC service, USHORT spb_length, SCHAR * spb) try { -/* Only need to add username and password information to those calls which need +/* Only need to add username and password information to those calls which need * to make a database connection */ if (*spb == isc_action_svc_backup || @@ -2125,7 +2118,7 @@ void *SVC_start(SVC service, USHORT spb_length, SCHAR * spb) service->svc_stdout = (UCHAR*)gds__alloc((SLONG) SVC_STDOUT_BUFFER_SIZE + 1); /* FREE: at SVC_detach() */ if (!service->svc_stdout) /* NOMEM: */ - { + { ERR_post(isc_virmemexh, 0); } @@ -2651,9 +2644,9 @@ static void service_get( if (timeout) { /* If a timeout period was given, check every .1 seconds to see if input is available from the pipe. When something shows up, read - what's available until all data has been read, or timeout occurs. + what's available until all data has been read, or timeout occurs. Otherwise, set the timeout flag and return. - Fall out of the loop if a BROKEN_PIPE error occurs. + Fall out of the loop if a BROKEN_PIPE error occurs. */ iter = timeout * 10; while ((iter--) && ((buf - buffer) < length)) { @@ -3563,7 +3556,7 @@ static USHORT process_switches( return 0; else { found = TRUE; - /* in case of "display all users" the spb buffer contains + /* in case of "display all users" the spb buffer contains nothing but isc_action_svc_display_user */ if (len == 0) break; @@ -3926,7 +3919,7 @@ static BOOLEAN get_action_svc_parameter( #ifdef DEBUG /* The following two functions are temporary stubs and will be - * removed as the services API takes shape. They are used to + * removed as the services API takes shape. They are used to * test that the paths for starting services and parsing command-lines * are followed correctly. */ @@ -3940,4 +3933,3 @@ void test_cmd(USHORT spb_length, SCHAR * spb, TEXT ** switches) gds__log("test_cmd called"); } #endif - diff --git a/src/lock/lock.cpp b/src/lock/lock.cpp index 53076420a8..95eb845450 100644 --- a/src/lock/lock.cpp +++ b/src/lock/lock.cpp @@ -19,9 +19,12 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ /* -$Id: lock.cpp,v 1.5 2002-01-04 11:34:16 skywalker Exp $ +$Id: lock.cpp,v 1.6 2002-02-16 03:27:32 seanleyne Exp $ */ #include "firebird.h" @@ -341,22 +344,14 @@ static struct ipccfg LOCK_hdrtbl[] = #ifdef SHLIB_DEFS #define sys_errlist (*_libgds_sys_errlist) -#ifdef IMP -#define wait (*_libgds_wait) -#else #define waitpid (*_libgds_waitpid) -#endif #define execl (*_libgds_execl) #define _exit (*_libgds__exit) #define statistics (*_libgds_stat) #define chmod (*_libgds_chmod) extern SCHAR *sys_errlist[]; -#ifdef IMP -extern int wait(); -#else extern int waitpid(); -#endif extern int execl(); extern void _exit(); extern int statistics(); @@ -431,7 +426,7 @@ int LOCK_deq( PTR request_offset) { /************************************** * - * L O C K _ d e q + * L O C K _ d e q * ************************************** * @@ -819,8 +814,8 @@ int LOCK_init( #ifndef SUPERSERVER #if defined(SCO_EV) || defined(LINUX) || defined(FREEBSD) || defined(NETBSD) || defined(AIX_PPC) /* 5.5 SCO port: might also help other classic ports, but not sure. This - and a few subsequent pieces of code later, solve problem of gds_drop - giving following message + and a few subsequent pieces of code later, solve problem of gds_drop + giving following message Fatal lock manager error: semop failed (acquire), errno: 22 --Invalid argument If this happens on another classic platform add that platform too. - Shailesh diff --git a/src/lock/lock.h b/src/lock/lock.h index 4df626d705..22b3b6002a 100644 --- a/src/lock/lock.h +++ b/src/lock/lock.h @@ -22,6 +22,7 @@ * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -105,10 +106,6 @@ #define SEMAPHORES 25 #endif -#ifdef IMP -#define SEMAPHORES 25 -#endif - #ifdef ultrix #define SEMAPHORES 25 #endif diff --git a/src/lock/lockv3.h b/src/lock/lockv3.h index a3c8930e5e..ec87ee3db0 100644 --- a/src/lock/lockv3.h +++ b/src/lock/lockv3.h @@ -22,6 +22,7 @@ * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "XENIX" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -79,10 +80,6 @@ union semun { #define SEMAPHORES 25 #endif -#ifdef IMP -#define SEMAPHORES 25 -#endif - #ifdef ultrix #define SEMAPHORES 25 #endif diff --git a/src/lock/printv3.cpp b/src/lock/printv3.cpp index 1e83453459..29b909bef4 100644 --- a/src/lock/printv3.cpp +++ b/src/lock/printv3.cpp @@ -19,14 +19,14 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #include "firebird.h" #include "../jrd/ib_stdio.h" #include -#ifdef IMP -#include -#endif #include #include "../jrd/common.h" @@ -162,7 +162,7 @@ int V3_lock_print(USHORT argc, UCHAR **argv) break; default: - /* Silently ignore invalid options - + /* Silently ignore invalid options - * the V4 option parser reported any appropriate error */ break; } diff --git a/src/make.new/config/config.h.in b/src/make.new/config/config.h.in index 6bbae985d8..f1d614e724 100644 --- a/src/make.new/config/config.h.in +++ b/src/make.new/config/config.h.in @@ -2,6 +2,7 @@ * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "MAC" and "MAC_CP" defines * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" define * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port */ #ifndef AUTOCONFIG_H @@ -71,6 +72,5 @@ #undef M88K #undef UNIXWARE #undef NCR3000 -#undef IMP #endif \ No newline at end of file diff --git a/src/makefiles/config/config.h.in b/src/makefiles/config/config.h.in index f9fd289565..f790fa5a60 100644 --- a/src/makefiles/config/config.h.in +++ b/src/makefiles/config/config.h.in @@ -2,6 +2,7 @@ * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "MAC" port (MAC/MAC_CP/MAC_AUX defines) * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port */ #ifndef AUTOCONFIG_H @@ -61,6 +62,5 @@ #undef M88K #undef UNIXWARE #undef NCR3000 -#undef IMP #endif \ No newline at end of file diff --git a/src/remote/inet.cpp b/src/remote/inet.cpp index f7fadc50ee..8dbb65b5c2 100644 --- a/src/remote/inet.cpp +++ b/src/remote/inet.cpp @@ -24,10 +24,11 @@ * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "XENIX" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ /* -$Id: inet.cpp,v 1.7 2002-02-16 02:49:56 seanleyne Exp $ +$Id: inet.cpp,v 1.8 2002-02-16 03:27:32 seanleyne Exp $ */ #include "firebird.h" #include "../jrd/ib_stdio.h" @@ -117,10 +118,6 @@ NETDB_DEFINE_CONTEXT #include "../jrd/sch_proto.h" #endif /* REQUESTER */ -#ifdef IMP -int h_errno; /* In Other platforms one of the system header files declares this */ -#endif - #if (defined hpux || defined SCO_UNIX || defined mips) extern int h_errno; #endif @@ -185,10 +182,8 @@ typedef int socklen_t; #endif #ifdef SYSV_SIGNALS -#ifndef IMP #define NO_ITIMER #endif -#endif #ifndef SYS_ERR #define SYS_ERR gds_arg_unix diff --git a/src/remote/protocol.cpp b/src/remote/protocol.cpp index c7fecf614d..454591246f 100644 --- a/src/remote/protocol.cpp +++ b/src/remote/protocol.cpp @@ -19,6 +19,9 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #include "firebird.h" @@ -100,9 +103,7 @@ extern bool_t xdr_float(); extern bool_t xdr_double(); extern bool_t xdr_wrapstring(); -# ifndef IMP extern bool_t xdr_free(); -# endif #else // 0 @@ -136,9 +137,7 @@ static STR gfloat_buffer; # define xdr_double (*_libgds_xdr_double) # endif # define xdr_wrapstring (*_libgds_xdr_wrapstring) -# ifndef IMP -# define xdr_free (*_libgds_xdr_free) -# endif +# define xdr_free (*_libgds_xdr_free) #if 0 // TMN: Patched away this for now, it should probably be removed. @@ -156,9 +155,7 @@ extern bool_t xdr_float(); extern bool_t xdr_double(); # endif // sgi extern bool_t xdr_wrapstring(); -# ifndef IMP extern bool_t xdr_free(); -# endif // IMP #else // 0 @@ -443,7 +440,7 @@ bool_t xdr_protocol(XDR * xdrs, PACKET * p) case op_response: case op_response_piggyback: - /* Changes to this op's protocol must be mirrored + /* Changes to this op's protocol must be mirrored in xdr_protocol_overhead */ response = &p->p_resp; @@ -640,9 +637,9 @@ bool_t xdr_protocol(XDR * xdrs, PACKET * p) MAP(xdr_short, reinterpret_cast < SSHORT & >(sqldata->p_sqldata_transaction)); if (xdrs->x_op == XDR_DECODE) { - /* the statement should be reset for each execution so that - all prefetched information from a prior execute is properly - cleared out. This should be done before fetching any message + /* the statement should be reset for each execution so that + all prefetched information from a prior execute is properly + cleared out. This should be done before fetching any message information (for example: blr info) */ @@ -1156,17 +1153,17 @@ static bool_t xdr_hyper( register XDR * xdrs, SINT64 * pi64) ************************************** * * Functional description - * Map a 64-bit Integer from external to internal representation + * Map a 64-bit Integer from external to internal representation * (or vice versa). - * + * * Enable this for all platforms except Solaris (since it is - * available in the XDR library on Solaris). This function (normally) - * would have been implemented in REMOTE/xdr.c. Since some system - * XDR libraries (HP-UX) do not implement this function, we have it - * in this module. At a later date, when the function is available + * available in the XDR library on Solaris). This function (normally) + * would have been implemented in REMOTE/xdr.c. Since some system + * XDR libraries (HP-UX) do not implement this function, we have it + * in this module. At a later date, when the function is available * on all platforms, we can start using the system-provided version. - * - * Handles "swapping" of the 2 long's to be "Endian" sensitive. + * + * Handles "swapping" of the 2 long's to be "Endian" sensitive. * **************************************/ union { @@ -1682,7 +1679,7 @@ static bool_t xdr_sql_blr( } /* If we have BLR describing a new input/output message, get ready by - * setting up a format + * setting up a format */ if (blr->cstr_length) { if ( @@ -2072,33 +2069,6 @@ static bool_t xdr_float( register XDR * xdrs, register float *ip) } #endif -#ifdef IMP -/** - xdr_free is not available on Motorola IMP 5.3 1.0 mc68060 as system - call. This routine is copied from the file remote/xdr.c. -**/ - -bool_t xdr_free(xdrproc_t proc, SCHAR * objp) -{ -/************************************** - * - * x d r _ f r e e - * - ************************************** - * - * Functional description - * Perform XDR_FREE operation on an XDR structure - * - **************************************/ - XDR xdrs; - - xdrs.x_op = XDR_FREE; - - return (*proc) (&xdrs, objp); -} -#endif - - static RSR get_statement( XDR * xdrs, SSHORT statement_id) { /************************************** @@ -2118,7 +2088,7 @@ static RSR get_statement( XDR * xdrs, SSHORT statement_id) RSR statement = NULL; PORT port = (PORT) xdrs->x_public; -/* if the statement ID is -1, this seems to indicate that we are +/* if the statement ID is -1, this seems to indicate that we are re-executing the previous statement. This is not a well-understood area of the implementation. @@ -2137,4 +2107,4 @@ else /* Check that what we found really is a statement structure */ assert(!statement || (statement->rsr_header.blk_type == type_rsr)); return statement; -} +} \ No newline at end of file diff --git a/src/remote/remote_def.h b/src/remote/remote_def.h index c2cac0c48d..4d295e9f79 100644 --- a/src/remote/remote_def.h +++ b/src/remote/remote_def.h @@ -23,6 +23,7 @@ * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "EPSON" define * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "XENIX" port * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -61,10 +62,6 @@ #endif #endif -#ifdef IMP -#define ARCHITECTURE arch_imp -#endif - #ifdef M88K #define ARCHITECTURE arch_m88k #endif diff --git a/src/utilities/dropv3.cpp b/src/utilities/dropv3.cpp index 421e99e558..c41c3aa30b 100644 --- a/src/utilities/dropv3.cpp +++ b/src/utilities/dropv3.cpp @@ -19,15 +19,15 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #include "firebird.h" #include "../jrd/ib_stdio.h" #include #include -#ifdef IMP -#include -#endif #include #include @@ -50,7 +50,7 @@ static long get_key(); static int dummy_init(); static int get_lock_header(); static int sem_exclusive(long , int ); -#ifndef MMAP_SUPPORTED +#ifndef MMAP_SUPPORTED static int remove_resource(int , TEXT *, int, int , TEXT *); #else static int remove_resource(int, TEXT *,int ,int ,TEXT *); @@ -65,10 +65,10 @@ static struct { #ifndef MMAP_SUPPORTED {"SHMSIZE", &LOCK_shm_size}, #else - {"SEMKEY", &LOCK_sem_key}, + {"SEMKEY", &LOCK_sem_key}, {"BLKSIG", &LOCK_blk_signal}, #endif - {"SEMCOUNT", &LOCK_sem_count}, + {"SEMCOUNT", &LOCK_sem_count}, {NULL, NULL} }; @@ -82,7 +82,7 @@ int V3_drop(int argc, UCHAR **argv) ************************************** * * Functional description - * Drop Lock Table and associated semaphores. + * Drop Lock Table and associated semaphores. * **************************************/ UCHAR **end, *p; diff --git a/src/wal/wal.cpp b/src/wal/wal.cpp index 0e89471ba2..d25b4e14a5 100644 --- a/src/wal/wal.cpp +++ b/src/wal/wal.cpp @@ -19,6 +19,9 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. + * + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port + * */ #include "firebird.h" @@ -108,19 +111,11 @@ static SSHORT wal_put2(STATUS *, WAL, UCHAR *, USHORT, UCHAR *, USHORT, #ifdef SHLIB_DEFS #define execl (*_libgds_execl) -#ifdef IMP -#define wait (*_libgds_wait) -#else #define waitpid (*_libgds_waitpid) -#endif #define _exit (*_libgds__exit) extern int execl(); -#ifdef IMP -extern int wait(); -#else extern int waitpid(); -#endif extern void _exit(); #endif @@ -134,7 +129,7 @@ SSHORT WAL_attach( STATUS * status_vector, WAL * WAL_handle, SCHAR * dbname) ************************************** * * Functional description - * Attach to an already intitalized WAL segment for the given + * Attach to an already intitalized WAL segment for the given * database. * Return SUCCESS if attachment succeeds else return FAILURE. * @@ -199,14 +194,14 @@ SSHORT WAL_checkpoint_finish(STATUS * status_vector, /* end of sanity check */ /* Checkpoint record is a logical concept. The higher level routines - * do not need to 'see' this record for recovery. We are putting a + * do not need to 'see' this record for recovery. We are putting a * zero length record for this purpose. */ wal_put2(status_vector, WAL_handle, chkpt_rec, 0, (UCHAR *) 0, 0, log_seqno, log_offset, TRUE); /* Now save the checkpoint record offset to be used by WAL writer later after - it flushes the block containing the checkpoint record. We need to do this + it flushes the block containing the checkpoint record. We need to do this now because our block may be blank-padded for raw-device support and then it would be difficult for the WAL writer to know the location of the checkpoint record in the block. */ @@ -242,7 +237,7 @@ SSHORT WAL_checkpoint_force(STATUS * status_vector, * Functional description * This procedure forces a checkpoint to happen. It starts as * well as finishes the checkpoint from WALs point of view. - * The caller should subsequently make a call to + * The caller should subsequently make a call to * WAL_checkpoint_recorded. * ***************************************/ @@ -268,7 +263,7 @@ SSHORT WAL_checkpoint_start(STATUS * status_vector, ************************************** * * Functional description - * To inform the caller if checkpoint needs to be started. + * To inform the caller if checkpoint needs to be started. * Returns TRUE or FASLE through ckpt_start parameter. * * Returns SUCCESS or FAILURE. @@ -298,7 +293,7 @@ SSHORT WAL_checkpoint_recorded(STATUS * status_vector, WAL WAL_handle) * * Functional description * To inform the WAL writer that the last checkpoint info has - * been recorded in the stable storage and so it can reuse + * been recorded in the stable storage and so it can reuse * earlier log files if possible. * * Returns SUCCESS or FAILURE. @@ -333,12 +328,12 @@ SSHORT WAL_commit(STATUS * status_vector, ************************************** * * Functional description - * Put the commit log record in the WAL buffer and flush the + * Put the commit log record in the WAL buffer and flush the * buffer to log file before returning. * If all the buffers are full and/or being flushed to disk, - * wait for one to become available. + * wait for one to become available. * Implement group-commit protocol. - * Return the sequence number of the log file in the log file + * Return the sequence number of the log file in the log file * series and the offset of this commit record in that file. * * Return SUCCESS or FAILURE. @@ -417,7 +412,7 @@ void WAL_fini( STATUS * status_vector, WAL * WAL_handle) ************************************** * * Functional description - * Unmap the WAL segment. + * Unmap the WAL segment. * **************************************/ @@ -432,7 +427,7 @@ SSHORT WAL_flush( { /************************************** * - * W A L _ f l u s h + * W A L _ f l u s h * ************************************** * @@ -471,7 +466,7 @@ SSHORT WAL_flush( *log_offset <= WAL_segment->wals_flushed_offset)) goto flush_exit; -/* Get the current status of the WAL buffers and then make sure that +/* Get the current status of the WAL buffers and then make sure that they are flushed at least upto that point. */ cur_log_seqno = WAL_segment->wals_log_seqno; @@ -481,7 +476,7 @@ SSHORT WAL_flush( goto flush_exit; /* Current buffer is non-empty, set it up for writing. The earlier - buffers, if any, would already have been set for writing when we + buffers, if any, would already have been set for writing when we switched to this buffer. */ if (CUR_BUF != -1 && (WAL_BLOCK(CUR_BUF))->walblk_cur_offset > 0) @@ -530,7 +525,7 @@ SSHORT WAL_init(STATUS * status_vector, ************************************** * * Functional description - * Initialize Write Ahead Log segment for the database and + * Initialize Write Ahead Log segment for the database and * attach to it. * * Initialize the WAL_handle. @@ -539,7 +534,7 @@ SSHORT WAL_init(STATUS * status_vector, * as the starting sequence number for the set of new log * files. * - * Start the WAL writer. + * Start the WAL writer. * Return SUCCESS if initialization succeeds else return FAILURE. * **************************************/ @@ -568,13 +563,13 @@ SSHORT WAL_journal_disable(STATUS * status_vector, WAL WAL_handle) { /************************************** * - * W A L _ j o u r n a l _ d i s a b l e + * W A L _ j o u r n a l _ d i s a b l e * ************************************** * * Functional description * To inform the WAL writer that journalling should be disabled. - * Before returning from this procedure make sure that the WAL + * Before returning from this procedure make sure that the WAL * writer has severed its ties with the journal server. * * Returns SUCCESS or FAILURE. @@ -594,8 +589,8 @@ SSHORT WAL_journal_disable(STATUS * status_vector, WAL WAL_handle) inform_wal_writer(WAL_handle); while (WAL_segment->wals_flags & WALS_JOURNAL_ENABLED) { - /* Wait for the WAL writer to severe its connection with the journal - server. Should we get out with an error after a certain number + /* Wait for the WAL writer to severe its connection with the journal + server. Should we get out with an error after a certain number of retries ? -- Damodar */ wait_for_writer(status_vector, WAL_handle); @@ -615,13 +610,13 @@ SSHORT WAL_journal_enable(STATUS * status_vector, { /************************************** * - * W A L _ j o u r n a l _ e n a b l e + * W A L _ j o u r n a l _ e n a b l e * ************************************** * * Functional description * To inform the WAL writer that journalling has been enabled. - * Before returning from this procedure make sure that the WAL + * Before returning from this procedure make sure that the WAL * writer has established a connection with the journal server. * * Returns SUCCESS or FAILURE. @@ -645,8 +640,8 @@ SSHORT WAL_journal_enable(STATUS * status_vector, inform_wal_writer(WAL_handle); while (!(WAL_segment->wals_flags & WALS_JOURNAL_ENABLED)) { - /* Wait for the WAL writer to establish connection with the journal - server. Should we get out with an error after a certain number + /* Wait for the WAL writer to establish connection with the journal + server. Should we get out with an error after a certain number of retries ? -- Damodar */ wait_for_writer(status_vector, WAL_handle); @@ -669,14 +664,14 @@ SSHORT WAL_put(STATUS * status_vector, { /************************************** * - * W A L _ p u t + * W A L _ p u t * ************************************** * * Functional description - * Put the given log record in a shared log buffer. + * Put the given log record in a shared log buffer. * If all the buffers are full and or being flushed to disk, - * wait for one to become available. + * wait for one to become available. * * If putting this buffer will make the current log file go * beyond its rollover length then ask the WAL writer @@ -687,7 +682,7 @@ SSHORT WAL_put(STATUS * status_vector, * to disk. * * The log record is put in (header+logrec) fashion. - * Return the sequence number of the log file in the log file + * Return the sequence number of the log file in the log file * series and the offset of this logrec in that file where * this log record would eventually be written. * @@ -713,12 +708,12 @@ BOOLEAN WAL_rollover_happened(STATUS * status_vector, ************************************** * * Functional description - * To inform the caller if rollover to a new log file has happened. - * Returns TRUE or FASLE. If TRUE then new_logname, + * To inform the caller if rollover to a new log file has happened. + * Returns TRUE or FASLE. If TRUE then new_logname, * new_log_partition_offset and new_seqno parameters are initialized - * with the new information. The caller should invoke + * with the new information. The caller should invoke * WAL_rollover_recorded() after recording the rollover - * information at a safe place (e.g. the header page). + * information at a safe place (e.g. the header page). * ***************************************/ WALS WAL_segment; @@ -750,9 +745,9 @@ void WAL_rollover_recorded( WAL WAL_handle) ************************************** * * Functional description - * To inform the WAL writer that the last rollover information + * To inform the WAL writer that the last rollover information * has been recorded. After this, the WAL writer can rollover - * to a new log file if needed. + * to a new log file if needed. * ***************************************/ WALS WAL_segment; @@ -774,7 +769,7 @@ SSHORT WAL_set_checkpoint_length( ************************************** * * Functional description - * Sets the checkpoint length to the passed value + * Sets the checkpoint length to the passed value * (in Kbytes). * **************************************/ @@ -804,7 +799,7 @@ void WAL_set_cleanup_flag( WAL WAL_handle) ************************************** * * Functional description - * Sets the cleanup flag in the WAL_handle so that + * Sets the cleanup flag in the WAL_handle so that * shared resource may be cleaned up during WALC_fini(). * **************************************/ @@ -825,7 +820,7 @@ SSHORT WAL_set_grpc_wait_time( ************************************** * * Functional description - * Sets the group commit wait time to the passed value + * Sets the group commit wait time to the passed value * (in microseconds). * **************************************/ @@ -854,7 +849,7 @@ SSHORT WAL_set_rollover_log(STATUS * status_vector, ************************************** * * Functional description - * Sets the base file name to be used for rolling over to the next + * Sets the base file name to be used for rolling over to the next * log file. * **************************************/ @@ -898,9 +893,9 @@ SSHORT WAL_shutdown(STATUS * status_vector, ************************************** * * Functional description - * Informs the WAL writer to shut down its operations. + * Informs the WAL writer to shut down its operations. * This procedure should be called when no other process (thread) - * is attached to the database. + * is attached to the database. * * Returns the information about the last log file in use. * @@ -929,13 +924,13 @@ SSHORT WAL_shutdown_old_writer(STATUS * status_vector, SCHAR * dbname) * Functional description * Informs an existing WAL writer (if any) for the passed * database to shut down its operations. It's not an error - * if no WAL writer for the given database is running. + * if no WAL writer for the given database is running. * * A WAL Writer may be hanging around if the 'last' process * attached to the database did not or could not detach from - * the database. So, this routine is used to shutdown that + * the database. So, this routine is used to shutdown that * WAL writer before starting recovery or in preparation for - * starting a fresh WAL writer. + * starting a fresh WAL writer. * ************************************/ WAL WAL_handle; @@ -972,7 +967,7 @@ SSHORT WAL_status(STATUS * status_vector, ************************************** * * Functional description - * Returns current status of the WAL activites through passed + * Returns current status of the WAL activites through passed * parameters. * **************************************/ @@ -1017,8 +1012,8 @@ static SLONG copy_buffer( * Functional description * Copies 'count' bytes from source to the specified WAL buffer. * Puts a header as prefix. - * The sufficiency of space in wblk has already been ascertained - * beforehand. + * The sufficiency of space in wblk has already been ascertained + * beforehand. * Returns the offset in the WAL file where these bytes would endup. * **************************************/ @@ -1075,7 +1070,7 @@ static SSHORT fork_writer( STATUS * status_vector, WAL WAL_handle) * Fork the WAL writer process (thread) and give it enough time * to initialize itself. * - * Returns SUCCESS if successful in forking the WAL writer. + * Returns SUCCESS if successful in forking the WAL writer. * **************************************/ WALS WAL_segment; @@ -1114,7 +1109,7 @@ static SSHORT fork_writer( STATUS * status_vector, WAL WAL_handle) * Fork the WAL writer process (thread) and give it enough time * to initialize itself. * - * Returns SUCCESS if successful in forking the WAL writer. + * Returns SUCCESS if successful in forking the WAL writer. * **************************************/ WALS WAL_segment; @@ -1133,14 +1128,14 @@ static SSHORT fork_writer( STATUS * status_vector, WAL WAL_handle) spawnl(P_DETACH, image_name, WAL_WRITER, WAL_segment->wals_dbname, NULL); #else -/* We are doing vfork() twice below to start the WAL writer process. +/* We are doing vfork() twice below to start the WAL writer process. This is to get around the problem of a process not responding to kill(0) signal properly on HP-UX systems. On HP-UX, if a child - (WAL writer) dies but the parent still exists then kill(0) to + (WAL writer) dies but the parent still exists then kill(0) to the pid of the dead process (WAL writer) does not return an error of ESRCH and hence we cannot restart it. Doing vfork() twice makes sure that the parent of WAL writer 'dies' so that WAL writer - would never get into a state in case it terminates + would never get into a state in case it terminates prematurely. */ if (!(pid = vfork())) { @@ -1181,8 +1176,8 @@ static SSHORT grpc_do_group_commit( ************************************** * * Functional description - * This process (thread) has been chosen to be the group - * coordinator. The group-commit block to be used is passed as + * This process (thread) has been chosen to be the group + * coordinator. The group-commit block to be used is passed as * a parameter. * NOTE: It is assume that upon entry to this routine, shared memory * is acquired. @@ -1192,7 +1187,7 @@ static SSHORT grpc_do_group_commit( SLONG dummy_offset; SSHORT ret; -/* Wait for more grouping and for the other group-commit_block +/* Wait for more grouping and for the other group-commit_block to be available. */ ret = grpc_wait_for_grouping(status_vector, WAL_handle, grpc_blknum); @@ -1257,7 +1252,7 @@ static SSHORT grpc_wait_for_grouping( ************************************** * * Functional description - * This function first waits for increasing the group size. It also + * This function first waits for increasing the group size. It also * makes sure that the other group-commit block is available before * this group-commit coordinator closes its door. * NOTE: It is assume that upon entry to this routine, shared memory @@ -1340,10 +1335,10 @@ GRP_COMMIT * grpc) ************************************** * * Functional description - * This function waits for the group commit on the given block to + * This function waits for the group commit on the given block to * finish. All the participants call this routine. * The parameter wait_id is the semaphore number to wait on. - * If needed, become the group_coordinator. + * If needed, become the group_coordinator. * NOTE: It is assume that upon entry to this routine, shared memory * is acquired. * @@ -1418,7 +1413,7 @@ static SSHORT next_buffer_available( WALS WAL_segment) ************************************** * * Functional description - * Return the next (to current) available buffer number modulo + * Return the next (to current) available buffer number modulo * maximum allocated buffers for this WAL. * If the next buffer is not available, return -1. * @@ -1447,9 +1442,9 @@ static void setup_buffer_for_writing( ************************************** * * Functional description - * Prepare the cuurent buffer block for writing. - * Inform the WAL writer that the current buffer is ready - * to be flushed to disk. Assumes that acquire() has + * Prepare the cuurent buffer block for writing. + * Inform the WAL writer that the current buffer is ready + * to be flushed to disk. Assumes that acquire() has * been done, before calling this routine. * If 'ckpt' flag is TRUE then this buffer finishes a checkpoint. ***************************************/ @@ -1479,9 +1474,9 @@ static SSHORT shutdown_writer( ************************************** * * Functional description - * Informs the WAL writer to shut down its operations. + * Informs the WAL writer to shut down its operations. * This procedure should be called when no other process (thread) - * is attached to the database. + * is attached to the database. * **************************************/ WALS WAL_segment; @@ -1514,16 +1509,16 @@ static SSHORT sync_with_wal_writer( STATUS * status_vector, WAL WAL_handle) { /************************************** * - * s y n c _ w i t h _ W A L _ w r i t e r + * s y n c _ w i t h _ W A L _ w r i t e r * ************************************** * * Functional description - * Make sure that WAL writer has initialized itself (and parts of + * Make sure that WAL writer has initialized itself (and parts of * the WAL segment). This is to avoid some race conditions when - * other processes may use the info regarding the log file in - * the WAL segment before the WAL writer got a chance to initialize - * that. Returns FAILURE after some number (10) of retries. + * other processes may use the info regarding the log file in + * the WAL segment before the WAL writer got a chance to initialize + * that. Returns FAILURE after some number (10) of retries. * **************************************/ SSHORT done; @@ -1581,7 +1576,7 @@ static SSHORT wait_for_writer( STATUS * status_vector, WAL WAL_handle) reinterpret_cast < void (*)() > (WALC_alarm_handler), ptr); if (ret == FAILURE) { - /* We got out because of timeout. May be our condition is + /* We got out because of timeout. May be our condition is already met. Let the caller decide that. In any case, make sure that the WAL_writer process is alive. */ @@ -1610,9 +1605,9 @@ USHORT len2, SLONG * log_seqno, SLONG * log_offset, SSHORT ckpt) ************************************** * * Functional description - * Put the given log record in a shared log buffer. + * Put the given log record in a shared log buffer. * If all the buffers are full and/or being flushed to disk, - * wait for one to become available. + * wait for one to become available. * * If putting this buffer will make the current log file go * beyond its rollover length then ask the WAL writer @@ -1623,11 +1618,11 @@ USHORT len2, SLONG * log_seqno, SLONG * log_offset, SSHORT ckpt) * to disk. * * The log record is put in (header+logrec) fashion. - * Return the sequence number of the log file in the log file + * Return the sequence number of the log file in the log file * series and the offset of this logrec in that file where * this log record would eventually be written. * - * If 'ckpt' parameter is TRUE then steup the buffer with + * If 'ckpt' parameter is TRUE then steup the buffer with * this logrec for writing and mark it as a checkpoint buffer. * The WAL writer will handle this checkpointed buffer in a special * way. @@ -1700,7 +1695,7 @@ USHORT len2, SLONG * log_seqno, SLONG * log_offset, SSHORT ckpt) done = TRUE; } else - /* Assumption: One empty WAL buffer is long enough to fully accommodate + /* Assumption: One empty WAL buffer is long enough to fully accommodate any one log record. Let's try the next buffer. */ setup_buffer_for_writing(WAL_handle, WAL_segment, 0); @@ -1717,4 +1712,4 @@ USHORT len2, SLONG * log_seqno, SLONG * log_offset, SSHORT ckpt) } -} // extern "C" +} // extern "C" \ No newline at end of file diff --git a/src/wal/wal.h b/src/wal/wal.h index 6dc438ef28..c240c8c0a6 100644 --- a/src/wal/wal.h +++ b/src/wal/wal.h @@ -21,6 +21,7 @@ * Contributor(s): ______________________________________. * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -34,9 +35,6 @@ #define FCNTL_INCLUDED #endif #endif -#ifdef IMP -#include -#endif #include "../jrd/common.h" #include "../jrd/misc.h" #include "../jrd/isc.h" diff --git a/src/wal/walw.cpp b/src/wal/walw.cpp index 9c77d3b208..5a921a40ef 100644 --- a/src/wal/walw.cpp +++ b/src/wal/walw.cpp @@ -21,6 +21,7 @@ * Contributor(s): ______________________________________. * * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "DELTA" port + * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "IMP" port * */ @@ -59,11 +60,9 @@ #if !(defined WIN_NT) #ifndef VMS #include -#ifndef IMP #ifndef NETWARE_386 #include #endif -#endif #else #include #include @@ -72,12 +71,10 @@ #include #endif -#ifdef IMP -#include -#endif #ifdef sparc #include #endif + #ifdef UNIX #include #endif @@ -344,7 +341,7 @@ SSHORT WALW_writer(STATUS * status_vector, WAL WAL_handle) { /************************************** * - * W A L W _ w r i t e r + * W A L W _ w r i t e r * ************************************** * @@ -352,11 +349,11 @@ SSHORT WALW_writer(STATUS * status_vector, WAL WAL_handle) * This is the main processing routine for the WAL writer. * This routine simply waits on its semaphore in a loop. If * the semaphore is poked, or an alarm expires, it wakes up, - * looks for buffers to be written to the log file, writes - * them, and wakes up everyone waiting for a free buffer + * looks for buffers to be written to the log file, writes + * them, and wakes up everyone waiting for a free buffer * before going back to sleep. * - * In addition to writing WAL buffers to log files, it also + * In addition to writing WAL buffers to log files, it also * takes care of such functions as checkpointing, rollover, * enabling and disabling journalling and WAL shutdown. * @@ -493,7 +490,7 @@ SSHORT WALW_writer(STATUS * status_vector, WAL WAL_handle) rollover_required = WAL_segment->wals_flags & WALS_ROLLOVER_REQUIRED; if (!buffer_full && !journal_enable_or_disable && !rollover_required) { - /* Nothing to do. Prepare to wait for a timeout or a wakeup + /* Nothing to do. Prepare to wait for a timeout or a wakeup from somebody else. */ ptr = &WAL_EVENTS[WAL_WRITER_WORK_SEM]; @@ -514,7 +511,7 @@ SSHORT WALW_writer(STATUS * status_vector, WAL WAL_handle) prepare_wal_block(WAL_segment, wblk); - /* Do the write after releasing the shared segment so that + /* Do the write after releasing the shared segment so that other concurrent activities may go on in the meantime. */ WALC_release(WAL_handle); @@ -535,7 +532,7 @@ SSHORT WALW_writer(STATUS * status_vector, WAL WAL_handle) release_wal_block(WAL_segment, wblk); /* If the WAL segment needs to be expanded and can be expanded - try to do it now because no WAL I/O is in progress and we + try to do it now because no WAL I/O is in progress and we can move things around. */ if (!(WAL_segment->wals_flags2 & WALS2_CANT_EXPAND) && @@ -573,7 +570,7 @@ SSHORT WALW_writer(STATUS * status_vector, WAL WAL_handle) same thread. discard_prev_log() may open the current log file to check its header for previously linked log files. That would change the file pointer to WALFH_LENGTH (2048) causing us to loose log records - in the current log file unless we do reseeking. This action won't + in the current log file unless we do reseeking. This action won't hurt on other platforms. */ lseek(LOG_FD, WAL_segment->wals_flushed_offset, SEEK_SET); #endif @@ -582,7 +579,7 @@ SSHORT WALW_writer(STATUS * status_vector, WAL WAL_handle) } /* If it is time to rollover to the next log file then do it. But - make sure that the last rollover information, if any, has + make sure that the last rollover information, if any, has already been recorded. */ if (rollover_required) { @@ -593,7 +590,7 @@ SSHORT WALW_writer(STATUS * status_vector, WAL WAL_handle) ISC_event_clear(WAL_EVENTS + WAL_WRITER_WORK_DONE_SEM); } - /* If journalling has been enabled or disabled, take care of that + /* If journalling has been enabled or disabled, take care of that situation now. */ if (journal_enable_or_disable) { @@ -732,7 +729,7 @@ SLONG starting_log_partition_offset, SSHORT delete_flag) * Functional description * From the starting_logname backwards, excluding the starting * one, mark all the log files as NOT needed for short-term - * recovery. Delete those files if appropriate AND/OR if + * recovery. Delete those files if appropriate AND/OR if * delete_flag is TRUE. * * If there is any error, return FAILURE else return SUCCESS. @@ -811,7 +808,7 @@ SLONG starting_log_partition_offset, SSHORT delete_flag) } } else { - /* Just update the header flag stating that we don't need this + /* Just update the header flag stating that we don't need this file for short-term recovery. */ WALF_set_log_header_flag(status_vector, dbname, log_name, log_partition_offset, @@ -867,7 +864,7 @@ static SSHORT flush_all_buffers( STATUS * status_vector, WAL WAL_handle) { /************************************** * - * f l u s h _ a l l _ b u f f e r s + * f l u s h _ a l l _ b u f f e r s * ************************************** * @@ -875,7 +872,7 @@ static SSHORT flush_all_buffers( STATUS * status_vector, WAL WAL_handle) * Flush all the non-empty buffer blocks to the current * log file. We need not worry about rollover because we * have already given its log file sequence number for - * the records in those buffers. + * the records in those buffers. * **************************************/ WALS WAL_segment; @@ -912,7 +909,7 @@ static SSHORT flush_all_buffers( STATUS * status_vector, WAL WAL_handle) bufnum = (bufnum + 1) % maxbufs; } while (bufnum != lastbuf); -/* Since all the log buffers are flushed and empty now, we can start +/* Since all the log buffers are flushed and empty now, we can start fresh. */ WAL_segment->wals_last_flushed_buf = -1; @@ -1012,7 +1009,7 @@ SLONG * new_offset, SLONG * log_type) { /************************************** * - * g e t _ n e x t _ l o g n a m e + * g e t _ n e x t _ l o g n a m e * ************************************** * @@ -1041,12 +1038,12 @@ SLONG * new_offset, SLONG * log_type) { /************************************** * - * g e t _ n e x t _ p r e a l l o c _ l o g n a m e + * g e t _ n e x t _ p r e a l l o c _ l o g n a m e * ************************************** * * Functional description - * Get the name of the next usable log file from the list of + * Get the name of the next usable log file from the list of * the preallocated log files. If preallocated files are not * available, try an overflow log file. * @@ -1109,7 +1106,7 @@ SLONG * new_offset, SLONG * log_type) { /************************************** * - * g e t _ n e x t _ s e r i a l _ l o g n a m e + * g e t _ n e x t _ s e r i a l _ l o g n a m e * ************************************** * @@ -1186,7 +1183,7 @@ SLONG * new_offset, SLONG * log_type) } #ifdef UNIX -/* WAL writer would typically be running as root. So give the +/* WAL writer would typically be running as root. So give the ownership of the new log file to the database owner. */ if (chown(new_logname, WAL_segment->wals_owner_id, WAL_segment->wals_group_id) == -1) { @@ -1276,7 +1273,7 @@ SLONG * new_offset, SLONG * log_type) { /************************************** * - * g e t _ o v e r f l o w _ l o g n a m e + * g e t _ o v e r f l o w _ l o g n a m e * ************************************** * @@ -1312,7 +1309,7 @@ SLONG * new_offset, SLONG * log_type) *log_type = *log_type | WALFH_OVERFLOW; #ifdef UNIX - /* WAL writer would typically be running as root. So give the + /* WAL writer would typically be running as root. So give the ownership of the new log file to the database owner. */ if (chown(new_logname, WAL_segment->wals_owner_id, WAL_segment->wals_group_id) == -1) { @@ -1362,9 +1359,9 @@ static SSHORT increase_buffers( * * Functional description * This function would try to increase the number of buffers in - * the shared WAL segment by the given number of buffers. May + * the shared WAL segment by the given number of buffers. May * involve remapping (or reallocating) the WAL segment. - * Used for performance tuning. Assumes that acquire() has been + * Used for performance tuning. Assumes that acquire() has been * done before calling this routine. * **************************************/ @@ -1539,15 +1536,15 @@ static void journal_disable( { /************************************** * - * j o u r n a l _ d i s a b l e + * j o u r n a l _ d i s a b l e * ************************************** * * Functional description - * Disconnects from the journal server after rolling over to a new - * log file so that the current log file does not get deleted by + * Disconnects from the journal server after rolling over to a new + * log file so that the current log file does not get deleted by * the journal server and the user can at least recover upto journal - * disable point. + * disable point. * **************************************/ WALS WAL_segment; @@ -1571,7 +1568,7 @@ static SSHORT journal_enable( STATUS * status_vector, WAL WAL_handle) { /************************************** * - * j o u r n a l _ e n a b l e + * j o u r n a l _ e n a b l e * ************************************** * @@ -1646,7 +1643,7 @@ static void prepare_wal_block( WALS WAL_segment, WALBLK * wblk) len = (USHORT) wblk->walblk_roundup_offset; /* Already includes the block trailing bytes */ -/* The following way of initializing and then copying the header to +/* The following way of initializing and then copying the header to walblk_buf is used to avoid datatype misalignment problem on some machines. */ header.walblk_hdr_blklen = len; @@ -1671,7 +1668,7 @@ static void release_wal_block( WALS WAL_segment, WALBLK * wblk) ************************************** * * Functional description - * A block has just been written to disk. Update statistics and + * A block has just been written to disk. Update statistics and * make this block available to other users. * **************************************/ @@ -1782,9 +1779,9 @@ static SSHORT rollover_log( ************************************** * * Functional description - * The current log file has reached its limit length. So move on + * The current log file has reached its limit length. So move on * to the next one. Update WAL_segment and log_header. WAL_segment - * is assumed to have already been acquired. + * is assumed to have already been acquired. * **************************************/ WALFH new_log_header; @@ -1842,7 +1839,7 @@ static SSHORT rollover_log( log_header->walfh_next_log_partition_offset = new_log_partition_offset; - /* The previous log name of the current log file may happen to be the + /* The previous log name of the current log file may happen to be the new_logname if there are 2 round-robin log files and we are re-using the new_logname. The same could happen even if we have one partitioned log file with only 2 partitions. In those cases, make the prev_logname @@ -1859,9 +1856,9 @@ static SSHORT rollover_log( log_header->walfh_hibsn = WAL_segment->wals_blkseqno - 1; close_log(status_vector, WAL_handle, saved_logname, log_header, TRUE); - /* This is a good place to inform the long term journal server + /* This is a good place to inform the long term journal server that we have rolled over to a new log file. Note that the close - info of the previous log file has already been sent during + info of the previous log file has already been sent during close_log() call made above. */ if (JOURNAL_HANDLE && !(LOCAL_FLAGS & WALW_DISABLING_JRN)) { @@ -1914,17 +1911,17 @@ static void setup_for_checkpoint( WALS WAL_segment) { /************************************** * - * s e t u p _ f o r _ c h e c k p o i n t + * s e t u p _ f o r _ c h e c k p o i n t * ************************************** * * Functional description - * Inform the Asynchronous Buffer writer that it is time to - * start checkpointing. Assumes that acquire() has + * Inform the Asynchronous Buffer writer that it is time to + * start checkpointing. Assumes that acquire() has * been done before calling this routine. ***************************************/ -/* AB writer checks this condition by calling WAL_start_checkpoiting() +/* AB writer checks this condition by calling WAL_start_checkpoiting() in its main loop. */ WAL_segment->wals_flags |= WALS_CKPT_START; @@ -1944,12 +1941,12 @@ SSHORT rollover, SCHAR * prev_logname, SLONG prev_log_partition_offset) { /************************************** * - * s e t u p _ l o g + * s e t u p _ l o g * ************************************** * * Functional description - * Initialize the log file header information and + * Initialize the log file header information and * the corresponding WAL_segment information. * Returns SUCCESS or an errno. * @@ -1966,7 +1963,7 @@ SSHORT rollover, SCHAR * prev_logname, SLONG prev_log_partition_offset) log_header, rollover, prev_logname, prev_log_partition_offset, &takeover); if (ret == SUCCESS) { - /* Now updates the appropriate fields of WAL_segment from the given + /* Now updates the appropriate fields of WAL_segment from the given log_header. */ strcpy(WAL_segment->wals_logname, logname); @@ -1974,7 +1971,7 @@ SSHORT rollover, SCHAR * prev_logname, SLONG prev_log_partition_offset) log_header->walfh_log_partition_offset; if (!takeover) { /* If a new WAL writer is taking over, we don't want to change the - wals_buf_offset etc. which might reflect the uptodate WAL buffer + wals_buf_offset etc. which might reflect the uptodate WAL buffer position. */ WAL_segment->wals_log_seqno = log_header->walfh_seqno; @@ -1985,7 +1982,7 @@ SSHORT rollover, SCHAR * prev_logname, SLONG prev_log_partition_offset) } if (WAL_segment->wals_max_logfiles > 0) { - /* Get the index of this logfile in the list of pre-allocated + /* Get the index of this logfile in the list of pre-allocated log files. */ WAL_segment->wals_cur_logfile = @@ -2036,18 +2033,18 @@ SCHAR * prev_logname, SLONG prev_log_partition_offset, SSHORT * takeover) ************************************** * * Functional description - * Open a given log file. + * Open a given log file. * Initialize the log file header information. * If 'rollover' flag is TRUE, then we are going to open a new log - * file. So use the 'prev_logname' as the previous log file + * file. So use the 'prev_logname' as the previous log file * name for the new log file. * If we are opening an existing log file and it has a 'next' log * file, then open the 'next' log file automatically using a recursive - * call. - * + * call. + * * If we determine that this is a takeover situation, set the takeover * parameter to TRUE. - * + * * Returns SUCCESS or FAILURE. * **************************************/ @@ -2067,7 +2064,7 @@ SCHAR * prev_logname, SLONG prev_log_partition_offset, SSHORT * takeover) *takeover = FALSE; if (!rollover) { - /* Try to read the logfile header and take appropriate steps + /* Try to read the logfile header and take appropriate steps afterwards. */ if (LLIO_read(status_vector, log_fd, logname, @@ -2158,9 +2155,9 @@ SCHAR * prev_logname, SLONG prev_log_partition_offset, SSHORT * takeover) } } else { - /* This situation should not arise. Before this, a recovery should + /* This situation should not arise. Before this, a recovery should have taken place. However, a graceful way of handling it - could be to scan the log and position at the end of the last + could be to scan the log and position at the end of the last 'valid looking' block. */ LLIO_close(0, log_fd); @@ -2177,10 +2174,10 @@ SCHAR * prev_logname, SLONG prev_log_partition_offset, SSHORT * takeover) log_header->walfh_next_logname = NULL; WALF_upd_log_hdr_frm_walfh_data(log_header, log_header->walfh_data); - /* In this case, walfh_next_logname should be empty. But there is + /* In this case, walfh_next_logname should be empty. But there is a small window wherein the rollover to a new logfile occurred but - that fact was not recorded at higher level (in database header page). - In that case, walfh_next_logname would not be empty and it would be + that fact was not recorded at higher level (in database header page). + In that case, walfh_next_logname would not be empty and it would be reasonable for us to open and use the next log file. */ if (strlen(log_header->walfh_next_logname) != 0) { @@ -2232,7 +2229,7 @@ static SSHORT write_log_header_and_reposition( (UCHAR *) log_header, WALFH_LENGTH, 0)) return FAILURE; -/* Let's write an invalid block header at the end so that even if we +/* Let's write an invalid block header at the end so that even if we are reusing an old log file, we don't use its old data */ if (LLIO_write(status_vector, log_fd, logname, @@ -2259,7 +2256,7 @@ static SSHORT write_wal_block( ************************************** * * Functional description - * Writes the prepared wal buffer to WAL file. + * Writes the prepared wal buffer to WAL file. * **************************************/ @@ -2336,4 +2333,4 @@ static void write_wal_statistics( WAL WAL_handle) } -} // extern "C" +} // extern "C" \ No newline at end of file