From 9edc8eb16e5411fad16a12d3840ef79ed17548b4 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Fri, 19 May 2017 13:53:06 +0300 Subject: [PATCH] ar(1): remove separate xpg4 version the default one no longer writes -v messages to stderr. --- share/man/man1/ar.1 | 83 +----------------------------- usr/src/cmd/sgs/ar/Makefile.com | 4 -- usr/src/cmd/sgs/ar/Makefile.targ | 16 ++---- usr/src/cmd/sgs/ar/common/ar.msg | 1 - usr/src/cmd/sgs/ar/common/cmd.c | 14 +---- usr/src/cmd/sgs/ar/common/file.c | 7 --- usr/src/cmd/sgs/ar/common/main.c | 2 - usr/src/cmd/sgs/ar/i386/Makefile | 4 +- usr/src/cmd/sgs/ar/sparc/Makefile | 4 +- usr/src/pkg/manifests/system-xopen-xcu4.mf | 1 - 10 files changed, 10 insertions(+), 126 deletions(-) diff --git a/share/man/man1/ar.1 b/share/man/man1/ar.1 index 70b29fff5a..ed2bde0c92 100644 --- a/share/man/man1/ar.1 +++ b/share/man/man1/ar.1 @@ -48,42 +48,6 @@ ar \- maintain portable archive or library .nf \fB/usr/bin/ar\fR \fB-x\fR [\fB-CsTVv\fR] \fIarchive\fR [\fIfile\fR]... .fi - -.LP -.nf -\fB/usr/xpg4/bin/ar\fR \fB-d\fR [\fB-Vv\fR] \fIarchive\fR \fIfile\fR... -.fi - -.LP -.nf -\fB/usr/xpg4/bin/ar\fR \fB-m\fR [\fB-abiVv\fR] [\fIposname\fR] \fIarchive\fR \fIfile\fR... -.fi - -.LP -.nf -\fB/usr/xpg4/bin/ar\fR \fB-p\fR [\fB-sVv\fR] \fIarchive\fR [\fIfile\fR]... -.fi - -.LP -.nf -\fB/usr/xpg4/bin/ar\fR \fB-q\fR [\fB-cVv\fR] \fIarchive\fR \fIfile\fR... -.fi - -.LP -.nf -\fB/usr/xpg4/bin/ar\fR \fB-r\fR [\fB-abciuVv\fR] [\fIposname\fR] \fIarchive\fR \fIfile\fR... -.fi - -.LP -.nf -\fB/usr/xpg4/bin/ar\fR \fB-t\fR [\fB-sVv\fR] \fIarchive\fR [\fIfile\fR]... -.fi - -.LP -.nf -\fB/usr/xpg4/bin/ar\fR \fB-x\fR [\fB-CsTVv\fR] \fIarchive\fR [\fIfile\fR]... -.fi - .SH DESCRIPTION .sp .LP @@ -283,8 +247,7 @@ with \fB-p\fR, \fB-v\fR writes the name of the file to the standard output before writing the file itself to the standard output. When used with \fB-t\fR, \fB-v\fR includes a long listing of information about the files within the archive. When used with \fB-x\fR, \fB-v\fR prints the filename preceding each -extraction. When writing to an archive, \fB-v\fR writes a message to the -standard error. +extraction. .RE .sp @@ -296,35 +259,6 @@ standard error. Prints its version number on standard error. .RE -.SS "\fB/usr/xpg4/bin/ar\fR" -.sp -.LP -The following options are supported for \fB/usr/xpg4/bin/ar\fR: -.sp -.ne 2 -.na -\fB\fB-v\fR\fR -.ad -.RS 6n -Same as the \fB/usr/bin/ar\fR version, except when writing to an archive, no -message is written to the standard error. -.RE - -.sp -.ne 2 -.na -\fB\fB-x\fR\fR -.ad -.RS 6n -Extracts the files named by the \fIfile\fR operands from \fIarchive\fR. The -contents of \fIarchive\fR are not changed. If no \fIfile\fR operands are given, -all files in \fIarchive\fR are extracted. If the file name of a file extracted -from \fIarchive\fR is longer than that supported in the directory to which it -is being extracted, the results are undefined. The modification time of each -\fIfile\fR extracted is set to the time \fIfile\fR is extracted from -\fIarchive\fR. -.RE - .SH OPERANDS .sp .LP @@ -427,21 +361,6 @@ _ Interface Stability Committed .TE -.SS "\fB/usr/xpg4/bin/ar\fR" -.sp - -.sp -.TS -box; -c | c -l | l . -ATTRIBUTE TYPE ATTRIBUTE VALUE -_ -Interface Stability Committed -_ -Standard See \fBstandards\fR(5). -.TE - .SH SEE ALSO .sp .LP diff --git a/usr/src/cmd/sgs/ar/Makefile.com b/usr/src/cmd/sgs/ar/Makefile.com index fdf3707cb7..fcbf8cf591 100644 --- a/usr/src/cmd/sgs/ar/Makefile.com +++ b/usr/src/cmd/sgs/ar/Makefile.com @@ -23,7 +23,6 @@ # PROG= ar -XPG4PROG= ar include $(SRC)/cmd/Makefile.cmd include $(SRC)/cmd/sgs/Makefile.com @@ -33,7 +32,6 @@ COMOBJ= main.o file.o cmd.o BLTOBJ = msg.o OBJS= $(BLTOBJ:%=objs/%) $(COMOBJ:%=objs/%) -XPG4OBJS= $(BLTOBJ:%=objs.xpg4/%) $(COMOBJ:%=objs.xpg4/%) LLDFLAGS = '-R$$ORIGIN/../../lib' LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)' @@ -43,8 +41,6 @@ C99MODE= $(C99_ENABLE) CERRWARN += -Wno-uninitialized LDLIBS += -lelf $(CONVLIBDIR) $(CONV_LIB) -lsendfile -$(XPG4) := CPPFLAGS += -DXPG4 - BLTDEFS = msg.h BLTDATA = msg.c BLTMESG = $(SGSMSGDIR)/ar diff --git a/usr/src/cmd/sgs/ar/Makefile.targ b/usr/src/cmd/sgs/ar/Makefile.targ index bab190124f..4827ca416c 100644 --- a/usr/src/cmd/sgs/ar/Makefile.targ +++ b/usr/src/cmd/sgs/ar/Makefile.targ @@ -21,18 +21,16 @@ # # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. -objs/%.o \ -objs.xpg4/%.o: ../common/%.c +objs/%.o: ../common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -objs/%.o \ -objs.xpg4/%.o: %.c +objs/%.o: %.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) clean: - $(RM) $(OBJS) $(XPG4OBJS) $(CLEANFILES) + $(RM) $(OBJS) $(CLEANFILES) delete: $(RM) $(PROG) @@ -43,15 +41,9 @@ $(PROG): $(OBJS) $(LINK.c) -o $@ $(LLDFLAGS) $(OBJS) $(LDLIBS) $(POST_PROCESS) -$(XPG4): $(XPG4OBJS) - $(LINK.c) -o $@ $(XPG4OBJS) $(LDLIBS) - $(POST_PROCESS) - $(OBJS): objs -$(XPG4OBJS): objs.xpg4 - -objs objs.xpg4: +objs: -@ mkdir -p $@ include $(SRC)/cmd/Makefile.targ diff --git a/usr/src/cmd/sgs/ar/common/ar.msg b/usr/src/cmd/sgs/ar/common/ar.msg index a0da94da04..52f52d6258 100644 --- a/usr/src/cmd/sgs/ar/common/ar.msg +++ b/usr/src/cmd/sgs/ar/common/ar.msg @@ -79,7 +79,6 @@ @ MSG_W_ELF_NODATA_AR "ar: %s(%s) has no data in section header table\n" @ MSG_BER_MES_CREATE "ar: creating %s\n" -@ MSG_BER_MES_WRITE "ar: writing %s\n" @ MSG_SYMTAB_01 "ar: symbol table entry size is 0\n" @ MSG_SYMTAB_NOSTR_FILE "ar: %s has no string table for symbol names\n" diff --git a/usr/src/cmd/sgs/ar/common/cmd.c b/usr/src/cmd/sgs/ar/common/cmd.c index 167a8a9137..1a643b493f 100644 --- a/usr/src/cmd/sgs/ar/common/cmd.c +++ b/usr/src/cmd/sgs/ar/common/cmd.c @@ -758,7 +758,6 @@ create_extract(ARFILE *a, int rawname, int f_len, Cmd_info *cmd_info) static void mesg(int c, char *file, Cmd_info *cmd_info) { -#ifdef XPG4 /* * XPG4 does not have any message defined for * 'c' operation. @@ -767,19 +766,8 @@ mesg(int c, char *file, Cmd_info *cmd_info) */ if (c == 'c' || c == 'u' || c == 'm') return; -#endif - /* - * If 'u' is passed, convert it to 'c'. - * 'u' makes more sense since the operation did not - * do anything, Unchanged, but 'c' has been used so - * I do no want to break the compatibility at this moment. - * (03/05/'96). - */ - if (c == 'u') - c = 'c'; if (cmd_info->opt_flgs & v_FLAG) - if (c != 'c') - (void) fprintf(stdout, MSG_ORIG(MSG_FMT_FILE), c, file); + (void) fprintf(stdout, MSG_ORIG(MSG_FMT_FILE), c, file); } static void diff --git a/usr/src/cmd/sgs/ar/common/file.c b/usr/src/cmd/sgs/ar/common/file.c index e3aa7fa0a5..45969fcaa0 100644 --- a/usr/src/cmd/sgs/ar/common/file.c +++ b/usr/src/cmd/sgs/ar/common/file.c @@ -1219,13 +1219,6 @@ writefile(Cmd_info *cmd_info) */ assert(arsize == lseek(ar_outfile.fd, 0, SEEK_CUR)); -#ifndef XPG4 - if (cmd_info->opt_flgs & v_FLAG) { - (void) fprintf(stderr, MSG_INTL(MSG_BER_MES_WRITE), - cmd_info->arnam); - } -#endif - /* * Fill pad_bytes array with newline characters. This array * is used to supply padding bytes at the end of ELF objects. diff --git a/usr/src/cmd/sgs/ar/common/main.c b/usr/src/cmd/sgs/ar/common/main.c index a452d403ff..b2279f2412 100644 --- a/usr/src/cmd/sgs/ar/common/main.c +++ b/usr/src/cmd/sgs/ar/common/main.c @@ -75,12 +75,10 @@ main(int argc, char **argv, char *envp[]) int ret; char *new = NULL; -#ifndef XPG4 /* * Check for a binary that better fits this architecture. */ (void) conv_check_native(argv, envp); -#endif /* * Establish locale. diff --git a/usr/src/cmd/sgs/ar/i386/Makefile b/usr/src/cmd/sgs/ar/i386/Makefile index 65c061d3b8..aeb84e6ce8 100644 --- a/usr/src/cmd/sgs/ar/i386/Makefile +++ b/usr/src/cmd/sgs/ar/i386/Makefile @@ -25,10 +25,10 @@ include ../Makefile.com .KEEP_STATE: -all: $(PROG) $(XPG4) +all: $(PROG) install \ -package: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTCCSBINLINK) +package: all $(ROOTPROG) $(ROOTCCSBINLINK) diff --git a/usr/src/cmd/sgs/ar/sparc/Makefile b/usr/src/cmd/sgs/ar/sparc/Makefile index eed82bcded..daa47f6019 100644 --- a/usr/src/cmd/sgs/ar/sparc/Makefile +++ b/usr/src/cmd/sgs/ar/sparc/Makefile @@ -25,9 +25,9 @@ include ../Makefile.com .KEEP_STATE: -all: $(PROG) $(XPG4) +all: $(PROG) install \ -package: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTCCSBINLINK) +package: all $(ROOTPROG) $(ROOTCCSBINLINK) include ../Makefile.targ diff --git a/usr/src/pkg/manifests/system-xopen-xcu4.mf b/usr/src/pkg/manifests/system-xopen-xcu4.mf index 11519962d7..3d29c22633 100644 --- a/usr/src/pkg/manifests/system-xopen-xcu4.mf +++ b/usr/src/pkg/manifests/system-xopen-xcu4.mf @@ -34,7 +34,6 @@ set name=variant.arch value=$(ARCH) dir path=usr group=sys dir path=usr/xpg4 dir path=usr/xpg4/bin -file path=usr/xpg4/bin/ar mode=0555 file path=usr/xpg4/bin/at group=sys mode=4755 file path=usr/xpg4/bin/awk mode=0555 file path=usr/xpg4/bin/batch mode=0555 -- 2.11.4.GIT