aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-02-28 09:38:32 +0000
committerYang Tse <yangsita@gmail.com>2008-02-28 09:38:32 +0000
commit3d74649908cfe0d397b24d966674415bc54f0fff (patch)
tree165dd8817d9bbdb439c77d806710497084091f36
parented63d9d4de2c40ee2bb15f3f2ffed0d9bfe54c22 (diff)
avoid inclusion of setup.h in util.h
-rw-r--r--tests/server/util.c6
-rw-r--r--tests/server/util.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/server/util.c b/tests/server/util.c
index 3d12ba9b9..8a2fa8814 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -218,7 +218,7 @@ int wait_ms(int timeout_ms)
return r;
}
-bool write_pidfile(const char *filename)
+int write_pidfile(const char *filename)
{
FILE *pidfile;
long pid;
@@ -227,10 +227,10 @@ bool write_pidfile(const char *filename)
pidfile = fopen(filename, "w");
if(!pidfile) {
logmsg("Couldn't write pid file: %s %s", filename, strerror(ERRNO));
- return FALSE;
+ return 0; /* fail */
}
fprintf(pidfile, "%ld\n", pid);
fclose(pidfile);
logmsg("Wrote pid %ld to %s", pid, filename);
- return TRUE;
+ return 1; /* success */
}
diff --git a/tests/server/util.h b/tests/server/util.h
index f5ec0333b..4f07fcb05 100644
--- a/tests/server/util.h
+++ b/tests/server/util.h
@@ -22,7 +22,6 @@
*
* $Id$
***************************************************************************/
-#include "setup.h" /* portability help from the lib directory */
void logmsg(const char *msg, ...);
@@ -52,6 +51,6 @@ char *test2file(long testno);
int wait_ms(int timeout_ms);
-bool write_pidfile(const char *filename);
+int write_pidfile(const char *filename);
#endif /* __SERVER_UTIL_H */