File tree Expand file tree Collapse file tree 4 files changed +5
-16
lines changed Expand file tree Collapse file tree 4 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -1156,15 +1156,6 @@ if env["vsproj"]:
11561156 env ["CPPPATH" ] = [Dir (path ) for path in env ["CPPPATH" ]]
11571157 methods .generate_vs_project (env , ARGUMENTS , env ["vsproj_name" ])
11581158
1159- # Check for the existence of headers
1160- conf = Configure (env )
1161- if "check_c_headers" in env :
1162- headers = env ["check_c_headers" ]
1163- for header in headers :
1164- if conf .CheckCHeader (header ):
1165- env .AppendUnique (CPPDEFINES = [headers [header ]])
1166- conf .Finish ()
1167-
11681159# Miscellaneous & post-build methods.
11691160if not env .GetOption ("clean" ) and not env .GetOption ("help" ):
11701161 methods .dump (env )
Original file line number Diff line number Diff line change @@ -4,5 +4,3 @@ from misc.utility.scons_hints import *
44Import ("env" )
55
66env .add_source_files (env .drivers_sources , "*.cpp" )
7-
8- env ["check_c_headers" ] = {"mntent.h" : "HAVE_MNTENT" }
Original file line number Diff line number Diff line change 4646#include < sys/stat.h>
4747#include < sys/statvfs.h>
4848
49- #ifdef HAVE_MNTENT
49+ #if __has_include(<mntent.h>)
5050#include < mntent.h>
5151#endif
5252
@@ -192,7 +192,7 @@ void DirAccessUnix::list_dir_end() {
192192 _cisdir = false ;
193193}
194194
195- #if defined(HAVE_MNTENT ) && defined(LINUXBSD_ENABLED)
195+ #if __has_include(<mntent.h> ) && defined(LINUXBSD_ENABLED)
196196static bool _filter_drive (struct mntent *mnt) {
197197 // Ignore devices that don't point to /dev
198198 if (strncmp (mnt->mnt_fsname , " /dev" , 4 ) != 0 ) {
@@ -216,7 +216,7 @@ static void _get_drives(List<String> *list) {
216216 // Add root.
217217 list->push_back (" /" );
218218
219- #if defined(HAVE_MNTENT ) && defined(LINUXBSD_ENABLED)
219+ #if __has_include(<mntent.h> ) && defined(LINUXBSD_ENABLED)
220220 // Check /etc/mtab for the list of mounted partitions.
221221 FILE *mtab = setmntent (" /etc/mtab" , " r" );
222222 if (mtab) {
Original file line number Diff line number Diff line change 7676#include < sys/utsname.h>
7777#include < unistd.h>
7878
79- #ifdef HAVE_MNTENT
79+ #if __has_include(<mntent.h>)
8080#include < mntent.h>
8181#endif
8282
@@ -999,7 +999,7 @@ static String get_mountpoint(const String &p_path) {
999999 return " " ;
10001000 }
10011001
1002- #ifdef HAVE_MNTENT
1002+ #if __has_include(<mntent.h>)
10031003 dev_t dev = s.st_dev ;
10041004 FILE *fd = setmntent (" /proc/mounts" , " r" );
10051005 if (!fd) {
You can’t perform that action at this time.
0 commit comments