Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1089)

Side by Side Diff: sysdeps/unix/sysv/linux/futimes.c

Issue 7785030: Replace #define syscalls cancel machinery. (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Cosmetic change Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sysdeps/posix/libc_fatal.c ('k') | sysdeps/unix/sysv/linux/libc_fatal.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* futimes -- change access and modification times of open file. Linux version. 1 /* futimes -- change access and modification times of open file. Linux version.
2 Copyright (C) 2002,2003,2005,2006,2007 Free Software Foundation, Inc. 2 Copyright (C) 2002,2003,2005,2006,2007 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version. 8 version 2.1 of the License, or (at your option) any later version.
9 9
10 The GNU C Library is distributed in the hope that it will be useful, 10 The GNU C Library is distributed in the hope that it will be useful,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 { 51 {
52 __set_errno (EINVAL); 52 __set_errno (EINVAL);
53 return -1; 53 return -1;
54 } 54 }
55 55
56 TIMEVAL_TO_TIMESPEC (&tvp[0], &ts[0]); 56 TIMEVAL_TO_TIMESPEC (&tvp[0], &ts[0]);
57 TIMEVAL_TO_TIMESPEC (&tvp[1], &ts[1]); 57 TIMEVAL_TO_TIMESPEC (&tvp[1], &ts[1]);
58 } 58 }
59 59
60 #ifdef __ASSUME_UTIMENSAT 60 #ifdef __ASSUME_UTIMENSAT
61 return INLINE_SYSCALL (utimensat, 4, fd, NULL, tvp ? &ts : NULL, 0); 61 return INLINE_SYSCALL (utimensat, 4, fd, NULL, tvp ? ts : NULL, 0);
62 #else 62 #else
63 int result; 63 int result;
64 # ifdef __NR_utimensat 64 # ifdef __NR_utimensat
65 if (!__builtin_expect (miss_utimensat, 0)) 65 if (!__builtin_expect (miss_utimensat, 0))
66 { 66 {
67 result = INLINE_SYSCALL (utimensat, 4, fd, NULL, tvp ? &ts : NULL, 0); 67 result = INLINE_SYSCALL (utimensat, 4, fd, NULL, tvp ? ts : NULL, 0);
68 if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) 68 if (__builtin_expect (result, 0) != -1 || errno != ENOSYS)
69 return result; 69 return result;
70 70
71 miss_utimensat = 1; 71 miss_utimensat = 1;
72 } 72 }
73 # endif 73 # endif
74 74
75 static const char selffd[] = "/proc/self/fd/"; 75 static const char selffd[] = "/proc/self/fd/";
76 char fname[sizeof (selffd) + 3 * sizeof (int)]; 76 char fname[sizeof (selffd) + 3 * sizeof (int)];
77 fname[sizeof (fname) - 1] = '\0'; 77 fname[sizeof (fname) - 1] = '\0';
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 # endif 129 # endif
130 if (INLINE_SYSCALL (fcntl, 3, fd, F_GETFD, 0) != -1) 130 if (INLINE_SYSCALL (fcntl, 3, fd, F_GETFD, 0) != -1)
131 __set_errno (ENOSYS); 131 __set_errno (ENOSYS);
132 break; 132 break;
133 } 133 }
134 134
135 return result; 135 return result;
136 #endif 136 #endif
137 } 137 }
138 weak_alias (__futimes, futimes) 138 weak_alias (__futimes, futimes)
OLDNEW
« no previous file with comments | « sysdeps/posix/libc_fatal.c ('k') | sysdeps/unix/sysv/linux/libc_fatal.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698