You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/06/23 00:57:36 UTC

cvs commit: apache-1.3/src/os/win32 util_win32.c os.h

wrowe       00/06/22 15:57:35

  Modified:    src/include ap_config.h
               src/os/win32 util_win32.c os.h
  Log:
    The attached changes wrap several very MS specific assumptions about
    the state of declarations that vary between MS and Borland.
    No doubt others remain.  Linkage spec is corrected for os_spawnle(),
    but the MMN will be bumped very shortly for the alloc.h rename patch.
  
  Revision  Changes    Path
  1.290     +0 -4      apache-1.3/src/include/ap_config.h
  
  Index: ap_config.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
  retrieving revision 1.289
  retrieving revision 1.290
  diff -u -r1.289 -r1.290
  --- ap_config.h	2000/06/19 20:36:34	1.289
  +++ ap_config.h	2000/06/22 22:57:29	1.290
  @@ -110,11 +110,7 @@
   #define ENUM_BITFIELD(e,n,w)  e n : w
   #endif
   
  -#ifdef WIN32
  -#include "../os/win32/os.h"
  -#else
   #include "os.h"
  -#endif
   
   /* Define one of these according to your system. */
   #if defined(MINT)
  
  
  
  1.35      +1 -1      apache-1.3/src/os/win32/util_win32.c
  
  Index: util_win32.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/win32/util_win32.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- util_win32.c	2000/06/02 16:30:27	1.34
  +++ util_win32.c	2000/06/22 22:57:31	1.35
  @@ -424,7 +424,7 @@
       return _spawnve(mode, szCmd, aszArgs, envp);
   }
   
  -API_EXPORT(int) os_spawnle(int mode, const char *cmdname, ...)
  +API_EXPORT_NONSTD(int) os_spawnle(int mode, const char *cmdname, ...)
   {
       int n;
       va_list vlist;
  
  
  
  1.32      +20 -12    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.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- os.h	1999/09/13 13:32:41	1.31
  +++ os.h	2000/06/22 22:57:33	1.32
  @@ -109,7 +109,10 @@
   typedef int uid_t;
   typedef int gid_t;
   typedef int pid_t;
  -typedef int mode_t;
  +#ifdef _MSC_VER
  +/* modified to match declaration in sys/stat.h */
  +typedef unsigned short mode_t;
  +#endif
   typedef char * caddr_t;
   
   /*
  @@ -118,34 +121,39 @@
   */
   
   #ifdef SHARED_MODULE
  -# define API_VAR_EXPORT		__declspec(dllimport)
  -# define API_EXPORT(type)    __declspec(dllimport) type __stdcall
  -# define API_EXPORT_NONSTD(type)    __declspec(dllimport) type
  +#define API_VAR_EXPORT          __declspec(dllimport)
  +#define API_EXPORT(type)        __declspec(dllimport) type __stdcall
  +#define API_EXPORT_NONSTD(type) __declspec(dllimport) type __cdecl
   #else
  -# define API_VAR_EXPORT		__declspec(dllexport)
  -# define API_EXPORT(type)    __declspec(dllexport) type __stdcall
  -# define API_EXPORT_NONSTD(type)    __declspec(dllexport) type
  +#define API_VAR_EXPORT          __declspec(dllexport)
  +#define API_EXPORT(type)        __declspec(dllexport) type __stdcall
  +#define API_EXPORT_NONSTD(type) __declspec(dllexport) type __cdecl
   #endif
   #define MODULE_VAR_EXPORT   __declspec(dllexport)
   
   #define strcasecmp(s1, s2) stricmp(s1, s2)
   #define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
   #define lstat(x, y) stat(x, y)
  +#ifndef S_ISLNK
   #define S_ISLNK(m) (0)
  -#define S_ISREG(m) ((m & _S_IFREG) == _S_IFREG)
  -#ifndef S_ISDIR
  -#define S_ISDIR(m) (((m) & S_IFDIR) == S_IFDIR)
   #endif
   #ifndef S_ISREG
  -#define S_ISREG(m)      (((m)&(S_IFREG)) == (S_IFREG))
  +#define S_ISREG(m) ((m & _S_IFREG) == _S_IFREG)
   #endif
  +#ifndef S_ISDIR
  +#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
  +#endif
   #define STDIN_FILENO  0
   #define STDOUT_FILENO 1
   #define STDERR_FILENO 2
   #define JMP_BUF jmp_buf
   #define sleep(t) Sleep(t*1000)
  +#ifndef O_CREAT
   #define O_CREAT _O_CREAT
  +#endif
  +#ifndef O_RDWR
   #define O_RDWR _O_RDWR
  +#endif
   #define SIGPIPE 17
   /* Seems Windows is not a subgenius */
   #define NO_SLACK
  @@ -175,7 +183,7 @@
   API_EXPORT(int) os_spawnve(int mode,const char *cmdname,const char *const *argv,const char *const *envp);
   #define _spawnle			    os_spawnle
   #define spawnle				    os_spawnle
  -API_EXPORT(int) os_spawnle(int mode,const char *cmdname,...);
  +API_EXPORT_NONSTD(int) os_spawnle(int mode,const char *cmdname,...);
   
   /* OS-dependent filename routines in util_win32.c */