/*
- * $Id: config.h,v 1.8 2003/01/23 00:36:47 robertc Exp $
+ * $Id: config.h,v 1.9 2003/04/24 06:35:03 hno Exp $
*
* AUTHOR: Duane Wessels
*
#elif defined(__CYGWIN32__) || defined(__CYGWIN__)
#define _SQUID_CYGWIN_
+#define _SQUID_WIN32_
#elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32)
#define _SQUID_MSWIN_
+#define _SQUID_WIN32_
#elif defined(__APPLE__)
#define _SQUID_APPLE_
/*
- * $Id: rfc1123.c,v 1.32 2003/02/03 21:33:15 robertc Exp $
+ * $Id: rfc1123.c,v 1.33 2003/04/24 06:35:04 hno Exp $
*
* DEBUG:
* AUTHOR: Harvest Derived
*/
if (tm->tm_isdst > 0)
dst = -3600;
-#if defined ( _timezone) || defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
+#if defined ( _timezone) || defined(_SQUID_WIN32_)
t -= (_timezone + dst);
#else
t -= (timezone + dst);
/*
- * $Id: cache_cf.cc,v 1.439 2003/04/17 15:25:43 hno Exp $
+ * $Id: cache_cf.cc,v 1.440 2003/04/24 06:35:04 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
fatalf("Unable to open configuration file: %s: %s",
file_name, xstrerror());
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(fp), O_TEXT);
return (NULL);
}
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(wordFile), O_TEXT);
#endif
/*
- * $Id: cache_diff.cc,v 1.18 2003/02/21 22:50:06 robertc Exp $
+ * $Id: cache_diff.cc,v 1.19 2003/04/24 06:35:08 hno Exp $
*
* AUTHOR: Alex Rousskov
*
return 0;
}
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(file), O_BINARY);
#endif
/*
- * $Id: cf_gen.cc,v 1.50 2003/02/21 22:50:07 robertc Exp $
+ * $Id: cf_gen.cc,v 1.51 2003/04/24 06:35:08 hno Exp $
*
* DEBUG: none Generate squid.conf.default and cf_parser.h
* AUTHOR: Max Okumoto
#if HAVE_ASSERT_H
#include <assert.h>
#endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
#include <io.h>
#endif
#if HAVE_FCNTL_H
exit(1);
}
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(fp), O_TEXT);
#endif
exit(1);
}
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(fp), O_TEXT);
#endif
exit(1);
}
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(fp), O_TEXT);
#endif
/*
- * $Id: client.cc,v 1.105 2003/02/21 22:50:07 robertc Exp $
+ * $Id: client.cc,v 1.106 2003/04/24 06:35:08 hno Exp $
*
* DEBUG: section 0 WWW Client
* AUTHOR: Harvest Derived
exit(-1);
}
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(put_fd, O_BINARY);
#endif
/*
- * $Id: comm.cc,v 1.373 2003/04/20 05:28:58 robertc Exp $
+ * $Id: comm.cc,v 1.374 2003/04/24 06:35:08 hno Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
int flags;
int dummy = 0;
#endif
-#if defined (_SQUID_CYGWIN_) || defined (_SQUID_MSWIN_)
+#ifdef _SQUID_WIN32_
int nonblocking = TRUE;
}
#endif
-#if defined (_SQUID_CYGWIN_) || defined (_SQUID_MSWIN_)
+#ifdef _SQUID_WIN32_
}
/*
- * $Id: debug.cc,v 1.89 2003/02/21 22:50:07 robertc Exp $
+ * $Id: debug.cc,v 1.90 2003/04/24 06:35:08 hno Exp $
*
* DEBUG: section 0 Debug Routines
* AUTHOR: Harvest Derived
debug_log = stderr;
}
-#if defined(_SQUID_CYGWIN_)||defined(_SQUID_MSWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(debug_log), O_TEXT);
#endif
/*
- * $Id: defines.h,v 1.113 2003/04/20 05:28:58 robertc Exp $
+ * $Id: defines.h,v 1.114 2003/04/24 06:35:08 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#define HTTP_REQBUF_SZ 4096
/* CygWin & Windows NT Port */
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
#define _WIN_SQUID_SERVICE_CONTROL_STOP SERVICE_CONTROL_STOP
#define _WIN_SQUID_SERVICE_CONTROL_SHUTDOWN SERVICE_CONTROL_SHUTDOWN
#define _WIN_SQUID_SERVICE_CONTROL_INTERROGATE SERVICE_CONTROL_INTERROGATE
/*
- * $Id: disk.cc,v 1.164 2003/02/21 22:50:08 robertc Exp $
+ * $Id: disk.cc,v 1.165 2003/04/24 06:35:08 hno Exp $
*
* DEBUG: section 6 Disk I/O Routines
* AUTHOR: Harvest Derived
static PF diskHandleRead;
static PF diskHandleWrite;
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_)
+#if defined(_SQUID_WIN32_) || defined(_SQUID_OS2_)
static int
diskWriteIsComplete(int fd)
{
}
if (F->flags.write_daemon) {
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_OS2_) || defined(_SQUID_CYGWIN_)
+#if defined(_SQUID_WIN32_) || defined(_SQUID_OS2_)
/*
* on some operating systems, you can not delete or rename
* open files, so we won't allow delayed close.
/*
- * $Id: dns_internal.cc,v 1.58 2003/04/22 15:06:09 hno Exp $
+ * $Id: dns_internal.cc,v 1.59 2003/04/24 06:35:09 hno Exp $
*
* DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c
* AUTHOR: Duane Wessels
using external DNS process.
*/
#ifndef USE_DNSSERVERS
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
#include "squid_windows.h"
#endif
#ifndef _PATH_RESOLV_CONF
#ifndef _SQUID_MSWIN_
static void idnsParseResolvConf(void);
#endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
static void idnsParseWIN32Registry(void);
#endif
static void idnsSendQuery(idns_query * q);
#endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
static void
idnsParseWIN32Registry(void)
{
idnsParseResolvConf();
#endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
if (0 == nns)
idnsParseWIN32Registry();
if (0 == nns)
fatal("Could not find any nameservers.\n"
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
" Please check your TCP-IP settings or /etc/resolv.conf file\n"
#else
" Please check your /etc/resolv.conf file\n"
/*
- * $Id: enums.h,v 1.230 2003/03/10 04:56:38 robertc Exp $
+ * $Id: enums.h,v 1.231 2003/04/24 06:35:09 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/* CygWin & Windows NT Port */
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
/*
* Supported Windows OS types codes
*/
/*
- * $Id: store_dir_ufs.cc,v 1.57 2003/03/06 06:21:41 robertc Exp $
+ * $Id: store_dir_ufs.cc,v 1.58 2003/04/24 06:35:10 hno Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
char *new_path = xstrdup(logFile(".new"));
int fd;
file_close(swaplog_fd);
-#if defined (_SQUID_OS2_) || defined (_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
+#if defined (_SQUID_OS2_) || defined (_SQUID_WIN32_)
if (::unlink(swaplog_path) < 0) {
debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror());
/* rename */
if (state->fd >= 0) {
-#if defined(_SQUID_OS2_) || defined (_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
+#if defined(_SQUID_OS2_) || defined (_SQUID_WIN32_)
file_close(state->fd);
state->fd = -1;
/*
- * $Id: globals.h,v 1.123 2003/04/22 15:06:09 hno Exp $
+ * $Id: globals.h,v 1.124 2003/04/24 06:35:09 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#ifdef _SQUID_MSWIN_
extern unsigned int WIN32_Socks_initialized; /* 0 */
#endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
extern unsigned int WIN32_OS_version; /* 0 */
extern char *WIN32_OS_string; /* NULL */
extern char *WIN32_Service_name; /* NULL */
/*
- * $Id: main.cc,v 1.372 2003/04/22 15:06:10 hno Exp $
+ * $Id: main.cc,v 1.373 2003/04/24 06:35:09 hno Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
version_string,
CONFIG_HOST_TYPE);
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) {
debug(1, 0) ("Running as %s Windows System Service on %s\n", WIN32_Service_name, WIN32_OS_string);
int errcount = 0;
int n; /* # of GC'd objects */
mode_t oldmask;
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
int WIN32_init_err;
#endif
if (FD_SETSIZE < Squid_MaxFD)
Squid_MaxFD = FD_SETSIZE;
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
if ((WIN32_init_err = WIN32_Subsystem_Init()))
return WIN32_init_err;
/*
- * $Id: mime.cc,v 1.111 2003/02/21 22:50:10 robertc Exp $
+ * $Id: mime.cc,v 1.112 2003/04/24 06:35:09 hno Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived
return;
}
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(fp), O_TEXT);
#endif
/*
- * $Id: pinger.cc,v 1.51 2003/02/23 00:08:04 robertc Exp $
+ * $Id: pinger.cc,v 1.52 2003/04/24 06:35:09 hno Exp $
*
* DEBUG: section 42 ICMP Pinger program
* AUTHOR: Duane Wessels
to use the native Windows port definitions.
*/
-#if !defined(_SQUID_MSWIN_) && !defined(_SQUID_CYGWIN_)
+#ifndef _SQUID_WIN32_
#include <netinet/in_systm.h>
#include <netinet/in.h>
static int socket_from_squid = 0;
static int socket_to_squid = 1;
-#else /* _SQUID_MSWIN_ or _SQUID_CYGWIN_ */
+#else /* _SQUID_WIN32_ */
#ifdef _SQUID_MSWIN_
/*
- * $Id: protos.h,v 1.476 2003/04/21 12:52:40 hno Exp $
+ * $Id: protos.h,v 1.477 2003/04/24 06:35:09 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/* CygWin & Windows NT Port */
/* win32.c */
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
#ifdef USE_WIN32_SERVICE
SQUIDCEXTERN int WIN32_Subsystem_Init(int *, char ***);
#else
SQUIDCEXTERN void WIN32_SetServiceCommandLine(void);
SQUIDCEXTERN void WIN32_InstallService(void);
SQUIDCEXTERN void WIN32_RemoveService(void);
-#endif
+#endif /* _SQUID_WIN32_ */
#ifdef _SQUID_MSWIN_
SQUIDCEXTERN int WIN32_getrusage(int, struct rusage *);
/*
- * $Id: squid.h,v 1.233 2003/04/20 05:29:00 robertc Exp $
+ * $Id: squid.h,v 1.234 2003/04/24 06:35:09 hno Exp $
*
* AUTHOR: Duane Wessels
*
#if HAVE_LIMITS_H
#include <limits.h>
#endif
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
#include <io.h>
#endif
/*
- * $Id: stat.cc,v 1.373 2003/04/22 15:06:10 hno Exp $
+ * $Id: stat.cc,v 1.374 2003/04/24 06:35:09 hno Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
storeAppendPrintf(sentry, "Squid Object Cache: Version %s\n",
version_string);
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) {
storeAppendPrintf(sentry,"\nRunning as %s Windows System Service on %s\n",
/*
- * $Id: tools.cc,v 1.234 2003/04/20 05:29:00 robertc Exp $
+ * $Id: tools.cc,v 1.235 2003/04/24 06:35:09 hno Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
return;
}
-#if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_)
+#ifdef _SQUID_WIN32_
setmode(fileno(fp), O_TEXT);
#endif