~ubuntu-branches/ubuntu/trusty/expect/trusty

« back to all changes in this revision

Viewing changes to debian/patches/13-implicit-defs.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-08-03 12:00:29 UTC
  • Revision ID: james.westby@ubuntu.com-20090803120029-mdxnz1e7vyu06ji6
* Adding patch from Adam Tkac <atkac@redhat.com> to compile with
  tcl8.5, but not yet enabling it.
* Updating vcs fields in control file.
* Using patch-stamp rather than patch in rules file.
* Replacing obsolete dh_clean -k with dh_prep.
* Using correct rfc-2822 date formats in changelog.
* Updating package to standards version 3.8.2.
* Adding misc depends.
* Removing shlibs file.
* Using quilt rather than dpatch.
* Adding patch from fedora to fix header comments.
* Adding patch from fedora to fix permissions when accessing logfiles.
* Adding patch from Vitezslav Crhonek <vcrhonek@redhat.com> for tcl
  8.5.6, but not yet enabling it.
* Minimizing rules file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh /usr/share/dpatch/dpatch-run
2
 
## 13-implict-defs.dpatch by LaMont Jones <lamont@debian.org>
3
 
##
4
 
## DP: Fix implicit definitions throughout (Closes: #441115).
5
 
 
6
 
@DPATCH@
7
 
 
8
 
diff -Naur expect-5.43.orig/Dbg.c expect-5.43/Dbg.c
9
 
--- expect-5.43.orig/Dbg.c      2002-03-23 04:11:54.000000000 +0000
10
 
+++ expect-5.43/Dbg.c   2007-10-10 10:00:12.000000000 +0000
11
 
@@ -8,6 +8,7 @@
12
 
 
13
 
 */
14
 
 
15
 
+#include <unistd.h>
16
 
 #include <stdio.h>
17
 
 
18
 
 #include "tcldbgcf.h"
19
 
diff -Naur expect-5.43.orig/exp_chan.c expect-5.43/exp_chan.c
20
 
--- expect-5.43.orig/exp_chan.c 2007-10-10 10:00:23.000000000 +0000
21
 
+++ expect-5.43/exp_chan.c      2007-10-10 10:00:12.000000000 +0000
22
 
@@ -31,9 +31,11 @@
23
 
 
24
 
 #include "string.h"
25
 
 
26
 
+#include "expect.h"
27
 
 #include "exp_rename.h"
28
 
 #include "exp_prog.h"
29
 
 #include "exp_command.h"
30
 
+#include "exp_event.h"
31
 
 #include "exp_log.h"
32
 
 
33
 
 static int             ExpBlockModeProc _ANSI_ARGS_((ClientData instanceData,
34
 
diff -Naur expect-5.43.orig/exp_clib.c expect-5.43/exp_clib.c
35
 
--- expect-5.43.orig/exp_clib.c 2007-10-10 10:00:23.000000000 +0000
36
 
+++ expect-5.43/exp_clib.c      2007-10-10 10:00:12.000000000 +0000
37
 
@@ -7,6 +7,8 @@
38
 
 would appreciate credit if this program or parts of it are used.
39
 
 */
40
 
 
41
 
+#include <unistd.h>
42
 
+
43
 
 #include "expect_cf.h"
44
 
 #include <stdio.h>
45
 
 #include <setjmp.h>
46
 
@@ -116,7 +118,9 @@
47
 
 #include <stdlib.h>            /* for malloc */
48
 
 #endif
49
 
 
50
 
+#include "tcl.h"
51
 
 #include "expect.h"
52
 
+#include "exp_command.h"
53
 
 #define TclRegError exp_TclRegError
54
 
 
55
 
 /*
56
 
@@ -1463,6 +1467,7 @@
57
 
  * end of regexp definitions and code
58
 
  */
59
 
 
60
 
+#if 0
61
 
 /*
62
 
  * following stolen from tcl8.0.4/generic/tclPosixStr.c
63
 
  */
64
 
@@ -1919,6 +1924,7 @@
65
 
 #endif
66
 
     }
67
 
 }
68
 
+#endif
69
 
 
70
 
 /*
71
 
  * end of excerpt from tcl8.0.X/generic/tclPosixStr.c
72
 
diff -Naur expect-5.43.orig/exp_command.c expect-5.43/exp_command.c
73
 
--- expect-5.43.orig/exp_command.c      2007-10-10 10:00:23.000000000 +0000
74
 
+++ expect-5.43/exp_command.c   2007-10-10 10:00:12.000000000 +0000
75
 
@@ -29,7 +29,6 @@
76
 
 #  include <fcntl.h>
77
 
 #endif
78
 
 #include <sys/file.h>
79
 
-#include "exp_tty.h"
80
 
 
81
 
 #include <errno.h>
82
 
 #include <signal.h>
83
 
@@ -64,6 +63,7 @@
84
 
 /*                             objects to including varargs.h twice, just */
85
 
 /*                             omit this one. */
86
 
 
87
 
+#include "expect.h"
88
 
 #include "tcl.h"
89
 
 #include "string.h"
90
 
 #include "expect_tcl.h"
91
 
@@ -72,6 +72,7 @@
92
 
 #include "exp_command.h"
93
 
 #include "exp_log.h"
94
 
 #include "exp_event.h"
95
 
+#include "exp_tty_in.h"
96
 
 #include "exp_pty.h"
97
 
 #ifdef TCL_DEBUGGER
98
 
 #include "tcldbg.h"
99
 
diff -Naur expect-5.43.orig/exp_command.h expect-5.43/exp_command.h
100
 
--- expect-5.43.orig/exp_command.h      2007-10-10 10:00:23.000000000 +0000
101
 
+++ expect-5.43/exp_command.h   2007-10-10 10:00:12.000000000 +0000
102
 
@@ -7,6 +7,9 @@
103
 
 would appreciate credit if this program or parts of it are used.
104
 
 */
105
 
 
106
 
+#ifndef __EXP_COMMAND_H
107
 
+#define __EXP_COMMAND_H
108
 
+
109
 
 #ifdef HAVE_SYS_WAIT_H
110
 
   /* ISC doesn't def WNOHANG unless _POSIX_SOURCE is def'ed */
111
 
 # ifdef WNOHANG_REQUIRES_POSIX_SOURCE
112
 
@@ -23,7 +26,7 @@
113
 
 # undef panic
114
 
 #endif
115
 
 
116
 
-#include <tclPort.h>
117
 
+#include "tclPort.h"
118
 
 
119
 
 #define EXP_CHANNELNAMELEN (16 + TCL_INTEGER_SPACE)
120
 
 
121
 
@@ -89,11 +92,11 @@
122
 
     char name[EXP_CHANNELNAMELEN+1]; /* expect and interact set variables
123
 
                                   to channel name, so for efficiency
124
 
                                   cache it here */
125
 
-    int fdin;          /* input fd */
126
 
-    int fdout;         /* output fd - usually the same as fdin, although
127
 
+    long fdin;         /* input fd - may be used for storing ClientData, a pointer */
128
 
+    long fdout;                /* output fd - usually the same as fdin, although
129
 
                           may be different if channel opened by tcl::open */
130
 
     Tcl_Channel channel_orig;   /* If opened by someone else, i.e. tcl::open */
131
 
-    int fd_slave;      /* slave fd if "spawn -pty" used */
132
 
+    long fd_slave;     /* slave fd if "spawn -pty" used */
133
 
 
134
 
     /* this may go away if we find it is not needed */
135
 
     /* it might be needed by inherited channels */
136
 
@@ -231,6 +234,7 @@
137
 
 EXTERN void            exp_init_send _ANSI_ARGS_((void));
138
 
 EXTERN void            exp_init_unit_random _ANSI_ARGS_((void));
139
 
 EXTERN void            exp_init_sig _ANSI_ARGS_((void));
140
 
+EXTERN void            exp_ecmd_remove_state_direct_and_indirect _ANSI_ARGS_((Tcl_Interp *interp,ExpState *esPtr));
141
 
 EXTERN void            expChannelInit _ANSI_ARGS_((void));
142
 
 EXTERN int             expChannelCountGet _ANSI_ARGS_((void));
143
 
 
144
 
@@ -323,9 +327,13 @@
145
 
 EXTERN int             expStateAnyIs _ANSI_ARGS_((ExpState *));
146
 
 EXTERN int             expDevttyIs _ANSI_ARGS_((ExpState *));
147
 
 EXTERN int             expStdinOutIs _ANSI_ARGS_((ExpState *));
148
 
+EXTERN int             expStdinoutIs _ANSI_ARGS_((ExpState *esPtr));
149
 
 EXTERN ExpState *      expStdinoutGet _ANSI_ARGS_((void));
150
 
 EXTERN ExpState *      expDevttyGet _ANSI_ARGS_((void));
151
 
 
152
 
+EXTERN int             Exp_StringCaseMatch _ANSI_ARGS_((char *string, char *pattern, int nocase, int *offset));
153
 
+
154
 
 /* generic functions that really should be provided by Tcl */
155
 
 EXTERN int             expSizeGet _ANSI_ARGS_((ExpState *));
156
 
 EXTERN int             expSizeZero _ANSI_ARGS_((ExpState *));
157
 
+#endif /* __EXP_COMMAND_H */
158
 
diff -Naur expect-5.43.orig/exp_glob.c expect-5.43/exp_glob.c
159
 
--- expect-5.43.orig/exp_glob.c 2002-03-23 04:11:54.000000000 +0000
160
 
+++ expect-5.43/exp_glob.c      2007-10-10 10:00:12.000000000 +0000
161
 
@@ -11,10 +11,17 @@
162
 
 
163
 
 */
164
 
 
165
 
+#include <string.h>
166
 
+
167
 
 #include "expect_cf.h"
168
 
 #include "tcl.h"
169
 
 #include "exp_int.h"
170
 
 
171
 
+int Exp_StringCaseMatch2(
172
 
+       register CONST char *string,
173
 
+       register CONST char *pattern,
174
 
+       int nocase);
175
 
+
176
 
 /* The following functions implement expect's glob-style string matching */
177
 
 /* Exp_StringMatch allow's implements the unanchored front (or conversely */
178
 
 /* the '^') feature.  Exp_StringMatch2 does the rest of the work. */
179
 
diff -Naur expect-5.43.orig/exp_inter.c expect-5.43/exp_inter.c
180
 
--- expect-5.43.orig/exp_inter.c        2004-08-18 02:03:00.000000000 +0000
181
 
+++ expect-5.43/exp_inter.c     2007-10-10 10:00:12.000000000 +0000
182
 
@@ -42,6 +42,7 @@
183
 
 #include "exp_rename.h"
184
 
 #include "exp_prog.h"
185
 
 #include "exp_command.h"
186
 
+#include "exp_event.h"
187
 
 #include "exp_log.h"
188
 
 
189
 
 typedef struct ThreadSpecificData {
190
 
diff -Naur expect-5.43.orig/exp_main_exp.c expect-5.43/exp_main_exp.c
191
 
--- expect-5.43.orig/exp_main_exp.c     2007-10-10 10:00:23.000000000 +0000
192
 
+++ expect-5.43/exp_main_exp.c  2007-10-10 10:00:12.000000000 +0000
193
 
@@ -12,6 +12,7 @@
194
 
 
195
 
 #include "expect_cf.h"
196
 
 #include <stdio.h>
197
 
+#include <stdlib.h>
198
 
 #include "tcl.h"
199
 
 #include "expect_tcl.h"
200
 
 
201
 
diff -Naur expect-5.43.orig/exp_main_sub.c expect-5.43/exp_main_sub.c
202
 
--- expect-5.43.orig/exp_main_sub.c     2007-10-10 10:00:23.000000000 +0000
203
 
+++ expect-5.43/exp_main_sub.c  2007-10-10 10:00:12.000000000 +0000
204
 
@@ -2,6 +2,7 @@
205
 
 
206
 
 #include "expect_cf.h"
207
 
 #include <stdio.h>
208
 
+#include <getopt.h>
209
 
 #include <errno.h>
210
 
 #ifdef HAVE_INTTYPES_H
211
 
 #  include <inttypes.h>
212
 
diff -Naur expect-5.43.orig/exp_main_tk.c expect-5.43/exp_main_tk.c
213
 
--- expect-5.43.orig/exp_main_tk.c      2007-10-10 10:00:23.000000000 +0000
214
 
+++ expect-5.43/exp_main_tk.c   2007-10-10 10:00:12.000000000 +0000
215
 
@@ -38,11 +38,19 @@
216
 
 #include <ctype.h>
217
 
 #include <string.h>  /* strrchr(3) */
218
 
 
219
 
+#include       "tclInt.h"      /* Internal definitions for Tcl. */
220
 
+#include "tcl.h"
221
 
+
222
 
 #include "tk.h"
223
 
+#include "tkInt.h"
224
 
 
225
 
 #include "expect_tcl.h"
226
 
 #include "tcldbg.h"
227
 
 
228
 
+#include "expect.h"
229
 
+#include "exp_command.h"
230
 
+#include "exp_log.h"
231
 
+
232
 
 #if (TCL_MAJOR_VERSION < 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4))
233
 
 /*
234
 
  * The following variable is a special hack that is needed in order for
235
 
@@ -56,6 +64,8 @@
236
 
 #ifdef TK_TEST
237
 
 EXTERN int             Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp));
238
 
 #endif /* TK_TEST */
239
 
+int Tk_Init2(Tcl_Interp *interp);
240
 
+
241
 
 
242
 
 /*
243
 
  *----------------------------------------------------------------------
244
 
@@ -386,7 +396,7 @@
245
 
      * Invoke platform-specific initialization.
246
 
      */
247
 
 
248
 
-    code = TkpInit(interp, 0);
249
 
+    code = TkpInit(interp);
250
 
 
251
 
     done:
252
 
     if (argv != NULL) {
253
 
diff -Naur expect-5.43.orig/exp_trap.c expect-5.43/exp_trap.c
254
 
--- expect-5.43.orig/exp_trap.c 2007-10-10 10:00:23.000000000 +0000
255
 
+++ expect-5.43/exp_trap.c      2007-10-10 10:00:12.000000000 +0000
256
 
@@ -28,6 +28,7 @@
257
 
 #include "exp_prog.h"
258
 
 #include "exp_command.h"
259
 
 #include "exp_log.h"
260
 
+#include "exp_event.h"
261
 
 
262
 
 #ifdef TCL_DEBUGGER
263
 
 #include "tcldbg.h"
264
 
diff -Naur expect-5.43.orig/exp_tty.c expect-5.43/exp_tty.c
265
 
--- expect-5.43.orig/exp_tty.c  2004-05-07 16:23:26.000000000 +0000
266
 
+++ expect-5.43/exp_tty.c       2007-10-10 10:00:12.000000000 +0000
267
 
@@ -36,6 +36,7 @@
268
 
 #include "exp_tty_in.h"
269
 
 #include "exp_command.h"
270
 
 #include "exp_log.h"
271
 
+#include "exp_win.h"
272
 
 
273
 
 static int is_raw = FALSE;
274
 
 static int is_noecho = FALSE;
275
 
diff -Naur expect-5.43.orig/exp_tty.h expect-5.43/exp_tty.h
276
 
--- expect-5.43.orig/exp_tty.h  2002-02-12 02:00:55.000000000 +0000
277
 
+++ expect-5.43/exp_tty.h       2007-10-10 10:00:12.000000000 +0000
278
 
@@ -21,6 +21,7 @@
279
 
 int exp_tty_raw_noecho();
280
 
 int exp_israw();
281
 
 int exp_isecho();
282
 
+EXTERN int exp_tty_cooked_echo _ANSI_ARGS_((Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo));
283
 
 
284
 
 void exp_tty_set();
285
 
 int exp_tty_set_simple();
286
 
diff -Naur expect-5.43.orig/exp_tty_in.h expect-5.43/exp_tty_in.h
287
 
--- expect-5.43.orig/exp_tty_in.h       2002-02-12 02:00:55.000000000 +0000
288
 
+++ expect-5.43/exp_tty_in.h    2007-10-10 10:00:12.000000000 +0000
289
 
@@ -11,6 +11,8 @@
290
 
 #define __EXP_TTY_IN_H__
291
 
 
292
 
 #include "expect_cf.h"
293
 
+#include "expect.h"
294
 
+#include "tcl.h"
295
 
 
296
 
 #ifdef __MACHTEN__
297
 
 #include "sys/types.h"
298
 
diff -Naur expect-5.43.orig/exp_win.c expect-5.43/exp_win.c
299
 
--- expect-5.43.orig/exp_win.c  2002-02-12 02:00:55.000000000 +0000
300
 
+++ expect-5.43/exp_win.c       2007-10-10 10:00:12.000000000 +0000
301
 
@@ -51,7 +51,8 @@
302
 
 #   include <sys/ptem.h>
303
 
 #endif /* HAVE_SYS_PTEM_H */
304
 
 
305
 
-#include "exp_tty.h"
306
 
+#include "expect.h"
307
 
+#include "exp_tty_in.h"
308
 
 #include "exp_win.h"
309
 
 
310
 
 #ifdef TIOCGWINSZ
311
 
diff -Naur expect-5.43.orig/exp_win.h expect-5.43/exp_win.h
312
 
--- expect-5.43.orig/exp_win.h  2002-02-12 02:00:56.000000000 +0000
313
 
+++ expect-5.43/exp_win.h       2007-10-10 10:00:12.000000000 +0000
314
 
@@ -1,3 +1,5 @@
315
 
+#ifndef __EXP_WIN_H
316
 
+#define __EXP_WIN_H
317
 
 /* exp_win.h - window support
318
 
 
319
 
 Written by: Don Libes, NIST, 10/25/93
320
 
@@ -6,15 +8,17 @@
321
 
 would appreciate credit if you use this file or parts of it.
322
 
 */
323
 
 
324
 
-int exp_window_size_set();
325
 
-int exp_window_size_get();
326
 
+EXTERN int exp_window_size_set _ANSI_ARGS_((int fd));
327
 
+EXTERN int exp_window_size_get _ANSI_ARGS_((int fd));
328
 
 
329
 
-void exp_win_rows_set();
330
 
-void exp_win_rows_get();
331
 
-void exp_win_columns_set();
332
 
-void exp_win_columns_get();
333
 
-
334
 
-void exp_win2_rows_set();
335
 
-void exp_win2_rows_get();
336
 
-void exp_win2_columns_set();
337
 
-void exp_win2_columns_get();
338
 
+EXTERN void exp_win_rows_set _ANSI_ARGS_((char *rows));
339
 
+EXTERN void exp_win_rows_get _ANSI_ARGS_((char *rows));
340
 
+EXTERN void exp_win_columns_set _ANSI_ARGS_((char *columns));
341
 
+EXTERN void exp_win_columns_get _ANSI_ARGS_((char *columns));
342
 
+
343
 
+EXTERN void exp_win2_rows_set _ANSI_ARGS_((int fd, char *rows));
344
 
+EXTERN void exp_win2_rows_get _ANSI_ARGS_((int fd, char *rows));
345
 
+EXTERN void exp_win2_columns_set _ANSI_ARGS_((int fd, char *columns));
346
 
+EXTERN void exp_win2_columns_get _ANSI_ARGS_((int fd, char *columns));
347
 
+
348
 
+#endif /* __EXP_WIN_H */
349
 
diff -Naur expect-5.43.orig/expect.c expect-5.43/expect.c
350
 
--- expect-5.43.orig/expect.c   2007-10-10 10:00:23.000000000 +0000
351
 
+++ expect-5.43/expect.c        2007-10-10 10:00:12.000000000 +0000
352
 
@@ -10,6 +10,8 @@
353
 
 
354
 
 #include <sys/types.h>
355
 
 #include <stdio.h>
356
 
+#include <stdarg.h>
357
 
+#include <string.h>
358
 
 #include <signal.h>
359
 
 #include <errno.h>
360
 
 #include <ctype.h>     /* for isspace */
361
 
@@ -29,12 +31,13 @@
362
 
 
363
 
 #include "string.h"
364
 
 
365
 
+#include "expect.h"
366
 
+#include "exp_tty_in.h"
367
 
 #include "exp_rename.h"
368
 
 #include "exp_prog.h"
369
 
 #include "exp_command.h"
370
 
 #include "exp_log.h"
371
 
 #include "exp_event.h"
372
 
-#include "exp_tty.h"
373
 
 #include "exp_tstamp.h"        /* this should disappear when interact */
374
 
                        /* loses ref's to it */
375
 
 #ifdef TCL_DEBUGGER
376
 
diff -Naur expect-5.43.orig/pty_termios.c expect-5.43/pty_termios.c
377
 
--- expect-5.43.orig/pty_termios.c      2007-10-10 10:00:23.000000000 +0000
378
 
+++ expect-5.43/pty_termios.c   2007-10-10 10:00:12.000000000 +0000
379
 
@@ -9,13 +9,18 @@
380
 
 
381
 
 #include <stdio.h>
382
 
 #include <signal.h>
383
 
+#include <string.h>
384
 
+#include <pty.h>
385
 
+#include <utmp.h>
386
 
 
387
 
 #if defined(SIGCLD) && !defined(SIGCHLD)
388
 
 #define SIGCHLD SIGCLD
389
 
 #endif
390
 
 
391
 
-#include "expect.h"
392
 
 #include "expect_cf.h"
393
 
+#include "tcl.h"
394
 
+#include "expect.h"
395
 
+#include "exp_tty_in.h"
396
 
 #include "exp_int.h"  /* expErrnoMsg() prototype */
397
 
 
398
 
 /*
399
 
@@ -98,7 +103,6 @@
400
 
 
401
 
 #include "exp_win.h"
402
 
 
403
 
-#include "exp_tty_in.h"
404
 
 #include "exp_rename.h"
405
 
 #include "exp_pty.h"
406
 
 
407
 
@@ -368,7 +372,7 @@
408
 
 #define W_OK 02
409
 
 #endif
410
 
 
411
 
-static int ttyname_checked(int fd) {
412
 
+static char * ttyname_checked(int fd) {
413
 
        const char *result;
414
 
        result= ttyname(fd);
415
 
        if (!result) {