Benny Prijono | e722461 | 2005-11-13 19:40:44 +0000 | [diff] [blame^] | 1 | /* $Id$
|
| 2 | *
|
| 3 | */
|
| 4 | /*
|
| 5 | * PJLIB - PJ Foundation Library
|
| 6 | * (C)2003-2005 Benny Prijono <bennylp@bulukucing.org>
|
| 7 | *
|
| 8 | * Author:
|
| 9 | * Benny Prijono <bennylp@bulukucing.org>
|
| 10 | *
|
| 11 | * This library is free software; you can redistribute it and/or
|
| 12 | * modify it under the terms of the GNU Lesser General Public
|
| 13 | * License as published by the Free Software Foundation; either
|
| 14 | * version 2.1 of the License, or (at your option) any later version.
|
| 15 | *
|
| 16 | * This library is distributed in the hope that it will be useful,
|
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
| 19 | * Lesser General Public License for more details.
|
| 20 | *
|
| 21 | * You should have received a copy of the GNU Lesser General Public
|
| 22 | * License along with this library; if not, write to the Free Software
|
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 24 | */
|
| 25 | /* $Log: /pjproject-0.3/pjlib/include/pj/compat/os_linux_kernel.h $
|
| 26 | *
|
| 27 | * 4 10/29/05 11:51a Bennylp
|
| 28 | * Version 0.3-pre2.
|
| 29 | *
|
| 30 | * 3 10/14/05 12:26a Bennylp
|
| 31 | * Finished error code framework, some fixes in ioqueue, etc. Pretty
|
| 32 | * major.
|
| 33 | *
|
| 34 | * 2 9/22/05 10:31a Bennylp
|
| 35 | * Moving all *.h files to include/.
|
| 36 | *
|
| 37 | * 1 9/21/05 1:38p Bennylp
|
| 38 | * Created.
|
| 39 | *
|
| 40 | */
|
| 41 | #ifndef __PJ_COMPAT_OS_LINUX_KERNEL_H__
|
| 42 | #define __PJ_COMPAT_OS_LINUX_KERNEL_H__
|
| 43 |
|
| 44 | /**
|
| 45 | * @file os_linux.h
|
| 46 | * @brief Describes Linux operating system specifics.
|
| 47 | */
|
| 48 |
|
| 49 | #define PJ_HAS_ARPA_INET_H 0
|
| 50 | #define PJ_HAS_ASSERT_H 0
|
| 51 | #define PJ_HAS_CTYPE_H 0
|
| 52 | #define PJ_HAS_ERRNO_H 0
|
| 53 | #define PJ_HAS_LINUX_SOCKET_H 1
|
| 54 | #define PJ_HAS_MALLOC_H 0
|
| 55 | #define PJ_HAS_NETDB_H 0
|
| 56 | #define PJ_HAS_NETINET_IN_H 0
|
| 57 | #define PJ_HAS_SETJMP_H 0
|
| 58 | #define PJ_HAS_STDARG_H 1
|
| 59 | #define PJ_HAS_STDDEF_H 0
|
| 60 | #define PJ_HAS_STDIO_H 0
|
| 61 | #define PJ_HAS_STDLIB_H 0
|
| 62 | #define PJ_HAS_STRING_H 0
|
| 63 | #define PJ_HAS_SYS_IOCTL_H 0
|
| 64 | #define PJ_HAS_SYS_SELECT_H 0
|
| 65 | #define PJ_HAS_SYS_SOCKET_H 0
|
| 66 | #define PJ_HAS_SYS_TIMEB_H 0
|
| 67 | #define PJ_HAS_SYS_TYPES_H 0
|
| 68 | #define PJ_HAS_TIME_H 0
|
| 69 | #define PJ_HAS_UNISTD_H 0
|
| 70 |
|
| 71 | #define PJ_HAS_MSWSOCK_H 0
|
| 72 | #define PJ_HAS_WINSOCK_H 0
|
| 73 | #define PJ_HAS_WINSOCK2_H 0
|
| 74 |
|
| 75 | #define PJ_SOCK_HAS_INET_ATON 0
|
| 76 |
|
| 77 | /* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
|
| 78 | * the status of non-blocking connect() operation.
|
| 79 | */
|
| 80 | #define PJ_HAS_SO_ERROR 1
|
| 81 |
|
| 82 | /* This value specifies the value set in errno by the OS when a non-blocking
|
| 83 | * socket recv() can not return immediate daata.
|
| 84 | */
|
| 85 | #define PJ_BLOCKING_ERROR_VAL EAGAIN
|
| 86 |
|
| 87 | /* This value specifies the value set in errno by the OS when a non-blocking
|
| 88 | * socket connect() can not get connected immediately.
|
| 89 | */
|
| 90 | #define PJ_BLOCKING_CONNECT_ERROR_VAL EINPROGRESS
|
| 91 |
|
| 92 | #ifndef PJ_HAS_THREADS
|
| 93 | # define PJ_HAS_THREADS (1)
|
| 94 | #endif
|
| 95 |
|
| 96 |
|
| 97 | /*
|
| 98 | * Declare __FD_SETSIZE now before including <linux*>.
|
| 99 | */
|
| 100 | #define __FD_SETSIZE PJ_IOQUEUE_MAX_HANDLES
|
| 101 |
|
| 102 | #define NULL ((void*)0)
|
| 103 |
|
| 104 | #include <linux/module.h> /* Needed by all modules */
|
| 105 | #include <linux/kernel.h> /* Needed for KERN_INFO */
|
| 106 |
|
| 107 | #define __PJ_EXPORT_SYMBOL(a) EXPORT_SYMBOL(a);
|
| 108 |
|
| 109 | /*
|
| 110 | * Override features.
|
| 111 | */
|
| 112 | #define PJ_HAS_FLOATING_POINT 0
|
| 113 | #define PJ_HAS_MALLOC 0
|
| 114 | #define PJ_HAS_SEMAPHORE 0
|
| 115 | #define PJ_HAS_EVENT_OBJ 0
|
| 116 | #define PJ_HAS_HIGH_RES_TIMER 1
|
| 117 | #define PJ_OS_HAS_CHECK_STACK 0
|
| 118 | #define PJ_TERM_HAS_COLOR 0
|
| 119 |
|
| 120 | #define PJ_ATOMIC_VALUE_TYPE int
|
| 121 | #define PJ_THREAD_DESC_SIZE 128
|
| 122 |
|
| 123 | #endif /* __PJ_COMPAT_OS_LINUX_KERNEL_H__ */
|
| 124 |
|