Skip to content

Commit 3f0dab9

Browse files
Debug commit - do not merge
1 parent e356ad7 commit 3f0dab9

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

Diff for: cpp/arduino/avr/pgmspace.h

+35
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,42 @@ externs = text.split("\n").select {|l| l.start_with? "extern"}
1313
out = externs.map {|l| l.split("(")[0].split(" ")[-1].gsub("*", "") }.uniq
1414
out.each { |l| puts d(l) }
1515
*/
16+
#include <_ansi.h>
17+
#include <sys/reent.h>
18+
#include <sys/cdefs.h>
19+
#include <sys/features.h>
20+
21+
#if defined(__MISC_VISIBLE)
22+
#warning "__MISC_VISIBLE"
23+
#endif
24+
#if defined(__POSIX_VISIBLE)
25+
#warning "__POSIX_VISIBLE"
26+
#endif
27+
#if defined(__GNU_VISIBLE)
28+
#warning "__GNU_VISIBLE"
29+
#endif
30+
#if defined(_BEGIN_STD_C)
31+
#warning "_BEGIN_STD_C"
32+
#endif
33+
#if defined(_HAVE_STD_CXX)
34+
#warning "_HAVE_STD_CXX"
35+
#endif
36+
#if defined(__STDC__)
37+
#warning "__STDC__"
38+
#endif
39+
#if defined(_HAVE_STDC)
40+
#warning "_HAVE_STDC"
41+
#endif
42+
#if defined(_GNU_SOURCE)
43+
#warning "_GNU_SOURCE"
44+
#endif
45+
#if defined(_DEFAULT_SOURCE)
46+
#warning "_DEFAULT_SOURCE"
47+
#endif
48+
1649

1750
#include <string.h>
51+
inline void *memccpy_P3(void *dest, const void *src, int val, size_t len) { return memccpy(dest, src, val, len); }
1852
#include <stdio.h>
1953
#include <stdint.h>
2054
#include <stdarg.h>
@@ -60,6 +94,7 @@ typedef uintptr_t uint_farptr_t;
6094
inline const void * memchr_P(const void *s, int val, size_t len) { return memchr(s, val, len); }
6195
inline int memcmp_P(const void *s1, const void *s2, size_t len) { return memcmp(s1, s2, len); }
6296
inline void *memccpy_P(void *dest, const void *src, int val, size_t len) { return memccpy(dest, src, val, len); }
97+
inline void *memccpy_P2(void *dest, const void *src, int val, size_t len) { return std::memccpy(dest, src, val, len); }
6398
inline void *memcpy_P(void *dest, const void *src, size_t n) { return memcpy(dest, src, n); }
6499
inline void *memmem_P(const void *s1, size_t len1, const void *s2, size_t len2) { return memmem(s1, len1, s2, len2); }
65100
inline const void *memrchr_P(const void *src, int val, size_t len) { return memrchr(src, val, len); }

Diff for: lib/arduino_ci/cpp_library.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def build_for_test_with_configuration(test_file, aux_libraries, gcc_binary, ci_g
324324
executable = Pathname.new("unittest_#{base}.bin").expand_path
325325
File.delete(executable) if File.exist?(executable)
326326
arg_sets = []
327-
arg_sets << ["-std=c++0x", "-o", executable.to_s, "-DARDUINO=100"]
327+
arg_sets << ["-std=c++0x", "-o", executable.to_s, "-DARDUINO=100", "-H"]
328328
if libasan?(gcc_binary)
329329
arg_sets << [ # Stuff to help with dynamic memory mishandling
330330
"-g", "-O1",

Diff for: spec/cpp_library_spec.rb

+12
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ def get_relative_dir(sampleprojects_tests_dir)
5555
context "test" do
5656
config = ArduinoCI::CIConfig.default
5757

58+
puts "\n\nstring.h\n\n"
59+
puts File.read("c:/cygwin/usr/include/string.h")
60+
61+
puts "\n\n_ansi.h\n\n"
62+
puts File.read("c:/cygwin/usr/include/_ansi.h")
63+
64+
puts "\n\nsys/config.h.h\n\n"
65+
puts File.read("c:/cygwin/usr/include/sys/config.h")
66+
67+
puts "\n\nsys/features.h.h\n\n"
68+
puts File.read("c:/cygwin/usr/include/sys/features.h")
69+
5870
after(:each) do |example|
5971
if example.exception
6072
puts "Last command: #{cpp_library.last_cmd}"

0 commit comments

Comments
 (0)