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

Re: [PATCH] #7 OS400/EBCDIC Port: Make svn_io_copy_file() CCSID insensitive.

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-03-07 14:39:34 CET

Mark Phippard <markp@softlanding.com> wrote on 02/24/2006 08:11:25 PM:

> > There's no difference between "text" and "binary" files on Unix.
>
> As always, thanks for the education. Other than OS/400, is Cygwin the
only
> environment where there is a difference?
>
> My only exposure to using these system calls is on OS/400 (via RPG
programs
> no less) so I am just used to this "feature" of OS/400. The high-level
> OS/400 "CPY" command even has a Text/Binary option.
>
> > Yes, I think that APR should be using APR_BINARY, too. I guess nobody
> > really noticed there was a problem because most of the testing was
done
> > on platforms where APR_BINARY has no meaning.
>
> Well maybe Max will try to get this into APR. That will be a long time
> before it trickles down to Subversion though. Can this patch be
reviewed
> in the meantime? Perhaps it can be tweaked (by Max) so that it could be
> used for Cygwin too so that he does not have to patch APR for Cygwin? A
> luxury we do not have for OS/400.
>
> Thanks
>
> Mark

Hey All,

We're down to the last two "core" patches to enable Subversion to run on
OS400 V5R4. I originally posted this patch back on 2/24 -
http://svn.haxx.se/dev/archive-2006-02/1418.shtml. It got discussed a
little then fell off the radar. I know, I know, don't post patches on
Friday!

Here is the original post of the patch again, please check it out if you
have some time.

Thanks,

Paul B.

----------------------------------------

(Don't know what the OS400/EBCDIC port is about? See:
http://svn.haxx.se/dev/archive-2006-02/0519.shtml)

Following on the heels of my last patch comes another related to file
CCSIDs - see http://svn.haxx.se/dev/archive-2006-02/1298.shtml for more on

the horror of CCSIDs. That noise you hear is Julian throwing himself off
a cliff after reading this...or possibly plotting to throw me off a cliff
8-o

On OS400 apr_file_copy() is sensitive to the source and destination files'

CCSIDs in that it attempts to convert the contents of the source file from

its CCSID to the CCSID of the destination file. If the files' CCSIDs
differ from each other and/or the system CCSID, the destination file is
likely to be corrupted.

My solution in the pre-V5R4 port (a.k.a. /svn/branches/ebcdic) was to add
a function (very closely) based on apr_file_transfer_contents() from
srclib/apr/file_io/unix/copy.c that copies the file in a CCSID-insensitive

manner.

I looked at this problem afresh for V5R4 and despite coming up with a lot
of ideas, I didn't see a better solution. So I further streamlined and
recommented the ebcdic branch approach and here it is for your
consideration, let me know what you think, thanks.

Paul B.

----------------------------------------------------------------------
[[[
OS400/EBCDIC Port: Make svn_io_copy_file CCSID insensitive.

This is one of several patches to allow Subversion to run on IBM's
OS400 V5R4. It makes svn_io_copy_file() insensitive to the CCSIDs of
the source and destination files, thereby preventing potential OS400
conversion of the files' contents.

* subversion/libsvn_subr/io.c
   (os400_file_copy): New function.
   (svn_io_copy_file): Replace call to apr_file_copy() with new
    function.
]]]

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Tue Mar 7 14:42:07 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.