Benny Prijono | 4766ffe | 2005-11-01 17:56:59 +0000 | [diff] [blame] | 1 | /* $Id$ |
| 2 | * |
| 3 | */ |
Benny Prijono | dd859a6 | 2005-11-01 16:42:51 +0000 | [diff] [blame] | 4 | /* $Log: /pjproject-0.3/pjlib/include/pj/compat/os_linux_kernel.h $ |
| 5 | * |
| 6 | * 4 10/29/05 11:51a Bennylp |
| 7 | * Version 0.3-pre2. |
| 8 | * |
| 9 | * 3 10/14/05 12:26a Bennylp |
| 10 | * Finished error code framework, some fixes in ioqueue, etc. Pretty |
| 11 | * major. |
| 12 | * |
| 13 | * 2 9/22/05 10:31a Bennylp |
| 14 | * Moving all *.h files to include/. |
| 15 | * |
| 16 | * 1 9/21/05 1:38p Bennylp |
| 17 | * Created. |
| 18 | * |
| 19 | */ |
| 20 | #ifndef __PJ_COMPAT_OS_LINUX_KERNEL_H__ |
| 21 | #define __PJ_COMPAT_OS_LINUX_KERNEL_H__ |
| 22 | |
| 23 | /** |
| 24 | * @file os_linux.h |
| 25 | * @brief Describes Linux operating system specifics. |
| 26 | */ |
| 27 | |
| 28 | #define PJ_HAS_ARPA_INET_H 0 |
| 29 | #define PJ_HAS_ASSERT_H 0 |
| 30 | #define PJ_HAS_CTYPE_H 0 |
| 31 | #define PJ_HAS_ERRNO_H 0 |
| 32 | #define PJ_HAS_LINUX_SOCKET_H 1 |
| 33 | #define PJ_HAS_MALLOC_H 0 |
| 34 | #define PJ_HAS_NETDB_H 0 |
| 35 | #define PJ_HAS_NETINET_IN_H 0 |
| 36 | #define PJ_HAS_SETJMP_H 0 |
| 37 | #define PJ_HAS_STDARG_H 1 |
| 38 | #define PJ_HAS_STDDEF_H 0 |
| 39 | #define PJ_HAS_STDIO_H 0 |
| 40 | #define PJ_HAS_STDLIB_H 0 |
| 41 | #define PJ_HAS_STRING_H 0 |
| 42 | #define PJ_HAS_SYS_IOCTL_H 0 |
| 43 | #define PJ_HAS_SYS_SELECT_H 0 |
| 44 | #define PJ_HAS_SYS_SOCKET_H 0 |
| 45 | #define PJ_HAS_SYS_TIMEB_H 0 |
| 46 | #define PJ_HAS_SYS_TYPES_H 0 |
| 47 | #define PJ_HAS_TIME_H 0 |
| 48 | #define PJ_HAS_UNISTD_H 0 |
| 49 | |
| 50 | #define PJ_HAS_MSWSOCK_H 0 |
| 51 | #define PJ_HAS_WINSOCK_H 0 |
| 52 | #define PJ_HAS_WINSOCK2_H 0 |
| 53 | |
| 54 | #define PJ_SOCK_HAS_INET_ATON 0 |
Benny Prijono | bc98615 | 2005-11-06 16:50:38 +0000 | [diff] [blame] | 55 | |
| 56 | /* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return |
| 57 | * the status of non-blocking connect() operation. |
| 58 | */ |
| 59 | #define PJ_HAS_SO_ERROR 1 |
| 60 | |
| 61 | /* This value specifies the value set in errno by the OS when a non-blocking |
| 62 | * socket recv() can not return immediate daata. |
| 63 | */ |
| 64 | #define PJ_BLOCKING_ERROR_VAL EAGAIN |
| 65 | |
| 66 | /* This value specifies the value set in errno by the OS when a non-blocking |
| 67 | * socket connect() can not get connected immediately. |
| 68 | */ |
| 69 | #define PJ_BLOCKING_CONNECT_ERROR_VAL EINPROGRESS |
Benny Prijono | dd859a6 | 2005-11-01 16:42:51 +0000 | [diff] [blame] | 70 | |
| 71 | #ifndef PJ_HAS_THREADS |
| 72 | # define PJ_HAS_THREADS (1) |
| 73 | #endif |
| 74 | |
| 75 | |
| 76 | /* |
| 77 | * Declare __FD_SETSIZE now before including <linux*>. |
| 78 | */ |
| 79 | #define __FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES |
| 80 | |
| 81 | #define NULL ((void*)0) |
| 82 | |
| 83 | #include <linux/module.h> /* Needed by all modules */ |
| 84 | #include <linux/kernel.h> /* Needed for KERN_INFO */ |
| 85 | |
| 86 | #define __PJ_EXPORT_SYMBOL(a) EXPORT_SYMBOL(a); |
| 87 | |
| 88 | /* |
| 89 | * Override features. |
| 90 | */ |
| 91 | #define PJ_HAS_FLOATING_POINT 0 |
| 92 | #define PJ_HAS_MALLOC 0 |
| 93 | #define PJ_HAS_SEMAPHORE 0 |
| 94 | #define PJ_HAS_EVENT_OBJ 0 |
| 95 | #define PJ_HAS_HIGH_RES_TIMER 1 |
| 96 | #define PJ_OS_HAS_CHECK_STACK 0 |
| 97 | #define PJ_TERM_HAS_COLOR 0 |
| 98 | |
| 99 | #define PJ_ATOMIC_VALUE_TYPE int |
| 100 | #define PJ_THREAD_DESC_SIZE 128 |
| 101 | |
| 102 | #endif /* __PJ_COMPAT_OS_LINUX_KERNEL_H__ */ |
| 103 | |