~ubuntu-branches/ubuntu/natty/psqlodbc/natty

« back to all changes in this revision

Viewing changes to debian/patches/20_psqlodbc-64bit.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Peter Eisentraut
  • Date: 2004-11-14 16:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20041114161231-hurw3wphq2vr9sr4
Tags: 1:07.03.0200-5
* Corrected license to old LGPL 2
* Big debian/rules modernization
* Moved odbc.ini.template to examples directory
* Converted to dpatch
* Added update of config.{guess,sub}
* Renamed unixodbc.HOWTO to README.Debian; revised
* Moved installation to /usr/lib/odbc; added symlink to old location
  for compatibility
* Dropped postgresql-dev dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 10_psqlodbc-64bit.dpatch by Peter Eisentraut <peter_e@gmx.net>
 
3
##
 
4
## DP: fixes several misguided assumptions that sizeof(long)==4 (bug #254847)
 
5
 
 
6
@DPATCH@
 
7
diff -urNad psqlodbc-07.03.0200/connection.h /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/connection.h
 
8
--- psqlodbc-07.03.0200/connection.h    2003-09-15 10:25:03.000000000 +0200
 
9
+++ /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/connection.h   2004-11-12 20:15:47.000000000 +0100
 
10
@@ -308,7 +308,7 @@
 
11
        int                     lobj_type;
 
12
        int                     ntables;
 
13
        COL_INFO  **col_info;
 
14
-       long            translation_option;
 
15
+       UDWORD          translation_option;
 
16
        HINSTANCE       translation_handle;
 
17
        DataSourceToDriverProc DataSourceToDriver;
 
18
        DriverToDataSourceProc DriverToDataSource;
 
19
diff -urNad psqlodbc-07.03.0200/dlg_specific.c /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/dlg_specific.c
 
20
--- psqlodbc-07.03.0200/dlg_specific.c  2003-08-27 12:17:53.000000000 +0200
 
21
+++ /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/dlg_specific.c 2004-11-12 20:15:47.000000000 +0100
 
22
@@ -127,7 +127,7 @@
 
23
        /* Abbrebiation is needed ? */
 
24
        if (abbrev || strlen(connect_string) >= len)
 
25
        {
 
26
-               unsigned long flag = 0;
 
27
+               UInt4 flag = 0;
 
28
                if (ci->disallow_premature)
 
29
                        flag |= BIT_DISALLOWPREMATURE;
 
30
                if (ci->allow_keyset)
 
31
@@ -207,7 +207,7 @@
 
32
 unfoldCXAttribute(ConnInfo *ci, const char *value)
 
33
 {
 
34
        int             count;
 
35
-       unsigned long   flag;
 
36
+       UInt4           flag;
 
37
 
 
38
        if (strlen(value) < 2)
 
39
        {
 
40
diff -urNad psqlodbc-07.03.0200/psqlodbc.h /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/psqlodbc.h
 
41
--- psqlodbc-07.03.0200/psqlodbc.h      2003-08-27 12:17:53.000000000 +0200
 
42
+++ /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/psqlodbc.h     2004-11-12 20:15:47.000000000 +0100
 
43
@@ -5,7 +5,7 @@
 
44
  *
 
45
  * Comments:           See "notice.txt" for copyright and license information.
 
46
  *
 
47
- * $Id: psqlodbc.h,v 1.78 2003/08/27 10:17:53 hinoue Exp $
 
48
+ * $Id: psqlodbc.h,v 1.1.1.1 2004/01/22 15:02:52 mpitt Exp $
 
49
  *
 
50
  */
 
51
 
 
52
@@ -56,28 +56,34 @@
 
53
 #include "gpps.h"
 
54
 #endif
 
55
 
 
56
+
 
57
 #ifndef WIN32
 
58
-#define Int4 long int
 
59
-#define UInt4 unsigned int
 
60
-#define Int2 short
 
61
-#define UInt2 unsigned short
 
62
 
 
63
-#if !defined(WITH_UNIXODBC) && !defined(WITH_IODBC)
 
64
+# if defined(HAVE_INTTYPES_H)
 
65
+#  include <inttypes.h>
 
66
+# else
 
67
+#  if defined(HAVE_STDINT_H)
 
68
+#   include <stdint.h>
 
69
+#  endif
 
70
+# endif
 
71
+
 
72
+# define Int4 int32_t
 
73
+# define UInt4 uint32_t
 
74
+# define Int2 int16_t
 
75
+# define UInt2 uint16_t
 
76
+
 
77
+# if !defined(WITH_UNIXODBC) && !defined(WITH_IODBC)
 
78
 typedef float SFLOAT;
 
79
 typedef double SDOUBLE;
 
80
-#endif
 
81
+# endif
 
82
 
 
83
-#ifndef CALLBACK
 
84
-#define CALLBACK
 
85
-#endif
 
86
+# ifndef CALLBACK
 
87
+#  define CALLBACK
 
88
+# endif
 
89
 
 
90
-#else
 
91
-#define Int4 int
 
92
-#define UInt4 unsigned int
 
93
-#define Int2 short
 
94
-#define UInt2 unsigned short
 
95
 #endif
 
96
 
 
97
+
 
98
 typedef UInt4 Oid;
 
99
 
 
100
 #ifndef WIN32
 
101
diff -urNad psqlodbc-07.03.0200/socket.c /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/socket.c
 
102
--- psqlodbc-07.03.0200/socket.c        2002-11-06 10:44:55.000000000 +0100
 
103
+++ /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/socket.c       2004-11-12 20:15:47.000000000 +0100
 
104
@@ -117,7 +117,11 @@
 
105
 #else
 
106
     struct hostent* hp;
 
107
 #endif 
 
108
-       unsigned long iaddr;
 
109
+#ifdef WIN32
 
110
+       UInt4   iaddr;
 
111
+#else
 
112
+       in_addr_t iaddr;
 
113
+#endif
 
114
 
 
115
        if (self->socket != -1)
 
116
        {
 
117
diff -urNad psqlodbc-07.03.0200/statement.c /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/statement.c
 
118
--- psqlodbc-07.03.0200/statement.c     2003-09-15 10:25:03.000000000 +0200
 
119
+++ /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/statement.c    2004-11-12 20:15:47.000000000 +0100
 
120
@@ -838,7 +838,7 @@
 
121
  *     just the current row number.  But it could be more sophisticated
 
122
  *     someday, such as mapping a key to a 32 bit value
 
123
  */
 
124
-unsigned long
 
125
+UInt4
 
126
 SC_get_bookmark(StatementClass *self)
 
127
 {
 
128
        return (self->currTuple + 1);
 
129
diff -urNad psqlodbc-07.03.0200/statement.h /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/statement.h
 
130
--- psqlodbc-07.03.0200/statement.h     2003-09-24 05:47:30.000000000 +0200
 
131
+++ /tmp/dpep.AqWwq0/psqlodbc-07.03.0200/statement.h    2004-11-12 20:15:47.000000000 +0100
 
132
@@ -289,7 +289,7 @@
 
133
 void           SC_free_params(StatementClass *self, char option);
 
134
 void           SC_log_error(const char *func, const char *desc, const StatementClass *self);
 
135
 time_t         SC_get_time(StatementClass *self);
 
136
-unsigned long SC_get_bookmark(StatementClass *self);
 
137
+UInt4          SC_get_bookmark(StatementClass *self);
 
138
 RETCODE                SC_pos_update(StatementClass *self, UWORD irow, UDWORD index);
 
139
 RETCODE                SC_pos_delete(StatementClass *self, UWORD irow, UDWORD index);
 
140
 RETCODE                SC_pos_refresh(StatementClass *self, UWORD irow, UDWORD index);