Project

General

Profile

Bug #1666 » libwrap64-git.patch

Alexander Pyhalov, 2013-10-12 04:10 PM

View differences:

usr/src/lib/libwrap/Makefile
10 10
HDRS =		tcpd.h
11 11
CHECKHDRS =
12 12
HDRDIR =	.
13
SUBDIRS	=	$(MACH)
13
SUBDIRS        =       $(MACH) $(BUILD64) $(MACH64)
14 14

  
15 15
all := 		TARGET = all
16 16
clean :=	TARGET = clean
usr/src/lib/libwrap/Makefile.com
37 37

  
38 38
LIBS =		$(DYNLIB) $(LINTLIB)
39 39
SONAME =	$(LIBRARY:.a=.so)$(MAJOR)
40
ROOTLINKS +=	$(ROOTLIBDIR)/$(LIBLINKS)$(MAJOR)
40
ROOTLINKS +=	$(ROOTLIBDIR)/$(LIBLINKS)$(MAJOR) $(ROOTLIBDIR64)/$(LIBLINKS)$(MAJOR)
41 41
$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
42 42

  
43 43
MAPFILES =	../mapfile
......
68 68
$(ROOTLIBDIR)/$(LIBLINKS)$(MAJOR): $(ROOTLIBDIR)/$(LIBLINKS)$(VERS)
69 69
	$(INS.liblink)
70 70

  
71
$(ROOTLIBDIR64)/$(LIBLINKS)$(MAJOR): $(ROOTLIBDIR64)/$(LIBLINKS)$(VERS)
72
	$(INS.liblink64)
73

  
71 74
include ../../Makefile.targ
72 75

  
73 76

  
usr/src/lib/libwrap/amd64/Makefile
1
#
2
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
3
# Use is subject to license terms.
4
#
5
# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
6
#
7

  
8
include ../Makefile.com
9
include $(SRC)/lib/Makefile.lib.64
10

  
11
install: all $(ROOTLIBS64) .WAIT $(ROOTLINKS64) $(ROOTLINT)
usr/src/lib/libwrap/percent_m.c
2 2
 * Copyright 2001 Sun Microsystems, Inc.  All rights reserved.
3 3
 * Use is subject to license terms.
4 4
 */
5
#pragma ident	"%Z%%M%	%I%	%E% SMI"
6

  
7 5
 /*
8 6
  * Replace %m by system error message.
9 7
  * 
......
19 17
#include <string.h>
20 18

  
21 19
extern int errno;
22
#ifndef SYS_ERRLIST_DEFINED
23
extern char *sys_errlist[];
24
extern int sys_nerr;
25
#endif
26 20

  
27 21
#include "mystdarg.h"
28 22

  
......
32 26
{
33 27
    char   *bp = obuf;
34 28
    char   *cp = ibuf;
29
    int    olderr;
30
    char   *errstr;
35 31

  
36 32
    while (*bp = *cp)
37 33
	if (*cp == '%' && cp[1] == 'm') {
38
	    if (errno < sys_nerr && errno > 0) {
39
		strcpy(bp, sys_errlist[errno]);
34
	    olderr = errno;
35
	    errstr = strerror(olderr);
36
	    if (errno) {
37
		sprintf(bp, "Unknown error %d", olderr);
40 38
	    } else {
41
		sprintf(bp, "Unknown error %d", errno);
39
		strcpy(bp, errstr);
42 40
	    }
43 41
	    bp += strlen(bp);
44 42
	    cp += 2;
usr/src/lib/libwrap/tli.c
3 3
 * Use is subject to license terms.
4 4
 */
5 5

  
6
#pragma ident	"%Z%%M%	%I%	%E% SMI"
7

  
8 6
 /*
9 7
  * tli_host() determines the type of transport (connected, connectionless),
10 8
  * the transport address of a client host, and the transport address of a
......
49 47

  
50 48
extern char *nc_sperror();
51 49
extern int errno;
52
extern char *sys_errlist[];
53
extern int sys_nerr;
54 50
extern int t_errno;
55 51
extern char *t_errlist[];
56 52
extern int t_nerr;
......
317 313
static char *tli_error()
318 314
{
319 315
    static char buf[40];
316
    char * errstr;
317
    int olderr;
320 318

  
321 319
    if (t_errno != TSYSERR) {
322 320
	if (t_errno < 0 || t_errno >= t_nerr) {
......
326 324
	    return (t_errlist[t_errno]);
327 325
	}
328 326
    } else {
329
	if (errno < 0 || errno >= sys_nerr) {
330
	    sprintf(buf, "Unknown UNIX error %d", errno);
327
	olderr = errno;
328
	errstr = strerror(olderr);
329
	if (errno) {
330
	    sprintf(buf, "Unknown UNIX error %d", olderr);
331 331
	    return (buf);
332 332
	} else {
333
	    return (sys_errlist[errno]);
333
	    strcpy(buf, errstr);
334
	    return (buf);
334 335
	}
335 336
    }
336 337
}
usr/src/pkg/manifests/developer-library-lint.mf
231 231
file path=usr/lib/$(ARCH64)/llib-lsmbios.ln
232 232
$(sparc_ONLY)file path=usr/lib/$(ARCH64)/llib-lv12n.ln
233 233
file path=usr/lib/$(ARCH64)/llib-lvolmgt.ln
234
file path=usr/lib/$(ARCH64)/llib-lwrap.ln
234 235
file path=usr/lib/$(ARCH64)/llib-lzoneinfo.ln
235 236
file path=usr/lib/$(ARCH64)/values-Xa.o
236 237
file path=usr/lib/$(ARCH64)/values-Xc.o
usr/src/pkg/manifests/system-library.mf
365 365
file path=usr/lib/$(ARCH64)/libsum.so.1
366 366
$(sparc_ONLY)file path=usr/lib/$(ARCH64)/libv12n.so.1
367 367
file path=usr/lib/$(ARCH64)/libvolmgt.so.1
368
file path=usr/lib/$(ARCH64)/libwrap.so.1.0
368 369
file path=usr/lib/$(ARCH64)/liby.so.1
369 370
file path=usr/lib/$(ARCH64)/libzoneinfo.so.1
370 371
file path=usr/lib/$(ARCH64)/nss_ad.so.1
......
990 991
link path=usr/lib/$(ARCH64)/libvolmgt.so target=libvolmgt.so.1
991 992
link path=usr/lib/$(ARCH64)/libw.so target=../../../lib/$(ARCH64)/libw.so.1
992 993
link path=usr/lib/$(ARCH64)/libw.so.1 target=../../../lib/$(ARCH64)/libw.so.1
994
link path=usr/lib/$(ARCH64)/libwrap.so target=libwrap.so.1.0
995
link path=usr/lib/$(ARCH64)/libwrap.so.1 target=libwrap.so.1.0
993 996
link path=usr/lib/$(ARCH64)/libxnet.so \
994 997
    target=../../../lib/$(ARCH64)/libxnet.so.1
995 998
link path=usr/lib/$(ARCH64)/libxnet.so.1 \
(2-2/2)