os.h revision 540bbdd4d087610fc0563f0dc3aab2fc5defbad9
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* ====================================================================
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * Copyright (c) 1995-1999 The Apache Group. All rights reserved.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * Redistribution and use in source and binary forms, with or without
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * modification, are permitted provided that the following conditions
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * 1. Redistributions of source code must retain the above copyright
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * notice, this list of conditions and the following disclaimer.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * 2. Redistributions in binary form must reproduce the above copyright
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * notice, this list of conditions and the following disclaimer in
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * the documentation and/or other materials provided with the
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * distribution.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * 3. All advertising materials mentioning features or use of this
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * software must display the following acknowledgment:
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * "This product includes software developed by the Apache Group
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * for use in the Apache HTTP server project (http://www.apache.org/)."
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * 4. The names "Apache Server" and "Apache Group" must not be used to
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * endorse or promote products derived from this software without
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * prior written permission. For written permission, please contact
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * apache@apache.org.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * 5. Products derived from this software may not be called "Apache"
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * nor may "Apache" appear in their names without prior written
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * permission of the Apache Group.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * 6. Redistributions of any form whatsoever must retain the following
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * acknowledgment:
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * "This product includes software developed by the Apache Group
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * for use in the Apache HTTP server project (http://www.apache.org/)."
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * OF THE POSSIBILITY OF SUCH DAMAGE.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * ====================================================================
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * This software consists of voluntary contributions made by many
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * individuals on behalf of the Apache Group and was originally based
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * on public domain software written at the National Center for
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * Supercomputing Applications, University of Illinois, Urbana-Champaign.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * For more information on the Apache Group and the Apache HTTP server
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * project, please see <http://www.apache.org/>.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * Compile the server including all the Windows NT 4.0 header files by
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * default. We still want the server to run on Win95/98 so use
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * runtime checks before calling NT specific functions to verify we are
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * really running on an NT system.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * This file in included in all Apache source code. It contains definitions
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * of facilities available on _this_ operating system (HAVE_* macros),
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * and prototypes of OS specific functions defined in os.c
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* temporarily replace crypt */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* char *crypt(const char *pw, const char *salt); */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* Although DIR_TYPE is dirent (see nt/readdir.h) we need direct.h for
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* #undef HAVE_TIMES */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* #undef HAVE_GETTIMEOFDAY */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingtypedef char * caddr_t;
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingDefine export types. API_EXPORT_NONSTD is a nasty hack to avoid having to declare
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingevery configuration function as __stdcall.
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#if 0 /* Handled by APR... */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# define API_EXPORT(type) __declspec(dllimport) type __stdcall
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# define API_EXPORT_NONSTD(type) __declspec(dllimport) type
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# define API_EXPORT(type) __declspec(dllexport) type __stdcall
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding# define API_EXPORT_NONSTD(type) __declspec(dllexport) type
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#define S_ISLNK(m) (0)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* Seems Windows is not a subgenius */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding__inline int ap_os_is_path_absolute(const char *file)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding /* For now, just do the same check that http_request.c and mod_alias.c
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#define _spawnv(mode,cmdname,argv) os_spawnv(mode,cmdname,argv)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#define spawnv(mode,cmdname,argv) os_spawnv(mode,cmdname,argv)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#define _spawnve(mode,cmdname,argv,envp) os_spawnve(mode,cmdname,argv,envp)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#define spawnve(mode,cmdname,argv,envp) os_spawnve(mode,cmdname,argv,envp)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* OS-dependent filename routines in util_win32.c */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingAPI_EXPORT(char *) ap_os_canonical_filename(ap_context_t *p, const char *file);
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingAPI_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool, const char *szFile);
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingAPI_EXPORT(char *) ap_os_systemcase_filename(ap_context_t *pPool, const char *szFile);
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingint os_strftime(char *, size_t , const char *, const struct tm *);
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* Abstractions for dealing with shared object files (DLLs on Win32).
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding * These are used by mod_so.c
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#define ap_os_dso_load(l) LoadLibraryEx(l, NULL, LOAD_WITH_ALTERED_SEARCH_PATH)
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* Other ap_os_ routines not used by this platform */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding/* Moved from multithread.h. Axe this stuff when APR comes online... */
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingtypedef void mutex;
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingtypedef void thread;
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingtypedef void event;
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingthread *create_thread(void (thread_fn) (void *thread_arg), void *thread_arg);
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingint await_thread(thread *thread_id, int sec_to_wait);
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fieldingevent *create_event(int manual, int initial, char *name);
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#endif /* ! APACHE_OS_H */