Changeset 3072 in kBuild
- Timestamp:
- Oct 2, 2017 8:33:39 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kmkbuiltin/touch.c
r3060 r3072 168 168 169 169 170 #if K_OS == K_OS_SOLARIS 171 /** 172 * Solaris doesn't have lutimes because System V doesn't believe in stuff like file modes on symbolic links. 173 */ 174 static int lutimes(const char *pszFile, struct timeval aTimes[2]) 175 { 176 struct stat Stat; 177 if (stat(pszFile, &Stat) != -1) 178 { 179 if (!S_ISLNK(Stat.st_mode)) 180 return utimes(pszFile, aTimes); 181 return 0; 182 } 183 return -1; 184 } 185 #endif 186 187 170 188 /** 171 189 * Parses adjustment value: [-][[hh]mm]SS … … 328 346 if (ExpTime.tm_isdst == 0) 329 347 { 348 #if K_OS == K_OS_SOLARIS 349 pDst->tv_sec = mktime(&ExpTime) - timezone; /* best we can do for now */ 350 #else 330 351 pDst->tv_sec = timegm(&ExpTime); 352 #endif 331 353 if (pDst->tv_sec == -1) 332 354 return touch_error("timegm failed on '%s': %s", pszTs, strerror(errno));
Note:
See TracChangeset
for help on using the changeset viewer.