Mercurial > gnulib
comparison m4/ls-mntd-fs.m4 @ 40144:cdd46dde7e34
mountlist: Port better to Android.
* lib/mountlist.c (MOUNTED): Redefine on Android.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Redefine MOUNTED on
Android.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 26 Jan 2019 22:49:57 +0100 |
parents | b06060465f09 |
children | 62fbdb07f551 |
comparison
equal
deleted
inserted
replaced
40143:648fa64e008c | 40144:cdd46dde7e34 |
---|---|
1 # serial 36 | 1 # serial 37 |
2 # How to list mounted file systems. | 2 # How to list mounted file systems. |
3 | 3 |
4 # Copyright (C) 1998-2004, 2006, 2009-2019 Free Software Foundation, Inc. | 4 # Copyright (C) 1998-2004, 2006, 2009-2019 Free Software Foundation, Inc. |
5 # | 5 # |
6 # This file is free software; the Free Software Foundation | 6 # This file is free software; the Free Software Foundation |
97 [AC_LANG_PROGRAM([[ | 97 [AC_LANG_PROGRAM([[ |
98 /* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ | 98 /* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ |
99 #include <stdio.h> | 99 #include <stdio.h> |
100 | 100 |
101 #include <mntent.h> | 101 #include <mntent.h> |
102 #if !defined MOUNTED | 102 #if defined __ANDROID__ /* Android */ |
103 # if defined _PATH_MOUNTED /* GNU libc */ | 103 # undef MOUNTED |
104 # define MOUNTED "/proc/mounts" | |
105 #elif !defined MOUNTED | |
106 # if defined _PATH_MOUNTED /* GNU libc */ | |
104 # define MOUNTED _PATH_MOUNTED | 107 # define MOUNTED _PATH_MOUNTED |
105 # endif | 108 # endif |
106 # if defined MNT_MNTTAB /* HP-UX. */ | 109 # if defined MNT_MNTTAB /* HP-UX. */ |
107 # define MOUNTED MNT_MNTTAB | 110 # define MOUNTED MNT_MNTTAB |
108 # endif | 111 # endif |
109 #endif | 112 #endif |
110 ]], | 113 ]], |
111 [[struct mntent *mnt = 0; char *table = MOUNTED; | 114 [[struct mntent *mnt = 0; char *table = MOUNTED; |