A few fixes for building regression tests with GCC on FreeBSD.
than mailing the developers (or mailing lists) directly -- bugs that
are not entered into bugzilla tend to get forgotten about or ignored.
+476320 Build failure with GCC
+
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
where XXXXXX is the bug number as listed above.
else
GCC_MAJOR_VERSION=`${CC} -dumpversion | $SED 's/\..*//' 2>/dev/null`
FLAG_32ON64="-B/usr/local/lib32/gcc${GCC_MAJOR_VERSION} -Wl,-rpath,/usr/local/lib32/gcc${GCC_MAJOR_VERSION}/"
+ FLAG_32ON64_GXX="-L/usr/local/lib32/gcc${GCC_MAJOR_VERSION} -lgcc_s"
+ AC_SUBST(FLAG_32ON64_GXX)
fi
valt_load_address_pri_norml="0x38000000"
valt_load_address_pri_inner="0x28000000"
#include <limits.h>
#include <string>
#include <memory>
+#include <cstring>
using std::cerr;
using std::cout;
size_t len;
if (sysctl(mib, 4, NULL, &len, NULL, 0) != 0) {
- cout << "sysctl failed to get path length: " << strerror(errno) << '\n';
+ cout << "sysctl failed to get path length: " << std::strerror(errno) << '\n';
return -1;
}
if (string(aResult.get()) == argv[1]) {
cout << "OK\n";
} else {
- cout << "Not OK aResult " << aResult << " argv[1] " << argv[1] << '\n';
+ cout << "Not OK aResult " << aResult.get() << " argv[1] " << argv[1] << '\n';
}
if (sysctl(mib, 4, NULL, NULL, NULL, 0) != -1) {
int main()
{
- size_t size(32);
- size_t badsize(33);
+ std::size_t size(32);
+ std::size_t badsize(33);
void *mem = nullptr;
more_x86_fp_LDADD = -lm
pcmpgt_SOURCES = pcmpgt.cpp
+if VGCONF_OS_IS_FREEBSD
+pcmpgt_CXXFLAGS = $(AM_CXXFLAGS) $(FLAG_32ON64_GXX)
+endif
#include <iostream>
//#include <fstream>
#include <string>
-//#include <cstdlib>
+#include <limits.h>
#include <unistd.h>
#include <fcntl.h>
#include <cassert>