1
0
Fork 0
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:
Peter Howkins 2018-03-23 01:51:39 +00:00
parent b1c3729e88
commit 9d69ea3d97
12 changed files with 61 additions and 8 deletions

View file

@ -108,6 +108,12 @@
#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)

View file

@ -94,6 +94,12 @@
#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"

View file

@ -121,13 +121,7 @@
* 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

View file

@ -149,7 +149,7 @@
#define _STDIO_INCLUDED 1
#endif
#if !defined(CSRG_BASED)
#if !defined(CSRG_BASED) && !defined(linux)
#ifndef FILE
#define FILE Sfio_t
#endif
@ -161,6 +161,9 @@
#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*));

View file

@ -50,10 +50,12 @@
#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>

View file

@ -120,6 +120,12 @@ __STDPP__directive pragma pp:hide endmntent getmntent
#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)

View file

@ -98,6 +98,12 @@ __STDPP__directive pragma pp:hide getgrgid
#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)

View file

@ -98,6 +98,12 @@ __STDPP__directive pragma pp:hide getpwuid
#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)

View file

@ -100,6 +100,12 @@ __STDPP__directive pragma pp:hide getgrgid getgrnam getpwnam
#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>

View file

@ -95,6 +95,12 @@
#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

View file

@ -99,6 +99,12 @@ __STDPP__directive pragma pp:hide getpwnam getpwuid
#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)

View file

@ -96,6 +96,12 @@ static const char id[] = "\n@(#)id (AT&T Bell Laboratories) 07/17/94\0\n";
#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>