st_size is now a quad, st_mtime is now a timespec
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 20 Jun 1992 06:15:06 +0000 (22:15 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 20 Jun 1992 06:15:06 +0000 (22:15 -0800)
SCCS-vsn: usr.bin/ar/archive.c 5.8
SCCS-vsn: usr.bin/ar/archive.h 5.9

usr/src/usr.bin/ar/archive.c
usr/src/usr.bin/ar/archive.h

index 1d4e7f5..579ad5e 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)archive.c  5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)archive.c  5.8 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -197,17 +197,19 @@ put_arobj(cfp, sb)
                                    name, OLDARMAXNAME, name);
                                (void)fflush(stderr);
                        }
                                    name, OLDARMAXNAME, name);
                                (void)fflush(stderr);
                        }
-                       (void)sprintf(hb, HDR3, name, sb->st_mtime, sb->st_uid,
-                           sb->st_gid, sb->st_mode, sb->st_size, ARFMAG);
+                       (void)sprintf(hb, HDR3, name, sb->st_mtimespec.ts_sec,
+                           sb->st_uid, sb->st_gid, sb->st_mode, sb->st_size,
+                           ARFMAG);
                        lname = 0;
                } else if (lname > sizeof(hdr->ar_name) || index(name, ' '))
                        lname = 0;
                } else if (lname > sizeof(hdr->ar_name) || index(name, ' '))
-                       (void)sprintf(hb, HDR1, AR_EFMT1, lname, sb->st_mtime,
-                           sb->st_uid, sb->st_gid, sb->st_mode,
-                           sb->st_size + lname, ARFMAG);
+                       (void)sprintf(hb, HDR1, AR_EFMT1, lname,
+                           sb->st_mtimespec.ts_sec, sb->st_uid, sb->st_gid,
+                           sb->st_mode, sb->st_size + lname, ARFMAG);
                else {
                        lname = 0;
                else {
                        lname = 0;
-                       (void)sprintf(hb, HDR2, name, sb->st_mtime, sb->st_uid,
-                           sb->st_gid, sb->st_mode, sb->st_size, ARFMAG);
+                       (void)sprintf(hb, HDR2, name, sb->st_mtimespec.ts_sec,
+                           sb->st_uid, sb->st_gid, sb->st_mode, sb->st_size,
+                           ARFMAG);
                }
                size = sb->st_size;
        } else {
                }
                size = sb->st_size;
        } else {
index 57b5fe3..6f5d6db 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)archive.h   5.8 (Berkeley) %G%
+ *     @(#)archive.h   5.9 (Berkeley) %G%
  */
 
 /* Ar(1) options. */
  */
 
 /* Ar(1) options. */
@@ -60,11 +60,11 @@ typedef struct {
 } CHDR;
 
 /* Header format strings. */
 } CHDR;
 
 /* Header format strings. */
-#define        HDR1    "%s%-13d%-12ld%-6u%-6u%-8o%-10ld%2s"
-#define        HDR2    "%-16.16s%-12ld%-6u%-6u%-8o%-10ld%2s"
+#define        HDR1    "%s%-13d%-12ld%-6u%-6u%-8o%-10qd%2s"
+#define        HDR2    "%-16.16s%-12ld%-6u%-6u%-8o%-10qd%2s"
 
 #define        OLDARMAXNAME    15
 
 #define        OLDARMAXNAME    15
-#define        HDR3    "%-16.15s%-12ld%-6u%-6u%-8o%-10ld%2s"
+#define        HDR3    "%-16.15s%-12ld%-6u%-6u%-8o%-10qd%2s"
 
 
 #include <sys/cdefs.h>
 
 
 #include <sys/cdefs.h>