Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2015-12-03 03:07:17 +0300
committerBen Wiederhake <BenWiederhake.GitHub@gmx.de>2015-12-30 19:30:09 +0300
commit2ef1b7de04e073beb265aa697bbd7c2576295ce6 (patch)
treecc0ff8beb9aa4485dbf746fd28470a9becbebb21 /mtproto-client.c
parent0d309a85c768317e9b1db60c30898f34a039448a (diff)
Fix bad usage of bswap
Diffstat (limited to 'mtproto-client.c')
-rw-r--r--mtproto-client.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/mtproto-client.c b/mtproto-client.c
index f8964a6..30e36a5 100644
--- a/mtproto-client.c
+++ b/mtproto-client.c
@@ -33,9 +33,6 @@
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
-#if defined(__FreeBSD__) || defined(__OpenBSD__)
-#include <sys/endian.h>
-#endif
#include <sys/types.h>
#ifdef WIN32
#include <winsock2.h>
@@ -67,14 +64,6 @@
#include "auto.h"
#include "tgl-methods-in.h"
-#if defined(__FreeBSD__)
-#define __builtin_bswap32(x) bswap32(x)
-#endif
-
-#if defined(__OpenBSD__)
-#define __builtin_bswap32(x) __swap32gen(x)
-#endif
-
#include "mtproto-common.h"
#define MAX_NET_RES (1L << 16)
@@ -83,15 +72,6 @@
static long long generate_next_msg_id (struct tgl_state *TLS, struct tgl_dc *DC, struct tgl_session *S);
static double get_server_time (struct tgl_dc *DC);
-#if !defined(HAVE___BUILTIN_BSWAP32) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
-static inline unsigned __builtin_bswap32(unsigned x) {
- return ((x << 24) & 0xff000000 ) |
- ((x << 8) & 0x00ff0000 ) |
- ((x >> 8) & 0x0000ff00 ) |
- ((x >> 24) & 0x000000ff );
-}
-#endif
-
// for statistic only
static int total_packets_sent;
static long long total_data_sent;