Thu May 23 14:57:32 2013 UTC ()
Fix various prototypes and missing inclueds.
(joerg)
diff -r1.3 -r1.4 pkgsrc/net/publicfile/distinfo
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-Makefile
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-alloc.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-exit.h
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-fetch.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-file.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-filetype.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-ftpd.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-httpd.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-leapsecs__read.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-main.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-open.h
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-prot.c
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-prot.h
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-readwrite.h
diff -r0 -r1.1 pkgsrc/net/publicfile/patches/patch-utime.c
diff -r1.1 -r0 pkgsrc/net/publicfile/patches/patch-aa
--- pkgsrc/net/publicfile/distinfo 2010/03/20 01:51:40 1.3
+++ pkgsrc/net/publicfile/distinfo 2013/05/23 14:57:32 1.4
| @@ -1,6 +1,20 @@ | | | @@ -1,6 +1,20 @@ |
1 | $NetBSD: distinfo,v 1.3 2010/03/20 01:51:40 schmonz Exp $ | | 1 | $NetBSD: distinfo,v 1.4 2013/05/23 14:57:32 joerg Exp $ |
2 | | | 2 | |
3 | SHA1 (publicfile-0.52.tar.gz) = 067e5a0c57bf8ac04c578cac47bd80c2d88eddeb | | 3 | SHA1 (publicfile-0.52.tar.gz) = 067e5a0c57bf8ac04c578cac47bd80c2d88eddeb |
4 | RMD160 (publicfile-0.52.tar.gz) = 02d2bff245e9d474f26ac29a96775c8eeed0799c | | 4 | RMD160 (publicfile-0.52.tar.gz) = 02d2bff245e9d474f26ac29a96775c8eeed0799c |
5 | Size (publicfile-0.52.tar.gz) = 34892 bytes | | 5 | Size (publicfile-0.52.tar.gz) = 34892 bytes |
6 | SHA1 (patch-aa) = e9933a7337b4fa6683fb6c11a6421bfa6e6962eb | | 6 | SHA1 (patch-Makefile) = e9933a7337b4fa6683fb6c11a6421bfa6e6962eb |
| | | 7 | SHA1 (patch-alloc.c) = 3a8491e1f15595cafba1406e22d282fdb1734365 |
| | | 8 | SHA1 (patch-exit.h) = cff7aa714c2dcfa95f3663af12a3e26013a4d391 |
| | | 9 | SHA1 (patch-fetch.c) = fc10297708df10817eff97927d1fc2f05acbaff0 |
| | | 10 | SHA1 (patch-file.c) = 15a9db2b4225ccbe935a71a3515553b1f9731af8 |
| | | 11 | SHA1 (patch-filetype.c) = 87e2fa25e92c41fa0ce84c8cd7549ba83f00f4b0 |
| | | 12 | SHA1 (patch-ftpd.c) = 90755132891cf6b36a5e0a5c589b6c11857dfeec |
| | | 13 | SHA1 (patch-httpd.c) = 4fa3d55ea17b2a626109da2c84a60a6c5f9b8972 |
| | | 14 | SHA1 (patch-leapsecs__read.c) = b956b8983d7a680b0349d9f99551a6480a1f664b |
| | | 15 | SHA1 (patch-main.c) = abe752e15212ee4f191de4e56256d7e137cfb184 |
| | | 16 | SHA1 (patch-open.h) = 4605a65b282d013c71a02128df3c297a259cfa16 |
| | | 17 | SHA1 (patch-prot.c) = 35c0fdce5b121f5b17b8cb4a288f4d43b8e8e197 |
| | | 18 | SHA1 (patch-prot.h) = 6c47e387dbc9c9bc59f53a84e2112fadd6836118 |
| | | 19 | SHA1 (patch-readwrite.h) = e6f17cddb9673ebb4a458c557215c28526712501 |
| | | 20 | SHA1 (patch-utime.c) = cd4b3414200c190cec781d00cf36267e2a0b4208 |
$NetBSD: patch-Makefile,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- Makefile.orig 1999-11-09 07:23:46.000000000 +0000
+++ Makefile
@@ -24,6 +24,14 @@ auto-str.o: \
compile auto-str.c substdio.h readwrite.h exit.h
./compile auto-str.c
+auto_destdir.c: \
+auto-str conf-destdir
+ ./auto-str auto_home `head -1 conf-destdir` > auto_destdir.c
+
+auto_destdir.o: \
+compile auto_destdir.c
+ ./compile auto_destdir.c
+
auto_home.c: \
auto-str conf-home
./auto-str auto_home `head -1 conf-home` > auto_home.c
@@ -257,9 +265,9 @@ gen_alloc.h tai.h uint64.h
./compile httpdate.c
install: \
-load install.o hier.o auto_home.o strerr.a substdio.a open.a error.a \
+load install.o hier.o auto_destdir.o strerr.a substdio.a open.a error.a \
str.a
- ./load install hier.o auto_home.o strerr.a substdio.a \
+ ./load install hier.o auto_destdir.o strerr.a substdio.a \
open.a error.a str.a
install.o: \
@@ -268,8 +276,8 @@ exit.h
./compile install.c
instcheck: \
-load instcheck.o hier.o auto_home.o strerr.a substdio.a error.a str.a
- ./load instcheck hier.o auto_home.o strerr.a substdio.a \
+load instcheck.o hier.o auto_destdir.o strerr.a substdio.a error.a str.a
+ ./load instcheck hier.o auto_destdir.o strerr.a substdio.a \
error.a str.a
instcheck.o: \
$NetBSD: patch-alloc.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- alloc.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ alloc.c
@@ -1,7 +1,6 @@
#include "alloc.h"
#include "error.h"
-extern char *malloc();
-extern void free();
+#include <stdlib.h>
#define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */
#define SPACE 4096 /* must be multiple of ALIGNMENT */
$NetBSD: patch-exit.h,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- exit.h.orig 1999-11-09 07:23:46.000000000 +0000
+++ exit.h
@@ -1,6 +1,7 @@
#ifndef EXIT_H
#define EXIT_H
-extern void _exit();
+#include <stdlib.h>
+#include <unistd.h>
#endif
$NetBSD: patch-fetch.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- fetch.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ fetch.c
@@ -8,6 +8,8 @@
#include "direntry.h"
#include "fmt.h"
#include "fetch.h"
+#include "readwrite.h"
+#include "open.h"
int fetch_ascii = 1;
unsigned long fetch_rest = 0;
@@ -75,14 +77,14 @@ static void list(char *fn,int flaglong)
if (error_temp(errno)) _exit(23);
return;
}
- printstat(&st);
+ printstat();
}
substdio_puts(&ss,fn);
substdio_puts(&ss,"\r\n");
}
-static int doit(char *fn,int fddata,int fdfile,int how)
+static void doit(char *fn,int fddata,int fdfile,int how)
{
DIR *dir;
direntry *d;
@@ -94,7 +96,7 @@ static int doit(char *fn,int fddata,int
switch(how) {
case FETCH_LISTONE:
if (fstat(fdfile,&st) == -1) break;
- printstat(&st);
+ printstat();
for (i = 0;fn[i];++i)
if (fn[i] == '\n')
substdio_put(&ss,"",1);
$NetBSD: patch-file.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- file.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ file.c
@@ -7,6 +7,8 @@
#include "str.h"
#include "tai.h"
#include "env.h"
+#include "open.h"
+#include "exit.h"
static void log(char *fn,char *result1,char *result2,int flagread)
{
$NetBSD: patch-filetype.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- filetype.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ filetype.c
@@ -1,5 +1,6 @@
#include "filetype.h"
#include "str.h"
+#include "exit.h"
void filetype(char *fn,stralloc *contenttype)
{
$NetBSD: patch-ftpd.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- ftpd.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ ftpd.c
@@ -7,6 +7,7 @@
#include "timeoutread.h"
#include "timeoutwrite.h"
#include "substdio.h"
+#include "exit.h"
#include "fetch.h"
#include "pathdecode.h"
#include "file.h"
$NetBSD: patch-httpd.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- httpd.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ httpd.c
@@ -1,3 +1,4 @@
+#include <sys/socket.h>
#include "pathdecode.h"
#include "file.h"
#include "filetype.h"
@@ -15,6 +16,7 @@
#include "substdio.h"
#include "error.h"
#include "getln.h"
+#include "byte.h"
int safewrite(int fd,char *buf,int len)
{
@@ -209,7 +211,7 @@ void readline(void)
if (line.len && (line.s[line.len - 1] == '\r')) --line.len;
}
-void doit()
+void doit(void)
{
int i;
int spaces;
$NetBSD: patch-leapsecs__read.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- leapsecs_read.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ leapsecs_read.c
@@ -1,8 +1,10 @@
+#include <unistd.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
-extern int errno;
+#include <errno.h>
#include "tai.h"
#include "leapsecs.h"
$NetBSD: patch-main.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- main.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ main.c
@@ -1,5 +1,6 @@
#include "env.h"
#include "exit.h"
+#include "prot.h"
#include "scan.h"
extern void doit(void);
$NetBSD: patch-open.h,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- open.h.orig 1999-11-09 07:23:46.000000000 +0000
+++ open.h
@@ -1,10 +1,7 @@
#ifndef OPEN_H
#define OPEN_H
-extern int open_read();
-extern int open_excl();
-extern int open_append();
-extern int open_trunc();
-extern int open_write();
+extern int open_read(char *);
+extern int open_trunc(char *);
#endif
$NetBSD: patch-prot.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- prot.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ prot.c
@@ -1,9 +1,10 @@
#include "hasshsgr.h"
#include "prot.h"
+#include <unistd.h>
/* XXX: there are more portability problems here waiting to leap out at me */
-int prot_gid(gid) int gid;
+int prot_gid(gid_t gid)
{
#ifdef HASSHORTSETGROUPS
short x[2];
@@ -15,7 +16,7 @@ int prot_gid(gid) int gid;
return setgid(gid); /* _should_ be redundant, but on some systems it isn't */
}
-int prot_uid(uid) int uid;
+int prot_uid(uid_t uid)
{
return setuid(uid);
}
$NetBSD: patch-prot.h,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- prot.h.orig 1999-11-09 07:23:46.000000000 +0000
+++ prot.h
@@ -1,7 +1,8 @@
#ifndef PROT_H
#define PROT_H
-extern int prot_gid();
-extern int prot_uid();
+#include <unistd.h>
+extern int prot_gid(gid_t);
+extern int prot_uid(uid_t);
#endif
$NetBSD: patch-readwrite.h,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- readwrite.h.orig 1999-11-09 07:23:46.000000000 +0000
+++ readwrite.h
@@ -1,7 +1,9 @@
#ifndef READWRITE_H
#define READWRITE_H
-extern int read();
-extern int write();
+#include <sys/stat.h>
+#include <unistd.h>
+
+void out_puts(char *s);
#endif
$NetBSD: patch-utime.c,v 1.1 2013/05/23 14:57:32 joerg Exp $
--- utime.c.orig 1999-11-09 07:23:46.000000000 +0000
+++ utime.c
@@ -1,5 +1,6 @@
#include <sys/types.h>
#include <sys/time.h>
+#include <utime.h>
#include "scan.h"
#include "exit.h"