parent
c3314fd593
commit
40e6a75709
@ -14,6 +14,7 @@ Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -22,6 +23,7 @@ Contributors:
|
||||
#include <string.h>
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <strings.h>
|
||||
#else
|
||||
#include <process.h>
|
||||
#include <winsock2.h>
|
||||
|
@ -14,6 +14,8 @@ Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
|
||||
/* For nanosleep */
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@ -21,7 +23,7 @@ Contributors:
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#else
|
||||
#include <process.h>
|
||||
#include <winsock2.h>
|
||||
@ -442,7 +444,10 @@ int main(int argc, char *argv[])
|
||||
#ifdef WIN32
|
||||
Sleep(100);
|
||||
#else
|
||||
usleep(100000);
|
||||
struct timespec ts;
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 100000000;
|
||||
nanosleep(&ts, NULL);
|
||||
#endif
|
||||
}
|
||||
rc = MOSQ_ERR_SUCCESS;
|
||||
|
@ -14,6 +14,8 @@ Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 199309L
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
1
config.h
1
config.h
@ -28,3 +28,4 @@
|
||||
#define uthash_malloc(sz) mosquitto__malloc(sz)
|
||||
#define uthash_free(ptr,sz) mosquitto__free(ptr)
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
@ -123,12 +123,12 @@ else
|
||||
CFLAGS?=-Wall -ggdb -O2
|
||||
endif
|
||||
|
||||
LIB_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I. -I.. -I../lib
|
||||
LIB_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I. -I.. -I../lib -std=c99
|
||||
LIB_CXXFLAGS:=$(LIB_CFLAGS) ${CPPFLAGS}
|
||||
LIB_LDFLAGS:=${LDFLAGS}
|
||||
|
||||
BROKER_CFLAGS:=${LIB_CFLAGS} ${CPPFLAGS} -DVERSION="\"${VERSION}\"" -DWITH_BROKER
|
||||
CLIENT_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I../lib -DVERSION="\"${VERSION}\""
|
||||
BROKER_CFLAGS:=${LIB_CFLAGS} ${CPPFLAGS} -DVERSION="\"${VERSION}\"" -DWITH_BROKER -std=c99
|
||||
CLIENT_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I../lib -DVERSION="\"${VERSION}\"" -std=c99
|
||||
|
||||
ifneq ($(or $(findstring $(UNAME),FreeBSD), $(findstring $(UNAME),OpenBSD)),)
|
||||
BROKER_LIBS:=-lm
|
||||
|
@ -14,12 +14,15 @@ Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef WIN32
|
||||
#include <strings.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
@ -45,8 +48,6 @@ typedef int ssize_t;
|
||||
#include "util_mosq.h"
|
||||
#include "will_mosq.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if !defined(WIN32) && !defined(__SYMBIAN32__)
|
||||
#define HAVE_PSELECT
|
||||
#endif
|
||||
|
@ -14,6 +14,8 @@ Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <mach/mach.h>
|
||||
#include <mach/mach_time.h>
|
||||
|
@ -16,12 +16,15 @@ Contributors:
|
||||
|
||||
#ifdef WITH_TLS
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef WIN32
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#else
|
||||
# include <arpa/inet.h>
|
||||
# include <sys/socket.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
@ -14,6 +14,8 @@ Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
@ -27,8 +29,6 @@ Contributors:
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "mosquitto.h"
|
||||
#include "mosquitto_broker_internal.h"
|
||||
#include "mosquitto_internal.h"
|
||||
|
@ -14,7 +14,7 @@ Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "config.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
@ -25,6 +25,7 @@ Contributors:
|
||||
#ifdef WIN32
|
||||
#else
|
||||
# include <dirent.h>
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
|
@ -28,6 +28,7 @@ Contributors:
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
# include <strings.h>
|
||||
# include <netdb.h>
|
||||
# include <sys/socket.h>
|
||||
#else
|
||||
|
@ -14,6 +14,8 @@ Contributors:
|
||||
Roger Light - initial implementation and documentation.
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#define _BSD_SOURCE
|
||||
|
||||
#include <errno.h>
|
||||
#include <openssl/evp.h>
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user