summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Porter <r.porter@techsmith.com>2020-09-03 10:36:58 -0400
committerRoss Porter <r.porter@techsmith.com>2020-09-03 10:36:58 -0400
commit59bbcd93cf5014170115ce74586e7e6182432764 (patch)
tree99e15e405aaeaa7645030cfd46d212a0fd7822fe
parentc37a4f92f654a7c357423babb4944e148ea407c7 (diff)
downloadlibproxy-git-59bbcd93cf5014170115ce74586e7e6182432764.tar.gz
Trivial Cleanup
While working on c37a4f92, I noticed that there were multiple `#ifdef WIN32` statements that seemed to include duplicated defines. Did the cleanup work to combine these into a single `#ifdef`
-rw-r--r--libproxy/url.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/libproxy/url.cpp b/libproxy/url.cpp
index ee776b2..e264d65 100644
--- a/libproxy/url.cpp
+++ b/libproxy/url.cpp
@@ -20,12 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
******************************************************************************/
-#ifdef WIN32
-#include <io.h>
-#define open _open
-#define O_RDONLY _O_RDONLY
-#define close _close
-#endif
+
#include <fcntl.h> // For ::open()
#include <cstring> // For memcpy()
#include <sstream> // For int/string conversion (using stringstream)
@@ -36,6 +31,8 @@
#ifdef WIN32
#include <io.h>
+#define open _open
+#define O_RDONLY _O_RDONLY
#define close _close
#define read _read
#define SHUT_RDWR SD_BOTH