[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[patch] fix for portability in diff

From: <cmpilato_at_collab.net>
Date: 2001-01-27 08:48:13 CET

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* NOTENOTENOTE: DO NOT APPLY THIS PATCH UNTIL THE APR TEAM APPROVES *
* THE PATCH WHICH ADDS THE FUNCTION APR_OPEN_STDOUT( ). *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* diff.c (svn_client_file_diff): Changed call to apr_put_os_file(),
                                 which was not portable, to the
                                 new APR function apr_open_stdout().

Index: subversion/client/diff.c
===================================================================
RCS file: /cvs/subversion/subversion/client/diff.c,v
retrieving revision 1.5
diff -u -r1.5 diff.c
--- subversion/client/diff.c 2001/01/26 19:40:48 1.5
+++ subversion/client/diff.c 2001/01/27 05:57:03
@@ -19,8 +19,7 @@
 /*** Includes. ***/
 #include <apr_hash.h>
 #include <apr_tables.h>
-#include <apr_portable.h>
-#include <unistd.h>
+#include <apr_file_io.h>
 #include "svn_hash.h"
 #include "svn_wc.h"
 #include "svn_client.h"
@@ -37,7 +36,6 @@
   svn_error_t *err;
   svn_string_t *pristine_copy_path;
   const char *args[5];
- apr_os_file_t stdout_fileno = STDOUT_FILENO;
 
   apr_file_t *outhandle = NULL;
 
@@ -50,7 +48,7 @@
 
   /* Get an apr_file_t representing stdout, which is where we'll have
      the diff program print to. */
- status = apr_put_os_file (&outhandle, &stdout_fileno, pool);
+ status = apr_open_stdout (&outhandle, pool);
   if (status)
     return svn_error_create (status, 0, NULL, pool,
                              "error: can't open handle to stdout");
Received on Sat Oct 21 14:36:20 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.