File: socket-ipconst.dpatch

package info (click to toggle)
python2.2 2.2.3dfsg-2sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 36,920 kB
  • ctags: 69,127
  • sloc: ansic: 219,839; python: 203,969; sh: 9,690; makefile: 3,468; perl: 3,454; lisp: 3,248; xml: 2,262; cpp: 106; sed: 2
file content (39 lines) | stat: -rw-r--r-- 1,001 bytes parent folder | download
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
#! /bin/sh -e

# DP: Add IPPROTO_IPV6 option to the socketmodule

dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
    dir="$3/"
elif [ $# -ne 1 ]; then
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
    exit 1
fi
case "$1" in
    -patch)
        patch $pdir -f --no-backup-if-mismatch -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
	echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
        exit 1
esac
exit 0

--- Modules/socketmodule.c~	2003-08-07 13:56:22.000000000 +0200
+++ Modules/socketmodule.c	2003-09-27 10:33:03.000000000 +0200
@@ -3749,6 +3749,9 @@
 #ifdef	IPPROTO_IPV4
 	PyModule_AddIntConstant(m, "IPPROTO_IPV4", IPPROTO_IPV4);
 #endif
+#ifdef	IPPROTO_IPV6
+	PyModule_AddIntConstant(m, "IPPROTO_IPV6", IPPROTO_IPV6);
+#endif
 #ifdef	IPPROTO_IPIP
 	PyModule_AddIntConstant(m, "IPPROTO_IPIP", IPPROTO_IPIP);
 #endif