Sun Feb 22 19:11:48 2009 UTC ()
Be nice to ancient NetBSD releases. From Hauke Fath.


(joerg)
diff -r1.17 -r1.18 pkgsrc/net/libfetch/files/common.c
diff -r1.26 -r1.27 pkgsrc/net/libfetch/files/ftp.c
diff -r1.21 -r1.22 pkgsrc/net/libfetch/files/http.c

cvs diff -r1.17 -r1.18 pkgsrc/net/libfetch/files/common.c (expand / switch to unified diff)

--- pkgsrc/net/libfetch/files/common.c 2009/02/05 16:59:45 1.17
+++ pkgsrc/net/libfetch/files/common.c 2009/02/22 19:11:48 1.18
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: common.c,v 1.17 2009/02/05 16:59:45 joerg Exp $ */ 1/* $NetBSD: common.c,v 1.18 2009/02/22 19:11:48 joerg Exp $ */
2/*- 2/*-
3 * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav 3 * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
4 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org> 4 * Copyright (c) 2008 Joerg Sonnenberger <joerg@NetBSD.org>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer 11 * notice, this list of conditions and the following disclaimer
12 * in this position and unchanged. 12 * in this position and unchanged.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -32,28 +32,28 @@ @@ -32,28 +32,28 @@
32 32
33#if HAVE_CONFIG_H 33#if HAVE_CONFIG_H
34#include "config.h" 34#include "config.h"
35#endif 35#endif
36#ifndef NETBSD 36#ifndef NETBSD
37#include <nbcompat.h> 37#include <nbcompat.h>
38#endif 38#endif
39 39
40#include <sys/types.h> 40#include <sys/types.h>
41#include <sys/socket.h> 41#include <sys/socket.h>
42#include <sys/time.h> 42#include <sys/time.h>
43#include <sys/uio.h> 43#include <sys/uio.h>
44 44
45#include <arpa/inet.h> 
46#include <netinet/in.h> 45#include <netinet/in.h>
 46#include <arpa/inet.h>
47 47
48#include <ctype.h> 48#include <ctype.h>
49#include <errno.h> 49#include <errno.h>
50#if defined(HAVE_INTTYPES_H) || defined(NETBSD) 50#if defined(HAVE_INTTYPES_H) || defined(NETBSD)
51#include <inttypes.h> 51#include <inttypes.h>
52#endif 52#endif
53#ifndef NETBSD 53#ifndef NETBSD
54#include <nbcompat/netdb.h> 54#include <nbcompat/netdb.h>
55#else 55#else
56#include <netdb.h> 56#include <netdb.h>
57#endif 57#endif
58#include <pwd.h> 58#include <pwd.h>
59#include <stdarg.h> 59#include <stdarg.h>

cvs diff -r1.26 -r1.27 pkgsrc/net/libfetch/files/ftp.c (expand / switch to unified diff)

--- pkgsrc/net/libfetch/files/ftp.c 2009/02/05 16:59:45 1.26
+++ pkgsrc/net/libfetch/files/ftp.c 2009/02/22 19:11:48 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ftp.c,v 1.26 2009/02/05 16:59:45 joerg Exp $ */ 1/* $NetBSD: ftp.c,v 1.27 2009/02/22 19:11:48 joerg Exp $ */
2/*- 2/*-
3 * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav 3 * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
4 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> 4 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer 11 * notice, this list of conditions and the following disclaimer
12 * in this position and unchanged. 12 * in this position and unchanged.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -62,28 +62,28 @@ @@ -62,28 +62,28 @@
62#define _GNU_SOURCE 62#define _GNU_SOURCE
63#endif 63#endif
64 64
65#if HAVE_CONFIG_H 65#if HAVE_CONFIG_H
66#include "config.h" 66#include "config.h"
67#endif 67#endif
68#ifndef NETBSD 68#ifndef NETBSD
69#include <nbcompat.h> 69#include <nbcompat.h>
70#endif 70#endif
71 71
72#include <sys/types.h> 72#include <sys/types.h>
73#include <sys/socket.h> 73#include <sys/socket.h>
74 74
75#include <arpa/inet.h> 
76#include <netinet/in.h> 75#include <netinet/in.h>
 76#include <arpa/inet.h>
77 77
78#include <ctype.h> 78#include <ctype.h>
79#include <errno.h> 79#include <errno.h>
80#include <fcntl.h> 80#include <fcntl.h>
81#if defined(HAVE_INTTYPES_H) || defined(NETBSD) 81#if defined(HAVE_INTTYPES_H) || defined(NETBSD)
82#include <inttypes.h> 82#include <inttypes.h>
83#endif 83#endif
84#include <stdarg.h> 84#include <stdarg.h>
85#ifndef NETBSD 85#ifndef NETBSD
86#include <nbcompat/netdb.h> 86#include <nbcompat/netdb.h>
87#include <nbcompat/stdio.h> 87#include <nbcompat/stdio.h>
88#else 88#else
89#include <netdb.h> 89#include <netdb.h>

cvs diff -r1.21 -r1.22 pkgsrc/net/libfetch/files/http.c (expand / switch to unified diff)

--- pkgsrc/net/libfetch/files/http.c 2009/02/05 16:59:45 1.21
+++ pkgsrc/net/libfetch/files/http.c 2009/02/22 19:11:48 1.22
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: http.c,v 1.21 2009/02/05 16:59:45 joerg Exp $ */ 1/* $NetBSD: http.c,v 1.22 2009/02/22 19:11:48 joerg Exp $ */
2/*- 2/*-
3 * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav 3 * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav
4 * Copyright (c) 2003 Thomas Klausner <wiz@NetBSD.org> 4 * Copyright (c) 2003 Thomas Klausner <wiz@NetBSD.org>
5 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org> 5 * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org>
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer 12 * notice, this list of conditions and the following disclaimer
13 * in this position and unchanged. 13 * in this position and unchanged.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -73,42 +73,46 @@ @@ -73,42 +73,46 @@
73#endif 73#endif
74#ifndef NETBSD 74#ifndef NETBSD
75#include <nbcompat.h> 75#include <nbcompat.h>
76#endif 76#endif
77 77
78#include <sys/types.h> 78#include <sys/types.h>
79#include <sys/socket.h> 79#include <sys/socket.h>
80 80
81#include <ctype.h> 81#include <ctype.h>
82#include <errno.h> 82#include <errno.h>
83#include <locale.h> 83#include <locale.h>
84#include <stdarg.h> 84#include <stdarg.h>
85#ifndef NETBSD 85#ifndef NETBSD
86#include <nbcompat/netdb.h> 
87#include <nbcompat/stdio.h> 86#include <nbcompat/stdio.h>
88#else 87#else
89#include <netdb.h> 
90#include <stdio.h> 88#include <stdio.h>
91#endif 89#endif
92#include <stdlib.h> 90#include <stdlib.h>
93#include <string.h> 91#include <string.h>
94#include <time.h> 92#include <time.h>
95#include <unistd.h> 93#include <unistd.h>
96 94
97#include <arpa/inet.h> 
98 
99#include <netinet/in.h> 95#include <netinet/in.h>
100#include <netinet/tcp.h> 96#include <netinet/tcp.h>
101 97
 98#ifndef NETBSD
 99#include <nbcompat/netdb.h>
 100#else
 101#include <netdb.h>
 102#endif
 103
 104#include <arpa/inet.h>
 105
102#include "fetch.h" 106#include "fetch.h"
103#include "common.h" 107#include "common.h"
104#include "httperr.h" 108#include "httperr.h"
105 109
106/* Maximum number of redirects to follow */ 110/* Maximum number of redirects to follow */
107#define MAX_REDIRECT 5 111#define MAX_REDIRECT 5
108 112
109/* Symbolic names for reply codes we care about */ 113/* Symbolic names for reply codes we care about */
110#define HTTP_OK 200 114#define HTTP_OK 200
111#define HTTP_PARTIAL 206 115#define HTTP_PARTIAL 206
112#define HTTP_MOVED_PERM 301 116#define HTTP_MOVED_PERM 301
113#define HTTP_MOVED_TEMP 302 117#define HTTP_MOVED_TEMP 302
114#define HTTP_SEE_OTHER 303 118#define HTTP_SEE_OTHER 303