VirtualBox

儲存庫 kBuild 的更動 1711


忽略:
時間撮記:
2008-9-2 下午10:05:43 (16 年 以前)
作者:
bird
訊息:

kmk_chmod: made it build on solaris (no lchmod or ALLPERMS).

位置:
trunk/src/kmk/kmkbuiltin
檔案:
修改 3 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/kmk/kmkbuiltin/chmod.c

    r1710 r1711  
    5252#include <stdlib.h>
    5353#include <string.h>
    54 #ifndef _MSC_VER
     54#ifdef _MSC_VER
    5555# include <unistd.h>
    5656#else
    5757# include "mscfakes.h"
     58#endif
     59#ifdef __sun__
     60# include "solfakes.h"
    5861#endif
    5962#include "getopt.h"
  • trunk/src/kmk/kmkbuiltin/solfakes.c

    r1246 r1711  
    7474}
    7575
     76
     77
     78int sol_lchmod(const char *pszPath, mode_t mode)
     79{
     80    /*
     81     * Weed out symbolic links.
     82     */
     83    struct stat s;
     84    if (    !lstat(pszPath, &s)
     85        &&  S_ISLNK(s.st_mode))
     86    {
     87        errno = -ENOSYS;
     88        return -1;
     89    }
     90
     91    return chmod(pszPath, mode);
     92}
     93
  • trunk/src/kmk/kmkbuiltin/solfakes.h

    r1246 r1711  
    3232#define ALLPERMS 0000777
    3333#define lutimes(path, tvs) utimes(path, tvs)
    34 #define lchmod(path, mod) chmod(path, mod)
     34#define lchmod sol_lchmod
    3535#define MAX(a,b) ((a) >= (b) ? (a) : (b))
    3636#ifndef USHRT_MAX
     
    4040int vasprintf(char **strp, const char *fmt, va_list va);
    4141int asprintf(char **strp, const char *fmt, ...);
     42int sol_lchmod(const char *pszPath, mode_t mode);
    4243
    4344#endif /* __sun__ */
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette