OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [include/] [mpw/] [mpw.h] - Diff between revs 106 and 107

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 106 Rev 107
/* Mac MPW host-specific definitions. */
/* Mac MPW host-specific definitions. */
 
 
#ifndef __INCLUDE_MPW_H
#ifndef __INCLUDE_MPW_H
#define __INCLUDE_MPW_H
#define __INCLUDE_MPW_H
 
 
#ifndef MPW
#ifndef MPW
#define MPW
#define MPW
#endif
#endif
 
 
/* MPW C is basically ANSI, but doesn't actually enable __STDC__,
/* MPW C is basically ANSI, but doesn't actually enable __STDC__,
   nor does it allow __STDC__ to be #defined. */
   nor does it allow __STDC__ to be #defined. */
 
 
#ifndef ALMOST_STDC
#ifndef ALMOST_STDC
#define ALMOST_STDC
#define ALMOST_STDC
#endif
#endif
 
 
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <ctype.h>
#include <errno.h>
#include <errno.h>
 
 
#define HAVE_TIME_T_IN_TIME_H 1
#define HAVE_TIME_T_IN_TIME_H 1
 
 
#define HAVE_STDLIB_H 1
#define HAVE_STDLIB_H 1
 
 
#define HAVE_ERRNO_H 1
#define HAVE_ERRNO_H 1
 
 
#define HAVE_STDDEF_H 1
#define HAVE_STDDEF_H 1
 
 
#define HAVE_STRING_H 1
#define HAVE_STRING_H 1
 
 
#define HAVE_STDARG_H 1
#define HAVE_STDARG_H 1
 
 
#define HAVE_VPRINTF 1
#define HAVE_VPRINTF 1
 
 
#ifdef USE_MW_HEADERS
#ifdef USE_MW_HEADERS
 
 
#include <unix.h>
#include <unix.h>
 
 
#else
#else
 
 
#include <fcntl.h>
#include <fcntl.h>
#include <ioctl.h>
#include <ioctl.h>
#include <sys/stat.h>
#include <sys/stat.h>
 
 
#define HAVE_FCNTL_H 1
#define HAVE_FCNTL_H 1
 
 
#ifndef O_ACCMODE
#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
#endif
#endif
 
 
#ifndef fileno
#ifndef fileno
#define fileno(fp) ((fp)->_file)
#define fileno(fp) ((fp)->_file)
#endif
#endif
 
 
/* stdio.h does not define this if __STDC__, so define here. */
/* stdio.h does not define this if __STDC__, so define here. */
 
 
#ifdef __STDC__
#ifdef __STDC__
FILE *fdopen(int fildes, const char *mode);
FILE *fdopen(int fildes, const char *mode);
#endif
#endif
 
 
#endif /* USE_MW_HEADERS */
#endif /* USE_MW_HEADERS */
 
 
/* Add ersatz definitions, for systems that lack them.  */
/* Add ersatz definitions, for systems that lack them.  */
 
 
#ifndef EIO
#ifndef EIO
#define EIO 96
#define EIO 96
#endif
#endif
#ifndef ENOENT
#ifndef ENOENT
#define ENOENT 97
#define ENOENT 97
#endif
#endif
#ifndef EACCES
#ifndef EACCES
#define EACCES 98
#define EACCES 98
#endif
#endif
#ifndef ENOSYS
#ifndef ENOSYS
#define ENOSYS 99
#define ENOSYS 99
#endif
#endif
 
 
#ifndef R_OK
#ifndef R_OK
#define R_OK 4
#define R_OK 4
#define W_OK 2
#define W_OK 2
#define X_OK 1
#define X_OK 1
#endif
#endif
 
 
/* Binary files have different characteristics; for instance, no cr/nl
/* Binary files have different characteristics; for instance, no cr/nl
   translation. */
   translation. */
 
 
#define USE_BINARY_FOPEN
#define USE_BINARY_FOPEN
 
 
#include <spin.h>
#include <spin.h>
 
 
#ifdef MPW_C
#ifdef MPW_C
#undef  __PTR_TO_INT
#undef  __PTR_TO_INT
#define __PTR_TO_INT(P) ((int)(P))
#define __PTR_TO_INT(P) ((int)(P))
#undef __INT_TO_PTR
#undef __INT_TO_PTR
#define __INT_TO_PTR(P) ((char *)(P))
#define __INT_TO_PTR(P) ((char *)(P))
#endif /* MPW_C */
#endif /* MPW_C */
 
 
#define NO_FCNTL
#define NO_FCNTL
 
 
int fstat ();
int fstat ();
 
 
FILE *mpw_fopen ();
FILE *mpw_fopen ();
int mpw_fseek ();
int mpw_fseek ();
int mpw_fread ();
int mpw_fread ();
int mpw_fwrite ();
int mpw_fwrite ();
int mpw_access ();
int mpw_access ();
int mpw_open ();
int mpw_open ();
int mpw_creat ();
int mpw_creat ();
void mpw_abort (void);
void mpw_abort (void);
 
 
/* Map these standard functions to improved versions in libiberty. */
/* Map these standard functions to improved versions in libiberty. */
 
 
#define fopen mpw_fopen
#define fopen mpw_fopen
#define fseek mpw_fseek
#define fseek mpw_fseek
#define fread mpw_fread
#define fread mpw_fread
#define fwrite mpw_fwrite
#define fwrite mpw_fwrite
#define open mpw_open
#define open mpw_open
#define access mpw_access
#define access mpw_access
#define creat mpw_creat
#define creat mpw_creat
#define abort mpw_abort
#define abort mpw_abort
 
 
#define POSIX_UTIME
#define POSIX_UTIME
 
 
#define LOSING_TOTALLY
#define LOSING_TOTALLY
 
 
/* Define this so that files will be closed before being unlinked. */
/* Define this so that files will be closed before being unlinked. */
 
 
#define CLOSE_BEFORE_UNLINK
#define CLOSE_BEFORE_UNLINK
 
 
#endif /* __INCLUDE_MPW_H */
#endif /* __INCLUDE_MPW_H */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.