Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit93a9cc8

Browse files
committed
Invoke on_exit() with correct number and type of arguments.
1 parenta8d4741 commit93a9cc8

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

‎src/bin/psql/input.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.16 2001/02/2708:13:27 ishii Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.17 2001/09/11 23:08:07 petere Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"input.h"
@@ -26,6 +26,13 @@ static bool useHistory;
2626

2727
#endif
2828

29+
#ifdefHAVE_ATEXIT
30+
staticvoidfinishInput(void);
31+
#else
32+
/* designed for use with on_exit() */
33+
staticvoidfinishInput(int,void*);
34+
#endif
35+
2936

3037
/*
3138
* gets_interactive()
@@ -154,7 +161,7 @@ initializeInput(int flags)
154161
#ifdefHAVE_ATEXIT
155162
atexit(finishInput);
156163
#else
157-
on_exit(finishInput);
164+
on_exit(finishInput,NULL);
158165
#endif
159166
}
160167

@@ -182,8 +189,12 @@ saveHistory(char *fname)
182189

183190

184191

185-
void
192+
staticvoid
193+
#ifdefHAVE_ATEXIT
186194
finishInput(void)
195+
#else
196+
finishInput(intexitstatus,void*arg)
197+
#endif
187198
{
188199
#ifdefUSE_HISTORY
189200
if (useHistory)

‎src/bin/psql/input.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
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 $
77
*/
88
#ifndefINPUT_H
99
#defineINPUT_H
@@ -39,6 +39,5 @@ char *gets_fromFile(FILE *source);
3939

4040
voidinitializeInput(intflags);
4141
boolsaveHistory(char*fname);
42-
voidfinishInput(void);
4342

4443
#endif/* INPUT_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp