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
|
$NetBSD: patch-ag,v 1.6 2010/07/11 02:53:25 obache Exp $
--- Wnn/jlib/js.c.orig 1999-05-17 03:04:45.000000000 +0000
+++ Wnn/jlib/js.c
@@ -70,9 +70,8 @@ extern Variables
*/
-extern char *malloc();
-
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
#ifdef UX386
#include <X11/Xos.h>
@@ -85,7 +84,6 @@ extern char *malloc();
#endif
#include <sys/stat.h>
#include <errno.h>
-extern int errno;
#include <signal.h>
#include "jd_sock.h"
#include "commonhd.h"
@@ -103,8 +101,6 @@ extern int errno;
#include "../etc/bdic.c"
#include "../etc/pwd.c"
-char *malloc();
-
#ifdef SYSVR2
#define bzero(adr,n) memset((adr),0,(n))
#endif
@@ -220,11 +216,11 @@ register char *lang;
#endif
return -1;
}
-#if !(defined(BSD) && (BSD >= 199306)) /* !4.4BSD-Lite */
- if (connect(sd,(struct sockaddr *)&saddr,strlen(saddr.sun_path)+sizeof(saddr.sun_family)) == ERROR) {
-#else /* 4.4BSD-Lite */
+
+#if !defined(SUN_LEN)
+# define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+#endif
if (connect(sd,(struct sockaddr *)&saddr,SUN_LEN(&saddr)) == ERROR) {
-#endif /* 4.4BSD-Lite */
#if DEBUG
xerror("jslib:Can't connect socket.\n");
@@ -2554,7 +2550,7 @@ char *lang;
int cnt;
{
FILE *fp;
- static char s[6][EXPAND_PATH_LENGTH];
+ static char s[7][EXPAND_PATH_LENGTH];
char serv_defs[EXPAND_PATH_LENGTH];
char data[1024];
int num;
|