From 25189ef1e6550954237b1fe4b587b028e17a398c Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 6 Apr 2023 18:57:34 -0700 Subject: [PATCH] remove some unused defines. Signed-off-by: Rosen Penev --- src/basicio.cpp | 2 +- src/http.cpp | 11 ++--------- src/jpgimage.cpp | 6 +++--- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/basicio.cpp b/src/basicio.cpp index d0b1a2ef..40e1e201 100644 --- a/src/basicio.cpp +++ b/src/basicio.cpp @@ -37,7 +37,7 @@ #endif #ifdef _WIN32 -#define mode_t unsigned short +using mode_t = unsigned short; #include #include #endif diff --git a/src/http.cpp b/src/http.cpp index 2ef670b0..ec7105e8 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -2,11 +2,6 @@ #include "config.h" -#if defined(_WIN32) -#define __USE_W32_SOCKETS -#include -#endif - #include "futils.hpp" #include "http.hpp" @@ -32,10 +27,6 @@ #include #include -#define fopen_S(f, n, o) f = fopen(n, o) -#define WINAPI -using DWORD = unsigned long; - #define SOCKET_ERROR (-1) #define WSAEWOULDBLOCK EINPROGRESS #define WSAENOTCONN EAGAIN @@ -43,6 +34,8 @@ using DWORD = unsigned long; static int WSAGetLastError() { return errno; } +#else +#include #endif //////////////////////////////////////// diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp index 75f5ae72..5d6cb856 100644 --- a/src/jpgimage.cpp +++ b/src/jpgimage.cpp @@ -16,9 +16,9 @@ #ifdef _WIN32 #include #else -#define BYTE char -#define USHORT uint16_t -#define ULONG uint32_t +using BYTE = char; +using USHORT = uint16_t; +using ULONG = uint32_t; #endif #include "fff.h"