]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
m4: mntctl.m4 - Modernize m4 syntax
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 25 Apr 2022 19:00:01 +0000 (22:00 +0300)
committerKarl Fleischmann <karl.fleischmann@open-xchange.com>
Mon, 4 Jul 2022 09:43:26 +0000 (11:43 +0200)
m4/mntctl.m4

index 9d0dde1d13238d9fa61264294d5d0f27c2769747..7cc74aa5b87e89fa5fcc3c12ca37b89bdd6df1fa 100644 (file)
@@ -5,19 +5,18 @@ dnl **
 AC_DEFUN([DOVECOT_MNTCTL], [
   if test $ac_cv_header_sys_vmount_h = yes; then
     AC_MSG_CHECKING([for reasonable mntctl buffer size])
-    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+    AC_RUN_IFELSE([AC_LANG_PROGRAM([[
       #include <stdio.h>
       #include <stdlib.h>
       #include <sys/vmount.h>
-      int main() {
+    ]], [[
         int size,count; char *m;
         FILE *f=fopen("conftestval", "w");
         if (!f) exit(1);
         if ((count=mntctl(MCTL_QUERY,sizeof(size),&size))!=0 || !(m=malloc(size)) ||
             (count=mntctl(MCTL_QUERY,size,m))<=0) exit(1);
-          fprintf(f, "%d\n",(size * (count + 5))/count & ~1); /* 5 mounts more */
-          exit(0);
-      }
+        fprintf(f, "%d\n",(size * (count + 5))/count & ~1); /* 5 mounts more */
+        exit(0);
     ]])],[
       size=`cat conftestval`
       rm -f conftestval