summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-09-10 18:10:49 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-09-11 20:06:36 +0200
commitacfc02c1747065fe450c7cfeb6f1844b62335f08 (patch)
tree5887806a2e6b99bbb0255e013a9028810e230a7f /base/gdevpipe.c
parentImport Ghostscript 9.52 (diff)
downloadghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.gz
ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.bz2
ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.zip
Import Ghostscript 9.53ghostscript-9.53
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'base/gdevpipe.c')
-rw-r--r--base/gdevpipe.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/base/gdevpipe.c b/base/gdevpipe.c
index a7742e16..b4f2acb1 100644
--- a/base/gdevpipe.c
+++ b/base/gdevpipe.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -29,8 +29,14 @@
static int
do_pclose(FILE *file)
{
-#ifndef GS_NO_FILESYSTEM
- return pclose(file);
+#ifdef GS_NO_FILESYSTEM
+ return gs_error_ok;
+#else
+ int status = pclose(file);
+ if (status < 0 || status > 0)
+ return_error(gs_error_ioerror);
+
+ return gs_error_ok;
#endif
}
@@ -96,10 +102,11 @@ pipe_fopen(gx_io_device * iodev, const char *fname, const char *access,
static int
pipe_fclose(gx_io_device * iodev, gp_file * file)
{
-#ifndef GS_NO_FILESYSTEM
- gp_fclose(file);
-#endif
+#ifdef GS_NO_FILESYSTEM
return 0;
+#else
+ return gp_fclose(file);
+#endif
}
static int