Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!seismo!harpo!floyd!clyde!akgua!msdc!win From: win@msdc.UUCP Newsgroups: net.bugs.4bsd Subject: Ranlib problem in 4.1BSD Message-ID: <1049@msdc.UUCP> Date: Mon, 7-Nov-83 16:31:07 EST Article-I.D.: msdc.1049 Posted: Mon Nov 7 16:31:07 1983 Date-Received: Wed, 9-Nov-83 00:59:43 EST Lines: 42 On our VAX 750 running 4.1BSD if you are trying to ranlib an object archive and the currently existing __.SYMDEF happens to have the correct lucky number in it, ranlib will calmly give up and tell you: ranlib: archive.a (__.SYMDEF): old format .o file This happens when the first octal number in the currently existing __.SYMDEF file is a magic number. Rather than skip this file in the loop, ranlib continues on causing the above mentioned error to happen. Below is a simple patch to fix this problem when the first octal number in __.SYMDEF happens to be a "magic" number. Diffs follow: *************** ( old ranlib.c ) *** 64,69 fread((char *)&exp, 1, sizeof(struct exec), fi); if (N_BADMAG(exp)) continue; if (exp.a_syms == 0) { fprintf(stderr, "ranlib: warning: %s(%s): no symbol table\n", *argv, archdr.ar_name); --- 65,74 ----- ( new ranlib.c ) fread((char *)&exp, 1, sizeof(struct exec), fi); + #ifdef ORIGINAL if (N_BADMAG(exp)) + #else + if (N_BADMAG(exp) || + strcmp(archdr.ar_name,"__.SYMDEF") == 0) + #endif continue; if (exp.a_syms == 0) { fprintf(stderr, "ranlib: warning: %s(%s): no symbol table\n", *argv, archdr.ar_name); Win Strickland, Jr. Medical Systems Development Corporation ...!allegra!akgua!msdc!win