summaryrefslogtreecommitdiffstats
path: root/package/ltp-testsuite/ltp-testsuite-remove-bcopy.patch
blob: be525abab90197d00ad8732955b5b86f6259ff8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
--- ltp/testcases/network/multicast/mc_member/member.c.orig	2005-10-03 12:19:46.000000000 -0600
+++ ltp/testcases/network/multicast/mc_member/member.c	2006-07-04 18:29:28.000000000 -0600
@@ -80,7 +80,7 @@
         }
 
         if((hp = gethostbyname(interface))) {
-           bcopy(hp->h_addr, &imr.imr_interface.s_addr, hp->h_length);
+	   memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
         } else 
            if((n = sscanf(interface, "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
               fprintf(stderr, "bad group address\n" ); 
--- ltp/testcases/network/tcp_cmds/echo/echoes.c.orig	2005-10-03 11:58:24.000000000 -0600
+++ ltp/testcases/network/tcp_cmds/echo/echoes.c	2006-07-04 18:27:06.000000000 -0600
@@ -133,7 +133,7 @@
 		exit(1);
 	}
 	port=sp->s_port;
-	bcopy(hp->h_addr_list[0],&hostaddr,sizeof(struct in_addr));
+	memcpy(&hostaddr,hp->h_addr_list[0],sizeof(struct in_addr));
 	bzero((char *)&sa,sizeof (sa));
 	sa.sin_port=port;
 	sa.sin_family=AF_INET;
--- ltp/testcases/network/tcp_cmds/perf_lan/pingpong.c.orig	2006-07-04 18:33:14.000000000 -0600
+++ ltp/testcases/network/tcp_cmds/perf_lan/pingpong.c	2006-07-04 18:33:44.000000000 -0600
@@ -118,7 +118,7 @@
 		hp = gethostbyname(av[1]);
 		if (hp) {
 			to->sin_family = hp->h_addrtype;
-			bcopy(hp->h_addr, (caddr_t)&to->sin_addr, hp->h_length);
+			memcpy((caddr_t)&to->sin_addr, hp->h_addr, hp->h_length);
 			hostname = hp->h_name;
 		} else {
             tst_resm (TINFO, "%s: unknown host, couldn't get address\n",argv[0]);
--- ltp/testcases/network/rpc/rpc01/rpc1.c.orig	2006-07-04 18:34:29.000000000 -0600
+++ ltp/testcases/network/rpc/rpc01/rpc1.c	2006-07-04 18:34:47.000000000 -0600
@@ -101,7 +101,7 @@
     }
     bzero(&server_sin, sizeof(server_sin));
     server_sin.sin_family = AF_INET;
-    bcopy(hp->h_addr, (char *) &server_sin.sin_addr, sizeof(hp->h_addr));
+    memcpy((char *) &server_sin.sin_addr, hp->h_addr, sizeof(hp->h_addr));
 
     if (!file_name) {
 	fprintf(stderr, "file name not given\n");
--- ltp/testcases/network/multicast/mc_commo/mc_recv.c.orig	2006-07-04 18:35:24.000000000 -0600
+++ ltp/testcases/network/multicast/mc_commo/mc_recv.c	2006-07-04 18:35:59.000000000 -0600
@@ -45,7 +45,7 @@
         imr.imr_multiaddr.s_addr = htonl((g1<<24) | (g2<<16) | (g3<<8) | g4);
 
         if((hp = gethostbyname(argv[2])))
-           bcopy(hp->h_addr, &imr.imr_interface.s_addr, hp->h_length);
+           memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
         else 
            if((n = sscanf(argv[2], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
                fprintf (stderr,"Bad group interface address\n");
--- ltp/testcases/network/multicast/mc_commo/mc_send.c.orig	2006-07-04 18:36:34.000000000 -0600
+++ ltp/testcases/network/multicast/mc_commo/mc_send.c	2006-07-04 18:36:52.000000000 -0600
@@ -48,7 +48,7 @@
         imr.imr_multiaddr.s_addr = htonl((g1<<24) | (g2<<16) | (g3<<8) | g4);
 
         if((hp = gethostbyname(argv[2]))) {
-           bcopy(hp->h_addr, &imr.imr_interface.s_addr, hp->h_length);
+           memcpy(&imr.imr_interface.s_addr, hp->h_addr, hp->h_length);
         } else 
            if((n = sscanf(argv[2], "%u.%u.%u.%u", &i1, &i2, &i3, &i4)) != 4) {
                fprintf (stderr,"Bad interface address\n");
--- ltp/testcases/kernel/ipc/pipeio/pipeio.c.orig	2006-07-04 18:37:26.000000000 -0600
+++ ltp/testcases/kernel/ipc/pipeio/pipeio.c	2006-07-04 18:38:44.000000000 -0600
@@ -742,7 +742,7 @@
 			   /*
 			    * get the last 2 words printed 
 			    */
-				bcopy(a-(width*NBPW),c,width*NBPW);
+				memcpy(c,a-(width*NBPW),width*NBPW);
 				for (p = c; (p-c) < width*NBPW; ++p) {
 					if (*p < '!' || *p > '~')
 						*p = '.';
@@ -761,7 +761,7 @@
 				printf("%10.10ld ",*word);
 				break;
 			case ASCII:
-				bcopy(a,b,NBPW);
+				memcpy(b,a,NBPW);
 				for (p = b; (p-b) < NBPW; ++p) {
 					if (*p < '!' || *p > '~')
 						*p = '.';
@@ -780,7 +780,7 @@
 	   */
 		bzero(c,width*NBPW);
 		if (extra_words) width = extra_words; /* odd number of words */
-		bcopy(a-(width*NBPW),c,width*NBPW);
+		memcpy(c,a-(width*NBPW),width*NBPW);
 		for (p = c; (p-c) < width*NBPW; ++p) {
 			if (*p < '!' || *p > '~')
 				*p = '.';
--- ltp/testcases/ballista/ballista/serverCommunication.cpp.orig	2006-07-04 18:39:39.000000000 -0600
+++ ltp/testcases/ballista/ballista/serverCommunication.cpp	2006-07-04 18:40:33.000000000 -0600
@@ -67,7 +67,7 @@
 #ifdef SUN
 
 #include <strings.h> 
-//includes bcopy proto
+//includes memcpy proto
 
 #endif
 
@@ -118,7 +118,7 @@
       }
 
 
-    bcopy ((const char *)hp->h_addr,(char *)&(server_addr.sin_addr.s_addr),hp->h_length);
+    memcpy ((char *)&(server_addr.sin_addr.s_addr),(const char *)hp->h_addr,hp->h_length);
 
 
     server_addr.sin_family = AF_INET;
--- ltp/tools/netpipe-2.4/TCP.c.orig	2006-07-04 18:41:13.000000000 -0600
+++ ltp/tools/netpipe-2.4/TCP.c	2006-07-04 18:41:39.000000000 -0600
@@ -85,7 +85,7 @@
      }
 
      lsin1->sin_family = addr->h_addrtype;
-     bcopy(addr->h_addr, (char*) &(lsin1->sin_addr.s_addr), addr->h_length);
+     memcpy((char*) &(lsin1->sin_addr.s_addr), addr->h_addr, addr->h_length);
    }
 
    lsin1->sin_port = htons(p->port);