components/python/python27/patches/07-dlpi.patch
branchs11u2-sru
changeset 3379 e99da14b537a
parent 458 2edc011b559e
child 3565 2d729d36ded7
equal deleted inserted replaced
3375:3724eda7445e 3379:e99da14b537a
     1 diff --git Python-2.6.4/Modules/dlpimodule.c Python-2.6.4/Modules/dlpimodule.c
     1 This patch provides Python dlpi support.  It may be contributed upstream at
     2 new file mode 100644
     2 some point, but the suitability (or lack thereof) has not yet been determined.
       
     3 
     3 --- /dev/null
     4 --- /dev/null
     4 +++ Python-2.6.4/Modules/dlpimodule.c
     5 +++ Python-2.6.4/Modules/dlpimodule.c
     5 @@ -0,0 +1,1205 @@
     6 @@ -0,0 +1,1205 @@
     6 +/*
     7 +/*
     7 + * Permission is hereby granted, free of charge, to any person obtaining a copy
     8 + * Permission is hereby granted, free of charge, to any person obtaining a copy
  1206 +	PyModule_AddIntConstant(mod, "UNKNOWN", DL_UNKNOWN);
  1207 +	PyModule_AddIntConstant(mod, "UNKNOWN", DL_UNKNOWN);
  1207 +	PyModule_AddIntConstant(mod, "UNBOUND", DL_UNBOUND);
  1208 +	PyModule_AddIntConstant(mod, "UNBOUND", DL_UNBOUND);
  1208 +	PyModule_AddIntConstant(mod, "IDLE", DL_IDLE);
  1209 +	PyModule_AddIntConstant(mod, "IDLE", DL_IDLE);
  1209 +	PyModule_AddIntConstant(mod, "SYSERR", DL_SYSERR);
  1210 +	PyModule_AddIntConstant(mod, "SYSERR", DL_SYSERR);
  1210 +}
  1211 +}
  1211 diff --git Python-2.6.4/setup.py Python-2.6.4/setup.py
  1212 --- Python-2.7.8/setup.py.~3~	2014-07-17 20:43:48.715101356 -0700
  1212 --- Python-2.6.4/setup.py
  1213 +++ Python-2.7.8/setup.py	2014-07-17 20:43:48.731874294 -0700
  1213 +++ Python-2.6.4/setup.py
  1214 @@ -1549,6 +1549,12 @@
  1214 @@ -1284,6 +1284,12 @@
       
  1215              exts.append( Extension('ucred', ['ucred.c'],
  1215              exts.append( Extension('ucred', ['ucred.c'],
  1216                                     libraries = ['tsol']) )
  1216                                     libraries = ['tsol']) )
  1217  
  1217  
  1218 +        # dlpi module (Solaris)
  1218 +        # dlpi module (Solaris)
  1219 +        dlpi_inc = find_file('libdlpi.h', [], inc_dirs)
  1219 +        dlpi_inc = find_file('libdlpi.h', [], inc_dirs)
  1222 +                                   libraries = ['dlpi']) )
  1222 +                                   libraries = ['dlpi']) )
  1223 +
  1223 +
  1224          # Thomas Heller's _ctypes module
  1224          # Thomas Heller's _ctypes module
  1225          self.detect_ctypes(inc_dirs, lib_dirs)
  1225          self.detect_ctypes(inc_dirs, lib_dirs)
  1226  
  1226  
  1227 diff --git Python-2.6.4/lib/test/dlpitest.py Python-2.6.4/Lib/test/dlpitest.py
       
  1228 new file mode 100644
       
  1229 --- /dev/null	2011-02-12 03:13:26.000000000 -0600
  1227 --- /dev/null	2011-02-12 03:13:26.000000000 -0600
  1230 +++ Python-2.6.4/Lib/test/dlpitest.py	2011-01-20 13:52:42.895865414 -0600
  1228 +++ Python-2.6.4/Lib/test/dlpitest.py	2011-01-20 13:52:42.895865414 -0600
  1231 @@ -0,0 +1,96 @@
  1229 @@ -0,0 +1,96 @@
  1232 +#!/usr/bin/python2.6
  1230 +#!/usr/bin/python2.7
  1233 +
  1231 +
  1234 +import dlpi
  1232 +import dlpi
  1235 +import sys
  1233 +import sys
  1236 +import time
  1234 +import time
  1237 +import struct
  1235 +import struct