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],
AC_PROG_CXX
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
......
......@@ -11,8 +11,8 @@ CFLAGS = $(filter-out $(CODE_COVERAGE_CFLAGS), @CFLAGS@)
TESTS_ENVIRONMENT= \
CC="${CC}" \
CXX="${CXX}" \
CFLAGS="${TESTSUITE_CFLAGS} ${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
CFLAGS="${TESTSUITE_CFLAGS} ${CFLAGS} ${DEFS}" \
CXXFLAGS="${CXXFLAGS} ${DEFS}" \
LDFLAGS="${LDFLAGS}" \
LIBFUZZER_CFLAGS="${LIBFUZZER_CFLAGS}" \
ASAN_ENV_FLAGS="@ASAN_ENV_FLAGS@" \
......
......@@ -70,8 +70,8 @@ AUTOGENERATED="# This file is autogenerated by $0 ${source_full} ${AFLAGS}"
# Create a common Makefile for the project
cat <<END_MAKEFILE > "${testdir}/Makefile"
${AUTOGENERATED}
COMMON_FLAGS= -I.
CFLAGS = \${COMMON_FLAGS} ${CFLAGS:-} -g -O1
COMMON_FLAGS= -I. -I${abs_top_srcdir}
CFLAGS = \${COMMON_FLAGS} ${CFLAGS:-} ${DEFS} -g -O1
CFLAGS += -DSRCDIR=../${srcdir}
CXXFLAGS = \${CFLAGS} ${CXXFLAGS}
LIBFUZZER_CFLAGS = ${LIBFUZZER_CFLAGS}
......
......@@ -5,6 +5,7 @@
* and finally compared to the original encoding.
*/
#undef NDEBUG
#include <PDU.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......@@ -15,8 +16,6 @@
#include <ctype.h>
#include <errno.h>
#include <PDU.h>
#ifndef SRCDIR
#define SRCDIR_S ".."
#else
......
......@@ -5,6 +5,7 @@
* and finally compared to the original encoding.
*/
#undef NDEBUG
#include <PDU.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......@@ -15,8 +16,6 @@
#include <ctype.h>
#include <errno.h>
#include <PDU.h>
#ifndef SRCDIR
#define SRCDIR_S ".."
#else
......
......@@ -4,6 +4,7 @@
* compared with *.out file, then decoded and compared with the original.
*/
#undef NDEBUG
#include <PDU.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......@@ -14,8 +15,6 @@
#include <ctype.h>
#include <errno.h>
#include <PDU.h>
#ifndef SRCDIR
#define SRCDIR_S ".."
#else
......
#undef NDEBUG
#include <T.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......@@ -8,8 +9,6 @@
#include <assert.h>
#include <errno.h>
#include <T.h>
#ifndef SRCDIR
#define SRCDIR_S ".."
#else
......
......@@ -5,6 +5,7 @@
* stream is checked against rules specified in ../data-70/README file.
*/
#undef NDEBUG
#include <PDU.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......@@ -15,8 +16,6 @@
#include <assert.h>
#include <errno.h>
#include <PDU.h>
#ifndef SRCDIR
#define SRCDIR_S ".."
#else
......
......@@ -5,6 +5,7 @@
* stream is compared with the corresponding .out file.
*/
#undef NDEBUG
#include <PDU.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
......@@ -15,8 +16,6 @@
#include <assert.h>
#include <errno.h>
#include <PDU.h>
#ifndef SRCDIR
#define SRCDIR_S ".."
#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