svn commit: r1927746 - apr/apr/trunk/build

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <175489808528.1793409.7599717831225050620@svn02-us-east.apache.org>
Author: jorton
Date: Mon Aug 11 07:41:24 2025
New Revision: 1927746

Log:
* build/apr_common.m4 (APR_TRY_COMPILE_NO_WARNING): Simplify by using
  APR_LANG_PROGRAM.

GitHub: pr #68

Modified:
   apr/apr/trunk/build/apr_common.m4

Modified: apr/apr/trunk/build/apr_common.m4
==============================================================================
--- apr/apr/trunk/build/apr_common.m4	Mon Aug 11 07:40:13 2025	(r1927745)
+++ apr/apr/trunk/build/apr_common.m4	Mon Aug 11 07:41:24 2025	(r1927746)
@@ -467,19 +467,11 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
    CFLAGS="$CFLAGS -Werror"
  fi
  AC_COMPILE_IFELSE(
-  [AC_LANG_SOURCE(
-   [
-#ifndef PACKAGE_NAME
-#include "confdefs.h"
-#endif
-   ]
-   [[$1]]
-   [int main(int argc, const char *const *argv) {]
-   [[$2]]
-   [   return 0; }]
-  )], [CFLAGS=$apr_save_CFLAGS
-$3],  [CFLAGS=$apr_save_CFLAGS
-$4])
+  [AC_LANG_PROGRAM([[$1]], [[$2]])],
+  [CFLAGS=$apr_save_CFLAGS
+   $3],
+  [CFLAGS=$apr_save_CFLAGS
+   $4])
 ])
 
 dnl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.