From 6948650efd3fb9e2a70b8cf16aca57e9d0b7eb0a Mon Sep 17 00:00:00 2001 From: Chris Liddell Date: Tue, 23 Jul 2013 16:24:19 +0100 Subject: Commit of build_consolidation branch Squashed into one commit (see branch for details of the evolution of the branch). This brings gpcl6 and gxps into the Ghostscript build system, and a shared set of graphics library object files for all the interpreters. Also, brings the same configuration options to the pcl and xps products as we have for Ghostscript. --- base/stdio_.h | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 base/stdio_.h (limited to 'base/stdio_.h') diff --git a/base/stdio_.h b/base/stdio_.h new file mode 100644 index 000000000..66c945839 --- /dev/null +++ b/base/stdio_.h @@ -0,0 +1,93 @@ +/* Copyright (C) 2001-2012 Artifex Software, Inc. + All Rights Reserved. + + This software is provided AS-IS with no warranty, either express or + implied. + + This software is distributed under license and may not be copied, + modified or distributed except as expressly authorized under the terms + of the license contained in the file LICENSE in this distribution. + + Refer to licensing information at http://www.artifex.com or contact + Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, San Rafael, + CA 94903, U.S.A., +1(415)492-9861, for further information. +*/ + + +/* Generic substitute for stdio.h */ + +#ifndef stdio__INCLUDED +# define stdio__INCLUDED + +/* + * This is here primarily because we must include std.h before + * any file that includes sys/types.h. + */ +#include "std.h" +#include + +#ifdef VMS +/* VMS prior to 7.0 doesn't have the unlink system call. Use delete instead. */ +# ifdef __DECC +# include +# endif +# if ( __VMS_VER < 70000000 ) +# define unlink(fname) delete(fname) +# endif +#else +#if !defined(const) +/* + * Other systems may or may not declare unlink in stdio.h; + * if they do, the declaration will be compatible with this one, as long + * as const has not been disabled by defining it to be the empty string. + */ +int unlink(const char *); +#endif + +#endif + +/* + * Plan 9 has a system function called sclose, which interferes with the + * procedure defined in stream.h. The following makes the system sclose + * inaccessible, but avoids the name clash. + */ +#ifdef Plan9 +# undef sclose +# define sclose(s) Sclose(s) +#endif + +/* Patch a couple of things possibly missing from stdio.h. */ +#ifndef SEEK_SET +# define SEEK_SET 0 +#endif +#ifndef SEEK_CUR +# define SEEK_CUR 1 +#endif +#ifndef SEEK_END +# define SEEK_END 2 +#endif + +#if defined(_MSC_VER) +# define fdopen(handle,mode) _fdopen(handle,mode) +# define fileno(file) _fileno(file) +# if _MSC_VER < 1500 /* VS 2008 has vsnprintf */ +# define vsnprintf _vsnprintf +# endif +/* Microsoft Visual C++ 2005 doesn't properly define snprintf */ +int snprintf(char *buffer, size_t count, const char *format , ...); +#endif + +/* for our non-localizing (v)s(n)printf() functions */ +/* only *really* required for floating point conversions */ +#include "gssprintf.h" + +#ifndef sprintf +#define sprintf DO_NOT_USE_SPRINTF +#endif + + +#ifndef fopen +#define fopen DO_NOT_USE_FOPEN +#endif + +#endif /* stdio__INCLUDED */ -- cgit v1.2.1