Skip to content

Commit 3a5475b

Browse files
committed
Remove Windows support which was broken in 1.0.
1 parent 565e93c commit 3a5475b

28 files changed

+18
-921
lines changed

README-WIN.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/CMakeLists.txt

Lines changed: 0 additions & 113 deletions
This file was deleted.

src/db_driver.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
#ifdef HAVE_CONFIG_H
2121
# include "config.h"
2222
#endif
23-
#ifdef _WIN32
24-
#include "sb_win.h"
25-
#endif
2623
#ifdef STDC_HEADERS
2724
# include <ctype.h>
2825
# include <inttypes.h>

src/drivers/mysql/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/drivers/mysql/drv_mysql.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
#ifdef HAVE_CONFIG_H
2323
# include "config.h"
2424
#endif
25-
#ifdef _WIN32
26-
#include <winsock2.h>
27-
#endif
2825

2926
#ifdef HAVE_STRING_H
3027
# include <string.h>

src/sb_barrier.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (C) 2016 Alexey Kopytov <[email protected]>
2+
Copyright (C) 2016-2018 Alexey Kopytov <[email protected]>
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -19,8 +19,7 @@
1919
/*
2020
Thread barrier implementation. It differs from pthread_barrier_t in two ways:
2121
22-
- it's more portable (will also work on OS X and Windows with existing
23-
pthread_* wrappers in sb_win.c).
22+
- it's more portable (will also work on OS X).
2423
2524
- it allows defining a callback function which is called right before
2625
signaling the participating threads to continue, i.e. as soon as the

src/sb_barrier.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (C) 2016 Alexey Kopytov <[email protected]>
2+
Copyright (C) 2016-2018 Alexey Kopytov <[email protected]>
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -29,10 +29,6 @@
2929
# include <pthread.h>
3030
#endif
3131

32-
#ifdef _WIN32
33-
#include "sb_win.h"
34-
#endif
35-
3632
#define SB_BARRIER_SERIAL_THREAD 1
3733

3834
typedef int (*sb_barrier_cb_t)(void *);

src/sb_histogram.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2011-2017 Alexey Kopytov.
1+
/* Copyright (C) 2011-2018 Alexey Kopytov.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -18,9 +18,6 @@
1818
#ifdef HAVE_CONFIG_H
1919
# include "config.h"
2020
#endif
21-
#ifdef _WIN32
22-
#include "sb_win.h"
23-
#endif
2421

2522
#ifdef STDC_HEADERS
2623
# include <stdio.h>

src/sb_logger.c

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Copyright (C) 2004 MySQL AB
2-
Copyright (C) 2004-2017 Alexey Kopytov <[email protected]>
2+
Copyright (C) 2004-2018 Alexey Kopytov <[email protected]>
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -19,9 +19,6 @@
1919
#ifdef HAVE_CONFIG_H
2020
# include "config.h"
2121
#endif
22-
#ifdef _WIN32
23-
#include "sb_win.h"
24-
#endif
2522

2623
#ifdef STDC_HEADERS
2724
# include <stdio.h>
@@ -372,16 +369,6 @@ void log_errno(log_msg_priority_t priority, const char *fmt, ...)
372369
int old_errno;
373370
char *tmp;
374371

375-
#ifdef _WIN32
376-
LPVOID lpMsgBuf;
377-
old_errno = GetLastError();
378-
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
379-
FORMAT_MESSAGE_ALLOCATE_BUFFER |
380-
FORMAT_MESSAGE_IGNORE_INSERTS,
381-
NULL, old_errno,
382-
0, (LPTSTR)&lpMsgBuf, 0, NULL);
383-
tmp = (char *)lpMsgBuf;
384-
#else
385372
old_errno = errno;
386373
#ifdef HAVE_STRERROR_R
387374
#ifdef STRERROR_R_CHAR_P
@@ -394,8 +381,7 @@ void log_errno(log_msg_priority_t priority, const char *fmt, ...)
394381
strncpy(errbuf, strerror(old_errno), sizeof(errbuf));
395382
tmp = errbuf;
396383
#endif /* HAVE_STRERROR_P */
397-
#endif /* WIN32 */
398-
384+
399385
va_start(ap, fmt);
400386
n = vsnprintf(buf, TEXT_BUFFER_SIZE, fmt, ap);
401387
va_end(ap);
@@ -404,10 +390,6 @@ void log_errno(log_msg_priority_t priority, const char *fmt, ...)
404390
snprintf(buf + n, TEXT_BUFFER_SIZE - n, " errno = %d (%s)", old_errno,
405391
tmp);
406392

407-
#ifdef _WIN32
408-
LocalFree(lpMsgBuf);
409-
#endif
410-
411393
log_text(priority, "%s", buf);
412394
}
413395

src/sb_options.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
#ifdef HAVE_CONFIG_H
2020
# include "config.h"
2121
#endif
22-
#ifdef _WIN32
23-
# include "sb_win.h"
24-
#endif
2522

2623
#ifdef STDC_HEADERS
2724
# include <stdio.h>

0 commit comments

Comments
 (0)