-''' % (str(lib_prefix + 'coap'), str(lib_prefix + 'coap ' + libcoap_version))
-
- cxx_headers = ['arpa/inet.h',
- 'assert.h',
- 'limits.h',
- 'netinet/in.h',
- 'stdio.h',
- 'strings.h',
- 'sys/select.h',
- 'sys/socket.h',
- 'sys/time.h',
- 'sys/types.h',
- 'sys/uio.h',
- 'sys/unistd.h',
- 'syslog.h',
- 'time.h',
- 'unistd.h',
- 'winsock2.h',
- 'ws2tcpip.h']
-
- cxx_functions = ['malloc',
- 'snprintf',
- 'strnlen',
- 'vprintf']
-
- if target_os == 'arduino':
- # Detection of headers on the Arduino platform is currently broken.
- cxx_headers = []
-
- def get_define_from_string(string):
- string_converted = string.replace("/","_").replace(".","_").upper()
- return "HAVE_" + string_converted
-
- for header_file_name in cxx_headers:
- if conf.CheckCXXHeader(header_file_name):
- config_h_body += "#define %s 1\n\n" % get_define_from_string(header_file_name)
-
- for function_name in cxx_functions:
- if conf.CheckFunc(function_name):
- config_h_body += "#define %s 1\n\n" % get_define_from_string(function_name)
-
- if conf.CheckCXXHeader('windows.h'):
- config_h_body += "#define ssize_t SSIZE_T\n\n"
- config_h_body += "#define in_port_t uint16_t\n\n"
-
- conf.Finish()
-
- # Autoconf feature doesn't work with Jenkins' arduino toolchain, so hardcode it here.
- if target_os == 'arduino':
- config_h_body += "#define HAVE_ARDUINO_TIME_H\n\n"
-
- # Generate the file
- config_h_file_path = os.path.join(src_dir, 'extlibs', 'libcoap', 'libcoap', 'include', 'coap', 'coap_config.h')
- if os.path.exists(config_h_file_path):
- os.remove(config_h_file_path)
- config_h_file = open(config_h_file_path, "w")
- config_h_file.write(config_h_header + config_h_body + config_h_footer)
- config_h_file.close()
+ ''' % (str(lib_prefix + 'coap'), str(lib_prefix + 'coap ' + libcoap_version))
+
+ cxx_headers = ['arpa/inet.h',
+ 'assert.h',
+ 'limits.h',
+ 'netinet/in.h',
+ 'stdio.h',
+ 'strings.h',
+ 'sys/select.h',
+ 'sys/socket.h',
+ 'sys/time.h',
+ 'sys/types.h',
+ 'sys/uio.h',
+ 'sys/unistd.h',
+ 'syslog.h',
+ 'time.h',
+ 'unistd.h',
+ 'winsock2.h',
+ 'ws2tcpip.h']
+
+ cxx_functions = ['malloc',
+ 'snprintf',
+ 'strnlen',
+ 'vprintf']
+
+ if target_os == 'arduino':
+ # Detection of headers on the Arduino platform is currently broken.
+ cxx_headers = []
+
+ def get_define_from_string(string):
+ string_converted = string.replace("/","_").replace(".","_").upper()
+ return "HAVE_" + string_converted
+
+ for header_file_name in cxx_headers:
+ if conf.CheckCXXHeader(header_file_name):
+ config_h_body += "#define %s 1\n\n" % get_define_from_string(header_file_name)
+
+ for function_name in cxx_functions:
+ if conf.CheckFunc(function_name):
+ config_h_body += "#define %s 1\n\n" % get_define_from_string(function_name)
+
+ if conf.CheckCXXHeader('windows.h'):
+ config_h_body += "#define ssize_t SSIZE_T\n\n"
+ config_h_body += "#define in_port_t uint16_t\n\n"
+
+ conf.Finish()
+
+ # Autoconf feature doesn't work with Jenkins' arduino toolchain, so hardcode it here.
+ if target_os == 'arduino':
+ config_h_body += "#define HAVE_ARDUINO_TIME_H\n\n"
+
+ # Generate the file
+ if os.path.exists(config_h_file_path):
+ os.remove(config_h_file_path)
+ config_h_file = open(config_h_file_path, "w")
+ config_h_file.write(config_h_header + config_h_body + config_h_footer)
+ config_h_file.close()