Re: Windows port merge - Service support (part 2) [PATCH]

From: Guido Serassio <serassio@dont-contact.us>
Date: Tue, 22 Apr 2003 18:48:40 +0200

Hi Henrik,

At 17.06 22/04/2003, Henrik Nordstrom wrote:

>Applied with some small cleanups:
>
>1. The USE_UNLINKD ifdef in unlinkd.cc is not applied. There should be
>no reason for this ifdef, and you did not give any motivation why this
>was done.

Opss, this is an unuseful piece of code inherited from the 2.3 Windows
version, the check is already in main.cc

>2. The USE_WIN32_SERVICE ifdefs is converted to #if USE_WIN32_SERVICE
>without redundant checks for WIN32/CYGWIN. #if is the proper method to
>check for config.h defines, and further this define should only be set
>on platforms where it is available and if set elsewhere it is perfectly
>fine if the compile crash and burns.
>
>+#if defined(USE_WIN32_SERVICE) && (defined(_SQUID_MSWIN_) ||
>defined(_SQUID_CYGWIN_))
>
>became
>
>+#if USE_WIN32_SERVICE

OK, I agree.

>3. The #if defined(_SQUID_MSWIN_) || defined(_SQUID_CYGWIN_) wrap of
>win32.cc has been removed. This is already done in automake to not
>compile win32.cc on other platforms.
>
>
>
>Another request for #ifdef cleanup in a future patch:
>
>Today there is many references to #if defined(_SQUID_MSWIN_) ||
>defined(_SQUID_CYGWIN_). I think it would be preferrable if these were
>unified into a single #ifdef _SQUID_WIN32_ which is set on both
>platforms, with _SQUID_MSWIN_ and _SQUID_CYGWIN_ reserved for things
>unique to either of the two platforms.

So, something like this in include/config.h:

#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_

>Note: src/stat.cc was not astyled correctly.

Thanks for the info, I will check carefully the merge result in nt branch.

Regards

Guido

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: guido.serassio@serassio.it
WWW: http://www.serassio.it
Received on Tue Apr 22 2003 - 10:48:45 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:42 MST