Project

General

Profile

Bug #1666 » libwrap-64.diff

Andrew Stormont, 2011-10-18 10:05 PM

View differences:

usr/src/lib/libwrap/Makefile Fri Sep 30 07:35:47 2011 +0100 → usr/src/lib/libwrap/Makefile Mon Oct 03 01:37:21 2011 +0100
10 10
CHECKHDRS =
11 11
HDRDIR =	.
12 12
SUBDIRS	=	$(MACH)
13
$(BUILD64)SUBDIRS += $(MACH64)
13 14

  
14 15
all := 		TARGET = all
15 16
clean :=	TARGET = clean
/dev/null Thu Jan 01 00:00:00 1970 +0000 → usr/src/lib/libwrap/amd64/Makefile Mon Oct 03 01:37:21 2011 +0100
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 ../../Makefile.lib.64
10

  
11
install: all $(ROOTLIBS64) .WAIT $(ROOTLINKS64) $(ROOTLINT)
/dev/null Thu Jan 01 00:00:00 1970 +0000 → usr/src/lib/libwrap/sparcv9/Makefile Mon Oct 03 01:37:21 2011 +0100
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 ../../Makefile.lib.64
10

  
11
install: all $(ROOTLIBS64) .WAIT $(ROOTLINKS64) $(ROOTLINT)
usr/src/pkg/manifests/system-library.mf Fri Sep 30 07:35:47 2011 +0100 → usr/src/pkg/manifests/system-library.mf Mon Oct 03 01:37:21 2011 +0100
365 365
file path=usr/lib/$(ARCH64)/passwdutil.so.1
366 366
file path=usr/lib/$(ARCH64)/straddr.so.2
367 367
file path=usr/lib/$(ARCH64)/watchmalloc.so.1
368
file path=usr/lib/$(ARCH64)/libwrap.so.1.0
368 369
file path=usr/lib/0@0.so.1
369 370
file path=usr/lib/cfgadm/$(ARCH64)/ib.so.1
370 371
file path=usr/lib/cfgadm/$(ARCH64)/pci.so.1
......
996 997
link path=usr/lib/$(ARCH64)/nss_user.so.1 \
997 998
    target=../../../lib/$(ARCH64)/nss_user.so.1
998 999
link path=usr/lib/$(ARCH64)/straddr.so target=straddr.so.2
1000
link path=usr/lib/$(ARCH64)/libwrap.so target=libwrap.so.1.0
1001
link path=usr/lib/$(ARCH64)/libwrap.so.1 target=libwrap.so.1.0
999 1002
link path=usr/lib/32 target=.
1000 1003
link path=usr/lib/64 target=$(ARCH64)
1001 1004
link path=usr/lib/cfgadm/$(ARCH64)/ib.so target=./ib.so.1
usr/src/lib/libwrap/percent_m.c Mon Oct 03 14:19:17 2011 +0100 → usr/src/lib/libwrap/percent_m.c Mon Oct 03 16:31:55 2011 +0100
19 19
#include <string.h>
20 20

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

  
27 23
#include "mystdarg.h"
28 24

  
......
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]);
40
	    } else {
41
		sprintf(bp, "Unknown error %d", errno);
42
	    }
34
        bp = strerror(errno);
43 35
	    bp += strlen(bp);
44 36
	    cp += 2;
45 37
	} else {
usr/src/lib/libwrap/tli.c Mon Oct 03 14:19:17 2011 +0100 → usr/src/lib/libwrap/tli.c Mon Oct 03 16:31:55 2011 +0100
49 49

  
50 50
extern char *nc_sperror();
51 51
extern int errno;
52
extern char *sys_errlist[];
53
extern int sys_nerr;
54 52
extern int t_errno;
55 53
extern char *t_errlist[];
56 54
extern int 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);
331
	    return (buf);
332
	} else {
333
	    return (sys_errlist[errno]);
334
	}
327
        return strerror(errno);
335 328
    }
336 329
}
337 330

  
(1-1/2)