cvs commit: apache-apr/include apr_lock.h apr_errno.h apr_file_io.h apr_general.h apr_network_io.h apr_thread_proc.h
rbb 99/05/12 05:00:12 Modified:include apr_errno.h apr_file_io.h apr_general.h apr_network_io.h apr_thread_proc.h Added: include apr_lock.h Log: Fixing some minor problems in the header files, and adding the locking header file. Revision ChangesPath 1.8 +8 -0 apache-apr/include/apr_errno.h Index: apr_errno.h === RCS file: /home/cvs/apache-apr/include/apr_errno.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- apr_errno.h 1999/05/10 16:58:17 1.7 +++ apr_errno.h 1999/05/12 12:00:10 1.8 @@ -58,6 +58,10 @@ #ifndef APR_ERRNO_H #define APR_ERRNO_H +#ifdef __cplusplus +extern C { +#endif /* __cplusplus */ + /* If this definition of APRStatus changes, then we can remove this, but right now, the decision was to use an errno-like implementation. */ @@ -68,5 +72,9 @@ #define ENOSTAT 4001 #define ENOPOOL 4002 + +#ifdef __cplusplus +} +#endif #endif /* ! APR_ERRNO_H */ 1.22 +7 -0 apache-apr/include/apr_file_io.h Index: apr_file_io.h === RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- apr_file_io.h 1999/05/10 16:58:17 1.21 +++ apr_file_io.h 1999/05/12 12:00:11 1.22 @@ -66,6 +66,9 @@ #include apr_general.h #include apr_errno.h +#ifdef __cplusplus +extern C { +#endif /* __cplusplus */ /* Flags for ap_open */ #define APR_READ 1 /* Open the file for reading */ @@ -132,6 +135,10 @@ /*accessor and general file_io functions. */ char *ap_get_filename(ap_context_t *, ap_file_t *); +#ifdef __cplusplus +} +#endif #endif /* ! APR_FILE_IO_H */ + 1.11 +8 -1 apache-apr/include/apr_general.h Index: apr_general.h === RCS file: /home/cvs/apache-apr/include/apr_general.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- apr_general.h 1999/05/10 16:58:17 1.10 +++ apr_general.h 1999/05/12 12:00:11 1.11 @@ -61,6 +61,10 @@ #ifndef APR_GENERAL_H #define APR_GENERAL_H +#ifdef __cplusplus +extern C { +#endif /* __cplusplus */ + #define TRUE 1 #define FALSE 0 @@ -88,7 +92,10 @@ ap_status_t ap_set_signal_safe(ap_context_t *, ap_int16_t ); ap_status_t ap_set_cancel_safe(ap_context_t *, ap_int16_t); ap_context_t *ap_create_sub_context(ap_context_t *, void *); -ap_status_t ap_destroy_context(ap_context_t *); +ap_status_t ap_exit(ap_context_t *); +#ifdef __cplusplus +} +#endif #endif /* ! APR_GENERAL_H */ 1.17 +8 -0 apache-apr/include/apr_network_io.h Index: apr_network_io.h === RCS file: /home/cvs/apache-apr/include/apr_network_io.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- apr_network_io.h 1999/05/10 16:58:18 1.16 +++ apr_network_io.h 1999/05/12 12:00:11 1.17 @@ -60,6 +60,10 @@ #include apr_errno.h #include networkio.h +#ifdef __cplusplus +extern C { +#endif /* __cplusplus */ + #ifndef MAX_SECS_TO_LINGER #define MAX_SECS_TO_LINGER 30 #endif @@ -110,6 +114,10 @@ ap_int32_t ap_poll(ap_context_t *, ap_pollfd_t *, ap_int32_t, ap_int32_t); /* accessor functions */ + +#ifdef __cplusplus +} +#endif #endif /* ! APR_FILE_IO_H */ 1.8 +33 -1 apache-apr/include/apr_thread_proc.h Index: apr_thread_proc.h === RCS file: /home/cvs/apache-apr/include/apr_thread_proc.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- apr_thread_proc.h 1999/05/10 16:58:18 1.7 +++ apr_thread_proc.h 1999/05/12 12:00:11 1.8 @@ -60,17 +60,40 @@ #include apr_general.h #include apr_errno.h +#ifdef __cplusplus +extern C { +#endif /* __cplusplus */ + typedef enum {APR_SHELLCMD, APR_PROGRAM} ap_cmdtype_e; typedef enum {APR_WAIT, APR_NOWAIT} ap_wait_how_e; +#define CANCEL_ASYNCHAPR_CANCEL_ASYNCH +#define CANCEL_DEFER APR_CANCEL_DEFER +#define CANCEL_ENABLEAPR_CANCEL_ENABLE +#define CANCEL_DISABLE APR_CANCEL_DISABLE + typedef struct thread_t ap_thread_t; typedef struct threadattr_t ap_threadattr_t; typedef struct proc_t ap_proc_t; typedef struct procattr_t ap_procattr_t; -/* Thread Function definitions */ +typedef threadkey_t ap_key_t; +typedef void
cvs commit: apache-apr/apr/locks/unix locks.h
rbb 99/05/12 05:01:11 Modified:apr/locks/unix locks.h Log: Stupid typo, but it would have kept the test programs from working. Submitted by: David Reid Revision ChangesPath 1.2 +1 -1 apache-apr/apr/locks/unix/locks.h Index: locks.h === RCS file: /home/cvs/apache-apr/apr/locks/unix/locks.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- locks.h 1999/05/10 17:57:54 1.1 +++ locks.h 1999/05/12 12:01:10 1.2 @@ -89,7 +89,7 @@ struct flock lock_it; struct flock unlock_it; #elif defined (USE_PTHREAD_MUTEX) -pthread_mutex_t *intraproc; +pthread_mutex_t *interproc; #elif defined (USE_FLOCK_SERIALIZE) int interproc; #else
cvs commit: apache-apr/include apr_file_io.h
rbb 99/05/12 05:31:17 Modified:include apr_file_io.h Log: Make the file_io header file more portable. None of these includes are needed here. They are all included someplace else. Revision ChangesPath 1.23 +0 -6 apache-apr/include/apr_file_io.h Index: apr_file_io.h === RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- apr_file_io.h 1999/05/12 12:00:11 1.22 +++ apr_file_io.h 1999/05/12 12:31:16 1.23 @@ -56,12 +56,6 @@ #ifndef APR_FILE_IO_H #define APR_FILE_IO_H -#include sys/types.h -#include sys/stat.h -#include fcntl.h -#include time.h -#include dirent.h -#include sys/uio.h #include fileio.h #include apr_general.h #include apr_errno.h
cvs commit: apache-1.3/src/main http_request.c
dgaudet 99/05/12 09:50:43 Modified:src CHANGES src/main http_request.c Log: don't assume the struct stat passed to stat() is left alone when the stat fails Submitted by: Ed Korthof [EMAIL PROTECTED] Revision ChangesPath 1.1353+3 -0 apache-1.3/src/CHANGES Index: CHANGES === RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1352 retrieving revision 1.1353 diff -u -r1.1352 -r1.1353 --- CHANGES 1999/05/07 00:38:05 1.1352 +++ CHANGES 1999/05/12 16:50:40 1.1353 @@ -1,5 +1,8 @@ Changes with Apache 1.3.7 + *) When stat() fails, don't assume anything about the contents of + the struct stat. [Ed Korthof [EMAIL PROTECTED]] + *) It's OK for a semop to return EINTR, just loop around and try again. [Dean Gaudet] 1.148 +10 -8 apache-1.3/src/main/http_request.c Index: http_request.c === RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v retrieving revision 1.147 retrieving revision 1.148 diff -u -r1.147 -r1.148 --- http_request.c1999/04/20 23:38:44 1.147 +++ http_request.c1999/05/12 16:50:42 1.148 @@ -265,8 +265,12 @@ *cp = '\0'; return OK; } + /* must set this to zero, some stat()s may have corrupted it + * even if they returned an error. + */ + r-finfo.st_mode = 0; #if defined(ENOENT) defined(ENOTDIR) -else if (errno == ENOENT || errno == ENOTDIR) { +if (errno == ENOENT || errno == ENOTDIR) { last_cp = cp; while (--cp path *cp != '/') @@ -299,15 +303,13 @@ * you needed to do this. Please be sure to include the operating * system you are using. */ -else { -last_cp = cp; + last_cp = cp; -while (--cp path *cp != '/') -continue; + while (--cp path *cp != '/') + continue; -while (cp path cp[-1] == '/') ---cp; -} + while (cp path cp[-1] == '/') + --cp; #endif /* ENOENT ENOTDIR */ } return OK;
cvs commit: apache-apr/apr/file_io/unix dir.c fileacc.c filedup.c fileio.h filestat.c open.c pipe.c readwrite.c seek.c
rbb 99/05/12 11:03:51 Modified:include apr_file_io.h docs fileio.txt apr/file_io/unix dir.c fileacc.c filedup.c fileio.h filestat.c open.c pipe.c readwrite.c seek.c Log: Makes the file I/O code MUCH more portable, because programmers now only have to include apr_file_io.h, and apr takes care of the rest. I will be doing this for the rest of the apr functions today. This also begins to implement the new directory functions. I have ignored the stuff to get the time and the filename, but it was just easier to change the other stuff while I was there. Revision ChangesPath 1.24 +5 -7 apache-apr/include/apr_file_io.h Index: apr_file_io.h === RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- apr_file_io.h 1999/05/12 12:31:16 1.23 +++ apr_file_io.h 1999/05/12 18:02:51 1.24 @@ -56,7 +56,6 @@ #ifndef APR_FILE_IO_H #define APR_FILE_IO_H -#include fileio.h #include apr_general.h #include apr_errno.h @@ -96,11 +95,10 @@ /* should be same as whence type in lseek, POSIZ defines this as int */ typedef ap_int32_t ap_seek_where_t; -typedef struct file_t ap_file_t; -typedef struct dir_t ap_dir_t; -typedef fileperms_t ap_fileperms_t; -typedef dirent_t ap_dirent_t; -typedef iovec_t ap_iovec_t; +typedef struct file_tap_file_t; +typedef struct dir_t ap_dir_t; +typedef iovec_t ap_iovec_t; +typedef fileperms_t ap_fileperms_t; /* Function definitions */ ap_file_t *ap_open(ap_context_t *, char *, ap_int32_t, ap_fileperms_t); @@ -118,7 +116,7 @@ ap_dir_t *ap_opendir(ap_context_t *, const char *); ap_status_t ap_closedir(ap_context_t *, ap_dir_t *); -ap_dirent_t *ap_readdir(ap_context_t *, ap_dir_t *); +ap_status_t ap_readdir(ap_context_t *, ap_dir_t *); ap_status_t ap_rewinddir(ap_context_t *, ap_dir_t *); ap_status_t ap_make_dir(ap_context_t *, const char *, ap_fileperms_t); ap_status_t ap_remove_dir(ap_context_t *, const char *); 1.21 +2 -2 apache-apr/docs/fileio.txt Index: fileio.txt === RCS file: /home/cvs/apache-apr/docs/fileio.txt,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- fileio.txt1999/05/10 14:36:17 1.20 +++ fileio.txt1999/05/12 18:03:01 1.21 @@ -128,12 +128,12 @@ arg 2) abstracted directory descriptor structure to be closed. return) APR_SUCCESS or APR_FAILURE - ap_dirent_t *ap_readdir(ap_context_t *, ap_dir_t *) + ap_status_t *ap_readdir(ap_context_t *, ap_dir_t *) Retrieve the next directory entry from the specified directory. Arguments: arg 1) The context to use. arg 2) Abstracted directory descriptor to read from. - return) the next directory entry. + return) APR_SUCCESS or APR_FAILURE. ap_status_t *ap_rewinddir(ap_context_t *, ap_dir_t *) Rewind directory to beginning of stream 1.4 +15 -9 apache-apr/apr/file_io/unix/dir.c Index: dir.c === RCS file: /home/cvs/apache-apr/apr/file_io/unix/dir.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dir.c 1999/05/10 14:36:24 1.3 +++ dir.c 1999/05/12 18:03:08 1.4 @@ -53,12 +53,13 @@ * */ -#include apr_file_io.h #include errno.h #include string.h #include dirent.h +#include fileio.h +#include apr_file_io.h -ap_status_t dir_cleanup(ap_dir_t *thedir) +ap_status_t dir_cleanup(struct dir_t *thedir) { if (closedir(thedir-dirstruct) == 0) { return APR_SUCCESS; @@ -68,9 +69,9 @@ } } -ap_dir_t *ap_opendir(ap_context_t *cont, const char *dirname) +struct dir_t *ap_opendir(ap_context_t *cont, const char *dirname) { -ap_dir_t *thedir = (ap_dir_t *)ap_palloc(cont-pool, sizeof(ap_dir_t)); +struct dir_t *thedir = (struct dir_t *)ap_palloc(cont-pool, sizeof(struct dir_t)); thedir-dirname = strdup(dirname); thedir-dirstruct = opendir(dirname); @@ -81,11 +82,12 @@ } else { ap_register_cleanup(cont-pool, (void *)thedir, dir_cleanup, NULL); +thedir-entry = NULL; return thedir; } } -ap_status_t ap_closedir(ap_context_t *cont, ap_dir_t *thedir) +ap_status_t ap_closedir(ap_context_t *cont, struct dir_t *thedir) { if (dir_cleanup(thedir) == APR_SUCCESS) { ap_kill_cleanup(cont-pool, thedir, dir_cleanup); @@ -94,18 +96,22 @@
cvs commit: apache-apr/apr/file_io/unix dir.c fileacc.c fileio.h open.c pipe.c readwrite.c
rbb 99/05/12 12:15:33 Modified:include apr_file_io.h apr/test testfile.c apr/file_io/unix dir.c fileacc.c fileio.h open.c pipe.c readwrite.c Log: Final commit for portability. Now, the user only has to include apr_file_io.h. Revision ChangesPath 1.25 +11 -11apache-apr/include/apr_file_io.h Index: apr_file_io.h === RCS file: /home/cvs/apache-apr/include/apr_file_io.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- apr_file_io.h 1999/05/12 18:02:51 1.24 +++ apr_file_io.h 1999/05/12 19:15:26 1.25 @@ -80,25 +80,25 @@ #define APR_END SEEK_END /* Permissions flags */ -#define APR_UREAD UREAD -#define APR_UWRITEUWRITE -#define APR_UEXECUTE UEXECUTE +#define APR_UREAD 0x400 +#define APR_UWRITE0x200 +#define APR_UEXECUTE 0x100 -#define APR_GREAD GREAD -#define APR_GWRITEGWRITE -#define APR_GEXECUTE GEXECUTE +#define APR_GREAD 0x040 +#define APR_GWRITE0x020 +#define APR_GEXECUTE 0x010 -#define APR_WREAD WREAD -#define APR_WWRITEWWRITE -#define APR_WEXECUTE WEXECUTE +#define APR_WREAD 0x004 +#define APR_WWRITE0x002 +#define APR_WEXECUTE 0x001 /* should be same as whence type in lseek, POSIZ defines this as int */ typedef ap_int32_t ap_seek_where_t; typedef struct file_tap_file_t; typedef struct dir_t ap_dir_t; -typedef iovec_t ap_iovec_t; -typedef fileperms_t ap_fileperms_t; +typedef struct iovec_t ap_iovec_t; +typedef ap_int32_t ap_fileperms_t; /* Function definitions */ ap_file_t *ap_open(ap_context_t *, char *, ap_int32_t, ap_fileperms_t); 1.15 +3 -14 apache-apr/apr/test/testfile.c Index: testfile.c === RCS file: /home/cvs/apache-apr/apr/test/testfile.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- testfile.c1999/05/10 14:36:33 1.14 +++ testfile.c1999/05/12 19:15:28 1.15 @@ -52,7 +52,6 @@ * project, please see http://www.apache.org/. * */ - #include apr_file_io.h #include apr_errno.h #include apr_general.h @@ -190,7 +189,7 @@ return APR_FAILURE; } -if (ap_remove_file(context, thefile-fname) == APR_FAILURE) { +if (ap_remove_file(context, testdel) == APR_FAILURE) { return APR_FAILURE; } @@ -209,7 +208,6 @@ int testdirs(ap_context_t *context) { ap_dir_t *temp; -ap_dirent_t *entry, *entry1; fprintf(stdout, Testing Directory functions.\n); @@ -236,7 +234,7 @@ } fprintf(stdout, \tReading Directory...); -if ((entry = ap_readdir(context, temp)) == NULL) { +if ((ap_readdir(context, temp)) == APR_FAILURE) { fprintf(stderr, Could not read directory\n); return -1; } @@ -247,16 +245,7 @@ fprintf(stdout, \tRewinding directory...); ap_rewinddir(context, temp); - -if ((entry1 = ap_readdir(context, temp)) != NULL) { -if (entry1-d_ino != entry-d_ino) { -fprintf(stderr, Couldn't rewind directory\n); -return -1; -} -else { -fprintf(stdout, OK\n); -} -} +fprintf(stdout, OK\n); fprintf(stdout, \tClosing Directory...); if (ap_closedir(context, temp) == APR_FAILURE) { 1.5 +2 -1 apache-apr/apr/file_io/unix/dir.c Index: dir.c === RCS file: /home/cvs/apache-apr/apr/file_io/unix/dir.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- dir.c 1999/05/12 18:03:08 1.4 +++ dir.c 1999/05/12 19:15:29 1.5 @@ -111,8 +111,9 @@ return APR_SUCCESS; } -ap_status_t ap_make_dir(ap_context_t *cont, const char *path, fileperms_t mode) +ap_status_t ap_make_dir(ap_context_t *cont, const char *path, ap_fileperms_t perm) { +mode_t mode = get_fileperms(perm); if (mkdir(path, mode) == 0) { return APR_SUCCESS; } 1.6 +27 -0 apache-apr/apr/file_io/unix/fileacc.c Index: fileacc.c === RCS file: /home/cvs/apache-apr/apr/file_io/unix/fileacc.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- fileacc.c 1999/05/12 18:03:11 1.5 +++ fileacc.c 1999/05/12 19:15:29 1.6 @@ -58,6 +58,7 @@ #include apr_general.h #include errno.h #include string.h +#include sys/types.h /* A file
cvs commit: apache-apr/apr/test Makefile server.c testsock.c
rbb 99/05/12 12:46:20 Modified:docs networkio.txt include apr_network_io.h apr/network_io/unix networkio.h poll.c sendrecv.c sockets.c sockopt.c apr/test Makefile server.c testsock.c Log: Changes to make the network code more portable. Now, users just include apr_network_io.h and the apr layer takes care of the rest. Revision ChangesPath 1.22 +16 -0 apache-apr/docs/networkio.txt Index: networkio.txt === RCS file: /home/cvs/apache-apr/docs/networkio.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- networkio.txt 1999/05/10 14:36:18 1.21 +++ networkio.txt 1999/05/12 19:46:11 1.22 @@ -86,6 +86,22 @@ Arguments: arg 1) The ap_sd_set we are clearing. + ap_pollfd_t *ap_setup_pool(ap_context_t *, ap_int32_t) +Allocate storage for poll variables. + Arguments: +arg 1) Context to operate on. +arg 2) How many sockets to poll on. +return) Allocated poll list. NULL on error. + + void ap_add_poll_socket(ap_context_t *, ap_pollfd_t *, ap_socket_t *, ap_int16_t, ap_int32_t) +Add a socket to the poll list. + Arguments: +arg 1) context to operate on. +arg 2) poll list to add to +arg 3) socket to add +arg 4) events to listen for +arg 5) position in poll list. (This may go away when I have time to do it.) + ap_int32_t ap_poll(ap_pollfd_t *, ap_int32_t, ap_int32_t) Monitor sockets for specifiedconditions. Arguments: 1.18 +8 -7 apache-apr/include/apr_network_io.h Index: apr_network_io.h === RCS file: /home/cvs/apache-apr/include/apr_network_io.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- apr_network_io.h 1999/05/12 12:00:11 1.17 +++ apr_network_io.h 1999/05/12 19:46:14 1.18 @@ -58,7 +58,6 @@ #include apr_general.h #include apr_errno.h -#include networkio.h #ifdef __cplusplus extern C { @@ -79,12 +78,12 @@ #define APR_SO_NONBLOCK 8 #define APR_SO_REUSEADDR 16 -#define APR_POLLINAPOLLIN -#define APR_POLLPRI APOLLPRI -#define APR_POLLOUT APOLLOUT -#define APR_POLLERR APOLLERR -#define APR_POLLHUP APOLLHUP -#define APR_POLLNVAL APOLLNVAL +#define APR_POLLIN0x001 +#define APR_POLLPRI 0x002 +#define APR_POLLOUT 0x004 +#define APR_POLLERR 0x010 +#define APR_POLLHUP 0x020 +#define APR_POLLNVAL 0x040 typedef enum {APR_SHUTDOWN_READ, APR_SHUTDOWN_WRITE, APR_SHUTDOWN_READWRITE} ap_shutdown_how_e; @@ -112,7 +111,9 @@ ap_status_t ap_setsocketopt(ap_context_t *, ap_socket_t *, ap_int32_t, ap_int32_t); ap_status_t ap_setport(ap_context_t *, ap_socket_t *, ap_uint32_t); +ap_pollfd_t *ap_setup_poll(ap_context_t *, ap_int32_t); ap_int32_t ap_poll(ap_context_t *, ap_pollfd_t *, ap_int32_t, ap_int32_t); +void ap_add_poll_socket(ap_context_t *, ap_pollfd_t *, ap_socket_t *, ap_int16_t, ap_int32_t); /* accessor functions */ #ifdef __cplusplus 1.8 +2 -7 apache-apr/apr/network_io/unix/networkio.h Index: networkio.h === RCS file: /home/cvs/apache-apr/apr/network_io/unix/networkio.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- networkio.h 1999/05/10 14:36:30 1.7 +++ networkio.h 1999/05/12 19:46:16 1.8 @@ -60,13 +60,6 @@ #include apr_general.h #include poll.h -#define APOLLIN POLLIN -#define APOLLPRI POLLPRI -#define APOLLOUT POLLOUT -#define APOLLERR POLLERR -#define APOLLHUP POLLHUP -#define APOLLNVALPOLLNVAL - struct socket_t { int socketdes; char *remote_hostname; @@ -79,6 +72,8 @@ ap_int16_t events; ap_int16_t revents; }; + +ap_int16_t get_event(ap_int16_t); #endif /* ! NETWORK_IO_H */ 1.4 +38 -2 apache-apr/apr/network_io/unix/poll.c Index: poll.c === RCS file: /home/cvs/apache-apr/apr/network_io/unix/poll.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- poll.c1999/05/10 14:36:30 1.3 +++ poll.c1999/05/12 19:46:17 1.4 @@ -53,13 +53,49 @@ * */ -#include apr_network_io.h #include networkio.h +#include apr_network_io.h #include apr_general.h #include errno.h #include sys/poll.h + + +ap_pollfd_t *ap_setup_poll(ap_context_t *context, ap_int32_t num) +{ +struct pollfd_t *new; +new =
cvs commit: apache-1.3/src Makefile.tmpl
coar99/05/12 13:00:09 Modified:src Makefile.tmpl Log: .def isn't a universally-recognised suffix; versions of make that don't know about it will think .def.a is a target rather than a rule. Revision ChangesPath 1.112 +1 -0 apache-1.3/src/Makefile.tmpl Index: Makefile.tmpl === RCS file: /home/cvs/apache-1.3/src/Makefile.tmpl,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- Makefile.tmpl 1999/05/04 11:21:08 1.111 +++ Makefile.tmpl 1999/05/12 20:00:07 1.112 @@ -15,6 +15,7 @@ $(CC) -c $(INCLUDES) $(CFLAGS) $ # Used to generate import library for OS/2 +.SUFFIXES: .def .def.a: emximp -o $@ $
cvs commit: apache-apr/apr/test Makefile testsock.c
rbb 99/05/12 13:04:38 Modified:include apr_thread_proc.h apr/threadproc/unix proc.c thread.c threadcancel.c threadpriv.c threadproc.h apr/test Makefile testsock.c Added: apr/threadproc/unix signals.c Log: Make thread/process stuff more portable. Revision ChangesPath 1.9 +3 -2 apache-apr/include/apr_thread_proc.h Index: apr_thread_proc.h === RCS file: /home/cvs/apache-apr/include/apr_thread_proc.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- apr_thread_proc.h 1999/05/12 12:00:11 1.8 +++ apr_thread_proc.h 1999/05/12 20:04:21 1.9 @@ -56,7 +56,7 @@ #ifndef APR_THREAD_PROC_H #define APR_THREAD_PROC_H -#include threadproc.h +#include apr_file_io.h #include apr_general.h #include apr_errno.h @@ -77,7 +77,7 @@ typedef struct proc_t ap_proc_t; typedef struct procattr_t ap_procattr_t; -typedef threadkey_t ap_key_t; +typedef struct threadkey_tap_key_t; typedef void *(*ap_thread_start_t)(void *); @@ -109,6 +109,7 @@ ap_proc_t *ap_create_process(ap_context_t *, char *, char *const [], char **, ap_procattr_t *); ap_status_t ap_wait_proc(ap_context_t *, ap_proc_t *, ap_wait_how_e); +void ap_kill(ap_proc_t *, ap_int32_t); #ifdef __cplusplus } #endif 1.9 +16 -15apache-apr/apr/threadproc/unix/proc.c Index: proc.c === RCS file: /home/cvs/apache-apr/apr/threadproc/unix/proc.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- proc.c1999/05/10 15:29:40 1.8 +++ proc.c1999/05/12 20:04:23 1.9 @@ -53,18 +53,19 @@ * */ +#include threadproc.h +#include fileio.h + #include apr_thread_proc.h #include apr_file_io.h #include apr_general.h -#include threadproc.h -#include fileio.h #include signal.h #include string.h #include sys/wait.h -ap_procattr_t *ap_createprocattr_init(ap_context_t *cont) +struct procattr_t *ap_createprocattr_init(ap_context_t *cont) { -ap_procattr_t *new = (ap_procattr_t *)ap_palloc(cont-pool, sizeof(ap_procattr_t)); +struct procattr_t *new = (struct procattr_t *)ap_palloc(cont-pool, sizeof(struct procattr_t)); new-parent_in = NULL; new-child_in = NULL; @@ -77,7 +78,7 @@ return new; } -ap_status_t ap_setprocattr_io(ap_context_t *cont, ap_procattr_t *attr, ap_int32_t in, +ap_status_t ap_setprocattr_io(ap_context_t *cont, struct procattr_t *attr, ap_int32_t in, ap_int32_t out, ap_int32_t err) { if (in) { @@ -112,19 +113,19 @@ } } -ap_status_t ap_setprocattr_dir(ap_context_t *cont, ap_procattr_t *attr, +ap_status_t ap_setprocattr_dir(ap_context_t *cont, struct procattr_t *attr, char *dir) { attr-currdir = strdup(dir); } -ap_status_t ap_setprocattr_cmdtype(ap_context_t *cont, ap_procattr_t *attr, +ap_status_t ap_setprocattr_cmdtype(ap_context_t *cont, struct procattr_t *attr, ap_cmdtype_e cmd) { attr-cmdtype = cmd; } -ap_int32_t ap_fork(ap_context_t *cont, ap_proc_t *proc) +ap_int32_t ap_fork(ap_context_t *cont, struct proc_t *proc) { int pid; @@ -141,11 +142,11 @@ return 1; } -ap_proc_t *ap_create_process(ap_context_t *cont, char *progname, +struct proc_t *ap_create_process(ap_context_t *cont, char *progname, char *const args[], char **env, - ap_procattr_t *attr) + struct procattr_t *attr) { -ap_proc_t *new = (ap_proc_t *)ap_palloc(cont-pool, sizeof(ap_proc_t)); +struct proc_t *new = (struct proc_t *)ap_palloc(cont-pool, sizeof(struct proc_t)); int i; char **newargs; @@ -215,22 +216,22 @@ return new; } -ap_file_t *ap_get_childin(ap_context_t *cont, ap_proc_t *proc) +ap_file_t *ap_get_childin(ap_context_t *cont, struct proc_t *proc) { return proc-attr-parent_in; } -ap_file_t *ap_get_childout(ap_context_t *cont, ap_proc_t *proc) +ap_file_t *ap_get_childout(ap_context_t *cont, struct proc_t *proc) { return proc-attr-parent_out; } -ap_file_t *ap_get_childerr(ap_context_t *cont, ap_proc_t *proc) +ap_file_t *ap_get_childerr(ap_context_t *cont, struct proc_t *proc) { return proc-attr-parent_err; } -ap_status_t ap_wait_proc(ap_context_t *cont, ap_proc_t *proc, +ap_status_t ap_wait_proc(ap_context_t *cont, struct proc_t *proc, ap_wait_how_e wait) { if