File: discover_localtime_r_with_AC_TRY_COMPILE.patch

package info (click to toggle)
mysql%2B%2B 3.2.5-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, trixie
  • size: 18,360 kB
  • sloc: cpp: 35,788; sh: 3,693; perl: 789; makefile: 730
file content (23 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Author: Helmut Grohne <helmut@subdivi.de>
Description: Use AC_TRY_COMPILE to discover localtime_r() (Closes: #901343)
--- mysql++-3.2.2+pristine.orig/config/localtime_r.m4
+++ mysql++-3.2.2+pristine/config/localtime_r.m4
@@ -9,16 +9,11 @@
 [
 	AC_MSG_CHECKING([for localtime_r()])
 
-	AC_TRY_RUN([
-		#include <time.h>
-		int main(void)
-		{
+	AC_TRY_COMPILE([#include <time.h>],[
 			time_t tt;
 			struct tm stm;
 			localtime_r(&tt, &stm);
-			return 0;
-		}
-	], [localtime_r_found=yes], [localtime_r_found=no], [localtime_r_found=no])
+	], [localtime_r_found=yes], [localtime_r_found=no])
 
 	AC_MSG_RESULT([$localtime_r_found])
 	if test x"$localtime_r_found" = xyes