Re: How necessary is 'scandir'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2015-02-10 10:14 AM, Akira TAGOH wrote:
I don't know how much AIX supports POSIX functions nor the own scandir-like
function substituting with POSIX functions even works on AIX. so if someone
can make a patch for AIX, that would be appreciated.

On Tue, Feb 10, 2015 at 6:04 PM, Michael Felt<aixtools@xxxxxxxxx>  wrote:

Thanks for the reply. Then I'll just have to work with the old version for
now.

I am not using it to build a desktop - so hopefully the old version will
work well enough.

Where does scandir come from, if not posix libc? (I am building on AIX)

On Tue, Feb 10, 2015 at 9:49 AM, Akira TAGOH<akira@xxxxxxxxx>  wrote:

scandir is used in a function to check the checksum of the caches. then
it is a must.

On Tue, Feb 10, 2015 at 5:34 PM, aixtools<aixtools@xxxxxxxxx>  wrote:

checking for posix_fadvise in fcntl.h... fcntl.h
checking for scandir... configure: error:
*** No scandir function available.

Background: I am trying to package a recent version of rrdtool - which
has several dependancies - and fontconfig is one of them.

While the rrdtool says fontconfig-2.4.2 is sufficient (and I have that
done) I am trying to be as up-to-date as possible with dependancies. When I
run 'configure' on AIX I get the error above (maybe more will follow).

If scandir is a must, then this gets moved to longer-term, if not -
please suggest the best way to correct this.

Many thanks,
Michael

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig



--
Akira TAGOH



Well, it seems scandir is known in the include files

*******************************************************************************
* * * * * Welcome to AIX Version 5.3! * * * * * * Please see the README file in /usr/lpp/bos for information pertinent to * * this release of the AIX Operating System. * * * * *
*******************************************************************************
root@x064:[/]cd /usr/include
root@x064:[/usr/include]grep scandir *.h sys/*.h
sys/dir.h:extern int scandir();
sys/dir.h:extern int scandir64();
sys/dir.h:/* The scandir and alphasort prototypes Have been changed
sys/dir.h:extern int scandir(const char *, struct dirent ***, int (*)(), int (*)());
sys/dir.h:extern int scandir(const char *, struct dirent ***,
sys/dir.h:extern int scandir64(const char *, struct dirent64 ***,
sys/dir.h:extern int __linux_scandir(const char *dirname, struct dirent ***namelist, sys/dir.h:extern int __linux_scandir64(const char *dirname, struct dirent64 ***namelist,
sys/dir.h:#define scandir(a, b, c, d) __linux_scandir(a, b, c, d)
sys/dir.h:#define scandir64(a, b, c, d) __linux_scandir64(a, b, c, d)
root@x064:[/usr/include]

config.log extract...

configure:14121: cc -qlanglvl=extc89 -c -g  -Werror  conftest.c >&5
cc: 1501-210 (S) command option Werror contains an incorrect subargument
configure:14121: $? = 40
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "fontconfig"
| #define PACKAGE_TARNAME "fontconfig"
| #define PACKAGE_VERSION "2.11.92"
| #define PACKAGE_STRING "fontconfig 2.11.92"
| #define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig";
| #define PACKAGE_URL ""
| #define PACKAGE "fontconfig"
| #define VERSION "2.11.92"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define _LARGE_FILES 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_DIRENT_H 1
| #define STDC_HEADERS 1
| #define HAVE_FCNTL_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_SYS_STATFS_H 1
| #define HAVE_SYS_PARAM_H 1
| #ifndef __cplusplus
| #define inline __inline__
| #endif
| #define FLEXIBLE_ARRAY_MEMBER /**/
| #define HAVE_VPRINTF 1
| #define HAVE_DOPRNT 1
| #define HAVE_STDLIB_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_MMAP 1
| #define HAVE_LINK 1
| #define HAVE_MKSTEMP 1
| #define HAVE_GETOPT 1
| #define HAVE_RAND 1
| #define HAVE_RANDOM 1
| #define HAVE_LRAND48 1
| #define HAVE_RANDOM_R 1
| #define HAVE_RAND_R 1
| #define HAVE_READLINK 1
| #define HAVE_FSTATVFS 1
| #define HAVE_FSTATFS 1
| #define HAVE_LSTAT 1
| #define HAVE_POSIX_FADVISE 1
| /* end confdefs.h.  */
|
|                       #include <dirent.h>
|                       int main(void);
|
| int
| main ()
| {
|
|                       int (* comp) (const void *, const void *) = 0;
|                       struct dirent **d;
|                       return scandir(".", &d, 0, comp) >= 0;
|
|   ;
|   return 0;
| }
configure:14131: error:
*** No scandir function available.

Looks like the wrong include file is used (dirent.h rather that sys/dir.h)

I will try modifying configure - no clue how/where to modify an .ac file.

Michael



_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig





[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux