diff --git a/.gitignore b/.gitignore index e0691294fb..623f4ee9da 100644 --- a/.gitignore +++ b/.gitignore @@ -93,7 +93,6 @@ examples/*.exe examples/riot/pkg_libcoap/patches # the include/ folder -include/coap3/coap.h include/coap3/coap_defines.h # the tests/ folder diff --git a/CMakeLists.txt b/CMakeLists.txt index d9c900bdb3..31c624b9e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -717,9 +717,6 @@ else(ENABLE_TCP) endif(ENABLE_TCP) # creates config header file in build directory -configure_file(${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap.h.in - ${CMAKE_CURRENT_BINARY_DIR}/include/coap${LIBCOAP_API_VERSION}/coap.h) - configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake_coap_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/coap_config.h) @@ -994,8 +991,6 @@ install( COMPONENT dev FILES_MATCHING PATTERN "*.h" - PATTERN "coap.h" EXCLUDE - PATTERN "coap_riot.h" EXCLUDE PATTERN "*_internal.h" EXCLUDE PATTERN "oscore*" EXCLUDE) install( diff --git a/Makefile.am b/Makefile.am index ba23bfbafa..8a334fdf15 100644 --- a/Makefile.am +++ b/Makefile.am @@ -124,9 +124,6 @@ EXTRA_DIST = \ include/coap$(LIBCOAP_API_VERSION)/coap_uthash_internal.h \ include/coap$(LIBCOAP_API_VERSION)/coap_utlist_internal.h \ include/coap$(LIBCOAP_API_VERSION)/coap_ws_internal.h \ - include/coap$(LIBCOAP_API_VERSION)/coap.h.in \ - include/coap$(LIBCOAP_API_VERSION)/coap.h.riot \ - include/coap$(LIBCOAP_API_VERSION)/coap.h.windows \ include/oscore/oscore_cbor.h \ include/oscore/oscore_context.h \ include/oscore/oscore_cose.h \ @@ -242,7 +239,7 @@ libcoap_includedir = $(includedir)/coap$(LIBCOAP_API_VERSION)/ # $(top_srcdir)/include/coap-$(LIBCOAP_API_VERSION)/* libcoap_include_HEADERS = \ - $(top_builddir)/include/coap$(LIBCOAP_API_VERSION)/coap.h \ + $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/libcoap.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_address.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_async.h \ diff --git a/autogen.sh b/autogen.sh index 0b97905fa0..036bc84597 100755 --- a/autogen.sh +++ b/autogen.sh @@ -27,7 +27,6 @@ depcomp doc/Doxyfile doc/doxyfile.stamp doc/doxygen_sqlite3.db doc/Makefile doc/Makefile.in examples/*.o examples/coap-client examples/coap-server examples/coap-rd examples/Makefile examples/Makefile.in -include/coap3/coap.h install-sh libcoap-*.pc libtool ltmain.sh man/coap*.[357] man/coap*.txt man/Makefile man/Makefile.in diff --git a/configure.ac b/configure.ac index 203e9e3b6d..70e4bc0a91 100644 --- a/configure.ac +++ b/configure.ac @@ -1329,7 +1329,6 @@ AC_CONFIG_FILES([ Makefile doc/Makefile examples/Makefile -include/coap$LIBCOAP_API_VERSION/coap.h man/coap.txt man/coap_address.txt man/coap_async.txt @@ -1552,6 +1551,7 @@ else AC_MSG_RESULT([ build static library : "no"]) fi +mkdir -p include/coap$LIBCOAP_API_VERSION LT_TEMP=`grep -B2 " COAP_" coap_config.h > include/coap$LIBCOAP_API_VERSION/coap_defines.h` if test "x$LT_TEMP" != "x" ; then AC_MSG_ERROR([Unable to build coap_defines.h]) diff --git a/examples/riot/pkg_libcoap/Makefile b/examples/riot/pkg_libcoap/Makefile index a2a3d86b26..4e09ad115d 100644 --- a/examples/riot/pkg_libcoap/Makefile +++ b/examples/riot/pkg_libcoap/Makefile @@ -17,7 +17,6 @@ endif libcoap: $(QQ)@cp $(LIBCOAP_SOURCE_DIR)/coap_config.h.riot $(LIBCOAP_SOURCE_DIR)/coap_config.h - $(QQ)@cp $(LIBCOAP_INCLUDE_DIR)/coap.h.riot $(LIBCOAP_INCLUDE_DIR)/coap.h $(QQ)"$(MAKE)" -C $(LIBCOAP_SOURCE_DIR)/src -f $(CURDIR)/Makefile.libcoap libcoap_oscore: diff --git a/include/coap3/coap.h.windows b/include/coap3/coap.h similarity index 94% rename from include/coap3/coap.h.windows rename to include/coap3/coap.h index 0466aea6d8..0b28bee369 100644 --- a/include/coap3/coap.h.windows +++ b/include/coap3/coap.h @@ -1,5 +1,5 @@ /* - * coap.h -- main header file for CoAP stack of libcoap (Windows) + * coap.h -- main header file for CoAP stack of libcoap * * Copyright (C) 2010-2012,2015-2024 Olaf Bergmann * 2015 Carsten Schoenert @@ -34,7 +34,7 @@ #define LIBCOAP_PACKAGE_VERSION "4.3.5rc3" /* Define the numeric version identifier for libcoap */ -#define LIBCOAP_VERSION (4003004U) +#define LIBCOAP_VERSION (4003004ULL) #ifdef __cplusplus extern "C" { diff --git a/include/coap3/coap.h.in b/include/coap3/coap.h.in deleted file mode 100644 index 8ebed6225a..0000000000 --- a/include/coap3/coap.h.in +++ /dev/null @@ -1,74 +0,0 @@ -/* - * coap.h -- main header file for CoAP stack of libcoap - * - * Copyright (C) 2010-2012,2015-2024 Olaf Bergmann - * 2015 Carsten Schoenert - * - * SPDX-License-Identifier: BSD-2-Clause - * - * This file is part of the CoAP library libcoap. Please see README for terms - * of use. - */ - -/** - * @file coap.h - * @brief Primary include file - */ - -#ifndef COAP_H_ -#define COAP_H_ - -/* Define the address where bug reports for libcoap should be sent. */ -#define LIBCOAP_PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" - -/* Define the full name of libcoap. */ -#define LIBCOAP_PACKAGE_NAME "@PACKAGE_NAME@" - -/* Define the full name and version of libcoap. */ -#define LIBCOAP_PACKAGE_STRING "@PACKAGE_STRING@" - -/* Define the home page for libcoap. */ -#define LIBCOAP_PACKAGE_URL "@PACKAGE_URL@" - -/* Define the version of libcoap this file belongs to. */ -#define LIBCOAP_PACKAGE_VERSION "@PACKAGE_VERSION@" - -/* Define the numeric version identifier for libcoap */ -#define LIBCOAP_VERSION (@LIBCOAP_VERSION@U) - -#ifdef __cplusplus -extern "C" { -#endif - -#include "coap@LIBCOAP_API_VERSION@/libcoap.h" - -#include "coap@LIBCOAP_API_VERSION@/coap_forward_decls.h" -#include "coap@LIBCOAP_API_VERSION@/coap_address.h" -#include "coap@LIBCOAP_API_VERSION@/coap_async.h" -#include "coap@LIBCOAP_API_VERSION@/coap_block.h" -#include "coap@LIBCOAP_API_VERSION@/coap_cache.h" -#include "coap@LIBCOAP_API_VERSION@/coap_debug.h" -#include "coap@LIBCOAP_API_VERSION@/coap_dtls.h" -#include "coap@LIBCOAP_API_VERSION@/coap_encode.h" -#include "coap@LIBCOAP_API_VERSION@/coap_event.h" -#include "coap@LIBCOAP_API_VERSION@/coap_io.h" -#include "coap@LIBCOAP_API_VERSION@/coap_mem.h" -#include "coap@LIBCOAP_API_VERSION@/coap_net.h" -#include "coap@LIBCOAP_API_VERSION@/coap_option.h" -#include "coap@LIBCOAP_API_VERSION@/coap_oscore.h" -#include "coap@LIBCOAP_API_VERSION@/coap_pdu.h" -#include "coap@LIBCOAP_API_VERSION@/coap_prng.h" -#include "coap@LIBCOAP_API_VERSION@/coap_proxy.h" -#include "coap@LIBCOAP_API_VERSION@/coap_resource.h" -#include "coap@LIBCOAP_API_VERSION@/coap_str.h" -#include "coap@LIBCOAP_API_VERSION@/coap_subscribe.h" -#include "coap@LIBCOAP_API_VERSION@/coap_supported.h" -#include "coap@LIBCOAP_API_VERSION@/coap_time.h" -#include "coap@LIBCOAP_API_VERSION@/coap_uri.h" -#include "coap@LIBCOAP_API_VERSION@/coap_ws.h" - -#ifdef __cplusplus -} -#endif - -#endif /* COAP_H_ */ diff --git a/include/coap3/coap.h.riot b/include/coap3/coap.h.riot deleted file mode 100644 index 4e79591088..0000000000 --- a/include/coap3/coap.h.riot +++ /dev/null @@ -1,74 +0,0 @@ -/* - * coap.h -- main header file for CoAP stack of libcoap (RIOT) - * - * Copyright (C) 2010-2012,2015-2024 Olaf Bergmann - * 2015 Carsten Schoenert - * - * SPDX-License-Identifier: BSD-2-Clause - * - * This file is part of the CoAP library libcoap. Please see README for terms - * of use. - */ - -/** - * @file coap.h - * @brief Primary include file - */ - -#ifndef COAP_H_ -#define COAP_H_ - -/* Define the address where bug reports for libcoap should be sent. */ -#define LIBCOAP_PACKAGE_BUGREPORT "libcoap-developers@lists.sourceforge.net" - -/* Define the full name of libcoap. */ -#define LIBCOAP_PACKAGE_NAME "libcoap" - -/* Define the full name and version of libcoap. */ -#define LIBCOAP_PACKAGE_STRING "libcoap 4.3.5rc3" - -/* Define the home page for libcoap. */ -#define LIBCOAP_PACKAGE_URL "https://libcoap.net/" - -/* Define the version of libcoap this file belongs to. */ -#define LIBCOAP_PACKAGE_VERSION "4.3.5rc3" - -/* Define the numeric version identifier for libcoap */ -#define LIBCOAP_VERSION (4003004U) - -#ifdef __cplusplus -extern "C" { -#endif - -#include "libcoap.h" - -#include "coap_forward_decls.h" -#include "coap_address.h" -#include "coap_async.h" -#include "coap_block.h" -#include "coap_cache.h" -#include "coap_debug.h" -#include "coap_dtls.h" -#include "coap_encode.h" -#include "coap_event.h" -#include "coap_io.h" -#include "coap_mem.h" -#include "coap_net.h" -#include "coap_option.h" -#include "coap_oscore.h" -#include "coap_pdu.h" -#include "coap_prng.h" -#include "coap_proxy.h" -#include "coap_resource.h" -#include "coap_str.h" -#include "coap_subscribe.h" -#include "coap_supported.h" -#include "coap_time.h" -#include "coap_uri.h" -#include "coap_ws.h" - -#ifdef __cplusplus -} -#endif - -#endif /* COAP_H_ */ diff --git a/scripts/fix_version.sh.in b/scripts/fix_version.sh.in index 62a818075f..abe3f87985 100755 --- a/scripts/fix_version.sh.in +++ b/scripts/fix_version.sh.in @@ -3,18 +3,20 @@ FILES="coap_config.h.contiki \ coap_config.h.riot \ coap_config.h.windows \ - include/coap@LIBCOAP_API_VERSION@/coap.h.riot \ - include/coap@LIBCOAP_API_VERSION@/coap.h.windows \ - examples/lwip/config/coap_config.h" + examples/lwip/config/coap_config.h \ + include/coap@LIBCOAP_API_VERSION@/coap.h" for file in $FILES ; do sed -i $file -e 's/#define PACKAGE_NAME ".*"/#define PACKAGE_NAME "@PACKAGE_NAME@"/g' sed -i $file -e 's/#define PACKAGE_STRING ".*"/#define PACKAGE_STRING "@PACKAGE_STRING@"/g' sed -i $file -e 's/#define PACKAGE_VERSION ".*"/#define PACKAGE_VERSION "@PACKAGE_VERSION@"/g' sed -i $file -e 's/#define PACKAGE_TARNAME ".*"/#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"/g' - sed -i $file -e 's/#define LIBCOAP_VERSION (.*)/#define LIBCOAP_VERSION (@LIBCOAP_VERSION@U)/g' + + sed -i $file -e 's/#define LIBCOAP_PACKAGE_BUGREPORT (.*)/#define LIBCOAP_PACKAGE_BUGREPORT (@PACKAGE_BUGREPORT@)/g' sed -i $file -e 's/#define LIBCOAP_PACKAGE_STRING ".*"/#define LIBCOAP_PACKAGE_STRING "@PACKAGE_STRING@"/g' + sed -i $file -e 's^#define LIBCOAP_PACKAGE_URL ".*"^#define LIBCOAP_PACKAGE_URL "@PACKAGE_URL@"^g' sed -i $file -e 's/#define LIBCOAP_PACKAGE_VERSION ".*"/#define LIBCOAP_PACKAGE_VERSION "@PACKAGE_VERSION@"/g' + sed -i $file -e 's/#define LIBCOAP_VERSION (.*)/#define LIBCOAP_VERSION (@LIBCOAP_VERSION@ULL)/g' done for file in CMakeLists.txt ; do diff --git a/win32/libcoap.vcxproj b/win32/libcoap.vcxproj index ce643c6037..6dbec886cb 100644 --- a/win32/libcoap.vcxproj +++ b/win32/libcoap.vcxproj @@ -388,7 +388,6 @@ TYPE %(FullPath) >> "$(IntDir)$(TargetName).def" copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h @@ -432,7 +431,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h @@ -473,7 +471,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows @@ -499,7 +496,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows @@ -523,7 +519,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h @@ -569,7 +564,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h @@ -612,7 +606,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows @@ -641,7 +634,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows @@ -666,7 +658,6 @@ copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h copy /Y ..\coap_config.h.windows ..\coap_config.h -copy /Y ..\$(LibCoAPIncludeDir)\coap.h.windows ..\$(LibCoAPIncludeDir)\coap.h copy /Y ..\coap_config.h.windows ..\$(LibCoAPIncludeDir)\coap_defines.h Copying config files for windows