#include "national.h"
#if _hdr_wchar && _lib_wctype && _lib_iswctype
+/* on linux wchar.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
# include <wchar.h>
# undef isalpha
# define isalpha(x) iswalpha(x)
#endif
#include "defs.h"
#include <fcin.h>
+/* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
#include <pwd.h>
#include "name.h"
#include "variables.h"
* workaround botched headers that assume <stdio.h>
*/
-#if defined(linux)
-#ifndef __FILE
-#define __FILE FILE
-#endif
-#endif
-
-#if !defined(CSRG_BASED)
+#if !defined(CSRG_BASED) && !defined(linux)
#ifndef FILE
#define FILE Sfio_t
#endif
#define _STDIO_INCLUDED 1
#endif
-#if !defined(CSRG_BASED)
+#if !defined(CSRG_BASED) && !defined(linux)
#ifndef FILE
#define FILE Sfio_t
#endif
#endif
typedef struct _sfio_ Sfile_t, Sfio_t, SFIO;
+#if defined(linux)
+typedef struct _sfio_ FILE;
+#endif
typedef struct _sfdc_ Sfdisc_t;
typedef int (*Sfread_f)_ARG_((Sfio_t*, Void_t*, int, Sfdisc_t*));
typedef int (*Sfwrite_f)_ARG_((Sfio_t*, const Void_t*, int, Sfdisc_t*));
#define stdout sfstdout
#define stderr sfstderr
#define BUFSIZ SF_BUFSIZE
+#if !defined(linux)
#ifdef FILE
#undef FILE
#endif
#define FILE Sfio_t
+#endif
#include <sfio.h>
#define getmntent ______getmntent
#endif
+/* on linux mntent.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
#include <mntent.h>
#if defined(__STDPP__directive) && defined(__STDPP__hide)
#include <ast.h>
#include <hash.h>
+/* on linux grp.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
#include <grp.h>
#if defined(__STDPP__directive) && defined(__STDPP__hide)
#include <ast.h>
#include <hash.h>
+/* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
#include <pwd.h>
#if defined(__STDPP__directive) && defined(__STDPP__hide)
#include <ast.h>
#include <hash.h>
+/* on linux pwd.h and grp.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
#include <pwd.h>
#include <grp.h>
#if _hdr_wchar && _lib_wctype && _lib_iswctype
+/* on linux wchar.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
#include <wchar.h>
#undef isalnum
#include <ast.h>
#include <hash.h>
+/* on linux pwd.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
#include <pwd.h>
#if defined(__STDPP__directive) && defined(__STDPP__hide)
#include "FEATURE/ids"
+/* on linux grp.h pwd.h can include FILE without stdio.h which clashes with sfio_t */
+#if defined(linux)
+ #ifndef __FILE_defined
+ #define __FILE_defined 1
+ #endif
+#endif
#include <grp.h>
#include <pwd.h>