diff options
Diffstat (limited to 'lib/Exceptions.cc')
-rw-r--r-- | lib/Exceptions.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index a647f16..110ffaa 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -137,6 +137,7 @@ void xfree(char *& p) { } } +#ifdef HAVE_PIPE int xpipe(int * p, int flag) throw (GeneralException) { if (pipe(p)) { throw GeneralException(String(_("Error creating pipe: ")) + strerror(errno)); @@ -144,7 +145,13 @@ int xpipe(int * p, int flag) throw (GeneralException) { return p[flag]; } +#else +int xpipe(int *, int) throw (GeneralException) { + throw GeneralException(_("Function pipe() not supported by this system.\n")); +} +#endif +#ifdef HAVE_FORK pid_t xfork() throw (GeneralException) { pid_t p; @@ -156,6 +163,11 @@ pid_t xfork() throw (GeneralException) { return p; } +#else +pid_t xfork() throw (GeneralException) { + throw GeneralException(_("Function fork() not supported by this system.\n")); +} +#endif void xexit(int status) throw (GeneralException) { throw Exit(status); |