File: systypes.h

package info (click to toggle)
gforth 0.7.0%2Bds2-0.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,808 kB
  • sloc: ansic: 8,506; sh: 3,660; lisp: 1,783; makefile: 993; yacc: 186; sed: 141; lex: 102; awk: 21
file content (83 lines) | stat: -rw-r--r-- 2,044 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* types needed for a standalone system

  Copyright (C) 1998,2000,2003,2004,2007 Free Software Foundation, Inc.

  This file is part of Gforth.

  Gforth is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation, either version 3
  of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, see http://www.gnu.org/licenses/.
*/

typedef Cell time_t;

#define SHARC

#ifdef __DOUBLES_ARE_FLOATS__
#define double float
#endif

struct timeval {
  Cell tv_sec;        /* seconds */
  Cell tv_usec;  /* microseconds */
};

struct timezone {
  Cell tz_minuteswest;
  /* minutes west of Greenwich */
  Cell tz_dsttime;
  /* type of dst correction */
};

struct tm
{
  Cell    tm_sec;         /* seconds */
  Cell    tm_min;         /* minutes */
  Cell    tm_hour;        /* hours */
  Cell    tm_mday;        /* day of the month */
  Cell    tm_mon;         /* month */
  Cell    tm_year;        /* year */
  Cell    tm_wday;        /* day of the week */
  Cell    tm_yday;        /* day in the year */
  Cell    tm_isdst;       /* daylight saving time */
};

struct stat {
  Cell st_inode;
  time_t st_time;
  Cell st_size;
};

#define F_OK 0
#define W_OK 2
#define R_OK 4

#include <io.h>
#include <fcntl.h>

double atanh(double r1);
double asinh(double r1);
double acosh(double r1);
char* ecvt(double x, int len, int* exp, int* sign);
char *strsignal(int sig);

#define AUTO_INCREMENT 1
#undef HAVE_RINT
#undef HAVE_ECVT
#undef HAVE_SYS_MMAN_H
#undef HAVE_MMAP
#undef HAVE_GETPAGESIZE
#undef HAVE_SYSCONF

#define PAGESIZE 0x1000

#define perror(string) fprintf(stderr, "%s: error %d\n", string, errno)