~ubuntu-branches/ubuntu/trusty/apache2/trusty

« back to all changes in this revision

Viewing changes to srclib/apr/file_io/win32/open.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-05-05 01:28:04 UTC
  • mfrom: (14.3.15 sid)
  • Revision ID: james.westby@ubuntu.com-20100505012804-vbouq0xs3tu2vvij
Tags: 2.2.15-5ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/{control, rules}: Enable PIE hardening.
  - debian/{control, rules, apache2.2-common.ufw.profile}: Add ufw profiles.
  - debian/control: Add bzr tag and point it to our tree.
  - debian/apache2-2.common.apache2.init: Add graceful restart (LP: #456381)
  + Dropped:
    - debian/patches/206-fix-potential-memory-leaks.dpatch: No longer needed.
    - debian/patches/206-report-max-client-mpm-worker.dpatch: No longer needed.
    - debian/config-dir/apache2.conf: Merged back from debian.
    - mod-reqtimeout functionality: Merge back from debian.
    - debian/patches/204_CVE-2010-0408.dpatch: No longer needed.
    - debian/patches/205_CVE-2010-0434.dpatch: No longer needed.
    - debian/patches/203_fix-ab-segfault.dpatch: No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
581
581
    return apr_get_os_error();
582
582
}
583
583
 
 
584
APR_DECLARE(apr_status_t) apr_file_link(const char *from_path, 
 
585
                                           const char *to_path)
 
586
{
 
587
    apr_status_t rv = APR_SUCCESS;
 
588
 
 
589
#if APR_HAS_UNICODE_FS
 
590
    IF_WIN_OS_IS_UNICODE
 
591
    {
 
592
        apr_wchar_t wfrom_path[APR_PATH_MAX];
 
593
        apr_wchar_t wto_path[APR_PATH_MAX];
 
594
 
 
595
        if (rv = utf8_to_unicode_path(wfrom_path, sizeof(wfrom_path) 
 
596
                                               / sizeof(apr_wchar_t), from_path))
 
597
            return rv;
 
598
        if (rv = utf8_to_unicode_path(wto_path, sizeof(wto_path) 
 
599
                                               / sizeof(apr_wchar_t), to_path))
 
600
            return rv;
 
601
 
 
602
        if (!CreateHardLinkW(wto_path, wfrom_path, NULL))
 
603
                return apr_get_os_error();
 
604
    }
 
605
#endif
 
606
#if APR_HAS_ANSI_FS
 
607
    ELSE_WIN_OS_IS_ANSI {
 
608
        if (!CreateHardLinkA(wto_path, wfrom_path))
 
609
                return apr_get_os_error()
 
610
    }
 
611
#endif
 
612
    return rv;
 
613
}
 
614
 
584
615
APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
585
616
                                          apr_file_t *file)
586
617
{