diff options
author | Moonchild <moonchild@palemoon.org> | 2021-01-02 19:27:13 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-01-02 19:27:13 +0000 |
commit | 84fa3f9f72e1221c5cd9e0723bffd0c4475e4914 (patch) | |
tree | 4ee9417f28243af45526b7e9857170ee269c1e19 /netwerk | |
parent | 0bb464bfc13e3a0239fd268de265fc332014b385 (diff) | |
download | UXP-84fa3f9f72e1221c5cd9e0723bffd0c4475e4914.tar UXP-84fa3f9f72e1221c5cd9e0723bffd0c4475e4914.tar.gz UXP-84fa3f9f72e1221c5cd9e0723bffd0c4475e4914.tar.lz UXP-84fa3f9f72e1221c5cd9e0723bffd0c4475e4914.tar.xz UXP-84fa3f9f72e1221c5cd9e0723bffd0c4475e4914.zip |
Redundant code path cleanup (#1702)
Remove various obsolete configure options.
Remove Adjust SDK install tracking filth.
Remove redundant code paths in old-configure
This also optimizes linker use
Remove redundant conditional blocks.
Rewrite span.h without constexpr use.
Diffstat (limited to 'netwerk')
-rwxr-xr-x | netwerk/sctp/src/netinet/sctp_os_userspace.h | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/netwerk/sctp/src/netinet/sctp_os_userspace.h b/netwerk/sctp/src/netinet/sctp_os_userspace.h index 13df42423..46d6ba9c2 100755 --- a/netwerk/sctp/src/netinet/sctp_os_userspace.h +++ b/netwerk/sctp/src/netinet/sctp_os_userspace.h @@ -3,6 +3,7 @@ * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. * Copyright (c) 2008-2011, by Brad Penoff. All rights reserved. + * Copyright (c) 2020 by Moonchild Productions. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -49,46 +50,13 @@ #include <Windows.h> #include "user_environment.h" typedef CRITICAL_SECTION userland_mutex_t; -#if WINVER < 0x0600 -enum { - C_SIGNAL = 0, - C_BROADCAST = 1, - C_MAX_EVENTS = 2 -}; -typedef struct -{ - u_int waiters_count; - CRITICAL_SECTION waiters_count_lock; - HANDLE events_[C_MAX_EVENTS]; -} userland_cond_t; -void InitializeXPConditionVariable(userland_cond_t *); -void DeleteXPConditionVariable(userland_cond_t *); -int SleepXPConditionVariable(userland_cond_t *, userland_mutex_t *); -void WakeAllXPConditionVariable(userland_cond_t *); -#define InitializeConditionVariable(cond) InitializeXPConditionVariable(cond) -#define DeleteConditionVariable(cond) DeleteXPConditionVariable(cond) -#define SleepConditionVariableCS(cond, mtx, time) SleepXPConditionVariable(cond, mtx) -#define WakeAllConditionVariable(cond) WakeAllXPConditionVariable(cond) -#else #define DeleteConditionVariable(cond) typedef CONDITION_VARIABLE userland_cond_t; -#endif typedef HANDLE userland_thread_t; #define ADDRESS_FAMILY unsigned __int8 #define IPVERSION 4 #define MAXTTL 255 -/* VS2010 comes with stdint.h */ -#if _MSC_VER >= 1600 #include <stdint.h> -#else -#define uint64_t unsigned __int64 -#define uint32_t unsigned __int32 -#define int32_t __int32 -#define uint16_t unsigned __int16 -#define int16_t __int16 -#define uint8_t unsigned __int8 -#define int8_t __int8 -#endif #ifndef _SIZE_T_DEFINED #define size_t __int32 #endif @@ -218,9 +186,6 @@ typedef char* caddr_t; #define bzero(buf, len) memset(buf, 0, len) #define bcopy(srcKey, dstKey, len) memcpy(dstKey, srcKey, len) -#if _MSC_VER < 1900 -#define snprintf(data, size, format, ...) _snprintf_s(data, size, _TRUNCATE, format, __VA_ARGS__) -#endif #define inline __inline #define __inline__ __inline #define MSG_EOR 0x8 /* data completes record */ |