Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: third_party/talloc/libreplace/repdir.m4

Issue 2282793002: Remove unused third_party/talloc (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 AC_CACHE_CHECK([for broken readdir],libreplace_cv_READDIR_NEEDED,[
2 AC_TRY_RUN([
3 #define test_readdir_os2_delete main
4 #include "$libreplacedir/test/os2_delete.c"],
5 [libreplace_cv_READDIR_NEEDED=no],
6 [libreplace_cv_READDIR_NEEDED=yes],
7 [libreplace_cv_READDIR_NEEDED="assuming not"])
8 ])
9
10 AC_CHECK_FUNCS(dirfd)
11 AC_HAVE_DECL(dirfd, [#include <dirent.h>])
12
13 #
14 # try to replace with getdirentries() if needed
15 #
16 if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
17 AC_CHECK_FUNCS(getdirentries)
18 AC_VERIFY_C_PROTOTYPE([long telldir(const DIR *dir)],
19 [
20 return 0;
21 ],[
22 AC_DEFINE(TELLDIR_TAKES_CONST_DIR, 1, [Whether telldir takes a const poi nter])
23 ],[],[
24 #include <dirent.h>
25 ])
26
27 AC_VERIFY_C_PROTOTYPE([int seekdir(DIR *dir, long ofs)],
28 [
29 return 0;
30 ],[
31 AC_DEFINE(SEEKDIR_RETURNS_INT, 1, [Whether seekdir returns an int])
32 ],[],[
33 #include <dirent.h>
34 ])
35 AC_CACHE_CHECK([for replacing readdir using getdirentries()],libreplace_cv_READD IR_GETDIRENTRIES,[
36 AC_TRY_RUN([
37 #define _LIBREPLACE_REPLACE_H
38 #include "$libreplacedir/repdir_getdirentries.c"
39 #define test_readdir_os2_delete main
40 #include "$libreplacedir/test/os2_delete.c"],
41 [libreplace_cv_READDIR_GETDIRENTRIES=yes],
42 [libreplace_cv_READDIR_GETDIRENTRIES=no])
43 ])
44 fi
45 if test x"$libreplace_cv_READDIR_GETDIRENTRIES" = x"yes"; then
46 AC_DEFINE(REPLACE_READDIR,1,[replace readdir])
47 AC_DEFINE(REPLACE_READDIR_GETDIRENTRIES,1,[replace readdir using getdire ntries()])
48 LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdirentries.o"
49 libreplace_cv_READDIR_NEEDED=no
50 fi
51
52 #
53 # try to replace with getdents() if needed
54 #
55 if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
56 AC_CHECK_FUNCS(getdents)
57 AC_CACHE_CHECK([for replacing readdir using getdents()],libreplace_cv_READDIR_GE TDENTS,[
58 AC_TRY_RUN([
59 #define _LIBREPLACE_REPLACE_H
60 #error _donot_use_getdents_replacement_anymore
61 #include "$libreplacedir/repdir_getdents.c"
62 #define test_readdir_os2_delete main
63 #include "$libreplacedir/test/os2_delete.c"],
64 [libreplace_cv_READDIR_GETDENTS=yes],
65 [libreplace_cv_READDIR_GETDENTS=no])
66 ])
67 fi
68 if test x"$libreplace_cv_READDIR_GETDENTS" = x"yes"; then
69 AC_DEFINE(REPLACE_READDIR,1,[replace readdir])
70 AC_DEFINE(REPLACE_READDIR_GETDENTS,1,[replace readdir using getdents()])
71 LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/repdir_getdents.o"
72 libreplace_cv_READDIR_NEEDED=no
73 fi
74
75 AC_MSG_CHECKING([a usable readdir()])
76 if test x"$libreplace_cv_READDIR_NEEDED" = x"yes"; then
77 AC_MSG_RESULT(no)
78 AC_MSG_WARN([the provided readdir() is broken])
79 else
80 AC_MSG_RESULT(yes)
81 fi
OLDNEW
« no previous file with comments | « third_party/talloc/libreplace/libreplace_network.m4 ('k') | third_party/talloc/libreplace/repdir_getdents.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698