]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Clean up config.h
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 17 Jul 2023 16:36:06 +0000 (18:36 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 18 Jul 2023 19:37:21 +0000 (21:37 +0200)
cmake/GenerateConfigurationFile.cmake
cmake/config.h.in

index dc6ce3d726332a53a62299b76da4240dde8dd0bb..7ff5ae383d7a02ad28b8d184eacfd3ea94ae077e 100644 (file)
@@ -1,21 +1,18 @@
 include(CheckIncludeFile)
 set(include_files
+    dirent.h
     linux/fs.h
     pwd.h
     sys/clonefile.h
+    sys/file.h
     sys/ioctl.h
     sys/mman.h
-    sys/time.h
+    sys/utime.h
     sys/wait.h
-    sys/file.h
     syslog.h
-    termios.h
-    dirent.h
-    strings.h
     unistd.h
     utime.h
-    sys/utime.h
-    varargs.h)
+)
 foreach(include_file IN ITEMS ${include_files})
   string(TOUPPER ${include_file} include_var)
   string(REGEX REPLACE "[/.]" "_" include_var ${include_var})
@@ -30,9 +27,7 @@ set(functions
     getpwuid
     localtime_r
     posix_fallocate
-    realpath
     setenv
-    strndup
     syslog
     unsetenv
     utimensat
@@ -47,14 +42,14 @@ endforeach()
 include(CheckStructHasMember)
 check_struct_has_member("struct stat" st_atim sys/stat.h
                         HAVE_STRUCT_STAT_ST_ATIM LANGUAGE CXX)
-check_struct_has_member("struct stat" st_ctim sys/stat.h
-                        HAVE_STRUCT_STAT_ST_CTIM LANGUAGE CXX)
-check_struct_has_member("struct stat" st_mtim sys/stat.h
-                        HAVE_STRUCT_STAT_ST_MTIM LANGUAGE CXX)
 check_struct_has_member("struct stat" st_atimespec sys/stat.h
                         HAVE_STRUCT_STAT_ST_ATIMESPEC LANGUAGE CXX)
+check_struct_has_member("struct stat" st_ctim sys/stat.h
+                        HAVE_STRUCT_STAT_ST_CTIM LANGUAGE CXX)
 check_struct_has_member("struct stat" st_ctimespec sys/stat.h
                         HAVE_STRUCT_STAT_ST_CTIMESPEC LANGUAGE CXX)
+check_struct_has_member("struct stat" st_mtim sys/stat.h
+                        HAVE_STRUCT_STAT_ST_MTIM LANGUAGE CXX)
 check_struct_has_member("struct stat" st_mtimespec sys/stat.h
                         HAVE_STRUCT_STAT_ST_MTIMESPEC LANGUAGE CXX)
 check_struct_has_member("struct statfs" f_fstypename sys/mount.h
index 2d23fcbf1f3b4555b86d4551f90d000d86795b31..ba6dd9210dc608585d60a85adff01edf3b2a1b93 100644 (file)
 
 #cmakedefine MTR_ENABLED
 
-// Define if you have the "asctime_r" function.
-#cmakedefine HAVE_ASCTIME_R
-
-// Define if your compiler supports AVX2.
-#cmakedefine HAVE_AVX2
-
-// Define if you have the "getopt_long" function.
-#cmakedefine HAVE_GETOPT_LONG
+// === Header files ===
 
-// Define if you have the "getpwuid" function.
-#cmakedefine HAVE_GETPWUID
+// Define if you have the <dirent.h> header file.
+#cmakedefine HAVE_DIRENT_H
 
 // Define if you have the <linux/fs.h> header file.
 #cmakedefine HAVE_LINUX_FS_H
 
-// Define if you have the "localtime_r" function.
-#cmakedefine HAVE_LOCALTIME_R
-
-// Define if the system has the type "long long".
-#cmakedefine HAVE_LONG_LONG
-
-// Define if you have the "posix_fallocate.
-#cmakedefine HAVE_POSIX_FALLOCATE
-
 // Define if you have the <pwd.h> header file.
 #cmakedefine HAVE_PWD_H
 
-// Define if you have the "realpath"" function.
-#cmakedefine HAVE_REALPATH
-
-// Define if you have the "setenv" function.
-#cmakedefine HAVE_SETENV
-
-// Define if you have the "strndup" function.
-#cmakedefine HAVE_STRNDUP
-
-// Define if "f_fstypename" is a member of "struct statfs".
-#cmakedefine HAVE_STRUCT_STATFS_F_FSTYPENAME
-
-// Define if "st_atim" is a member of "struct stat".
-#cmakedefine HAVE_STRUCT_STAT_ST_ATIM
-
-// Define if "st_ctim" is a member of "struct stat".
-#cmakedefine HAVE_STRUCT_STAT_ST_CTIM
-
-// Define if "st_mtim" is a member of "struct stat".
-#cmakedefine HAVE_STRUCT_STAT_ST_MTIM
-
-// Define if "st_atimespec" is a member of "struct stat".
-#cmakedefine HAVE_STRUCT_STAT_ST_ATIMESPEC
-
-// Define if "st_ctimespec" is a member of "struct stat".
-#cmakedefine HAVE_STRUCT_STAT_ST_CTIMESPEC
-
-// Define if "st_mtimespec" is a member of "struct stat".
-#cmakedefine HAVE_STRUCT_STAT_ST_MTIMESPEC
-
-// Define if you have the "syslog" function.
-#cmakedefine HAVE_SYSLOG
-
-// Define if you have the <syslog.h> header file.
-#cmakedefine HAVE_SYSLOG_H
-
 // Define if you have the <sys/clonefile.h> header file.
 #cmakedefine HAVE_SYS_CLONEFILE_H
 
 // Define if you have the <sys/mman.h> header file.
 #cmakedefine HAVE_SYS_MMAN_H
 
-// Define if you have the <sys/time.h> header file.
-#cmakedefine HAVE_SYS_TIME_H
+// Define if you have the <sys/utime.h> header file.
+#cmakedefine HAVE_SYS_UTIME_H
 
-// Define if you have <sys/wait.h> that is POSIX.1 compatible.
+// Define if you have the <sys/wait.h>  header file.
 #cmakedefine HAVE_SYS_WAIT_H
 
-// Define if you have the <sys/file.h> header file.
-#cmakedefine HAVE_SYS_FILE_H
-
-// Define if you have the <termios.h> header file.
-#cmakedefine HAVE_TERMIOS_H
-
-// Define if you have the <dirent.h> header file.
-#cmakedefine HAVE_DIRENT_H
-
-// Define if you have the <strings.h> header file.
-#cmakedefine HAVE_STRINGS_H
+// Define if you have the <syslog.h> header file.
+#cmakedefine HAVE_SYSLOG_H
 
 // Define if you have the <unistd.h> header file.
 #cmakedefine HAVE_UNISTD_H
 // Define if you have the <utime.h> header file.
 #cmakedefine HAVE_UTIME_H
 
-// Define if you have the <sys/utime.h> header file.
-#cmakedefine HAVE_SYS_UTIME_H
+// === Functions ===
 
-// Define if you have the <varargs.h> header file.
-#cmakedefine HAVE_VARARGS_H
+// Define if you have the "asctime_r" function.
+#cmakedefine HAVE_ASCTIME_R
+
+// Define if you have the "getopt_long" function.
+#cmakedefine HAVE_GETOPT_LONG
+
+// Define if you have the "getpwuid" function.
+#cmakedefine HAVE_GETPWUID
+
+// Define if you have the "localtime_r" function.
+#cmakedefine HAVE_LOCALTIME_R
+
+// Define if you have the "posix_fallocate" function.
+#cmakedefine HAVE_POSIX_FALLOCATE
+
+// Define if you have the "setenv" function.
+#cmakedefine HAVE_SETENV
+
+// Define if you have the "syslog" function.
+#cmakedefine HAVE_SYSLOG
 
 // Define if you have the "unsetenv" function.
 #cmakedefine HAVE_UNSETENV
 // Define if you have the "utimes" function.
 #cmakedefine HAVE_UTIMES
 
+// === Struct members ===
+
+// Define if "st_atim" is a member of "struct stat".
+#cmakedefine HAVE_STRUCT_STAT_ST_ATIM
+
+// Define if "st_atimespec" is a member of "struct stat".
+#cmakedefine HAVE_STRUCT_STAT_ST_ATIMESPEC
+
+// Define if "st_ctim" is a member of "struct stat".
+#cmakedefine HAVE_STRUCT_STAT_ST_CTIM
+
+// Define if "st_ctimespec" is a member of "struct stat".
+#cmakedefine HAVE_STRUCT_STAT_ST_CTIMESPEC
+
+// Define if "st_mtim" is a member of "struct stat".
+#cmakedefine HAVE_STRUCT_STAT_ST_MTIM
+
+// Define if "st_mtimespec" is a member of "struct stat".
+#cmakedefine HAVE_STRUCT_STAT_ST_MTIMESPEC
+
+// Define if "f_fstypename" is a member of "struct statfs".
+#cmakedefine HAVE_STRUCT_STATFS_F_FSTYPENAME
+
+// === Instruction sets ===
+
+// Define if your compiler supports AVX2.
+#cmakedefine HAVE_AVX2
+
+// === Other ===
+
 #if defined(__ibmxl__) && defined(__clang__) // Compiler xlclang
-#  undef HAVE_VARARGS_H // varargs.h would hide macros of stdarg.h
 #  undef HAVE_STRUCT_STAT_ST_CTIM
 #  undef HAVE_STRUCT_STAT_ST_MTIM
 #endif