mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:43:03 +01:00
Do not redefine MAXPATHLEN. Always use the value supplied by the operating
system (header files).
This commit is contained in:
parent
32f6029a96
commit
507b9c86c8
@ -36,9 +36,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#define BLKDEF(type, root, tail) type,
|
||||
enum alice_blk_t
|
||||
|
@ -24,7 +24,7 @@
|
||||
//
|
||||
//____________________________________________________________
|
||||
//
|
||||
// $Id: exe.cpp,v 1.5 2002-10-31 05:05:49 seanleyne Exp $
|
||||
// $Id: exe.cpp,v 1.6 2002-11-06 07:08:41 eku Exp $
|
||||
//
|
||||
// 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
|
||||
// conditionals, as the engine now fully supports
|
||||
@ -67,10 +67,6 @@ static TEXT val_errors[] =
|
||||
isc_info_tpage_errors, gds_info_end
|
||||
};
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#define STUFF_DPB(blr) {*d++ = (UCHAR)(blr);}
|
||||
#define STUFF_DPB_INT(blr) \
|
||||
{ \
|
||||
|
@ -26,6 +26,8 @@
|
||||
#include "../intl/ldcommon.h"
|
||||
#include "../intl/ld_proto.h"
|
||||
|
||||
#include <sys/param.h> /* for MAXPATHLEN */
|
||||
|
||||
/* Commented out to make Linux version work because it is inaccessiable on all
|
||||
known platforms. Nickolay Samofatov, 10 Sept 2002
|
||||
extern void gds__log(UCHAR*, ...);
|
||||
|
@ -50,10 +50,6 @@
|
||||
#include "../jrd/sch_proto.h"
|
||||
#include "../remote/window.h"
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 256
|
||||
#endif
|
||||
|
||||
#define statistics stat
|
||||
|
||||
extern "C" {
|
||||
|
@ -54,10 +54,6 @@
|
||||
#include "../isql/isql_proto.h"
|
||||
#include "../jrd/gds_proto.h"
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 256
|
||||
#endif
|
||||
|
||||
typedef struct scrollkeys {
|
||||
WORD wVirtkey;
|
||||
int iMessage;
|
||||
|
@ -49,7 +49,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: common.h,v 1.45 2002-11-04 13:57:10 eku Exp $
|
||||
$Id: common.h,v 1.46 2002-11-06 07:08:44 eku Exp $
|
||||
*/
|
||||
|
||||
#ifndef JRD_COMMON_H
|
||||
@ -227,15 +227,6 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define MOVE_FASTER(from,to,length) memcpy (to, from, (int) (length))
|
||||
#define MOVE_CLEAR(to,length) memset (to, 0, (int) (length))
|
||||
|
||||
#if 0 /* sys/param included up top, wait till John says if need #define. MOD 16-07-2001 */
|
||||
#ifdef DARWIN
|
||||
#define _PPC_PARAM_H_
|
||||
#endif
|
||||
#ifndef MAXPATHLEN
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef RETSIGTYPE (*SIG_FPTR) (int);
|
||||
#endif /* Darwin Platforms */
|
||||
|
||||
@ -590,10 +581,6 @@ typedef unsigned __int64 UINT64;
|
||||
//#define BOOLEAN_DEFINED
|
||||
//typedef unsigned char BOOLEAN;
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 260
|
||||
#endif
|
||||
|
||||
typedef RETSIGTYPE (CLIB_ROUTINE * SIG_FPTR) (int);
|
||||
#endif /* WIN_NT */
|
||||
|
||||
@ -617,10 +604,6 @@ typedef RETSIGTYPE (CLIB_ROUTINE * SIG_FPTR) (int);
|
||||
#define KILLER_SIGNALS
|
||||
#define SYSV_SIGNALS
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#define I386 1
|
||||
#define UNIX 1
|
||||
#define CURSES_KEYPAD 1
|
||||
@ -657,9 +640,6 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define MOVE_FASTER(from,to,length) memcpy (to, from, (unsigned int) (length))
|
||||
#define MOVE_CLEAR(to,length) memset (to, 0, (unsigned int) (length))
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
/* These functions are supported so we don't need the defines
|
||||
#define setreuid(ruid,euid) setuid(euid)
|
||||
#define setregid(rgid,egid) setgid(egid)
|
||||
@ -680,10 +660,6 @@ typedef RETSIGTYPE (*SIG_FPTR) ();
|
||||
#define IMPLEMENTATION isc_info_db_impl_alpha_osf /* 52 */
|
||||
#define IEEE
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#define MEMMOVE(from,to,length) memmove ((void *)to, (void *)from, (size_t) length)
|
||||
#define MOVE_FAST(from,to,length) memcpy (to, from, (int) (length))
|
||||
#define MOVE_FASTER(from,to,length) memcpy (to, from, (int) (length))
|
||||
@ -1058,10 +1034,6 @@ void GDS_breakpoint(int);
|
||||
#define ISC_EXT_LIB_PATH_ENV "INTERBASE_EXT_LIB_PATH"
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#define ISC_STATUS_LENGTH 20
|
||||
|
||||
/* switch name and state table. This structure should be used in all
|
||||
|
@ -328,10 +328,6 @@ static void validate_memory(void);
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifndef GENERIC_SQLCODE
|
||||
#define GENERIC_SQLCODE -999
|
||||
#endif
|
||||
|
@ -93,7 +93,6 @@ typedef struct itm {
|
||||
|
||||
#if (defined NFS || defined FREEBSD || defined NETBSD || defined SINIXZ)
|
||||
#include <pwd.h>
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifdef hpux
|
||||
@ -218,17 +217,9 @@ extern struct passwd *getpwnam(), *getpwuid();
|
||||
#ifndef TEXT
|
||||
#define TEXT SCHAR
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN _MAX_PATH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 512
|
||||
#endif
|
||||
|
||||
#ifndef MAXHOSTLEN
|
||||
#define MAXHOSTLEN 64
|
||||
#endif
|
||||
|
@ -110,10 +110,6 @@ defined APIs for this function.
|
||||
#define TEXT char
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#define QATEST_testing 0
|
||||
#define QATEST_delete_database 1
|
||||
#define QATEST_delete_shadow 2
|
||||
|
@ -132,10 +132,6 @@
|
||||
#define SYS_ERR isc_arg_unix
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 256
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
#define waitpid(x,y,z) wait (y)
|
||||
#endif
|
||||
|
@ -98,7 +98,6 @@ extern "C" {
|
||||
#define THD_MUTEX_DESTROY(mutx)
|
||||
#endif
|
||||
|
||||
#define MAXPATHLEN 1024
|
||||
#define IO_RETRY 20
|
||||
|
||||
#ifdef O_SYNC
|
||||
@ -754,7 +753,7 @@ int PIO_read(FIL file, BDB bdb, PAG page, STATUS * status_vector)
|
||||
#ifndef PREAD_PWRITE
|
||||
THD_MUTEX_UNLOCK(file->fil_mutex);
|
||||
#endif
|
||||
if (bytes == -1 && !SYSCALL_INTERRUPTED(errno))
|
||||
if (bytes == -1U && !SYSCALL_INTERRUPTED(errno))
|
||||
return unix_error("read", file, isc_io_read_err,
|
||||
status_vector);
|
||||
}
|
||||
@ -773,7 +772,7 @@ int PIO_read(FIL file, BDB bdb, PAG page, STATUS * status_vector)
|
||||
break;
|
||||
THD_MUTEX_UNLOCK(file->fil_mutex);
|
||||
#endif
|
||||
if (bytes == -1 && !SYSCALL_INTERRUPTED(errno))
|
||||
if (bytes == -1U && !SYSCALL_INTERRUPTED(errno))
|
||||
return unix_error("read", file, isc_io_read_err,
|
||||
status_vector);
|
||||
}
|
||||
@ -847,7 +846,7 @@ int PIO_write(FIL file, BDB bdb, PAG page, STATUS * status_vector)
|
||||
break;
|
||||
THD_MUTEX_UNLOCK(file->fil_mutex);
|
||||
#endif
|
||||
if (bytes == -1 && !SYSCALL_INTERRUPTED(errno))
|
||||
if (bytes == -1U && !SYSCALL_INTERRUPTED(errno))
|
||||
return unix_error("write", file, isc_io_write_err,
|
||||
status_vector);
|
||||
}
|
||||
@ -866,7 +865,7 @@ int PIO_write(FIL file, BDB bdb, PAG page, STATUS * status_vector)
|
||||
break;
|
||||
THD_MUTEX_UNLOCK(file->fil_mutex);
|
||||
#endif
|
||||
if (bytes == -1 && !SYSCALL_INTERRUPTED(errno))
|
||||
if (bytes == -1U && !SYSCALL_INTERRUPTED(errno))
|
||||
return unix_error("write", file, isc_io_write_err,
|
||||
status_vector);
|
||||
}
|
||||
@ -976,7 +975,7 @@ static FIL seek_file(FIL file, BDB bdb, UINT64 * offset, STATUS * status_vector)
|
||||
#else
|
||||
THD_MUTEX_LOCK(file->fil_mutex);
|
||||
|
||||
if ((lseek(file->fil_desc, LSEEK_OFFSET_CAST lseek_offset, 0)) == -1) {
|
||||
if ((lseek(file->fil_desc, LSEEK_OFFSET_CAST lseek_offset, 0)) == (off_t)-1) {
|
||||
THD_MUTEX_UNLOCK(file->fil_mutex);
|
||||
return (FIL) unix_error("lseek", file, isc_io_access_err,
|
||||
status_vector);
|
||||
|
@ -39,7 +39,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: why.c,v 1.21 2002-10-31 05:05:57 seanleyne Exp $
|
||||
$Id: why.c,v 1.22 2002-11-06 07:08:45 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -109,10 +109,6 @@ $Id: why.c,v 1.21 2002-10-31 05:05:57 seanleyne Exp $
|
||||
#define TEXT SCHAR
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifndef F_OK
|
||||
#define F_OK 0
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: y-valve.cpp,v 1.14 2002-10-31 05:05:57 seanleyne Exp $
|
||||
$Id: y-valve.cpp,v 1.15 2002-11-06 07:08:45 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -104,10 +104,6 @@ $Id: y-valve.cpp,v 1.14 2002-10-31 05:05:57 seanleyne Exp $
|
||||
#define TEXT SCHAR
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifndef F_OK
|
||||
#define F_OK 0
|
||||
#endif
|
||||
|
@ -29,7 +29,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: lock.cpp,v 1.20 2002-11-04 11:19:08 eku Exp $
|
||||
$Id: lock.cpp,v 1.21 2002-11-06 07:08:46 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -184,10 +184,6 @@ SSHORT LOCK_debug_level = 0;
|
||||
#define MUTEX LOCK_header->lhb_mutex
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 256
|
||||
#endif
|
||||
|
||||
#ifndef SV_INTERRUPT
|
||||
#define SV_INTERRUPT 0
|
||||
#endif
|
||||
|
@ -69,10 +69,6 @@
|
||||
#define FPRINTF ib_fprintf
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 256
|
||||
#endif
|
||||
|
||||
typedef IB_FILE *OUTFILE;
|
||||
|
||||
#define SW_I_ACQUIRE 1
|
||||
|
@ -43,12 +43,6 @@
|
||||
#define FOPEN_READ_TYPE "r"
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 256
|
||||
#endif
|
||||
|
||||
//extern LHB ISC_map_file();
|
||||
|
||||
static USHORT sw_requests, sw_processes, sw_locks, sw_series, sw_history,
|
||||
sw_mutex;
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* $Id: head.cpp,v 1.14 2002-10-30 06:40:50 seanleyne Exp $ */
|
||||
/* $Id: head.cpp,v 1.15 2002-11-06 07:08:46 eku Exp $ */
|
||||
|
||||
#include "firebird.h"
|
||||
#include "../jrd/ib_stdio.h"
|
||||
@ -97,10 +97,6 @@
|
||||
#define GDS_SERVER "GDS_BRIDGE"
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 256
|
||||
#endif
|
||||
|
||||
#define ESTABLISH_PIPES { \
|
||||
if (!read_pipe || !write_pipe) \
|
||||
{ \
|
||||
|
@ -41,7 +41,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: inet.cpp,v 1.33 2002-11-04 11:19:16 eku Exp $
|
||||
$Id: inet.cpp,v 1.34 2002-11-06 07:08:47 eku Exp $
|
||||
*/
|
||||
#include "firebird.h"
|
||||
#include "../jrd/ib_stdio.h"
|
||||
@ -74,14 +74,11 @@ $Id: inet.cpp,v 1.33 2002-11-04 11:19:16 eku Exp $
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_GRP_H
|
||||
#include <grp.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
@ -341,10 +338,6 @@ static ULONG inet_debug_timer(void)
|
||||
//SLONG INET_max_data;
|
||||
//SLONG INET_remote_buffer;
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifndef MAXHOSTLEN
|
||||
#define MAXHOSTLEN 64
|
||||
#endif
|
||||
|
@ -100,10 +100,6 @@ static USHORT ostype = 0;
|
||||
#define MAX_USER_LENGTH 33
|
||||
#define MAX_OTHER_PARAMS (1+1+sizeof(port->port_dummy_packet_interval))
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
|
||||
static RVNT add_event(PORT);
|
||||
|
@ -49,7 +49,6 @@
|
||||
#define BUFFER_SIZE MAX_DATA
|
||||
#define MAX_SEQUENCE 256
|
||||
#define MAX_PACKETLEN 2048
|
||||
#define MAXPATHLEN 64
|
||||
#define MAXHOSTLEN 64
|
||||
#define MAXLOGINLEN 27
|
||||
#define RPM_STRLEN 6
|
||||
|
@ -67,10 +67,6 @@
|
||||
#define BUFFER_SIZE MAX_DATA
|
||||
#define MAX_SEQUENCE 256
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#ifndef MAXHOSTLEN
|
||||
#define MAXHOSTLEN 64
|
||||
#endif
|
||||
|
@ -96,10 +96,6 @@ extern "C" {
|
||||
#define INVALID_SOCKET -1
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
extern int xdrmem_create();
|
||||
|
||||
static int accept_connection(PORT, P_CNCT *);
|
||||
|
@ -21,7 +21,7 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
/*
|
||||
$Id: util.cpp,v 1.7 2002-09-18 12:50:05 eku Exp $
|
||||
$Id: util.cpp,v 1.8 2002-11-06 07:08:47 eku Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -64,11 +64,6 @@ $Id: util.cpp,v 1.7 2002-09-18 12:50:05 eku Exp $
|
||||
#include "../jrd/gds_proto.h"
|
||||
#include "../jrd/isc_proto.h"
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
pid_t UTIL_start_process(char *process, char **argv)
|
||||
{
|
||||
|
@ -47,10 +47,6 @@
|
||||
#define SYS_ERR gds_arg_unix
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#define MAX_JRN_INIT_DATA 2 * (MAXPATHLEN + 2)
|
||||
|
||||
#define WALS_VERSION1 1
|
||||
|
Loading…
Reference in New Issue
Block a user