]> Cypherpunks repositories - gostls13.git/commitdiff
6ar: explain why __.SYMDEF didn't get put in.
authorRuss Cox <rsc@golang.org>
Tue, 26 May 2009 21:34:32 +0000 (14:34 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 26 May 2009 21:34:32 +0000 (14:34 -0700)
people using ar for non-object archives
will just have to deal with the warnings.

R=r
DELTA=3  (2 added, 0 deleted, 1 changed)
OCL=29384
CL=29398

src/cmd/ar/ar.c

index 05f4b6d6529f13f51ce5f23a5b831d0138ded6fd..733c4b5c87fb8f2d2445fb3dd6c3d9de92b2c84b 100644 (file)
@@ -594,8 +594,10 @@ scanobj(Biobuf *b, Arfile *ap, long size)
        offset = Boffset(b);
        obj = objtype(b, 0);
        if (obj < 0) {                  /* not an object file */
-               if (!gflag || strcmp(file, pkgdef) != 0)  /* don't clear allobj if it's pkg defs */
+               if (!gflag || strcmp(file, pkgdef) != 0) {  /* don't clear allobj if it's pkg defs */
+                       fprint(2, "ar: non-object file %s\n", file);
                        allobj = 0;
+               }
                d = dirfstat(Bfildes(b));
                if (d != nil && d->length == 0)
                        fprint(2, "ar: zero length file %s\n", file);