mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-28 17:47:09 +03:00
libcoap.h: introduce new header file for libcoap
To get a proper public header setup for libcoap we need to split out the static and platform related header files. This commit is about creating the platform specific header file which have to contain platform relevant header and or declarations and is included by the coap.h header file. Currently there is only Contiki as non Linux/BSD based platform we have to take care. Potentially there is more to come.
This commit is contained in:
1 parent
0e59edc231
commit
5032b292e4
2 files changed
+29
-1
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* coap.h -- main header file for CoAP stack
|
||||
* coap.h -- main header file for CoAP stack of libcoap
|
||||
*
|
||||
* Copyright (C) 2010-2012,2015 Olaf Bergmann <bergmann@tzi.org>
|
||||
* 2015 Carsten Schoenert <c.schoenert@t-online.de>
|
||||
@@ -11,6 +11,8 @@
|
||||
#ifndef _COAP_H_
|
||||
#define _COAP_H_
|
||||
|
||||
#include "libcoap.h"
|
||||
|
||||
/* Define the address where bug reports for libcoap should be sent. */
|
||||
#define LIBCOAP_PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* libcoap.h -- platform specific header file for CoAP stack
|
||||
*
|
||||
* Copyright (C) 2015 Carsten Schoenert <c.schoenert@t-online.de>
|
||||
*
|
||||
* This file is part of the CoAP library libcoap. Please see README for terms
|
||||
* of use.
|
||||
*/
|
||||
|
||||
#ifndef _LIBCOAP_H_
|
||||
#define _LIBCOAP_H_
|
||||
|
||||
/* The non posix embedded platforms like Contiki, TinyOS, RIOT, ... doesn't have
|
||||
* a POSIX compatible header structure so we have to slightly do some platform
|
||||
* related things. Currently there is only Contiki available so we check for a
|
||||
* CONTIKI environment and do *not* include the POSIX related network stuff. If
|
||||
* there are other platforms in future there need to be analogous environments.
|
||||
*
|
||||
* The CONTIKI variable is within the Contiki build environment! */
|
||||
|
||||
#if !defined (CONTIKI)
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#endif /* CONTIKI */
|
||||
|
||||
#endif /* _LIBCOAP_H_ */
|
||||
Reference in new issue
Block a user