mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-04 00:45:40 +03:00
i/c/*.h: remove obsolete #ifdef HAVE_* constructs
The various variable checks within the public header files are not useful as such checks doesn't have to be done in these files. The public header files have only to provide the function declarations and some macro definitions, any check for the availability of needed other system header files has to be done by the user on his own. TODO: The check for syslog.h in debug.h has to be moved out of the public part into the source of the library later.
This commit is contained in:
1 parent
d90bc9164e
commit
489eb73f0c
5 files changed
+3
-48
No files matched your search
+1
-17
@@ -14,25 +14,9 @@
|
||||
#ifndef _COAP_ADDRESS_H_
|
||||
#define _COAP_ADDRESS_H_
|
||||
|
||||
#ifdef HAVE_ASSERT_H
|
||||
#include <assert.h>
|
||||
#else
|
||||
#ifndef assert
|
||||
#warning "assertions are disabled"
|
||||
# define assert(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#ifdef WITH_LWIP
|
||||
#include <lwip/ip_addr.h>
|
||||
|
||||
+1
-11
@@ -9,18 +9,8 @@
|
||||
#ifndef _COAP_IO_H_
|
||||
#define _COAP_IO_H_
|
||||
|
||||
#ifdef HAVE_ASSERT_H
|
||||
#include <assert.h>
|
||||
#else
|
||||
#ifndef assert
|
||||
#warning "assertions are disabled"
|
||||
# define assert(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "address.h"
|
||||
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
#ifndef _COAP_MEM_H_
|
||||
#define _COAP_MEM_H_
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef WITH_LWIP
|
||||
/**
|
||||
|
||||
+1
-16
@@ -13,26 +13,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ASSERT_H
|
||||
#include <assert.h>
|
||||
#else
|
||||
#ifndef assert
|
||||
#warning "assertions are disabled"
|
||||
# define assert(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
#ifdef WITH_LWIP
|
||||
#include <lwip/ip_addr.h>
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#ifndef _COAP_RESOURCE_H_
|
||||
#define _COAP_RESOURCE_H_
|
||||
|
||||
#if defined(HAVE_ASSERT_H) && !defined(assert)
|
||||
# include <assert.h>
|
||||
#endif
|
||||
|
||||
#ifndef COAP_RESOURCE_CHECK_TIME
|
||||
/** The interval in seconds to check if resources have changed. */
|
||||
|
||||
Reference in new issue
Block a user