]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Minor tweaks to style and comments.
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 27 Jun 2023 14:24:49 +0000 (17:24 +0300)
committerJia Tan <jiat0218@gmail.com>
Tue, 27 Jun 2023 15:56:06 +0000 (23:56 +0800)
CMakeLists.txt
configure.ac

index 66a5ded68de7af5f467e41d23f4cff5f22b50bc2..7aed9d9fc1c25c2584ab8114a369a60b1cb10461 100644 (file)
@@ -371,7 +371,7 @@ if(ENABLE_THREADS)
             #
             # The Win95 threading lacks thread-safe one-time initialization
             # function.
-            if (ENABLE_SMALL)
+            if(ENABLE_SMALL)
                 message(SEND_ERROR "Threading method win95 and ENABLE_SMALL "
                                    "cannot be used at the same time")
             endif()
@@ -772,9 +772,9 @@ if(ALLOW_ATTR_IFUNC)
     set(CMAKE_REQUIRED_FLAGS "-Werror")
     check_c_source_compiles("
             static void func(void) { return; }
-            static void (*resolve_func (void)) (void) { return func; }
-            void func_ifunc (void)
-                    __attribute__ ((__ifunc__ (\"resolve_func\")));
+            static void (*resolve_func(void)) (void) { return func; }
+            void func_ifunc(void)
+                    __attribute__((__ifunc__(\"resolve_func\")));
             int main(void) { return 0; }
         "
         HAVE_FUNC_ATTRIBUTE_IFUNC)
index 5b764fce6071b433edd9328821512349c2a7f663..193e2d6d4c34f47d26b6d02567bca8e99e3649f8 100644 (file)
@@ -859,11 +859,12 @@ AC_COMPILE_IFELSE([
 ], [
        AC_MSG_RESULT([no])
 ])
-
 CFLAGS="$OLD_CFLAGS"
 
-# __attribute__((__ifunc__())) can be used for one-time initializations,
-# similar to __attribute__((__constructor__)).
+# __attribute__((__ifunc__())) can be used to choose between different
+# implementations of the same function at runtime. This is slightly more
+# efficient than using __attribute__((__constructor__)) and setting
+# a function pointer.
 AC_ARG_ENABLE([ifunc], [AS_HELP_STRING([--disable-ifunc],
                [do not use __attribute__((__ifunc__()))])],
        [], [enable_ifunc=yes])
@@ -876,7 +877,7 @@ if test "x$enable_ifunc" = xyes ; then
                static void func(void) { return; }
                static void (*resolve_func (void)) (void) { return func; }
                void func_ifunc (void)
-                               __attribute__ ((__ifunc__ ("resolve_func")));
+                               __attribute__((__ifunc__("resolve_func")));
        ], [
                AC_DEFINE([HAVE_FUNC_ATTRIBUTE_IFUNC], [1],
                        [Define to 1 if __attribute__((__ifunc__()))