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

RE: [Patch] Support OS/2

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 24 Jun 2010 14:44:45 +0200

> -----Original Message-----
> From: Paul Smedley [mailto:paul_at_smedley.id.au]
> Sent: donderdag 24 juni 2010 15:04
> To: dev_at_subversion.apache.org
> Subject: [Patch] Support OS/2
>
> Hi All,
>
> I've been building Subversion on OS/2 for some time, and figured it was
> time to request to get the patches incorporated in the main
> distribution.
>
> The current diff, based on 1.6.12 is attached.
>
> Mostly, it's changes to use some of the Win32 code for drive letters,
> etc.

Huge chunks of this code have been rewritten on trunk. (E.g. the dirent code
and some parts of io.c). Can you update this patch to work against trunk?

The path changes look ok. Your changes in io.c use '//'-style comments and
most likely break on other operating systems.

E.g.
> /* If the file is in a memory filesystem, fsync() may return
> EINVAL. Presumably the user knows the risks, and we can just
> ignore the error. */
> - if (rv == -1 && APR_STATUS_IS_EINVAL(apr_get_os_error()))
> +// if (rv == -1 && APR_STATUS_IS_EINVAL(apr_get_os_error()))
> + if (rv != 0 && rv==EINVAL)
> return SVN_NO_ERROR;

Changes the check from
#define APR_STATUS_IS_EINVAL(s) ((s) == APR_EINVAL \
                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_ACCESS \
                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_DATA \
                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_FUNCTION \
                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_HANDLE \
                || (s) == APR_OS_START_SYSERR + ERROR_INVALID_PARAMETER \
                || (s) == APR_OS_START_SYSERR + ERROR_NEGATIVE_SEEK)

To just checking for APR_EINVAL on Windows.

We don't keep the old code as comments in our code; we use a version control
system to look at the old code ;-)

> if (rv == -1)
> return svn_error_wrap_apr
> - (apr_get_os_error(), _("Can't flush file to disk"));
> + (rv, _("Can't flush file to disk"));
> +// (apr_get_os_error(), _("Can't flush file to disk"));

This will return error code -1 (Undefined behavior), where it used to give
the os error.
(Similar cases in a few places)

        Bert
Received on 2010-06-24 14:45:39 CEST

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