File tree 2 files changed +15
-5
lines changed
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 3
3
*
4
4
* Copyright 2000 by PostgreSQL Global Development Group
5
5
*
6
- * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.16 2001/02/27 08:13:27 ishii Exp $
6
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.17 2001/09/11 23: 08:07 petere Exp $
7
7
*/
8
8
#include "postgres_fe.h"
9
9
#include "input.h"
@@ -26,6 +26,13 @@ static bool useHistory;
26
26
27
27
#endif
28
28
29
+ #ifdef HAVE_ATEXIT
30
+ static void finishInput (void );
31
+ #else
32
+ /* designed for use with on_exit() */
33
+ static void finishInput (int , void * );
34
+ #endif
35
+
29
36
30
37
/*
31
38
* gets_interactive()
@@ -154,7 +161,7 @@ initializeInput(int flags)
154
161
#ifdef HAVE_ATEXIT
155
162
atexit (finishInput );
156
163
#else
157
- on_exit (finishInput );
164
+ on_exit (finishInput , NULL );
158
165
#endif
159
166
}
160
167
@@ -182,8 +189,12 @@ saveHistory(char *fname)
182
189
183
190
184
191
185
- void
192
+ static void
193
+ #ifdef HAVE_ATEXIT
186
194
finishInput (void )
195
+ #else
196
+ finishInput (int exitstatus , void * arg )
197
+ #endif
187
198
{
188
199
#ifdef USE_HISTORY
189
200
if (useHistory )
Original file line number Diff line number Diff line change 3
3
*
4
4
* Copyright 2000 by PostgreSQL Global Development Group
5
5
*
6
- * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.11 2000/10/03 19:50:20 petere Exp $
6
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.12 2001/09/11 23:08:07 petere Exp $
7
7
*/
8
8
#ifndef INPUT_H
9
9
#define INPUT_H
@@ -39,6 +39,5 @@ char *gets_fromFile(FILE *source);
39
39
40
40
void initializeInput (int flags );
41
41
bool saveHistory (char * fname );
42
- void finishInput (void );
43
42
44
43
#endif /* INPUT_H */
You can’t perform that action at this time.
0 commit comments