cvs commit: apache-2.0/src/lib/apr/include apr_portable.h
stoddard99/11/08 07:35:36 Modified:src/lib/apr/include apr_portable.h Log: Fix Win32 build break Submitted by: John Bley Reviewed by: Bill Stoddard Revision ChangesPath 1.13 +5 -0 apache-2.0/src/lib/apr/include/apr_portable.h Index: apr_portable.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- apr_portable.h1999/10/23 20:15:18 1.12 +++ apr_portable.h1999/11/08 15:35:35 1.13 @@ -64,7 +64,12 @@ extern C { #endif /* __cplusplus */ +#ifndef WIN32 #include apr_config.h +#else +#include apr_win.h +#endif + #include apr_general.h #include apr_thread_proc.h #include apr_file_io.h
cvs commit: apache-2.0/src/lib/apr/include apr_portable.h
martin 99/10/23 13:15:18 Modified:src/lib/apr/file_io/unix dir.c src/lib/apr/file_io/win32 dir.c src/lib/apr/include apr_portable.h Log: Fix interface of ap_get_os_dir(): it previously modified a local pointer without returning anything sensible. Also, in ap_readdir() I modified a questionable use of an uninitialized variable (save_errno) which could result in an endless loop returning APR_SUCCESS when in fact EOF was reached. Revision ChangesPath 1.12 +6 -7 apache-2.0/src/lib/apr/file_io/unix/dir.c Index: dir.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/dir.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- dir.c 1999/10/21 13:15:55 1.11 +++ dir.c 1999/10/23 20:15:16 1.12 @@ -127,13 +127,12 @@ #if APR_HAS_THREADS _POSIX_THREAD_SAFE_FUNCTIONS return readdir_r(thedir-dirstruct, thedir-entry, thedir-entry); #else -int save_errno; -ap_status_t status; thedir-entry = readdir(thedir-dirstruct); if (thedir-entry == NULL) { -if (errno == save_errno) { -return APR_SUCCESS; +/* If NULL was returned, this can NEVER be a success. Can it?! */ +if (errno == APR_SUCCESS) { +return APR_ENOENT; } return errno; } @@ -294,17 +293,17 @@ } /* ***APRDOC - * ap_status_t ap_get_os_dir(ap_os_dir_t *, ap_dir_t *) + * ap_status_t ap_get_os_dir(ap_os_dir_t **, ap_dir_t *) *convert the dir from apr type to os specific type. * arg 1) The apr dir to convert. * arg 2) The os specific dir we are converting to */ -ap_status_t ap_get_os_dir(ap_os_dir_t *thedir, struct dir_t *dir) +ap_status_t ap_get_os_dir(ap_os_dir_t **thedir, struct dir_t *dir) { if (dir == NULL) { return APR_ENODIR; } -thedir = dir-dirstruct; +*thedir = dir-dirstruct; return APR_SUCCESS; } 1.6 +2 -2 apache-2.0/src/lib/apr/file_io/win32/dir.c Index: dir.c === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/win32/dir.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- dir.c 1999/10/12 06:14:43 1.5 +++ dir.c 1999/10/23 20:15:17 1.6 @@ -210,12 +210,12 @@ return APR_SUCCESS; } -ap_status_t ap_get_os_dir(ap_os_dir_t *thedir, struct dir_t *dir) +ap_status_t ap_get_os_dir(ap_os_dir_t **thedir, struct dir_t *dir) { if (dir == NULL) { return APR_ENODIR; } -thedir = dir-dirhand; +*thedir = dir-dirhand; return APR_SUCCESS; } 1.12 +1 -1 apache-2.0/src/lib/apr/include/apr_portable.h Index: apr_portable.h === RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- apr_portable.h1999/10/22 22:30:41 1.11 +++ apr_portable.h1999/10/23 20:15:18 1.12 @@ -187,7 +187,7 @@ #endif ap_status_t ap_get_os_file(ap_os_file_t *, ap_file_t *); -ap_status_t ap_get_os_dir(ap_os_dir_t *, ap_dir_t *); +ap_status_t ap_get_os_dir(ap_os_dir_t **, ap_dir_t *); ap_status_t ap_get_os_sock(ap_os_sock_t *, ap_socket_t *); ap_status_t ap_get_os_lock(ap_os_lock_t *, ap_lock_t *); ap_status_t ap_get_os_proc(ap_os_proc_t *, ap_proc_t *);
cvs commit: apache-2.0/src/lib/apr/include apr_portable.h
rbb 99/10/21 09:43:12 Modified:src/lib/apr/include apr_portable.h Log: Remove the check for HAVE_PTHREAD_H from the common code for ap_get_thread*. This was an unecessary check, although the APR_HAS_THREADS is required. Revision ChangesPath 1.10 +2 -2 apache-2.0/src/lib/apr/include/apr_portable.h Index: apr_portable.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- apr_portable.h1999/10/21 14:31:19 1.9 +++ apr_portable.h1999/10/21 16:43:10 1.10 @@ -192,7 +192,7 @@ ap_status_t ap_get_os_lock(ap_os_lock_t *, ap_lock_t *); ap_status_t ap_get_os_proc(ap_os_proc_t *, ap_proc_t *); ap_status_t ap_get_os_time(ap_os_time_t **, ap_time_t *); -#if APR_HAS_THREADS HAVE_PTHREAD_H +#if APR_HAS_THREADS ap_status_t ap_get_os_thread(ap_os_thread_t *, ap_thread_t *); ap_status_t ap_get_os_threadkey(ap_os_threadkey_t *, ap_key_t *); #endif @@ -203,7 +203,7 @@ ap_status_t ap_put_os_lock(ap_lock_t **, ap_os_lock_t *, ap_context_t *); ap_status_t ap_put_os_proc(ap_proc_t **, ap_os_proc_t *, ap_context_t *); ap_status_t ap_put_os_time(ap_time_t **, ap_os_time_t *, ap_context_t *); -#if APR_HAS_THREADS HAVE_PTHREAD_H +#if APR_HAS_THREADS ap_status_t ap_put_os_thread(ap_thread_t **, ap_os_thread_t *, ap_context_t *); ap_status_t ap_put_os_threadkey(ap_key_t **, ap_os_threadkey_t *, ap_context_t *); #endif
cvs commit: apache-2.0/src/lib/apr/include apr_portable.h
stoddard99/09/13 12:38:02 Modified:src/lib/apr/include apr_portable.h Log: Prevent duplicate declarations Revision ChangesPath 1.4 +11 -0 apache-2.0/src/lib/apr/include/apr_portable.h Index: apr_portable.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- apr_portable.h1999/09/07 13:16:40 1.3 +++ apr_portable.h1999/09/13 19:38:00 1.4 @@ -57,7 +57,13 @@ * This should be the only header file that programs need to include that * actually has platform dependant code which refers to the . */ +#ifndef APR_PORTABLE_H +#define APR_PORTABLE_H +#ifdef __cplusplus +extern C { +#endif /* __cplusplus */ + #include apr_general.h #include apr_thread_proc.h #include apr_file_io.h @@ -192,3 +198,8 @@ ap_status_t ap_put_os_time(ap_context_t *, ap_time_t **, ap_os_time_t *); ap_status_t ap_put_os_threadkey(ap_context_t *, ap_key_t **, ap_os_threadkey_t *); +#ifdef __cplusplus +} +#endif + +#endif /* ! APR_PORTABLE_H */
cvs commit: apache-2.0/src/lib/apr/include apr_portable.h
bjh 99/08/30 07:42:32 Modified:src/lib/apr/include apr_portable.h Log: APR OS/2 - add ap_os_* type defines for OS/2. Revision ChangesPath 1.2 +13 -0 apache-2.0/src/lib/apr/include/apr_portable.h Index: apr_portable.h === RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- apr_portable.h1999/08/17 15:59:37 1.1 +++ apr_portable.h1999/08/30 14:42:32 1.2 @@ -95,6 +95,19 @@ typedef PROCESS_INFORMATION ap_os_proc_t; typedef DWORD ap_os_threadkey_t; typedef SYSTEMTIMEap_os_time_t; + +#elif defined(OS2) +#define INCL_DOS +#include os2.h +typedef HFILE ap_os_file_t; +typedef HDIR ap_os_dir_t; +typedef int ap_os_sock_t; +typedef HMTX ap_os_lock_t; +typedef TID ap_os_thread_t; +typedef PID ap_os_proc_t; +typedef PULONGap_os_threadkey_t; +typedef struct timevalap_os_time_t; + #else /* Any other OS should go above this one. This is the lowest common * denominator typedefs for all UNIX-like systems. :)