1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-31 10:30:33 +03:00

Remove support for on_exit()

All supported platforms support the C89 standard function atexit()
(SunOS 4 probably being the last one not to), and supporting both
makes the code clumsy.
This commit is contained in:
Peter Eisentraut
2011-12-27 20:57:59 +02:00
parent c317a3ac16
commit d383c23f6f
7 changed files with 2 additions and 268 deletions

View File

@@ -45,12 +45,7 @@ static int history_lines_added;
#define NL_IN_HISTORY 0x01
#endif
#ifdef HAVE_ATEXIT
static void finishInput(void);
#else
/* designed for use with on_exit() */
static void finishInput(int, void *);
#endif
/*
@@ -313,11 +308,7 @@ initializeInput(int flags)
}
#endif
#ifdef HAVE_ATEXIT
atexit(finishInput);
#else
on_exit(finishInput, NULL);
#endif
}
@@ -416,11 +407,7 @@ saveHistory(char *fname, int max_lines, bool appendFlag, bool encodeFlag)
static void
#ifdef HAVE_ATEXIT
finishInput(void)
#else
finishInput(int exitstatus, void *arg)
#endif
{
#ifdef USE_READLINE
if (useHistory && psql_history)