File:  [gforth] / gforth / arch / sharc / systypes.h
Revision 1.5: download - view: text, annotated - select for diffs
Mon Dec 31 19:02:25 2007 UTC (16 years, 3 months ago) by anton
Branches: MAIN
CVS tags: v0-7-0, HEAD
updated copyright year after changing license notice

    1: /* types needed for a standalone system
    2: 
    3:   Copyright (C) 1998,2000,2003,2004,2007 Free Software Foundation, Inc.
    4: 
    5:   This file is part of Gforth.
    6: 
    7:   Gforth is free software; you can redistribute it and/or
    8:   modify it under the terms of the GNU General Public License
    9:   as published by the Free Software Foundation, either version 3
   10:   of the License, or (at your option) any later version.
   11: 
   12:   This program is distributed in the hope that it will be useful,
   13:   but WITHOUT ANY WARRANTY; without even the implied warranty of
   14:   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15:   GNU General Public License for more details.
   16: 
   17:   You should have received a copy of the GNU General Public License
   18:   along with this program; if not, see http://www.gnu.org/licenses/.
   19: */
   20: 
   21: typedef Cell time_t;
   22: 
   23: #define SHARC
   24: 
   25: #ifdef __DOUBLES_ARE_FLOATS__
   26: #define double float
   27: #endif
   28: 
   29: struct timeval {
   30:   Cell tv_sec;        /* seconds */
   31:   Cell tv_usec;  /* microseconds */
   32: };
   33: 
   34: struct timezone {
   35:   Cell tz_minuteswest;
   36:   /* minutes west of Greenwich */
   37:   Cell tz_dsttime;
   38:   /* type of dst correction */
   39: };
   40: 
   41: struct tm
   42: {
   43:   Cell    tm_sec;         /* seconds */
   44:   Cell    tm_min;         /* minutes */
   45:   Cell    tm_hour;        /* hours */
   46:   Cell    tm_mday;        /* day of the month */
   47:   Cell    tm_mon;         /* month */
   48:   Cell    tm_year;        /* year */
   49:   Cell    tm_wday;        /* day of the week */
   50:   Cell    tm_yday;        /* day in the year */
   51:   Cell    tm_isdst;       /* daylight saving time */
   52: };
   53: 
   54: struct stat {
   55:   Cell st_inode;
   56:   time_t st_time;
   57:   Cell st_size;
   58: };
   59: 
   60: #define F_OK 0
   61: #define W_OK 2
   62: #define R_OK 4
   63: 
   64: #include <io.h>
   65: #include <fcntl.h>
   66: 
   67: double atanh(double r1);
   68: double asinh(double r1);
   69: double acosh(double r1);
   70: char* ecvt(double x, int len, int* exp, int* sign);
   71: char *strsignal(int sig);
   72: 
   73: #define AUTO_INCREMENT 1
   74: #undef HAVE_RINT
   75: #undef HAVE_ECVT
   76: #undef HAVE_SYS_MMAN_H
   77: #undef HAVE_MMAP
   78: #undef HAVE_GETPAGESIZE
   79: #undef HAVE_SYSCONF
   80: 
   81: #define PAGESIZE 0x1000
   82: 
   83: #define perror(string) fprintf(stderr, "%s: error %d\n", string, errno)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>