libsmbclient: Fix 32-bit problems
authorVolker Lendecke <vl@samba.org>
Fri, 4 Sep 2015 14:40:25 +0000 (16:40 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 7 Sep 2015 13:13:08 +0000 (15:13 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Sep  7 15:13:08 CEST 2015 on sn-devel-104

examples/libsmbclient/teststat.c
examples/libsmbclient/teststat2.c
examples/libsmbclient/testutime.c

index f36639eab7b382c2d7ac5e3a3c4d6ed0c80b3a69..4084fd08e61fcf84ac7c35b3ba0835725a0ebb58 100644 (file)
@@ -47,10 +47,10 @@ int main(int argc, char * argv[])
         return 1;
     }
     
-    printf("\nSAMBA\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-           st.st_mtime, ctime_r(&st.st_mtime, m_time),
-           st.st_ctime, ctime_r(&st.st_ctime, c_time),
-           st.st_atime, ctime_r(&st.st_atime, a_time)); 
+    printf("\nSAMBA\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+           (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time),
+           (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time),
+           (long long)st.st_atime, ctime_r(&st.st_atime, a_time));
     
     if (pLocalPath != NULL)
     {
@@ -60,10 +60,10 @@ int main(int argc, char * argv[])
             return 1;
         }
         
-        printf("LOCAL\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-               st.st_mtime, ctime_r(&st.st_mtime, m_time),
-               st.st_ctime, ctime_r(&st.st_ctime, c_time),
-               st.st_atime, ctime_r(&st.st_atime, a_time)); 
+        printf("LOCAL\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+               (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time),
+               (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time),
+               (long long)st.st_atime, ctime_r(&st.st_atime, a_time));
     }
 
     return 0; 
index fcd3e309351a336d04f27df3823ef2dec82173b2..963cd2709d27692f49833f778a5419f0a536f2b9 100644 (file)
@@ -47,10 +47,10 @@ static int gettime(const char * pUrl,
                 return 1;
         }
         
-        printf("SAMBA\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-               st.st_mtime, ctime_r(&st.st_mtime, m_time),
-               st.st_ctime, ctime_r(&st.st_ctime, c_time),
-               st.st_atime, ctime_r(&st.st_atime, a_time)); 
+        printf("SAMBA\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+               (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time),
+               (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time),
+               (long long)st.st_atime, ctime_r(&st.st_atime, a_time));
         
         
         /* check the stat on this file */
@@ -60,10 +60,10 @@ static int gettime(const char * pUrl,
                 return 1;
         }
         
-        printf("LOCAL\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-               st.st_mtime, ctime_r(&st.st_mtime, m_time),
-               st.st_ctime, ctime_r(&st.st_ctime, c_time),
-               st.st_atime, ctime_r(&st.st_atime, a_time));
+        printf("LOCAL\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+               (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time),
+               (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time),
+               (long long)st.st_atime, ctime_r(&st.st_atime, a_time));
         
         
         return 0;
index 2b3c40b61b591b8a1fb6d3aca725190f5a5f92fd..cdbcfec316471230a23c125ea394475da663e34d 100644 (file)
@@ -47,10 +47,10 @@ int main(int argc, char * argv[])
         return 1;
     }
     
-    printf("Before\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-           st.st_mtime, ctime_r(&st.st_mtime, m_time),
-           st.st_ctime, ctime_r(&st.st_ctime, c_time),
-           st.st_atime, ctime_r(&st.st_atime, a_time)); 
+    printf("Before\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+           (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time),
+           (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time),
+           (long long)st.st_atime, ctime_r(&st.st_atime, a_time));
     
     utimbuf.actime = t;         /* unchangable (wont change) */
     utimbuf.modtime = t;        /* this one should succeed */
@@ -66,10 +66,10 @@ int main(int argc, char * argv[])
         return 1;
     }
     
-    printf("After\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n",
-           st.st_mtime, ctime_r(&st.st_mtime, m_time),
-           st.st_ctime, ctime_r(&st.st_ctime, c_time),
-           st.st_atime, ctime_r(&st.st_atime, a_time)); 
+    printf("After\n mtime:%lld/%s ctime:%lld/%s atime:%lld/%s\n",
+           (long long)st.st_mtime, ctime_r(&st.st_mtime, m_time),
+           (long long)st.st_ctime, ctime_r(&st.st_ctime, c_time),
+           (long long)st.st_atime, ctime_r(&st.st_atime, a_time));
     
     return 0; 
 }