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

« back to all changes in this revision

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

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