Implemented renicing (-20) in gnokiid mode
[gnokii.git] / include / uccompat.h
1 /*
2
3   $Id$
4
5   G N O K I I
6
7   A Linux/Unix toolset and driver for Nokia mobile phones.
8
9   Released under the terms of the GNU GPL, see file COPYING for more details.
10
11 */
12
13 #ifndef __UCCOMPAT_H__
14 #define __UCCOMPAT_H__
15
16 #ifdef UCCOMPAT
17
18
19 /* Handle non-existing atoi() */
20 #include <limits.h>
21 #define atoi(s) ({ \
22                 long _atoi_l=strtol((s), (char **)NULL, 10); \
23                 /**/ if (_atoi_l<INT_MIN) _atoi_l=INT_MIN; \
24                 else if (_atoi_l>INT_MAX) _atoi_l=INT_MAX; \
25                 _atoi_l; \
26                 })
27
28 #define strchr _Xstrchr
29 #define strrchr _Xstrrchr
30 #include <string.h>
31 #undef strchr
32 #undef strrchr
33 extern char * strchr __P ((const char *, int));
34 extern char * strrchr __P ((const char *, int));
35
36 extern pid_t getpid(void);
37 extern int execv(const char *path, char *const argv[]);
38 extern int nice(int inc);
39
40
41 #endif /* UCCOMPAT */
42
43 #endif /* __UCCOMPAT_H__ */