backtrace \
backtrace_symbols \
execvp \
+dirfd \
fpathconf \
fstatat \
malloc_usable_size \
+mkdirat \
mtrace \
openat \
strlcpy \
EFL_CHECK_FUNCS([EFL], [fnmatch gettimeofday])
+have_atfile_source="${ac_cv_func_fstatat}"
+AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
+ [test "x${have_atfile_source}" = "xyes"],
+ [1], [Use fstatat and other -at file functions])
+
###################### EFL ######################
### Checks for library functions
-EFL_CHECK_FUNCS([EINA], [dirfd dlopen dladdr iconv shm_open setxattr])
+EFL_CHECK_FUNCS([EINA], [dlopen dladdr iconv shm_open setxattr])
enable_log="no"
if test "x${efl_func_fnmatch}" = "xyes" && test "x${want_log}" = "xyes" ; then
### Additional options to configure
-AC_ARG_ENABLE([atfile-source],
- [AC_HELP_STRING([--disable-atfile-source],
- [disable use of atfile source functions as openat and mkdirat @<:@default=detect@:>@])],
- [
- if test "x${enableval}" = "xyes" ; then
- have_atfile_source="yes"
- else
- have_atfile_source="no"
- fi],
- [have_atfile_source=auto])
-
### Default values
-if ! test "x${have_atfile_source}" = "xno" ; then
- AC_CHECK_FUNCS([mkdirat],
- [
- have_atfile_source="yes"
- AC_DEFINE(HAVE_ATFILE_SOURCE, 1, [mkdirat exists])
- ],
- [
- if test "x${have_atfile_source}" = "xyes" ; then
- AC_MSG_ERROR([required atfile-source but no mkdirat()])
- fi
- have_atfile_source="no"
- ])
-fi
-
### Checks for programs
### Checks for libraries
eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Stat *st)
{
struct stat buf;
-#if defined(HAVE_FSTATAT) && defined(HAVE_DIRFD)
+#ifdef HAVE_ATFILE_SOURCE
int fd;
#endif
EINA_SAFETY_ON_NULL_RETURN_VAL(info, -1);
EINA_SAFETY_ON_NULL_RETURN_VAL(st, -1);
-#if defined(HAVE_FSTATAT) && defined(HAVE_DIRFD)
+#ifdef HAVE_ATFILE_SOURCE
fd = dirfd((DIR*) container);
if (fstatat(fd, info->path + info->name_start, &buf, 0))
#else