Introduce [u]intptr_t type
[openbios/afaerber.git] / include / config.h
blobd5a1e200acb1039b3567a45b51db63f29894715b
1 /*
2 * Creation Date: <2003/12/20 00:07:16 samuel>
3 * Time-stamp: <2004/01/19 17:40:26 stepan>
5 * <config.h>
9 * Copyright (C) 2003, 2004 Samuel Rydh (samuel@ibrium.se)
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * version 2
17 #ifndef _H_CONFIG
18 #define _H_CONFIG
20 #include "autoconf.h"
21 #include "mconfig.h"
22 #include "asm/types.h"
24 #define PROGRAM_NAME "OpenBIOS"
26 #ifndef BOOTSTRAP
28 #ifndef NULL
29 #define NULL ((void*)0)
30 #endif
32 typedef unsigned int size_t;
33 typedef unsigned int usize_t;
34 typedef signed int ssize_t;
35 typedef signed int off_t;
37 typedef unsigned int time_t;
39 #define UINT_MAX ((unsigned int)-1)
41 #define ENOMEM 1
42 #define EIO 2
43 #define EINVAL 3
44 #define ENOENT 4
45 #define ENOTDIR 5
46 #define EISDIR 6
47 #define ENAMETOOLONG 7
49 #define SEEK_CUR 1
50 #define SEEK_SET 2
51 #define SEEK_END 3
53 #endif /* BOOTSTRAP */
55 #include "sysinclude.h"
57 #ifndef MIN
58 #define MIN(x,y) (((x) < (y)) ? (x) : (y))
59 #define MAX(x,y) (((x) > (y)) ? (x) : (y))
60 #endif
62 /* errno is a macro on some systems, which might cause nasty problems.
63 * We try to cope with this here.
65 #undef errno
66 #define errno errno_int
68 #endif /* _H_CONFIG */