Changeset 988 for vendor/current/examples/libsmbclient/testutime.c
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/examples/libsmbclient/testutime.c
r414 r988 1 #include "config.h" 1 2 #include <stdio.h> 2 3 #include <unistd.h> … … 9 10 int main(int argc, char * argv[]) 10 11 { 11 int ret;12 12 int debug = 0; 13 char buffer[16384]; 14 char mtime[32]; 15 char ctime[32]; 16 char atime[32]; 17 char * pSmbPath = NULL; 13 char m_time[32]; 14 char c_time[32]; 15 char a_time[32]; 16 const char * pSmbPath = NULL; 18 17 time_t t = time(NULL); 19 struct tm tm;20 18 struct stat st; 21 19 struct utimbuf utimbuf; … … 50 48 } 51 49 52 printf("Before\n mtime:%l u/%s ctime:%lu/%s atime:%lu/%s\n",53 st.st_mtime, ctime_r(&st.st_mtime, mtime),54 st.st_ctime, ctime_r(&st.st_ctime, ctime),55 st.st_atime, ctime_r(&st.st_atime, atime));50 printf("Before\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n", 51 (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time), 52 (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time), 53 (long long)st.st_atime, ctime_r(&st.st_atime, a_time)); 56 54 57 55 utimbuf.actime = t; /* unchangable (wont change) */ … … 69 67 } 70 68 71 printf("After\n mtime:%l u/%s ctime:%lu/%s atime:%lu/%s\n",72 st.st_mtime, ctime_r(&st.st_mtime, mtime),73 st.st_ctime, ctime_r(&st.st_ctime, ctime),74 st.st_atime, ctime_r(&st.st_atime, atime));69 printf("After\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n", 70 (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time), 71 (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time), 72 (long long)st.st_atime, ctime_r(&st.st_atime, a_time)); 75 73 76 74 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.