apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46820] New: [PATCH] apr_file_mtime_set working with symlinks
Date Sun, 08 Mar 2009 14:38:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46820

           Summary: [PATCH] apr_file_mtime_set working with symlinks
           Product: APR
           Version: HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: catone@cpan.org


Created an attachment (id=23354)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23354)
svn diff from root

Currently there are no ability to change mtime of symlink.

I've ran into this problem while using Subversion feature 'use_commit_times'
with symlinks in repository.

Assuming that lutimes libc function is present in some BSD ( at least, FreeBSD
and it's derivatives ), linux ( glibc >= 2.6 with kernel >= 2.6.22 ), and MacOS
( made through emulation, not a syscall ), imo, it could be also supported by
APR now.

Patch adds apr_file_lmtime_set function with 'wanted' argument, allowing to use
APR_FINFO_LINK flag if you want to change mtime of symlink itself, and not the
file it is pointing to.

Behavior of apr_file_mtime_set kept as it was.

Detection of lutimes made on 'configure' stage, using apr_file_io.m4 detections
and setting 'HAVE_LUTIMES' to 1. If 'HAVE_LUTIMES' is not defined - behavior of
apr_file_lmtime_set is equal to current apr_file_mtime_set.

In testfileinfo.c added test for apr_file_lmtime_set, compiled only if
HAVE_LUTIMES is defined. For 'HAVE_LUTIMES' to be visible in tests - added
including of apr_private.h, and this, in it's turn, requires extending INCLUDES
part of test/Makefile.

patch was tested on:
- Linux 2.6.27-11-generic
- FreeBSD 7.1-STABLE-20090201
applying to trunk revision 751107 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=751107
)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message