You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2009/12/18 01:21:03 UTC
svn commit: r892028 - /apr/apr/trunk/build/apr_common.m4
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