Changeset 1364 in svn for branches/3.0/xcache/xc_lock.c


Ignore:
Timestamp:
2013-09-09T13:35:36+02:00 (23 months ago)
Author:
Xuefer
Message:

merge [1363] from trunk: cygwin hack unlink should be cygwin only

Location:
branches/3.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0

    • Property svn:mergeinfo changed
      /trunkmerged: 1363
  • branches/3.0/xcache/xc_lock.c

    r1246 r1364  
    6767typedef struct {
    6868    HANDLE fd;
     69#ifdef __CYGWIN__
     70    /* store the path for unlink() later */
    6971    char *pathname;
     72#endif
    7073} xc_fcntl_lock_t;
    7174
     
    150153    if (fd != INVALID_HANDLE_VALUE) {
    151154
    152 #ifndef __CYGWIN__
    153         unlink(pathname);
    154 #endif
    155155        lck->fd = fd;
     156#ifdef __CYGWIN__
    156157        size = strlen(pathname) + 1;
    157158        lck->pathname = malloc(size);
    158159        memcpy(lck->pathname, pathname, size);
     160#else
     161        unlink(pathname);
     162#endif
    159163    }
    160164    else {
     
    175179#ifdef __CYGWIN__
    176180    unlink(lck->pathname);
    177 #endif
    178181    free(lck->pathname);
     182#endif
    179183}
    180184/* }}} */
Note: See TracChangeset for help on using the changeset viewer.