SOURCES: Firebird-fix-os-detection.dpatch (NEW), Firebird-fix-pthr...
arekm
arekm at pld-linux.org
Tue Mar 28 20:24:57 CEST 2006
Author: arekm Date: Tue Mar 28 18:24:57 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- new (from debian); updated
---- Files affected:
SOURCES:
Firebird-fix-os-detection.dpatch (NONE -> 1.1) (NEW), Firebird-fix-pthreads-detect.dpatch (NONE -> 1.1) (NEW), Firebird-link-with-g++.dpatch (NONE -> 1.1) (NEW), Firebird-no-custom-errno-and-sys_XXerrXX.dpatch (NONE -> 1.1) (NEW), Firebird-opt-bypass-redundant-sort.dpatch (NONE -> 1.1) (NEW), Firebird-security-remote-preauth-crash.dpatch (NONE -> 1.1) (NEW), Firebird-separate-file-and-sem-perms.dpatch (NONE -> 1.1) (NEW), Firebird-gcc4.patch (1.3 -> 1.4)
---- Diffs:
================================================================
Index: SOURCES/Firebird-fix-os-detection.dpatch
diff -u /dev/null SOURCES/Firebird-fix-os-detection.dpatch:1.1
--- /dev/null Tue Mar 28 20:24:57 2006
+++ SOURCES/Firebird-fix-os-detection.dpatch Tue Mar 28 20:24:52 2006
@@ -0,0 +1,59 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 006_fix-os-detection.dpatch by <divanov at creditreform.bg>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix OS detection in configure and configure.in
+
+ at DPATCH@
+
+--- firebird2-1.5.2.orig/src/extern/editline/configure
++++ firebird2-1.5.2/src/extern/editline/configure
+@@ -894,7 +894,7 @@
+ *-*-freebsd*)
+ ABI="elf"
+ ;;
+- *-*-linux*)
++ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ ABI="elf"
+ ;;
+ *-*-netbsd*)
+--- firebird2-1.5.2.orig/src/extern/editline/configure.in
++++ firebird2-1.5.2/src/extern/editline/configure.in
+@@ -32,7 +32,7 @@
+ *-*-freebsd*)
+ ABI="elf"
+ ;;
+- *-*-linux*)
++ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ ABI="elf"
+ ;;
+ *-*-netbsd*)
+--- firebird2-1.5.2.orig/configure.in
++++ firebird2-1.5.2/configure.in
+@@ -58,7 +58,7 @@
+ SHRLIB_EXT=so
+ ;;
+
+- x86_64*-*-linux*)
++ x86_64*-*-linux* | x86_64*-*-gnu* | x86_64*-*-k*bsd*-gnu)
+ MAKEFILE_PREFIX=linux_amd64
+ INSTALL_PREFIX=linux
+ PLATFORM=LINUX
+@@ -70,7 +70,7 @@
+ CPU_TYPE=amd64
+ ;;
+
+- sparc*-*-linux*)
++ sparc*-*-linux* | sparc*-*-gnu* | sparc*-*-k*bsd*-gnu)
+ MAKEFILE_PREFIX=linux_sparc32
+ INSTALL_PREFIX=linux
+ PLATFORM=LINUX
+@@ -80,7 +80,7 @@
+ SHRLIB_EXT=so
+ ;;
+
+- *-*-linux*)
++ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ MAKEFILE_PREFIX=linux
+ PLATFORM=LINUX
+ AC_DEFINE(LINUX)
================================================================
Index: SOURCES/Firebird-fix-pthreads-detect.dpatch
diff -u /dev/null SOURCES/Firebird-fix-pthreads-detect.dpatch:1.1
--- /dev/null Tue Mar 28 20:24:57 2006
+++ SOURCES/Firebird-fix-pthreads-detect.dpatch Tue Mar 28 20:24:52 2006
@@ -0,0 +1,58 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 005_fix-pthreads-detect.dpatch by <divanov at creditreform.bg>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix pthreads detection
+
+ at DPATCH@
+
+--- firebird2-1.5.2.orig/src/common/classes/locks.h
++++ firebird2-1.5.2/src/common/classes/locks.h
+@@ -29,24 +29,22 @@
+ #include "firebird.h"
+
+ #ifdef MULTI_THREAD
+-#ifdef WIN_NT
++#if defined(WIN_NT)
+ // It is relatively easy to avoid using this header. Maybe do the same stuff like
+ // in thd.h ? This is Windows platform maintainers choice
+ #include <windows.h>
+-#else
+-#ifndef SOLARIS
+-#include <pthread.h>
+-#else
++#elif defined(SOLARIS)
+ #include <thread.h>
+ #include <synch.h>
+-#endif
++#else
++#include <pthread.h>
+ #endif
+ #endif /* MULTI_THREAD */
+
+ namespace Firebird {
+
+ #ifdef MULTI_THREAD
+-#ifdef WIN_NT
++#if defined(WIN_NT)
+
+ /* Process-local spinlock. Used to manage memory heaps in threaded environment. */
+ // Windows version of the class
+@@ -77,7 +75,7 @@
+
+ /* Process-local spinlock. Used to manage memory heaps in threaded environment. */
+ // Pthreads version of the class
+-#if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD)
++#if !defined(SOLARIS) && !defined(DARWIN) && !defined(FREEBSD) && !defined(_POSIX_THREAD_IS_GNU_PTH)
+ class Spinlock {
+ private:
+ pthread_spinlock_t spinlock;
+@@ -124,7 +122,7 @@
+ system_call_failed::raise();
+ }
+ };
+-#else // DARWIN and FREEBSD
++#else // DARWIN, FREEBSD and gnu pth
+ class Spinlock {
+ private:
+ pthread_mutex_t mlock;
================================================================
Index: SOURCES/Firebird-link-with-g++.dpatch
diff -u /dev/null SOURCES/Firebird-link-with-g++.dpatch:1.1
--- /dev/null Tue Mar 28 20:24:57 2006
+++ SOURCES/Firebird-link-with-g++.dpatch Tue Mar 28 20:24:52 2006
@@ -0,0 +1,32 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 008_link-with-g++.dpatch by <divanov at creditreform.bg>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: use g++ to link objects
+
+ at DPATCH@
+
+--- firebird2-1.5.2.orig/builds/posix/make.rules
++++ firebird2-1.5.2/builds/posix/make.rules
+@@ -91,16 +91,16 @@
+ ifdef UseLibToolForLink
+
+
+- LIB_LINK= libtool $(CC(
+- STATICLIB_LINK = libtool $(CC) -all-static
++ LIB_LINK= libtool $(CXX)
++ STATICLIB_LINK = libtool $(CXX) -all-static
+ # LIB_LINK_OPTIONS = -version-info 0:0:0 -release 1.5.0.0 -rpath /usr/lib
+ LIB_LINK_OPTIONS += -version-info 0:0:0 -release 1.5.0.0 $(LIB_LINK_RPATH)$(FirebirdInstallPrefix)/lib
+
+- EXE_LINK = libtool $(CC)
+- STATICEXE_LINK = libtool $(CC) -all-static
++ EXE_LINK = libtool $(CXX)
++ STATICEXE_LINK = libtool $(CXX) -all-static
+ else
+
+- LIB_LINK= $(CC)
++ LIB_LINK= $(CXX)
+ STATICLIB_LINK= ar cruvs
+ # LIB_LINK_OPTIONS = -soname libgds.$(SHRLIB_EXT) -rpath /usr/lib
+ # LIB_LINK_OPTIONS = -soname libgds.$(SHRLIB_EXT).2 -rpath /usr/lib
================================================================
Index: SOURCES/Firebird-no-custom-errno-and-sys_XXerrXX.dpatch
diff -u /dev/null SOURCES/Firebird-no-custom-errno-and-sys_XXerrXX.dpatch:1.1
--- /dev/null Tue Mar 28 20:24:57 2006
+++ SOURCES/Firebird-no-custom-errno-and-sys_XXerrXX.dpatch Tue Mar 28 20:24:52 2006
@@ -0,0 +1,201 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 003_no-custom-errno-and-sys_XXerrXX.dpatch by <divanov at creditreform.bg>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Remove declarations of errno, syserrlist, sysnerr
+
+ at DPATCH@
+
+--- firebird2-1.5.2.orig/src/jrd/gds.cpp
++++ firebird2-1.5.2/src/jrd/gds.cpp
+@@ -182,12 +182,6 @@
+
+ extern "C" {
+
+-#if !(defined VMS || defined WIN_NT || defined LINUX || defined FREEBSD || defined NETBSD || defined DARWIN )
+-extern int errno;
+-extern SCHAR *sys_errlist[];
+-extern int sys_nerr;
+-#endif
+-
+ #ifndef PRINTF
+ #define PRINTF ib_printf
+ #endif
+@@ -334,8 +328,6 @@
+ #define ib_printf (*_libgds_printf)
+ #define ib_fopen (*_libgds_fopen)
+ #define ib_fclose (*_libgds_fclose)
+-#define sys_nerr (*_libgds_sys_nerr)
+-#define sys_errlist (*_libgds_sys_errlist)
+ #define malloc (*_libgds_malloc)
+ #define gettimeofday(*_libgds_gettimeofday)
+ #define ctime (*_libgds_ctime)
+@@ -368,8 +360,6 @@
+ extern int ib_printf();
+ extern IB_FILE *ib_fopen();
+ extern int ib_fclose();
+-extern int sys_nerr;
+-extern SCHAR *sys_errlist[];
+ extern void *malloc();
+ extern int gettimeofday();
+ extern SCHAR *ctime();
+@@ -956,14 +946,7 @@
+ break;
+
+ case gds_arg_unix:
+- if (code > 0 && code < sys_nerr && (p = (TEXT*)sys_errlist[code]))
+- strcpy(s, p);
+- else if (code == 60)
+- strcpy(s, "connection timed out");
+- else if (code == 61)
+- strcpy(s, "connection refused");
+- else
+- sprintf(s, "unknown unix error %ld", code); /* TXNN */
++ sprintf(s, "%s", strerror (code));
+ break;
+
+ case gds_arg_dos:
+--- firebird2-1.5.2.orig/src/jrd/shrinit.cpp
++++ firebird2-1.5.2/src/jrd/shrinit.cpp
+@@ -70,8 +70,6 @@
+ void (*_libgds_rewind) () = 0;
+ int (*_libgds_fseek) () = 0;
+ int (*_libgds__flsbuf) () = 0;
+-SCHAR(**_libgds_sys_errlist) = 0;
+-int *_libgds_sys_nerr = 0;
+ void *(*_libgds_malloc) () = 0;
+ int (*_libgds_gettimeofday) () = 0;
+ SCHAR *(*_libgds_ctime) () = 0;
+--- firebird2-1.5.2.orig/src/extern/editline/sys.h
++++ firebird2-1.5.2/src/extern/editline/sys.h
+@@ -124,11 +124,8 @@
+ extern int fflush(FILE *);
+ extern int tolower(int);
+ extern int toupper(int);
+-extern int errno, sys_nerr;
+-extern char *sys_errlist[];
+ extern void perror(const char *);
+ # include <string.h>
+-# define strerror(e) sys_errlist[e]
+ # endif
+ # ifdef SABER
+ extern ptr_t memcpy(ptr_t, const ptr_t, size_t);
+--- firebird2-1.5.2.orig/src/utilities/rebuild.cpp
++++ firebird2-1.5.2/src/utilities/rebuild.cpp
+@@ -56,8 +56,6 @@
+
+ IB_FILE *dbg_file;
+
+-extern SCHAR *sys_errlist[];
+-
+ static void checksum(RBDB, ULONG, ULONG, UCHAR);
+ static USHORT compute_checksum(RBDB, PAG);
+ static void db_error(int);
+@@ -536,7 +534,7 @@
+ *
+ **************************************/
+
+- ib_printf(sys_errlist[status]);
++ ib_printf(strerror (status));
+ exit(FINI_ERROR);
+ }
+
+--- firebird2-1.5.2.orig/src/utilities/analyse.cpp
++++ firebird2-1.5.2/src/utilities/analyse.cpp
+@@ -47,8 +47,6 @@
+ #include "jrd.h"
+ #include "ods.h"
+
+-extern SCHAR *sys_errlist[];
+-
+ static void analyse(int, SCHAR *, PAG, int);
+ static SLONG get_long(void);
+ static void db_error(int);
+@@ -290,7 +288,7 @@
+ *
+ **************************************/
+
+- ib_printf(sys_errlist[status]);
++ ib_printf(strerror (status));
+ abort();
+ }
+
+--- firebird2-1.5.2.orig/src/utilities/dba_full.epp
++++ firebird2-1.5.2/src/utilities/dba_full.epp
+@@ -63,8 +63,6 @@
+
+ #if (defined WIN_NT)
+ #include <stdlib.h>
+-#else
+-extern SCHAR *sys_errlist[];
+ #endif
+
+ typedef struct dba_rel {
+@@ -1122,7 +1120,7 @@
+ tddba = GET_THREAD_DATA;
+
+ #ifndef VMS
+- FPRINTF(tddba->sw_outfile, "%s\n", sys_errlist[status]);
++ FPRINTF(tddba->sw_outfile, "%s\n", strerror (status));
+ #else
+ if ((p = strerror(status)) || (p = strerror(EVMSERR, status)))
+ FPRINTF(tddba->sw_outfile, "%s\n", p);
+--- firebird2-1.5.2.orig/src/utilities/sbc_print.cpp
++++ firebird2-1.5.2/src/utilities/sbc_print.cpp
+@@ -69,10 +69,6 @@
+
+ #define DEFAULT_SIZE 8192
+
+-#if !(defined WIN_NT)
+-extern SCHAR *sys_errlist[];
+-#endif
+-
+ static void cache_init(void);
+ static void db_get_sbc(SCHAR *, SCHAR *, SLONG *, SSHORT *);
+
+@@ -490,7 +486,7 @@
+ SCHAR *p;
+
+ #ifndef VMS
+- ib_printf(sys_errlist[status]);
++ ib_printf(strerror (status));
+ #else
+ if ((p = strerror(status)) || (p = strerror(EVMSERR, status)))
+ ib_printf("%s\n", p);
+--- firebird2-1.5.2.orig/src/utilities/dba.epp
++++ firebird2-1.5.2/src/utilities/dba.epp
+@@ -1520,7 +1520,7 @@
+ tddba->page_number = -1;
+
+ #ifndef VMS
+- FPRINTF(tddba->sw_outfile, "%s\n", sys_errlist[status]);
++ FPRINTF(tddba->sw_outfile, "%s\n", strerror (status));
+ #else
+ if ((p = strerror(status)) || (p = strerror(EVMSERR, status)))
+ FPRINTF(tddba->sw_outfile, "%s\n", p);
+--- firebird2-1.5.2.orig/src/lock/lock.cpp
++++ firebird2-1.5.2/src/lock/lock.cpp
+@@ -338,14 +338,12 @@
+
+
+ #ifdef SHLIB_DEFS
+-#define sys_errlist (*_libgds_sys_errlist)
+ #define waitpid (*_libgds_waitpid)
+ #define execl (*_libgds_execl)
+ #define _exit (*_libgds__exit)
+ #define statistics (*_libgds_stat)
+ #define chmod (*_libgds_chmod)
+
+-extern SCHAR *sys_errlist[];
+ extern int waitpid();
+ extern int execl();
+ extern void _exit();
+@@ -2067,7 +2065,7 @@
+
+ #if !(defined WIN_NT)
+ if (errno > 0)
+- ib_fprintf(ib_stderr, "--%s\n", sys_errlist[errno]);
++ ib_fprintf(ib_stderr, "--%s\n", strerror (errno));
+ #endif
+
+ #ifdef DEV_BUILD
================================================================
Index: SOURCES/Firebird-opt-bypass-redundant-sort.dpatch
diff -u /dev/null SOURCES/Firebird-opt-bypass-redundant-sort.dpatch:1.1
--- /dev/null Tue Mar 28 20:24:57 2006
+++ SOURCES/Firebird-opt-bypass-redundant-sort.dpatch Tue Mar 28 20:24:52 2006
@@ -0,0 +1,103 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 009_opt-bypass-redundant-sort.dpatch by <divanov at creditreform.bg>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: RP: optimize sort with OUTER JOIN if all the fields in the sort list
+## DP: are from one stream, check the stream is the most outer stream, if true
+## DP: update rse and ignore the sort
+
+ at DPATCH@
+
+--- firebird2-1.5.2.orig/src/jrd/opt.cpp
++++ firebird2-1.5.2/src/jrd/opt.cpp
+@@ -1518,7 +1518,89 @@
+ set_position(sort, project, NULL);
+ sort = rse->rse_sorted = NULL;
+ }
+- }
++ }
++
++ // RP: optimize sort with OUTER JOIN
++ // if all the fields in the sort list are from one stream, check the stream is
++ // the most outer stream, if true update rse and ignore the sort
++ if (sort) {
++ UCHAR sort_stream = 0;
++ bool usableSort = true;
++ sort_ptr = sort->nod_arg;
++ sort_end = sort_ptr + sort->nod_count;
++ for (; sort_ptr < sort_end; sort_ptr++) {
++ if ((*sort_ptr)->nod_type == nod_field) {
++ // Get stream for this field at this position.
++ const UCHAR current_stream = (UCHAR)(IPTR)(*sort_ptr)->nod_arg[e_fld_stream];
++ // If this is the first position node, save this stream.
++ if (sort_ptr == sort->nod_arg) {
++ sort_stream = current_stream;
++ }
++ else if (current_stream != sort_stream) {
++ // If the current stream is different then the previous stream
++ // then we can't use this sort for an indexed order retrieval.
++ usableSort = false;
++ break;
++ }
++ }
++ else {
++ // This position doesn't use a simple field, thus we can't use
++ // any index for the sort.
++ usableSort = false;
++ break;
++ }
++ }
++
++ if (usableSort) {
++ RSE new_rse = NULL;
++ JRD_NOD node = (JRD_NOD) rse;
++ while (node) {
++ if (node->nod_type == nod_rse) {
++ new_rse = (RSE) node;
++ if (new_rse->rse_jointype == blr_inner) {
++ if (new_rse->rse_count == 1) {
++ node = new_rse->rse_relation[0];
++ }
++ else {
++ bool sortStreamFound = false;
++ for (int i = 0; i < new_rse->rse_count; i++) {
++ JRD_NOD subNode = (JRD_NOD) new_rse->rse_relation[i];
++ if (subNode->nod_type == nod_relation &&
++ ((USHORT)(IPTR)subNode->nod_arg[e_rel_stream]) == sort_stream &&
++ new_rse != rse)
++ {
++ sortStreamFound = true;
++ break;
++ }
++
++ }
++ if (sortStreamFound) {
++ new_rse->rse_sorted = sort;
++ sort = rse->rse_sorted = NULL;
++ }
++ node = NULL;
++ }
++ }
++ else if (new_rse->rse_jointype == blr_left) {
++ node = new_rse->rse_relation[0];
++ }
++ else {
++ node = NULL;
++ }
++ }
++ else {
++ if (node->nod_type == nod_relation &&
++ ((USHORT)(IPTR)node->nod_arg[e_rel_stream]) == sort_stream &&
++ new_rse && new_rse != rse)
++ {
++ new_rse->rse_sorted = sort;
++ sort = rse->rse_sorted = NULL;
++ }
++ node = NULL;
++ }
++ }
++ }
++ }
+ }
+
+
================================================================
Index: SOURCES/Firebird-security-remote-preauth-crash.dpatch
diff -u /dev/null SOURCES/Firebird-security-remote-preauth-crash.dpatch:1.1
--- /dev/null Tue Mar 28 20:24:57 2006
+++ SOURCES/Firebird-security-remote-preauth-crash.dpatch Tue Mar 28 20:24:52 2006
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## security-remote-preauth-crash.dpatch by <divanov at creditreform.bg>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad firebird2-1.5.3.4870~/src/jrd/unix.cpp firebird2-1.5.3.4870/src/jrd/unix.cpp
+--- firebird2-1.5.3.4870~/src/jrd/unix.cpp 2004-03-29 06:50:11.000000000 +0300
++++ firebird2-1.5.3.4870/src/jrd/unix.cpp 2006-03-20 11:46:53.000000000 +0200
+@@ -643,6 +643,8 @@
+ if (string) {
+ ptr = string;
+ if (length) {
++ if (length >= sizeof(temp)) length = sizeof(temp) - 1;
++
+ MOVE_FAST(string, temp, length);
+ temp[length] = 0;
+ ptr = temp;
+@@ -651,6 +653,8 @@
+ else {
+ ptr = file_name;
+ if (file_length) {
++ if (file_length >= sizeof(temp)) file_length = sizeof(temp) - 1;
++
+ MOVE_FAST(file_name, temp, file_length);
+ temp[file_length] = 0;
+ ptr = temp;
================================================================
Index: SOURCES/Firebird-separate-file-and-sem-perms.dpatch
diff -u /dev/null SOURCES/Firebird-separate-file-and-sem-perms.dpatch:1.1
--- /dev/null Tue Mar 28 20:24:58 2006
+++ SOURCES/Firebird-separate-file-and-sem-perms.dpatch Tue Mar 28 20:24:52 2006
@@ -0,0 +1,124 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 004_separate_file_and_sem_perms.dpatch by <divanov at creditreform.bg>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Separate definitions for file and semaphore permissions
+
+ at DPATCH@
+
+--- firebird2-1.5.2.orig/src/jrd/isc_sync.cpp
++++ firebird2-1.5.2/src/jrd/isc_sync.cpp
+@@ -136,8 +136,20 @@
+ #endif
+
+ #define FTOK_KEY 15
+-#define PRIV 0666
+ #define LOCAL_SEMAPHORES 4
++#define FILE_PERM 0666
++#if defined(SEM_R) && defined(SEM_A)
++#define SEM_PERM SEM_R | SEM_A | (SEM_R>>3) | (SEM_A>>3) \
++ | (SEM_R>>6) | (SEM_A>>6)
++#else
++#define SEM_PERM FILE_PERM
++#endif
++#if defined(SHM_R) && defined(SHM_W)
++#define SHM_PERM SHM_R | SHM_W | (SHM_R>>3) | (SHM_W>>3) \
++ | (SHM_R>>6) | (SHM_W>>6)
++#else
++#define SHM_PERM FILE_PERM
++#endif
+
+ #ifndef GDS_RELAY
+ #define GDS_RELAY "/bin/gds_relay"
+@@ -2381,7 +2393,7 @@
+
+ /* Create the shared memory region if it doesn't already exist. */
+
+- if ((shmid = shmget(key, length, IPC_CREAT | PRIV)) == -1)
++ if ((shmid = shmget(key, length, IPC_CREAT | SHM_PERM)) == -1)
+ #ifdef SUPERSERVER
+ if (errno == EINVAL) {
+ /* There are two cases when shmget() returns EINVAL error:
+@@ -2428,7 +2440,7 @@
+ way to get shmid is to attach to the segment with zero
+ length
+ */
+- if ((shmid = shmget(key, 0, PRIV)) == -1) {
++ if ((shmid = shmget(key, 0, SHM_PERM)) == -1) {
+ error(status_vector, "shmget", errno);
+ ib_fclose(fp);
+ return NULL;
+@@ -2446,7 +2458,7 @@
+ we use IPC_EXCL flag to get an error if by some miracle
+ the sagment with the same key is already exists
+ */
+- if ((shmid = shmget(key, length, IPC_CREAT | IPC_EXCL | PRIV)) ==
++ if ((shmid = shmget(key, length, IPC_CREAT | IPC_EXCL | SHM_PERM)) ==
+ -1) {
+ error(status_vector, "shmget", errno);
+ ib_fclose(fp);
+@@ -2491,7 +2503,7 @@
+ return NULL;
+ }
+
+- if ((shmid = shmget(key, length, IPC_CREAT | IPC_EXCL | PRIV)) ==
++ if ((shmid = shmget(key, length, IPC_CREAT | IPC_EXCL | SHM_PERM)) ==
+ -1) {
+ error(status_vector, "shmget", errno);
+ ib_fclose(fp);
+@@ -2500,7 +2512,7 @@
+ }
+ else {
+ length = buf.shm_segsz;
+- if ((shmid = shmget(key, length, PRIV)) == -1) {
++ if ((shmid = shmget(key, length, SHM_PERM)) == -1) {
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/Firebird-gcc4.patch?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list