components/python/python26/patches/Python26-17-netpacket-packet-h.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 841 1a62cefa636d
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     1
diff --git Python-2.6.4/Modules/socketmodule.c Python-2.6.4/Modules/socketmodule.c
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     2
--- Python-2.6.4/Modules/socketmodule.c
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     3
+++ Python-2.6.4/Modules/socketmodule.c
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     4
@@ -81,6 +81,14 @@
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     5
 
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     6
 */
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     7
 
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     8
+#ifdef HAVE_NETPACKET_PACKET_H
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
     9
+#ifdef sun
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    10
+#define USE_NETPACKET_PACKET_H 0
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    11
+#else
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    12
+#define USE_NETPACKET_PACKET_H 1
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    13
+#endif
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    14
+#endif
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    15
+
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    16
 #ifdef __APPLE__
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    17
   /*
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    18
    * inet_aton is not available on OSX 10.3, yet we want to use a binary
841
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    19
@@ -1096,7 +1104,7 @@
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    20
         }
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    21
 #endif
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    22
 
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    23
-#ifdef HAVE_NETPACKET_PACKET_H
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    24
+#if USE_NETPACKET_PACKET_H
841
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    25
     case AF_PACKET:
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    26
     {
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    27
         struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    28
@@ -1387,7 +1395,7 @@
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    29
     }
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    30
 #endif
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    31
 
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    32
-#ifdef HAVE_NETPACKET_PACKET_H
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    33
+#if USE_NETPACKET_PACKET_H
841
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    34
     case AF_PACKET:
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    35
     {
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    36
         struct sockaddr_ll* addr;
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    37
@@ -1564,7 +1572,7 @@
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    38
     }
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    39
 #endif
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    40
 
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    41
-#ifdef HAVE_NETPACKET_PACKET_H
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    42
+#if USE_NETPACKET_PACKET_H
841
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    43
     case AF_PACKET:
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    44
     {
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    45
         *len_ret = sizeof (struct sockaddr_ll);
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    46
@@ -4599,7 +4607,7 @@
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    47
     PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF");
99
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    48
 #endif
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    49
 
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    50
-#ifdef HAVE_NETPACKET_PACKET_H
c15c9099bb44 6841644 OpenSolaris Python should support gdbm
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents:
diff changeset
    51
+#if USE_NETPACKET_PACKET_H
841
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    52
     PyModule_AddIntConstant(m, "AF_PACKET", AF_PACKET);
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    53
     PyModule_AddIntConstant(m, "PF_PACKET", PF_PACKET);
1a62cefa636d 7121707 python 2.6.4 should be updated to latest 2.6.X release
Rich Burridge <rich.burridge@oracle.com>
parents: 115
diff changeset
    54
     PyModule_AddIntConstant(m, "PACKET_HOST", PACKET_HOST);