Mercurial > mplayer.hg
annotate osdep/osdep.h @ 36802:621b61818a0f
configure: add -Zhigh-mem linker flag for OS/2
x264 encoder crashes due to memory allocation failure. This fixes the problem.
author | komh |
---|---|
date | Thu, 20 Feb 2014 13:59:34 +0000 |
parents | 5c8339df2496 |
children |
rev | line source |
---|---|
30746 | 1 /* |
2 * Header in order to include OS-specific headers, macros, types and so on | |
3 * | |
4 * Copyright (c) 2010 by KO Myung-Hun (komh@chollian.net) | |
5 * | |
6 * This file is part of MPlayer. | |
7 * | |
8 * MPlayer is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * MPlayer is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License along | |
19 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
21 */ | |
22 | |
23 #ifndef MPLAYER_OSDEP_H | |
24 #define MPLAYER_OSDEP_H | |
25 | |
36253 | 26 #include "config.h" |
27 | |
28 #if CONFIG_PATH_MAX_CHECK | |
29 #include <stdio.h> /* fopen() */ | |
30 #include <dirent.h> /* opendir() */ | |
31 #include <io.h> /* open() */ | |
32 #include <fcntl.h> /* open() */ | |
33 #include <string.h> /* strlen() */ | |
34 #include <limits.h> /* PATH_MAX */ | |
35 #include <errno.h> /* errno */ | |
36 | |
37 #define fopen(n, m) \ | |
38 (strlen(n) >= PATH_MAX ? (errno = ENAMETOOLONG, NULL) : (fopen)(n, m)) | |
39 | |
40 #define opendir(n) \ | |
41 (strlen(n) >= PATH_MAX ? (errno = ENOENT, NULL) : (opendir)(n)) | |
42 | |
43 #define open(n, ...) \ | |
44 (strlen(n) >= PATH_MAX ? (errno = ENAMETOOLONG, -1) : \ | |
45 (open)(n, __VA_ARGS__)) | |
46 #endif /* CONFIG_PATH_MAX_CHECK */ | |
47 | |
30746 | 48 #ifdef __OS2__ |
49 #define INCL_DOS | |
50 #define INCL_DOSDEVIOCTL | |
51 #include <os2.h> | |
30786
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
52 |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
53 #include <process.h> /* getpid() */ |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
54 |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
55 #define REALTIME_PRIORITY_CLASS MAKESHORT(0, PRTYC_TIMECRITICAL) |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
56 #define HIGH_PRIORITY_CLASS MAKESHORT(PRTYD_MAXIMUM, PRTYC_REGULAR) |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
57 #define ABOVE_NORMAL_PRIORITY_CLASS MAKESHORT(PRTYD_MAXIMUM / 2, PRTYC_REGULAR) |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
58 #define NORMAL_PRIORITY_CLASS MAKESHORT(0, PRTYC_REGULAR) |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
59 #define BELOW_NORMAL_PRIORITY_CLASS MAKESHORT(PRTYD_MAXIMUM, PRTYC_IDLETIME) |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
60 #define IDLE_PRIORITY_CLASS MAKESHORT(0, PRTYC_IDLETIME) |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
61 |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
62 #define SetPriorityClass(pid, prio) \ |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
63 DosSetPriority(PRTYS_PROCESS, \ |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
64 HIBYTE(prio), \ |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
65 LOBYTE(prio), \ |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
66 pid) |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
67 |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
68 #define GetCurrentProcess() getpid() |
24c1cedb1de2
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
komh
parents:
30746
diff
changeset
|
69 #endif /* __OS2__ */ |
30746 | 70 |
71 #endif /* MPLAYER_OSDEP_H */ | |
72 |