Commit c3f74c40 authored by Damir Franusic's avatar Damir Franusic

fixes #46

* tests using readdir and other
  filesystem related functions fail
  when using 32bit crossdev
  environment without these changes
parent 86b05417
...@@ -20,6 +20,13 @@ m4_ifdef([AM_PROG_AR], ...@@ -20,6 +20,13 @@ m4_ifdef([AM_PROG_AR],
AC_PROG_CXX AC_PROG_CXX
CXXFLAGS="-std=c++11" CXXFLAGS="-std=c++11"
dnl - needed for tests, some fail when _FILE_OFFSET_BITS is not
dnl explicitly set
dnl - for example, the case of crossdev environment
dnl when runing 32bit binaries on a 64bit host;
dnl readdir() and other related functions used in some
dnl test cases will return a null pointer and fail
AC_SYS_LARGEFILE
LT_INIT LT_INIT
......
...@@ -11,8 +11,8 @@ CFLAGS = $(filter-out $(CODE_COVERAGE_CFLAGS), @CFLAGS@) ...@@ -11,8 +11,8 @@ CFLAGS = $(filter-out $(CODE_COVERAGE_CFLAGS), @CFLAGS@)
TESTS_ENVIRONMENT= \ TESTS_ENVIRONMENT= \
CC="${CC}" \ CC="${CC}" \
CXX="${CXX}" \ CXX="${CXX}" \
CFLAGS="${TESTSUITE_CFLAGS} ${CFLAGS}" \ CFLAGS="${TESTSUITE_CFLAGS} ${CFLAGS} ${DEFS}" \
CXXFLAGS="${CXXFLAGS}" \ CXXFLAGS="${CXXFLAGS} ${DEFS}" \
LDFLAGS="${LDFLAGS}" \ LDFLAGS="${LDFLAGS}" \
LIBFUZZER_CFLAGS="${LIBFUZZER_CFLAGS}" \ LIBFUZZER_CFLAGS="${LIBFUZZER_CFLAGS}" \
ASAN_ENV_FLAGS="@ASAN_ENV_FLAGS@" \ ASAN_ENV_FLAGS="@ASAN_ENV_FLAGS@" \
......
...@@ -70,8 +70,8 @@ AUTOGENERATED="# This file is autogenerated by $0 ${source_full} ${AFLAGS}" ...@@ -70,8 +70,8 @@ AUTOGENERATED="# This file is autogenerated by $0 ${source_full} ${AFLAGS}"
# Create a common Makefile for the project # Create a common Makefile for the project
cat <<END_MAKEFILE > "${testdir}/Makefile" cat <<END_MAKEFILE > "${testdir}/Makefile"
${AUTOGENERATED} ${AUTOGENERATED}
COMMON_FLAGS= -I. COMMON_FLAGS= -I. -I${abs_top_srcdir}
CFLAGS = \${COMMON_FLAGS} ${CFLAGS:-} -g -O1 CFLAGS = \${COMMON_FLAGS} ${CFLAGS:-} ${DEFS} -g -O1
CFLAGS += -DSRCDIR=../${srcdir} CFLAGS += -DSRCDIR=../${srcdir}
CXXFLAGS = \${CFLAGS} ${CXXFLAGS} CXXFLAGS = \${CFLAGS} ${CXXFLAGS}
LIBFUZZER_CFLAGS = ${LIBFUZZER_CFLAGS} LIBFUZZER_CFLAGS = ${LIBFUZZER_CFLAGS}
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* and finally compared to the original encoding. * and finally compared to the original encoding.
*/ */
#undef NDEBUG #undef NDEBUG
#include <PDU.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -15,8 +16,6 @@ ...@@ -15,8 +16,6 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <PDU.h>
#ifndef SRCDIR #ifndef SRCDIR
#define SRCDIR_S ".." #define SRCDIR_S ".."
#else #else
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* and finally compared to the original encoding. * and finally compared to the original encoding.
*/ */
#undef NDEBUG #undef NDEBUG
#include <PDU.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -15,8 +16,6 @@ ...@@ -15,8 +16,6 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <PDU.h>
#ifndef SRCDIR #ifndef SRCDIR
#define SRCDIR_S ".." #define SRCDIR_S ".."
#else #else
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* compared with *.out file, then decoded and compared with the original. * compared with *.out file, then decoded and compared with the original.
*/ */
#undef NDEBUG #undef NDEBUG
#include <PDU.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -14,8 +15,6 @@ ...@@ -14,8 +15,6 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <PDU.h>
#ifndef SRCDIR #ifndef SRCDIR
#define SRCDIR_S ".." #define SRCDIR_S ".."
#else #else
......
#undef NDEBUG #undef NDEBUG
#include <T.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -8,8 +9,6 @@ ...@@ -8,8 +9,6 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <T.h>
#ifndef SRCDIR #ifndef SRCDIR
#define SRCDIR_S ".." #define SRCDIR_S ".."
#else #else
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* stream is checked against rules specified in ../data-70/README file. * stream is checked against rules specified in ../data-70/README file.
*/ */
#undef NDEBUG #undef NDEBUG
#include <PDU.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -15,8 +16,6 @@ ...@@ -15,8 +16,6 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <PDU.h>
#ifndef SRCDIR #ifndef SRCDIR
#define SRCDIR_S ".." #define SRCDIR_S ".."
#else #else
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* stream is compared with the corresponding .out file. * stream is compared with the corresponding .out file.
*/ */
#undef NDEBUG #undef NDEBUG
#include <PDU.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
...@@ -15,8 +16,6 @@ ...@@ -15,8 +16,6 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <PDU.h>
#ifndef SRCDIR #ifndef SRCDIR
#define SRCDIR_S ".." #define SRCDIR_S ".."
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment