]> git.pld-linux.org Git - packages/Firebird.git/blame - Firebird-no-custom-errno-and-sys_XXerrXX.dpatch
- updated for 1.5.4.4910
[packages/Firebird.git] / Firebird-no-custom-errno-and-sys_XXerrXX.dpatch
CommitLineData
32938903
AM
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 003_no-custom-errno-and-sys_XXerrXX.dpatch by <divanov@creditreform.bg>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Remove declarations of errno, syserrlist, sysnerr
6
7@DPATCH@
8
5472bf2d
JB
9--- firebird-1.5.4.4910/src/jrd/gds.cpp.orig 2007-01-22 13:27:53.000000000 +0100
10+++ firebird-1.5.4.4910/src/jrd/gds.cpp 2007-02-17 23:09:07.007240730 +0100
11@@ -185,12 +185,6 @@
32938903
AM
12
13 extern "C" {
14
5472bf2d 15-#if !(defined VMS || defined WIN_NT || defined LINUX || defined FREEBSD || defined NETBSD || defined DARWIN || defined AIX || defined HP11)
32938903
AM
16-extern int errno;
17-extern SCHAR *sys_errlist[];
18-extern int sys_nerr;
19-#endif
20-
21 #ifndef PRINTF
22 #define PRINTF ib_printf
23 #endif
5472bf2d 24@@ -341,8 +335,6 @@
32938903
AM
25 #define ib_printf (*_libgds_printf)
26 #define ib_fopen (*_libgds_fopen)
27 #define ib_fclose (*_libgds_fclose)
28-#define sys_nerr (*_libgds_sys_nerr)
29-#define sys_errlist (*_libgds_sys_errlist)
30 #define malloc (*_libgds_malloc)
31 #define gettimeofday(*_libgds_gettimeofday)
32 #define ctime (*_libgds_ctime)
5472bf2d 33@@ -375,8 +367,6 @@
32938903
AM
34 extern int ib_printf();
35 extern IB_FILE *ib_fopen();
36 extern int ib_fclose();
37-extern int sys_nerr;
38-extern SCHAR *sys_errlist[];
39 extern void *malloc();
40 extern int gettimeofday();
41 extern SCHAR *ctime();
5472bf2d 42@@ -963,14 +953,7 @@
32938903
AM
43 break;
44
45 case gds_arg_unix:
46- if (code > 0 && code < sys_nerr && (p = (TEXT*)sys_errlist[code]))
47- strcpy(s, p);
48- else if (code == 60)
49- strcpy(s, "connection timed out");
50- else if (code == 61)
51- strcpy(s, "connection refused");
52- else
53- sprintf(s, "unknown unix error %ld", code); /* TXNN */
54+ sprintf(s, "%s", strerror (code));
55 break;
56
57 case gds_arg_dos:
58--- firebird2-1.5.2.orig/src/jrd/shrinit.cpp
59+++ firebird2-1.5.2/src/jrd/shrinit.cpp
60@@ -70,8 +70,6 @@
61 void (*_libgds_rewind) () = 0;
62 int (*_libgds_fseek) () = 0;
63 int (*_libgds__flsbuf) () = 0;
64-SCHAR(**_libgds_sys_errlist) = 0;
65-int *_libgds_sys_nerr = 0;
66 void *(*_libgds_malloc) () = 0;
67 int (*_libgds_gettimeofday) () = 0;
68 SCHAR *(*_libgds_ctime) () = 0;
69--- firebird2-1.5.2.orig/src/extern/editline/sys.h
70+++ firebird2-1.5.2/src/extern/editline/sys.h
71@@ -124,11 +124,8 @@
72 extern int fflush(FILE *);
73 extern int tolower(int);
74 extern int toupper(int);
75-extern int errno, sys_nerr;
76-extern char *sys_errlist[];
77 extern void perror(const char *);
78 # include <string.h>
79-# define strerror(e) sys_errlist[e]
80 # endif
81 # ifdef SABER
82 extern ptr_t memcpy(ptr_t, const ptr_t, size_t);
83--- firebird2-1.5.2.orig/src/utilities/rebuild.cpp
84+++ firebird2-1.5.2/src/utilities/rebuild.cpp
85@@ -56,8 +56,6 @@
86
87 IB_FILE *dbg_file;
88
89-extern SCHAR *sys_errlist[];
90-
91 static void checksum(RBDB, ULONG, ULONG, UCHAR);
92 static USHORT compute_checksum(RBDB, PAG);
93 static void db_error(int);
94@@ -536,7 +534,7 @@
95 *
96 **************************************/
97
98- ib_printf(sys_errlist[status]);
99+ ib_printf(strerror (status));
100 exit(FINI_ERROR);
101 }
102
103--- firebird2-1.5.2.orig/src/utilities/analyse.cpp
104+++ firebird2-1.5.2/src/utilities/analyse.cpp
105@@ -47,8 +47,6 @@
106 #include "jrd.h"
107 #include "ods.h"
108
109-extern SCHAR *sys_errlist[];
110-
111 static void analyse(int, SCHAR *, PAG, int);
112 static SLONG get_long(void);
113 static void db_error(int);
114@@ -290,7 +288,7 @@
115 *
116 **************************************/
117
118- ib_printf(sys_errlist[status]);
119+ ib_printf(strerror (status));
120 abort();
121 }
122
123--- firebird2-1.5.2.orig/src/utilities/dba_full.epp
124+++ firebird2-1.5.2/src/utilities/dba_full.epp
125@@ -63,8 +63,6 @@
126
127 #if (defined WIN_NT)
128 #include <stdlib.h>
129-#else
130-extern SCHAR *sys_errlist[];
131 #endif
132
133 typedef struct dba_rel {
134@@ -1122,7 +1120,7 @@
135 tddba = GET_THREAD_DATA;
136
137 #ifndef VMS
138- FPRINTF(tddba->sw_outfile, "%s\n", sys_errlist[status]);
139+ FPRINTF(tddba->sw_outfile, "%s\n", strerror (status));
140 #else
141 if ((p = strerror(status)) || (p = strerror(EVMSERR, status)))
142 FPRINTF(tddba->sw_outfile, "%s\n", p);
143--- firebird2-1.5.2.orig/src/utilities/sbc_print.cpp
144+++ firebird2-1.5.2/src/utilities/sbc_print.cpp
145@@ -69,10 +69,6 @@
146
147 #define DEFAULT_SIZE 8192
148
149-#if !(defined WIN_NT)
150-extern SCHAR *sys_errlist[];
151-#endif
152-
153 static void cache_init(void);
154 static void db_get_sbc(SCHAR *, SCHAR *, SLONG *, SSHORT *);
155
156@@ -490,7 +486,7 @@
157 SCHAR *p;
158
159 #ifndef VMS
160- ib_printf(sys_errlist[status]);
161+ ib_printf(strerror (status));
162 #else
163 if ((p = strerror(status)) || (p = strerror(EVMSERR, status)))
164 ib_printf("%s\n", p);
165--- firebird2-1.5.2.orig/src/utilities/dba.epp
166+++ firebird2-1.5.2/src/utilities/dba.epp
167@@ -1520,7 +1520,7 @@
168 tddba->page_number = -1;
169
170 #ifndef VMS
171- FPRINTF(tddba->sw_outfile, "%s\n", sys_errlist[status]);
172+ FPRINTF(tddba->sw_outfile, "%s\n", strerror (status));
173 #else
174 if ((p = strerror(status)) || (p = strerror(EVMSERR, status)))
175 FPRINTF(tddba->sw_outfile, "%s\n", p);
176--- firebird2-1.5.2.orig/src/lock/lock.cpp
177+++ firebird2-1.5.2/src/lock/lock.cpp
178@@ -338,14 +338,12 @@
179
180
181 #ifdef SHLIB_DEFS
182-#define sys_errlist (*_libgds_sys_errlist)
183 #define waitpid (*_libgds_waitpid)
184 #define execl (*_libgds_execl)
185 #define _exit (*_libgds__exit)
186 #define statistics (*_libgds_stat)
187 #define chmod (*_libgds_chmod)
188
189-extern SCHAR *sys_errlist[];
190 extern int waitpid();
191 extern int execl();
192 extern void _exit();
193@@ -2067,7 +2065,7 @@
194
195 #if !(defined WIN_NT)
196 if (errno > 0)
197- ib_fprintf(ib_stderr, "--%s\n", sys_errlist[errno]);
198+ ib_fprintf(ib_stderr, "--%s\n", strerror (errno));
199 #endif
200
201 #ifdef DEV_BUILD
This page took 0.079959 seconds and 4 git commands to generate.