mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtksh: HACKY fix for compilation on later linux C library where FILE definition has moved
This commit is contained in:
parent
b1c3729e88
commit
9d69ea3d97
12 changed files with 61 additions and 8 deletions
|
@ -108,6 +108,12 @@
|
||||||
#include "national.h"
|
#include "national.h"
|
||||||
|
|
||||||
#if _hdr_wchar && _lib_wctype && _lib_iswctype
|
#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>
|
# include <wchar.h>
|
||||||
# undef isalpha
|
# undef isalpha
|
||||||
# define isalpha(x) iswalpha(x)
|
# define isalpha(x) iswalpha(x)
|
||||||
|
|
|
@ -94,6 +94,12 @@
|
||||||
#endif
|
#endif
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include <fcin.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 <pwd.h>
|
||||||
#include "name.h"
|
#include "name.h"
|
||||||
#include "variables.h"
|
#include "variables.h"
|
||||||
|
|
|
@ -121,13 +121,7 @@
|
||||||
* workaround botched headers that assume <stdio.h>
|
* workaround botched headers that assume <stdio.h>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(linux)
|
#if !defined(CSRG_BASED) && !defined(linux)
|
||||||
#ifndef __FILE
|
|
||||||
#define __FILE FILE
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(CSRG_BASED)
|
|
||||||
#ifndef FILE
|
#ifndef FILE
|
||||||
#define FILE Sfio_t
|
#define FILE Sfio_t
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -149,7 +149,7 @@
|
||||||
#define _STDIO_INCLUDED 1
|
#define _STDIO_INCLUDED 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(CSRG_BASED)
|
#if !defined(CSRG_BASED) && !defined(linux)
|
||||||
#ifndef FILE
|
#ifndef FILE
|
||||||
#define FILE Sfio_t
|
#define FILE Sfio_t
|
||||||
#endif
|
#endif
|
||||||
|
@ -161,6 +161,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _sfio_ Sfile_t, Sfio_t, SFIO;
|
typedef struct _sfio_ Sfile_t, Sfio_t, SFIO;
|
||||||
|
#if defined(linux)
|
||||||
|
typedef struct _sfio_ FILE;
|
||||||
|
#endif
|
||||||
typedef struct _sfdc_ Sfdisc_t;
|
typedef struct _sfdc_ Sfdisc_t;
|
||||||
typedef int (*Sfread_f)_ARG_((Sfio_t*, Void_t*, int, 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*));
|
typedef int (*Sfwrite_f)_ARG_((Sfio_t*, const Void_t*, int, Sfdisc_t*));
|
||||||
|
|
|
@ -50,10 +50,12 @@
|
||||||
#define stdout sfstdout
|
#define stdout sfstdout
|
||||||
#define stderr sfstderr
|
#define stderr sfstderr
|
||||||
#define BUFSIZ SF_BUFSIZE
|
#define BUFSIZ SF_BUFSIZE
|
||||||
|
#if !defined(linux)
|
||||||
#ifdef FILE
|
#ifdef FILE
|
||||||
#undef FILE
|
#undef FILE
|
||||||
#endif
|
#endif
|
||||||
#define FILE Sfio_t
|
#define FILE Sfio_t
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sfio.h>
|
#include <sfio.h>
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,12 @@ __STDPP__directive pragma pp:hide endmntent getmntent
|
||||||
#define getmntent ______getmntent
|
#define getmntent ______getmntent
|
||||||
#endif
|
#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>
|
#include <mntent.h>
|
||||||
|
|
||||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||||
|
|
|
@ -98,6 +98,12 @@ __STDPP__directive pragma pp:hide getgrgid
|
||||||
|
|
||||||
#include <ast.h>
|
#include <ast.h>
|
||||||
#include <hash.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>
|
#include <grp.h>
|
||||||
|
|
||||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||||
|
|
|
@ -98,6 +98,12 @@ __STDPP__directive pragma pp:hide getpwuid
|
||||||
|
|
||||||
#include <ast.h>
|
#include <ast.h>
|
||||||
#include <hash.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>
|
#include <pwd.h>
|
||||||
|
|
||||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||||
|
|
|
@ -100,6 +100,12 @@ __STDPP__directive pragma pp:hide getgrgid getgrnam getpwnam
|
||||||
|
|
||||||
#include <ast.h>
|
#include <ast.h>
|
||||||
#include <hash.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 <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,12 @@
|
||||||
|
|
||||||
#if _hdr_wchar && _lib_wctype && _lib_iswctype
|
#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>
|
#include <wchar.h>
|
||||||
|
|
||||||
#undef isalnum
|
#undef isalnum
|
||||||
|
|
|
@ -99,6 +99,12 @@ __STDPP__directive pragma pp:hide getpwnam getpwuid
|
||||||
|
|
||||||
#include <ast.h>
|
#include <ast.h>
|
||||||
#include <hash.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>
|
#include <pwd.h>
|
||||||
|
|
||||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||||
|
|
|
@ -96,6 +96,12 @@ static const char id[] = "\n@(#)id (AT&T Bell Laboratories) 07/17/94\0\n";
|
||||||
|
|
||||||
#include "FEATURE/ids"
|
#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 <grp.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue