fielding 99/01/08 15:46:47
Modified: src CHANGES
src/include httpd.h
src/os/bs2000 os.h
src/os/os2 os.h
src/os/tpf os.h
src/os/unix os.h
src/os/win32 os.h
Log:
Revert most of my last commit. Only ap_os_is_filename_valid() can be
moved to os.h, since the other prototypes depend on the pool typedef.
Revision Changes Path
1.1209 +0 -6 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1208
retrieving revision 1.1209
diff -u -r1.1208 -r1.1209
--- CHANGES 1999/01/08 20:08:18 1.1208
+++ CHANGES 1999/01/08 23:46:39 1.1209
@@ -1,11 +1,5 @@
Changes with Apache 1.3.4
- *) Moved prototypes/defines for ap_os_canonical_filename(),
- ap_os_case_canonical_filename(), ap_os_systemcase_filename(), and
- ap_os_is_filename_valid() from httpd.h to the separate os.h files.
- Moved BS2000-specific os_set_account() and os_init_job_environment()
- prototypes to bs2000/os.h. [Roy Fielding]
-
*) Renamed macros status_drops_connection to ap_status_drops_connection
and vestigial scan_script_header to ap_scan_script_header_err,
mostly for aesthetic reasons. [Roy Fielding]
1.261 +23 -0 apache-1.3/src/include/httpd.h
Index: httpd.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/include/httpd.h,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -r1.260 -r1.261
--- httpd.h 1999/01/08 20:08:21 1.260
+++ httpd.h 1999/01/08 23:46:41 1.261
@@ -1017,6 +1017,29 @@
API_EXPORT(int) ap_can_exec(const struct stat *);
API_EXPORT(void) ap_chdir_file(const char *file);
+#ifndef HAVE_CANONICAL_FILENAME
+/*
+ * We can't define these in os.h because of dependence on pool pointer.
+ */
+#define ap_os_canonical_filename(p,f) (f)
+#define ap_os_case_canonical_filename(p,f) (f)
+#define ap_os_systemcase_filename(p,f) (f)
+#else
+API_EXPORT(char *) ap_os_canonical_filename(pool *p, const char *file);
+#ifdef WIN32
+API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char
*szFile);
+API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char
*szFile);
+#else
+#define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f)
+#define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f)
+#endif
+#endif
+
+#ifdef _OSD_POSIX
+extern const char *os_set_account(pool *p, const char *account);
+extern int os_init_job_environment(server_rec *s, const char *user_name, int
one_process);
+#endif /* _OSD_POSIX */
+
char *ap_get_local_host(pool *);
unsigned long ap_get_virthost_addr(char *hostname, unsigned short *port);
1.15 +0 -11 apache-1.3/src/os/bs2000/os.h
Index: os.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/bs2000/os.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- os.h 1999/01/08 20:08:25 1.14
+++ os.h 1999/01/08 23:46:43 1.15
@@ -31,18 +31,7 @@
/* Other ap_os_ routines not used by this platform */
-#define ap_os_canonical_filename(p,f) (f)
-#define ap_os_case_canonical_filename(p,f) (f)
-#define ap_os_systemcase_filename(p,f) (f)
#define ap_os_is_filename_valid(f) (1)
-
-/* Routines in bs2login.c */
-
-#ifdef _OSD_POSIX
-extern const char *os_set_account(pool *p, const char *account);
-extern int os_init_job_environment(server_rec *s, const char *user_name,
- int one_process);
-#endif
/* Sorry if this is ugly, but the include order doesn't allow me
* to use request_rec here... */
1.11 +1 -7 apache-1.3/src/os/os2/os.h
Index: os.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/os2/os.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- os.h 1999/01/08 20:08:25 1.10
+++ os.h 1999/01/08 23:46:44 1.11
@@ -2,6 +2,7 @@
#define APACHE_OS_H
#define PLATFORM "OS/2"
+#define HAVE_CANONICAL_FILENAME
/*
* This file in included in all Apache source code. It contains definitions
@@ -26,13 +27,6 @@
*/
extern int ap_os_is_path_absolute(const char *file);
#endif
-
-/* Canonical Filename Routines */
-
-API_EXPORT(char *) ap_os_canonical_filename(pool *p, const char *file);
-
-#define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f)
-#define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f)
/* FIXME: the following should be implemented on this platform */
#define ap_os_is_filename_valid(f) (1)
1.5 +0 -3 apache-1.3/src/os/tpf/os.h
Index: os.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/tpf/os.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- os.h 1999/01/08 20:08:26 1.4
+++ os.h 1999/01/08 23:46:45 1.5
@@ -35,9 +35,6 @@
/* Other ap_os_ routines not used by this platform */
-#define ap_os_canonical_filename(p,f) (f)
-#define ap_os_case_canonical_filename(p,f) (f)
-#define ap_os_systemcase_filename(p,f) (f)
#define ap_os_is_filename_valid(f) (1)
/* Sorry if this is ugly, but the include order doesn't allow me
1.38 +0 -3 apache-1.3/src/os/unix/os.h
Index: os.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/unix/os.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- os.h 1999/01/08 20:08:27 1.37
+++ os.h 1999/01/08 23:46:46 1.38
@@ -88,9 +88,6 @@
/* Other ap_os_ routines not used by this platform */
-#define ap_os_canonical_filename(p,f) (f)
-#define ap_os_case_canonical_filename(p,f) (f)
-#define ap_os_systemcase_filename(p,f) (f)
#define ap_os_is_filename_valid(f) (1)
/*
1.27 +2 -5 apache-1.3/src/os/win32/os.h
Index: os.h
===================================================================
RCS file: /home/cvs/apache-1.3/src/os/win32/os.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- os.h 1999/01/08 20:08:27 1.26
+++ os.h 1999/01/08 23:46:47 1.27
@@ -33,6 +33,7 @@
#define HAVE_MMAP
#define USE_MMAP_SCOREBOARD
#define MULTITHREAD
+#define HAVE_CANONICAL_FILENAME
typedef int uid_t;
typedef int gid_t;
typedef int pid_t;
@@ -104,12 +105,8 @@
#define spawnle os_spawnle
API_EXPORT(int) os_spawnle(int mode,const char *cmdname,...);
-/* Canonical Filename Routines in util_win32.c */
+/* OS-dependent filename routines in util_win32.c */
-API_EXPORT(char *) ap_os_canonical_filename(pool *p, const char *file);
-API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool,
- const char *szFile);
-API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char
*szFile);
API_EXPORT(int) ap_os_is_filename_valid(const char *file);
/* Abstractions for dealing with shared object files (DLLs on Win32).