Changeset 1244 for pjproject/trunk/pjlib/include/pj/errno.h
- Timestamp:
- May 2, 2007 6:54:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/errno.h
r1080 r1244 168 168 * multiple times. 169 169 */ 170 #define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : e + PJ_ERRNO_START_SYS) 170 #if PJ_NATIVE_ERR_POSITIVE 171 # define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : e + PJ_ERRNO_START_SYS) 172 #else 173 # define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : PJ_ERRNO_START_SYS - e) 174 #endif 171 175 172 176 /** … … 180 184 * pj_get_os_error or PJ_STATUS_FROM_OS, the results are undefined. 181 185 */ 182 #define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : e - PJ_ERRNO_START_SYS) 186 #if PJ_NATIVE_ERR_POSITIVE 187 # define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : e - PJ_ERRNO_START_SYS) 188 #else 189 # define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : PJ_ERRNO_START_SYS - e) 190 #endif 183 191 184 192
Note: See TracChangeset
for help on using the changeset viewer.