apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r892028 - /apr/apr/trunk/build/apr_common.m4
Date Fri, 18 Dec 2009 00:21:03 GMT
Author: wrowe
Date: Fri Dec 18 00:21:02 2009
New Revision: 892028

URL: http://svn.apache.org/viewvc?rev=892028&view=rev
Log:
More portable solution to this type mess, extensible to other \r\n platforms

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

Modified: apr/apr/trunk/build/apr_common.m4
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/apr_common.m4?rev=892028&r1=892027&r2=892028&view=diff
==============================================================================
--- apr/apr/trunk/build/apr_common.m4 (original)
+++ apr/apr/trunk/build/apr_common.m4 Fri Dec 18 00:21:02 2009
@@ -464,11 +464,16 @@
 AC_CACHE_VAL(AC_CV_NAME,
 [AC_TRY_RUN([#include <stdio.h>
 $1
+#ifdef WIN32
+#define binmode "b"
+#else
+#define binmode
+#endif
 main()
 {
-  FILE *f=fopen("conftestval", "w");
+  FILE *f=fopen("conftestval", "w" binmode);
   if (!f) exit(1);
-  fprintf(f, "%d", sizeof($2));
+  fprintf(f, "%d\n", sizeof($2));
   exit(0);
 }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3],,,
 AC_CV_NAME=$3))])dnl



Mime
View raw message