You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zy...@apache.org on 2012/05/11 19:48:21 UTC

[2/2] TS-672 cleanup Win32 references

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/mgmt/utils/MgmtUtils.h
----------------------------------------------------------------------
diff --git a/mgmt/utils/MgmtUtils.h b/mgmt/utils/MgmtUtils.h
index 400d313..4aab6e7 100644
--- a/mgmt/utils/MgmtUtils.h
+++ b/mgmt/utils/MgmtUtils.h
@@ -45,13 +45,8 @@ void mgmt_blockAllSigs();
 int mgmt_readline(int fd, char *buf, int maxlen);
 int mgmt_writeline(int fd, const char *data, int nbytes);
 
-#if !defined(_WIN32)
 int mgmt_read_pipe(int fd, char *buf, int bytes_to_read);
 int mgmt_write_pipe(int fd, char *buf, int bytes_to_write);
-#else
-int mgmt_read_pipe(HANDLE hpipe, char *buf, int maxlen);
-int mgmt_write_pipe(HANDLE hpipe, char *data, int nbytes);
-#endif
 
 void mgmt_use_syslog();
 void mgmt_cleanup();

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/mgmt/utils/WebMgmtUtils.cc
----------------------------------------------------------------------
diff --git a/mgmt/utils/WebMgmtUtils.cc b/mgmt/utils/WebMgmtUtils.cc
index 18dfd49..4e31df0 100644
--- a/mgmt/utils/WebMgmtUtils.cc
+++ b/mgmt/utils/WebMgmtUtils.cc
@@ -1242,7 +1242,6 @@ processSpawn(const char *args[],
   NOWARN_UNUSED(run_as_root);
   int status = 0;
 
-#ifndef _WIN32
   char buffer[1024];
   int nbytes;
   int stdinPipe[2];
@@ -1391,7 +1390,7 @@ processSpawn(const char *args[],
     removeRootPriv(saved_euid);
   }
 #endif
-#endif // _WIN32
+
   return status;
 }
 
@@ -1405,20 +1404,15 @@ processSpawn(const char *args[],
 int
 getFilesInDirectory(char *managedDir, ExpandingArray * fileList)
 {
-#ifndef _WIN32
   struct dirent *dirEntry;
   DIR *dir;
-#else
-  char *searchPattern;
-  WIN32_FIND_DATA W32FD;
-#endif
+
   char *fileName;
   char *filePath;
   struct stat fileInfo;
   //  struct stat records_config_fileInfo;
   fileEntry *fileListEntry;
 
-#ifndef _WIN32
   if ((dir = opendir(managedDir)) == NULL) {
     mgmt_log(stderr, "[getFilesInDirectory] Unable to open %s directory: %s\n", managedDir, strerror(errno));
     return -1;
@@ -1452,37 +1446,6 @@ getFilesInDirectory(char *managedDir, ExpandingArray * fileList)
   }
 
   closedir(dir);
-#else
-  // Append '\*' as a wildcard for FindFirstFile()
-  searchPattern = newPathString(managedDir, "*");
-  HANDLE hDInfo = FindFirstFile(searchPattern, &W32FD);
-
-  if (INVALID_HANDLE_VALUE == hDInfo) {
-    mgmt_log(stderr, "[getFilesInDirectory] FindFirstFile failed for %s: %s\n", searchPattern, ink_last_err());
-    delete[]searchPattern;
-    return -1;
-  }
-  delete[]searchPattern;
-
-  while (FindNextFile(hDInfo, &W32FD)) {
-    fileName = W32FD.cFileName;
-    filePath = newPathString(managedDir, fileName);
-    if (stat(filePath, &fileInfo) < 0) {
-      mgmt_log(stderr, "[getFilesInDirectory] Stat of a %s failed: %s\n", fileName, strerror(errno));
-    } else {
-      // Ignore ., .., and any dot files
-      if (fileName && *fileName != '.') {
-        fileListEntry = (fileEntry *)ats_malloc(sizeof(fileEntry));
-        fileListEntry->c_time = fileInfo.st_ctime;
-        ink_strlcpy(fileListEntry->name, fileName, sizeof(fileListEntry->name));
-        fileList->addEntry(fileListEntry);
-      }
-    }
-    delete[]filePath;
-  }
-
-  FindClose(hDInfo);
-#endif
 
   fileList->sortWithFunction(fileEntryCmpFunc);
   return 1;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/mgmt/web2/WebCompatibility.h
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebCompatibility.h b/mgmt/web2/WebCompatibility.h
index 09796bc..10fed20 100644
--- a/mgmt/web2/WebCompatibility.h
+++ b/mgmt/web2/WebCompatibility.h
@@ -43,18 +43,9 @@
 // types/defines
 //-------------------------------------------------------------------------
 
-#if defined(_WIN32)
-
-#define WEB_HANDLE_INVALID INVALID_HANDLE_VALUE
-typedef HANDLE WebHandle;
-
-#else
-
 #define WEB_HANDLE_INVALID -1
 typedef int WebHandle;
 
-#endif
-
 //-------------------------------------------------------------------------
 // WebGetHostname
 //-------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/mgmt/web2/WebHttp.cc
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebHttp.cc b/mgmt/web2/WebHttp.cc
index b938f3b..4ea7124 100644
--- a/mgmt/web2/WebHttp.cc
+++ b/mgmt/web2/WebHttp.cc
@@ -53,25 +53,19 @@
 #include "ConfigAPI.h"
 #include "SysAPI.h"
 
-#if !defined(_WIN32)
 // Ugly hack - define HEAP_H and STACK_H to prevent stuff from the
 // template library from being included which SUNPRO CC does not not
 // like.
 #define HEAP_H
 #define STACK_H
-#endif // !defined(_WIN32)
 
 
 //-------------------------------------------------------------------------
 // defines
 //-------------------------------------------------------------------------
 
-#ifndef _WIN32
 #define DIR_MODE S_IRWXU
 #define FILE_MODE S_IRWXU
-#else
-#define FILE_MODE S_IWRITE
-#endif
 
 #define MAX_ARGS         10
 #define MAX_TMP_BUF_LEN  1024
@@ -91,43 +85,6 @@ static InkHashTable *g_autoconf_allow_ht = 0;
 
 static InkHashTable *g_file_bindings_ht = 0;
 
-#if defined(_WIN32)
-// adjustCmdLine
-//
-// This function is used for constructing a command line from a CGI
-// scripting program because Windows doesn't know how to execute a
-// script.  For example, instead of executing "blacklist.cgi", we need
-// to tell Windows to execute "perl.exe blacklist.cgi".
-
-static void
-adjustCmdLine(char *cmdLine, int cmdline_len, const char *cgiFullPath)
-{
-  char line[1024 + 1];
-  char *interpreter = NULL;
-
-  FILE *f = fopen(cgiFullPath, "r");
-  if (f != NULL) {
-    if (fgets(line, 1024, f) != NULL) {
-      int n = strlen(line);
-      if (n > 2 && strncmp(line, "#!", 2) == 0 && line[n - 1] == '\n') {
-        line[n - 1] = '\0';
-        interpreter = line + 2;
-      }
-    }
-    fclose(f);
-  }
-
-  if (interpreter) {
-    snprintf(cmdLine, cmdline_len, "\"%s\" \"%s\"", interpreter, cgiFullPath);
-  } else {
-    ink_strlcpy(cmdLine, cgiFullPath, cmdline_len);
-  }
-  return;
-}
-
-#endif
-
-
 //-------------------------------------------------------------------------
 // handle_record_info
 //
@@ -366,9 +323,7 @@ read_request(WebHttpContext * whc)
   // (in compliance with TCP). This causes problems with the "POST"
   // method. (for example with update.html). With IE, we found ending
   // "\r\n" were not read.  The following work around is to read all
-  // that is left in the socket before closing it.  The same problem
-  // applies for Windows 2000 as well.
-#if !defined(_WIN32)
+  // that is left in the socket before closing it.
 #define MAX_DRAIN_BYTES 32
   // INKqa11524: If the user is malicious and keeps sending us data,
   // we'll go into an infinite spin here.  Fix is to only drain up
@@ -381,17 +336,6 @@ read_request(WebHttpContext * whc)
       drain_bytes++;
     }
   }
-#else
-  {
-    unsigned long i;
-    if (ioctlsocket(whc->si.fd, FIONREAD, &i) != SOCKET_ERROR) {
-      if (i) {
-        char *buf = (char *) alloca(i * sizeof(char));
-        read_socket(whc->si.fd, buf, i);
-      }
-    }
-  }
-#endif
 
   return WEB_HTTP_ERR_OKAY;
 }
@@ -502,7 +446,6 @@ signal_handler_init()
   // read.  All future reads from the socket should fail since
   // incoming traffic is shutdown on the connection and thread should
   // exit normally
-#if !defined(_WIN32)
   sigset_t sigsToBlock;
   // FreeBSD and Linux use SIGUSR1 internally in the threads library
 #if !defined(linux) && !defined(freebsd) && !defined(darwin)
@@ -517,7 +460,6 @@ signal_handler_init()
   sigfillset(&sigsToBlock);
   sigdelset(&sigsToBlock, SIGUSR1);
   ink_thread_sigsetmask(SIG_SETMASK, &sigsToBlock, NULL);
-#endif // !_WIN32
   return WEB_HTTP_ERR_OKAY;
 }
 
@@ -630,7 +572,6 @@ Ltransaction_send:
     goto Ltransaction_close;
 
   // close the connection before logging it to reduce latency
-#ifndef _WIN32
   shutdown(whc->si.fd, 1);
   drain_bytes = 0;
   if (fcntl(whc->si.fd, F_SETFL, O_NONBLOCK) >= 0) {
@@ -638,7 +579,6 @@ Ltransaction_send:
       drain_bytes++;
     }
   }
-#endif
   close_socket(whc->si.fd);
   whc->si.fd = -1;
 
@@ -646,7 +586,6 @@ Ltransaction_close:
 
   // if we didn't close already, close connection
   if (whc->si.fd != -1) {
-#ifndef _WIN32
     shutdown(whc->si.fd, 1);
     drain_bytes = 0;
     if (fcntl(whc->si.fd, F_SETFL, O_NONBLOCK) >= 0) {
@@ -654,7 +593,6 @@ Ltransaction_close:
         drain_bytes++;
       }
     }
-#endif
     close_socket(whc->si.fd);
   }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/mgmt/web2/WebIntrMain.cc
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebIntrMain.cc b/mgmt/web2/WebIntrMain.cc
index 72399f7..a0d8f24 100644
--- a/mgmt/web2/WebIntrMain.cc
+++ b/mgmt/web2/WebIntrMain.cc
@@ -128,7 +128,7 @@ checkWebContext(WebContext * wctx, const char *desc)
   }
 
   defaultFile.copyFrom(wctx->docRoot, strlen(wctx->docRoot));
-  defaultFile.copyFrom("/", 1); // TODO: Win32 support here ?
+  defaultFile.copyFrom("/", 1);
   defaultFile.copyFrom(wctx->defaultFile, strlen(wctx->defaultFile));
 
   if (stat(defaultFile.bufPtr(), &fInfo) < 0) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/mgmt/web2/WebUtils.cc
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebUtils.cc b/mgmt/web2/WebUtils.cc
index 7abaf6a..d1e4510 100644
--- a/mgmt/web2/WebUtils.cc
+++ b/mgmt/web2/WebUtils.cc
@@ -40,15 +40,12 @@
 
 #include "openssl/ssl.h"
 
-#ifndef _WIN32
-
 /* Ugly hack - define HEAP_H and STACK_H to prevent stuff
  *   from the template library from being included which
  *   SUNPRO CC does not not like.
  */
 #define HEAP_H
 #define STACK_H
-#endif // !_WIN32
 
 ssize_t
 socket_write(SocketInfo socketD, const char *buf, size_t nbyte)
@@ -97,15 +94,9 @@ sigfdrdln(SocketInfo socketD, char *s, int len)
 
   do {
 
-#ifndef _WIN32
     do {
       result = socket_read(socketD, &c, 1);
     } while (result < 0 && errno == EAGAIN);
-#else
-    do {
-      result = socket_read(socketD, &c, 1);
-    } while (result == SOCKET_ERROR && WSAGetLastError() == WSAEWOULDBLOCK);
-#endif
 
     // If we are out of bytes or there is an
     //   error, we are done

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/CoreUtils.cc
----------------------------------------------------------------------
diff --git a/proxy/CoreUtils.cc b/proxy/CoreUtils.cc
index 3b74d6f..ef76b49 100644
--- a/proxy/CoreUtils.cc
+++ b/proxy/CoreUtils.cc
@@ -927,14 +927,8 @@ CoreUtils::dump_history(HttpSM * hsm)
 
     fileline = (fileline != NULL) ? fileline : ats_strdup("UNKNOWN");
 
-#if defined(_WIN32)
-    // Visual C++ preprocessor is unable to stringify __LINE__
-    //   so we have to waste a ton a memory and store it
-    //   as an integer
-    printf("%d   %d   %s:%d", e, r, fileline, hsm->history[i].line);
-#else
     printf("%d   %d   %s", e, r, fileline);
-#endif
+
     char buffer[32];
     const char *msg = event_int_to_string(e, sizeof(buffer), buffer);
     printf("   event string: \"%s\"\n", msg);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/ICP.cc
----------------------------------------------------------------------
diff --git a/proxy/ICP.cc b/proxy/ICP.cc
index 4a92ed6..adb7653 100644
--- a/proxy/ICP.cc
+++ b/proxy/ICP.cc
@@ -46,10 +46,6 @@
 #include "BaseManager.h"
 #include "HdrUtils.h"
 
-#if defined (_WIN32)
-extern long glShutdownInProgress;
-#endif
-
 extern CacheLookupHttpConfig global_cache_lookup_config;
 HTTPHdr gclient_request;
 
@@ -577,7 +573,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
           return EVENT_DONE;
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_read_active:     // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -629,7 +625,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
           return EVENT_DONE;
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_read_data:       // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -658,7 +654,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
           break;
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_read_data_done:  // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -804,7 +800,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
           break;                // move to next_state
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_process_data_read:       // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -853,7 +849,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
           break;
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_awaiting_cache_lookup_response:  // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -891,7 +887,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
           return EVENT_DONE;
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_send_reply:      // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -922,7 +918,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
           break;                // move to next_state
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_write_done:      // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -951,7 +947,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
         RECORD_ICP_STATE_CHANGE(s, 0, READ_NOT_ACTIVE);
         break;                  // move to next_state
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_get_icp_request: // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -1007,7 +1003,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
         s->_next_state = READ_NOT_ACTIVE;
         break;                  // move to next_state
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_get_icp_request_mutex:   // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -1036,7 +1032,7 @@ ICPPeerReadCont::PeerReadStateMachine(PeerReadData * s, Event * e)
           break;                // restart
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_read_not_active: // fix DEC warnings
 #endif
       ink_release_assert(0);    // Should never happen
@@ -1183,7 +1179,7 @@ ICPRequestCont::ICPRequestEvent(int event, Event * e)
         break;
       }
     }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
   _end_case:                   // fix DEC warnings
 #endif
     ink_release_assert(0);      // should never happen
@@ -1274,7 +1270,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
           break;                // move to next_state
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_icp_start:       // fix DEC warnings
 #endif
       ink_release_assert(0);    // should never happen
@@ -1295,7 +1291,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
         _next_state = ICP_DONE;
         return EVENT_DONE;
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_icp_off_terminate:       // fix DEC warnings
 #endif
       ink_release_assert(0);    // should never happen
@@ -1372,7 +1368,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
         _next_state = ICP_AWAITING_RESPONSE;
         return EVENT_DONE;
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_icp_queue_request:       // fix DEC warnings
 #endif
       ink_release_assert(0);    // should never happen
@@ -1404,7 +1400,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
           return EVENT_DONE;
         }
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_icp_awaiting_response:   // fix DEC warnings
 #endif
       ink_release_assert(0);    // should never happen
@@ -1419,7 +1415,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
         _next_state = ICP_POST_COMPLETION;
         break;                  // move to next_state
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_icp_dequeue_request:     // fix DEC warnings
 #endif
       ink_release_assert(0);    // should never happen
@@ -1441,7 +1437,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
         _next_state = ICP_WAIT_SEND_COMPLETE;
         break;                  // move to next_state
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_icp_post_completion:     // fix DEC warnings
 #endif
       ink_release_assert(0);    // should never happen
@@ -1457,7 +1453,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
         }
       }
       break;
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_icp_wait_send_complete:  // fix DEC warnings
 #endif
       ink_release_assert(0);    // should never happen
@@ -1475,7 +1471,7 @@ ICPRequestCont::ICPStateMachine(int event, void *d)
         _next_state = ICP_DONE;
         return EVENT_DONE;
       }
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
     _end_case_icp_request_not_active:  // fix DEC warnings
 #endif
       ink_release_assert(0);    // should never happen
@@ -1871,10 +1867,6 @@ ICPProcessor::ICPProcessor()
 
 ICPProcessor::~ICPProcessor()
 {
-#if defined (_WIN32)
-  if (0 < glShutdownInProgress)
-    return;
-#endif
   if (_ICPPeriodic) {
     MUTEX_TAKE_LOCK(_ICPPeriodic->mutex, this_ethread());
     _PeriodicEvent->cancel();
@@ -2376,7 +2368,7 @@ ICPProcessor::ReconfigState_t
     }                           // End of switch
 
   }                             // End of while
-#if !defined(_WIN32) && !defined(__GNUC__)
+#if !defined(__GNUC__)
 _exit_while:                   // fix DEC warnings
 #endif
   return RC_DONE;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/Initialize.cc
----------------------------------------------------------------------
diff --git a/proxy/Initialize.cc b/proxy/Initialize.cc
index 8fd6085..2a74095 100644
--- a/proxy/Initialize.cc
+++ b/proxy/Initialize.cc
@@ -231,7 +231,7 @@ init_system_reconfigure_diags(void)
   ////////////////////////////////////
   // change the diags config values //
   ////////////////////////////////////
-#if !defined (_WIN32) && !defined(__GNUC__) && !defined(hpux)
+#if !defined(__GNUC__) && !defined(hpux)
   diags->config = c;
 #else
   memcpy(((void *) &diags->config), ((void *) &c), sizeof(DiagsConfigState));

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/InkIOCoreAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkIOCoreAPI.cc b/proxy/InkIOCoreAPI.cc
index 661d1d9..c4596fc 100644
--- a/proxy/InkIOCoreAPI.cc
+++ b/proxy/InkIOCoreAPI.cc
@@ -95,11 +95,9 @@ TSReturnCode sdk_sanity_check_null_ptr(void *ptr);
 ////////////////////////////////////////////////////////////////////
 struct INKThreadInternal:public EThread
 {
-#if !defined (_WIN32)
   INKThreadInternal()
     : EThread(DEDICATED, -1)
   {  }
-#endif
 
   TSThreadFunc func;
   void *data;
@@ -129,9 +127,7 @@ TSThreadCreate(TSThreadFunc func, void *data)
 
   thread = NEW(new INKThreadInternal);
 
-#if !defined (_WIN32)
   ink_assert(thread->event_types == 0);
-#endif
 
   thread->func = func;
   thread->data = data;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index 6235507..0dbbbd7 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -1697,7 +1697,7 @@ main(int argc, char **argv)
     HttpProxyPort::loadDefaultIfEmpty();
 
     cacheProcessor.start();
-    udpNet.start(num_of_udp_threads);   // XXX : broken for __WIN32
+    udpNet.start(num_of_udp_threads);
     sslNetProcessor.start(getNumSSLThreads());
 
 #ifndef INK_NO_LOG

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/StatSystem.h
----------------------------------------------------------------------
diff --git a/proxy/StatSystem.h b/proxy/StatSystem.h
index 093dfff..5275e45 100644
--- a/proxy/StatSystem.h
+++ b/proxy/StatSystem.h
@@ -428,34 +428,6 @@ mutex->thread_holding->global_dyn_stats[X].sum += (S)
 global_dyn_stats[X].count = 0; \
 global_dyn_stats[X].sum = 0
 
-#ifdef _WIN32
-
-#define READ_GLOBAL_DYN_STAT(X,C,S) do { \
-  ink_unprot_global_stat_t _s = global_dyn_stats[X]; \
-  for (int _e = 0; _e < eventProcessor.get_thread_count() ; _e++) { \
-    _s.count += eventProcessor._all_ethreads[_e]->global_dyn_stats[X].count; \
-    _s.sum += eventProcessor._all_ethreads[_e]->global_dyn_stats[X].sum; \
-  } \
-  C = _s.count; \
-  S = _s.sum; \
-} while (0)
-
-#define READ_GLOBAL_DYN_COUNT(X,C) do { \
-  ink_statval_t _s = global_dyn_stats[X].count; \
-  for (int _e = 0; _e < eventProcessor.get_thread_count() ; _e++) \
-    _s += eventProcessor._all_ethreads[_e]->global_dyn_stats[X].count; \
-  C = _s; \
-} while (0)
-
-#define READ_GLOBAL_DYN_SUM(X,S) do { \
-  ink_statval_t _s = global_dyn_stats[X].sum; \
-  for (int _e = 0; _e < eventProcessor.get_thread_count() ; _e++) \
-    _s += eventProcessor._all_ethreads[_e]->global_dyn_stats[X].sum; \
-  S = _s; \
-} while (0)
-
-#else
-
 #define READ_GLOBAL_DYN_STAT(X,C,S) do { \
   ink_unprot_global_stat_t _s = global_dyn_stats[X]; \
   for (int _e = 0; _e < eventProcessor.n_ethreads ; _e++) { \
@@ -480,8 +452,6 @@ global_dyn_stats[X].sum = 0
   S = _s; \
 } while (0)
 
-#endif
-
 #define READ_GLOBAL_HTTP_TRANS_STAT(X,C,S) \
 { \
     C = global_http_trans_stats[X].count; \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/Update.cc
----------------------------------------------------------------------
diff --git a/proxy/Update.cc b/proxy/Update.cc
index cf6cbe7..56ef1b6 100644
--- a/proxy/Update.cc
+++ b/proxy/Update.cc
@@ -890,12 +890,7 @@ UpdateConfigManager::BuildUpdateList()
     return (UpdateConfigList *) NULL;
   }
 
-#ifdef _WIN32
-  // O_BINARY to avoid translation of CR-LF
-  int fd = open(ConfigFilePath, O_RDONLY | O_BINARY);
-#else
   int fd = open(ConfigFilePath, O_RDONLY);
-#endif
   if (fd < 0) {
     Warning("read update.config, open failed");
     SignalWarning(MGMT_SIGNAL_CONFIG_ERROR, "read update.config, open failed");

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/config/plugin.config.default
----------------------------------------------------------------------
diff --git a/proxy/config/plugin.config.default b/proxy/config/plugin.config.default
index 37135da..6f257a1 100644
--- a/proxy/config/plugin.config.default
+++ b/proxy/config/plugin.config.default
@@ -1,11 +1,9 @@
 # Comments start with a '#' and continue to the end of the line
 # Blank lines are ignored
 #
-# On UNIX
 # test-plugin.so arg1 arg2 arg3
 #
-# On WIN NT/2000
-# test-plugin.dll arg1 arg2 arg3
+# Example:
 #inktomi/iwx/iwx.so
 #inktomi/abuse/abuse.so etc/trafficserver/abuse.config
 #inktomi/icx/icx.so etc/trafficserver/icx.config

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/config/vaddrs.config.default
----------------------------------------------------------------------
diff --git a/proxy/config/vaddrs.config.default b/proxy/config/vaddrs.config.default
index 2d479d4..f091103 100644
--- a/proxy/config/vaddrs.config.default
+++ b/proxy/config/vaddrs.config.default
@@ -11,12 +11,3 @@
 #     209.1.33.10 hme0 10
 #     209.1.33.11 hme0 11
 #
-# Windows
-#   Format:
-#     <virtual IP address> <pseudo interface>
-#
-#     note: <pseudo interface> is defined in "winnt_intr.config"
-#
-#   Example:
-#     209.1.33.10 intr0
-#     209.1.33.11 intr0

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/config/winnt_intr.config.default
----------------------------------------------------------------------
diff --git a/proxy/config/winnt_intr.config.default b/proxy/config/winnt_intr.config.default
deleted file mode 100644
index 7669940..0000000
--- a/proxy/config/winnt_intr.config.default
+++ /dev/null
@@ -1,17 +0,0 @@
-###########################################################################
-#
-# winnt_intr.config - Network interface configuration file for WIN NT/2000
-#
-# - This config file is used on Windows NT/2000 only.
-#
-# - It stores a list of available network interfaces on the machine.
-#   The first field is the name of the interface. The name can be
-#   arbitrary as long as they are referred to correctly from variables
-#   inside records.config. The names also need to be consistent across
-#   a cluster. The second field is the assigned IP address of the
-#   interface.
-#
-# - Example:
-#   intr0 209.1.32.101
-#
-###########################################################################

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/hdrs/HdrTest.cc
----------------------------------------------------------------------
diff --git a/proxy/hdrs/HdrTest.cc b/proxy/hdrs/HdrTest.cc
index 3b49bf1..2c45c1d 100644
--- a/proxy/hdrs/HdrTest.cc
+++ b/proxy/hdrs/HdrTest.cc
@@ -1565,9 +1565,6 @@ HdrTest::test_regex()
 
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
-#if defined (_WIN32)
-#pragma warning (once:4305)
-#endif
 
 int
 HdrTest::test_accept_language_match()
@@ -2219,6 +2216,3 @@ HdrTest::failures_to_status(const char *testname, int nfail)
   return ((nfail > 0) ? 0 : 1);
 }
 
-#if defined (_WIN32)
-#pragma warning (default:4305)
-#endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/53ebc2f7/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 8e85793..72e1cdc 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -275,15 +275,8 @@ HttpVCTable::cleanup_all()
 #define __REMEMBER(x)  #x
 #define _REMEMBER(x)   __REMEMBER(x)
 
-#if defined(_WIN32)
-// Proper macro expansion is beyond Visual C++
-#define RECORD_FILE_LINE() \
-history[pos].fileline = __FILE__; \
-history[pos].line = __LINE__;
-#else
 #define RECORD_FILE_LINE() \
 history[pos].fileline = __FILE__ ":" _REMEMBER (__LINE__);
-#endif
 
 #define REMEMBER(e,r) \
 { if (REMEMBER_EVENT_FILTER(e)) { \
@@ -6318,14 +6311,7 @@ HttpSM::dump_state_on_assert()
   for (int i = 0; i < hist_size; i++) {
     int r = history[i].reentrancy;
     int e = history[i].event;
-#if defined(_WIN32)
-    // Visual C++ preprocessor is unable to stringify __LINE__
-    //   so we have to waste a ton a memory and store it
-    //   as an integer
-    Error("%d   %d   %s:%d", e, r, history[i].fileline, history[i].line);
-#else
     Error("%d   %d   %s", e, r, history[i].fileline);
-#endif
   }
 
   // Dump the via string