Skip to content

Commit

Permalink
Consistent use of config.h across the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Aug 16, 2018
1 parent dde005e commit 88765a5
Show file tree
Hide file tree
Showing 42 changed files with 77 additions and 30 deletions.
2 changes: 1 addition & 1 deletion client/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include_directories(${mosquitto_SOURCE_DIR}/lib
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/lib
${STDBOOL_H_PATH} ${STDINT_H_PATH})
link_directories(${mosquitto_BINARY_DIR}/lib)

Expand Down
2 changes: 1 addition & 1 deletion client/client_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#define _POSIX_C_SOURCE 200809L
#include "config.h"

#include <errno.h>
#include <fcntl.h>
Expand Down
3 changes: 1 addition & 2 deletions client/pub_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

/* For nanosleep */
#define _POSIX_C_SOURCE 200809L
#include "config.h"

#include <errno.h>
#include <fcntl.h>
Expand Down
2 changes: 1 addition & 1 deletion client/sub_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#define _POSIX_C_SOURCE 200809L
#include "config.h"

#include <assert.h>
#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion client/sub_client_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#define _POSIX_C_SOURCE 200809L
#include "config.h"

#include <assert.h>
#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ LIB_CXXFLAGS:=$(CFLAGS) ${CPPFLAGS} -I. -I.. -I../lib
LIB_LDFLAGS:=${LDFLAGS}

BROKER_CFLAGS:=${LIB_CFLAGS} ${CPPFLAGS} -DVERSION="\"${VERSION}\"" -DWITH_BROKER
CLIENT_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I../lib -DVERSION="\"${VERSION}\""
CLIENT_CFLAGS:=${CFLAGS} ${CPPFLAGS} -I.. -I../lib -DVERSION="\"${VERSION}\""

ifneq ($(or $(findstring $(UNAME),FreeBSD), $(findstring $(UNAME),OpenBSD), $(findstring $(UNAME),NetBSD)),)
BROKER_LIBS:=-lm
Expand Down
2 changes: 2 additions & 0 deletions lib/handle_connack.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>

#include "mosquitto.h"
Expand Down
2 changes: 2 additions & 0 deletions lib/handle_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/handle_pubackcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/handle_publish.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <string.h>

Expand Down
2 changes: 2 additions & 0 deletions lib/handle_pubrec.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/handle_pubrel.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/handle_suback.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>

#ifdef WITH_BROKER
Expand Down
2 changes: 2 additions & 0 deletions lib/handle_unsuback.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <errno.h>
#include <stdbool.h>

Expand Down
3 changes: 3 additions & 0 deletions lib/logging_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ and the Eclipse Distribution License is available at
Contributors:
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/messages_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdlib.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/packet_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <errno.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/read_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/send_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <string.h>

Expand Down
2 changes: 2 additions & 0 deletions lib/send_disconnect.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>

#ifdef WITH_BROKER
Expand Down
2 changes: 2 additions & 0 deletions lib/send_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>
#include <string.h>
Expand Down
2 changes: 2 additions & 0 deletions lib/send_publish.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <string.h>

Expand Down
2 changes: 2 additions & 0 deletions lib/send_subscribe.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <string.h>

Expand Down
2 changes: 2 additions & 0 deletions lib/send_unsubscribe.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <string.h>

Expand Down
2 changes: 2 additions & 0 deletions lib/socks_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <errno.h>
#include <string.h>

Expand Down
2 changes: 2 additions & 0 deletions lib/srv_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#ifdef WITH_SRV
# include <ares.h>

Expand Down
2 changes: 2 additions & 0 deletions lib/utf8_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation.
*/

#include "config.h"

#include <stdio.h>
#include "mosquitto.h"

Expand Down
2 changes: 2 additions & 0 deletions lib/util_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <string.h>

Expand Down
2 changes: 2 additions & 0 deletions lib/will_mosq.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <stdio.h>
#include <string.h>

Expand Down
2 changes: 1 addition & 1 deletion src/conf_includedir.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include <config.h>
#include "config.h"

#include <limits.h>
#include <stdio.h>
Expand Down
4 changes: 2 additions & 2 deletions src/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <time.h>

#include "config.h"

#include "mosquitto_broker_internal.h"
#include "memory_mosq.h"
#include "packet_mosq.h"
Expand Down
4 changes: 2 additions & 2 deletions src/database.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>

#include "config.h"

#include "mosquitto_broker_internal.h"
#include "memory_mosq.h"
#include "send_mosq.h"
Expand Down
3 changes: 2 additions & 1 deletion src/handle_connack.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include <config.h>
#include "config.h"

#include <stdio.h>
#include <string.h>

Expand Down
4 changes: 2 additions & 2 deletions src/handle_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <stdio.h>
#include <string.h>

#include "config.h"

#include "mosquitto_broker_internal.h"
#include "mqtt3_protocol.h"
#include "memory_mosq.h"
Expand Down
4 changes: 2 additions & 2 deletions src/handle_publish.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <assert.h>
#include <stdio.h>
#include <string.h>

#include "config.h"

#include "mosquitto_broker_internal.h"
#include "mqtt3_protocol.h"
#include "memory_mosq.h"
Expand Down
4 changes: 2 additions & 2 deletions src/handle_subscribe.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <stdio.h>
#include <string.h>

#include "config.h"

#include "mosquitto_broker_internal.h"
#include "memory_mosq.h"
#include "packet_mosq.h"
Expand Down
4 changes: 2 additions & 2 deletions src/handle_unsubscribe.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ and the Eclipse Distribution License is available at
Roger Light - initial implementation and documentation.
*/

#include "config.h"

#include <stdio.h>
#include <string.h>

#include "config.h"

#include "mosquitto_broker_internal.h"
#include "memory_mosq.h"
#include "mqtt3_protocol.h"
Expand Down
6 changes: 2 additions & 4 deletions src/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and the Eclipse Distribution License is available at
Contributors:
Roger Light - initial implementation and documentation.
*/
#include "config.h"

#include <stdarg.h>
#include <stdio.h>
#include <string.h>
Expand All @@ -21,10 +23,6 @@ and the Eclipse Distribution License is available at
#endif
#include <time.h>

#ifndef CMAKE
#include "config.h"
#endif

#include "mosquitto_broker_internal.h"
#include "memory_mosq.h"
#include "util_mosq.h"
Expand Down
Loading

0 comments on commit 88765a5

Please sign in to comment.