]> git.proxmox.com Git - mirror_edk2.git/commitdiff
AppPkg/.../Python-2.7.10: AppPkg.dsc, pyconfig.h, PyMod-2.7.10
authorDaryl McDaniel <edk2-lists@mc2research.org>
Wed, 23 Dec 2015 00:15:45 +0000 (00:15 +0000)
committerdarylm503 <darylm503@Edk2>
Wed, 23 Dec 2015 00:15:45 +0000 (00:15 +0000)
Apply UEFI-specific changes to files to make them equivalent to the Python 2.7.2 versions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
---
 AppPkg/AppPkg.dsc                                  |   5 +-
 .../Python/Python-2.7.10/Ia32/pyconfig.h           |  93 ++++++++----
 .../Python-2.7.10/PyMod-2.7.10/Lib/ntpath.py       |  30 +++-
 .../Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py    |  35 ++++-
 .../Python/Python-2.7.10/PyMod-2.7.10/Lib/pydoc.py |  17 +++
 .../Python/Python-2.7.10/PyMod-2.7.10/Lib/site.py  | 165 ++++++---------------
 .../Python-2.7.10/PyMod-2.7.10/Modules/_sre.c      | 150 ++++++++++---------
 .../Python-2.7.10/PyMod-2.7.10/Modules/addrinfo.h  | 101 +++++++------
 .../PyMod-2.7.10/Modules/errnomodule.c             |  57 ++++++-
 .../PyMod-2.7.10/Modules/expat/expat_external.h    |   4 +-
 .../Python-2.7.10/PyMod-2.7.10/Modules/getpath.c   | 143 +++++-------------
 .../Python-2.7.10/PyMod-2.7.10/Modules/main.c      |  61 ++++----
 .../PyMod-2.7.10/Modules/selectmodule.c            |  43 ++++--
 .../PyMod-2.7.10/Modules/zlib/gzguts.h             |  10 +-
 .../PyMod-2.7.10/Modules/zlib/zutil.h              |  11 +-
 .../PyMod-2.7.10/Objects/longobject.c              |  14 +-
 .../PyMod-2.7.10/Objects/stringlib/localeutil.h    |  17 ++-
 .../PyMod-2.7.10/Python/getcopyright.c             |  24 ++-
 .../Python-2.7.10/PyMod-2.7.10/Python/marshal.c    |  21 ++-
 .../Python-2.7.10/PyMod-2.7.10/Python/random.c     |  32 +++-
 .../Python/Python-2.7.10/X64/pyconfig.h            |  63 ++++++--
 21 files changed, 640 insertions(+), 456 deletions(-)

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19462 6f19259b-4bc3-4df7-8a09-765794883524

21 files changed:
AppPkg/AppPkg.dsc
AppPkg/Applications/Python/Python-2.7.10/Ia32/pyconfig.h
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/ntpath.py
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/os.py
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/pydoc.py
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Lib/site.py
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/_sre.c
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/addrinfo.h
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/errnomodule.c
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/expat/expat_external.h
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/getpath.c
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/main.c
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/selectmodule.c
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/zlib/gzguts.h
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/zlib/zutil.h
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Objects/longobject.c
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Objects/stringlib/localeutil.h
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Python/getcopyright.c
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Python/marshal.c
AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Python/random.c
AppPkg/Applications/Python/Python-2.7.10/X64/pyconfig.h

index 6db32a177d78cb324f3137ed610d0c99d62e750a..58bc84e4ed365c40e89f693d0ff5c7ab7754c209 100644 (file)
       gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80400040\r
   }\r
 \r
       gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80400040\r
   }\r
 \r
-#### Un-comment the following line to build Python.\r
+#### Un-comment the following line to build Python 2.7.2.\r
 #  AppPkg/Applications/Python/PythonCore.inf\r
 \r
 #  AppPkg/Applications/Python/PythonCore.inf\r
 \r
+#### Un-comment the following line to build Python 2.7.10.\r
+# AppPkg/Applications/Python/Python-2.7.10/Python2710.inf\r
+\r
 #### Un-comment the following line to build Lua.\r
 #  AppPkg/Applications/Lua/Lua.inf\r
 \r
 #### Un-comment the following line to build Lua.\r
 #  AppPkg/Applications/Lua/Lua.inf\r
 \r
index 7970f14430ae4420b940ea62458a456093d5bc4e..02808583b5c19ee3578c95b3479ae4ffd22908a5 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
+    Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
     Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
@@ -67,6 +68,9 @@
 /* Define to 1 if you have the 'alarm' function. */\r
 #undef HAVE_ALARM\r
 \r
 /* Define to 1 if you have the 'alarm' function. */\r
 #undef HAVE_ALARM\r
 \r
+/* Define to 1 if you have the <alloca.h> header file. */\r
+#undef HAVE_ALLOCA_H\r
+\r
 /* Define this if your time.h defines altzone. */\r
 #undef HAVE_ALTZONE\r
 \r
 /* Define this if your time.h defines altzone. */\r
 #undef HAVE_ALTZONE\r
 \r
 /* define to 1 if your sem_getvalue is broken. */\r
 #define HAVE_BROKEN_SEM_GETVALUE      1\r
 \r
 /* define to 1 if your sem_getvalue is broken. */\r
 #define HAVE_BROKEN_SEM_GETVALUE      1\r
 \r
+/* Define if 'unsetenv' does not return an int. */\r
+#undef HAVE_BROKEN_UNSETENV\r
+\r
 /* Define this if you have the type _Bool. */\r
 #define HAVE_C99_BOOL                 1\r
 \r
 /* Define this if you have the type _Bool. */\r
 #define HAVE_C99_BOOL                 1\r
 \r
 /* Define to 1 if you have the device macros. */\r
 #undef HAVE_DEVICE_MACROS\r
 \r
 /* Define to 1 if you have the device macros. */\r
 #undef HAVE_DEVICE_MACROS\r
 \r
-/* Define if we have /dev/ptc. */\r
+/* Define to 1 if you have the /dev/ptc device file. */\r
 #undef HAVE_DEV_PTC\r
 \r
 #undef HAVE_DEV_PTC\r
 \r
-/* Define if we have /dev/ptmx. */\r
+/* Define to 1 if you have the /dev/ptmx device file. */\r
 #undef HAVE_DEV_PTMX\r
 \r
 /* Define to 1 if you have the <direct.h> header file. */\r
 #undef HAVE_DEV_PTMX\r
 \r
 /* Define to 1 if you have the <direct.h> header file. */\r
 #undef HAVE_GAMMA\r
 \r
 /* Define if we can use gcc inline assembler to get and set x87 control word\r
 #undef HAVE_GAMMA\r
 \r
 /* Define if we can use gcc inline assembler to get and set x87 control word\r
-*/\r
+   */\r
 #if defined(__GNUC__)\r
   #define HAVE_GCC_ASM_FOR_X87  1\r
 #else\r
 #if defined(__GNUC__)\r
   #define HAVE_GCC_ASM_FOR_X87  1\r
 #else\r
-  #undef HAVE_GCC_ASM_FOR_X87\r
+#undef HAVE_GCC_ASM_FOR_X87\r
 #endif\r
 \r
 /* Define if you have the getaddrinfo function. */\r
 #endif\r
 \r
 /* Define if you have the getaddrinfo function. */\r
 /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */\r
 #undef HAVE_GETC_UNLOCKED\r
 \r
 /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */\r
 #undef HAVE_GETC_UNLOCKED\r
 \r
+/* Define to 1 if you have the 'getentropy' function. */\r
+#undef HAVE_GETENTROPY\r
+\r
 /* Define to 1 if you have the 'getgroups' function. */\r
 #undef HAVE_GETGROUPS\r
 \r
 /* Define to 1 if you have the 'getgroups' function. */\r
 #undef HAVE_GETGROUPS\r
 \r
 /* Define to 1 if you have the 'initgroups' function. */\r
 #undef HAVE_INITGROUPS\r
 \r
 /* Define to 1 if you have the 'initgroups' function. */\r
 #undef HAVE_INITGROUPS\r
 \r
+/* Define if your compiler provides int32_t. */\r
+#undef HAVE_INT32_T\r
+\r
+/* Define if your compiler provides int64_t. */\r
+#undef HAVE_INT64_T\r
+\r
 /* Define to 1 if you have the <inttypes.h> header file. */\r
 #define HAVE_INTTYPES_H   1\r
 \r
 /* Define to 1 if you have the <inttypes.h> header file. */\r
 #define HAVE_INTTYPES_H   1\r
 \r
 /* Define to 1 if you have the 'mktime' function. */\r
 #define HAVE_MKTIME     1\r
 \r
 /* Define to 1 if you have the 'mktime' function. */\r
 #define HAVE_MKTIME     1\r
 \r
+/* Define to 1 if you have the 'mmap' function. */\r
+#undef HAVE_MMAP\r
+\r
 /* Define to 1 if you have the 'mremap' function. */\r
 #undef HAVE_MREMAP\r
 \r
 /* Define to 1 if you have the 'mremap' function. */\r
 #undef HAVE_MREMAP\r
 \r
 /* Define if you have GNU PTH threads. */\r
 #undef HAVE_PTH\r
 \r
 /* Define if you have GNU PTH threads. */\r
 #undef HAVE_PTH\r
 \r
+/* Define to 1 if you have the 'pthread_atfork' function. */\r
+#undef HAVE_PTHREAD_ATFORK\r
+\r
 /* Defined for Solaris 2.6 bug in pthread header. */\r
 #undef HAVE_PTHREAD_DESTRUCTOR\r
 \r
 /* Defined for Solaris 2.6 bug in pthread header. */\r
 #undef HAVE_PTHREAD_DESTRUCTOR\r
 \r
 /* Define to 1 if you have the 'putenv' function. */\r
 #undef HAVE_PUTENV\r
 \r
 /* Define to 1 if you have the 'putenv' function. */\r
 #undef HAVE_PUTENV\r
 \r
+/* Define if the libcrypto has RAND_egd */\r
+#undef HAVE_RAND_EGD\r
+\r
 /* Define to 1 if you have the 'readlink' function. */\r
 #undef HAVE_READLINK\r
 \r
 /* Define to 1 if you have the 'readlink' function. */\r
 #undef HAVE_READLINK\r
 \r
 #define HAVE_STDARG_PROTOTYPES          1\r
 \r
 /* Define to 1 if you have the <stdint.h> header file. */\r
 #define HAVE_STDARG_PROTOTYPES          1\r
 \r
 /* Define to 1 if you have the <stdint.h> header file. */\r
-#define HAVE_STDINT_H                   1\r
+#define HAVE_STDINT_H   1\r
 \r
 /* Define to 1 if you have the <stdlib.h> header file. */\r
 \r
 /* Define to 1 if you have the <stdlib.h> header file. */\r
-#define HAVE_STDLIB_H                   1\r
+#define HAVE_STDLIB_H   1\r
 \r
 /* Define to 1 if you have the 'strdup' function. */\r
 \r
 /* Define to 1 if you have the 'strdup' function. */\r
-#define HAVE_STRDUP                     1\r
+#define HAVE_STRDUP     1\r
 \r
 /* Define to 1 if you have the 'strftime' function. */\r
 \r
 /* Define to 1 if you have the 'strftime' function. */\r
-#define HAVE_STRFTIME                   1\r
+#define HAVE_STRFTIME   1\r
 \r
 /* Define to 1 if you have the <strings.h> header file. */\r
 #undef HAVE_STRINGS_H\r
 \r
 /* Define to 1 if you have the <string.h> header file. */\r
 \r
 /* Define to 1 if you have the <strings.h> header file. */\r
 #undef HAVE_STRINGS_H\r
 \r
 /* Define to 1 if you have the <string.h> header file. */\r
-#define HAVE_STRING_H                   1\r
+#define HAVE_STRING_H   1\r
 \r
 /* Define to 1 if you have the <stropts.h> header file. */\r
 #undef HAVE_STROPTS_H\r
 \r
 /* Define to 1 if you have the <stropts.h> header file. */\r
 #undef HAVE_STROPTS_H\r
 /* Define to 1 if 'st_rdev' is a member of 'struct stat'. */\r
 #undef HAVE_STRUCT_STAT_ST_RDEV\r
 \r
 /* Define to 1 if 'st_rdev' is a member of 'struct stat'. */\r
 #undef HAVE_STRUCT_STAT_ST_RDEV\r
 \r
+/* Define to 1 if 'st_dev' is a member of 'struct stat'. */\r
+#undef HAVE_STRUCT_STAT_ST_DEV\r
+\r
+/* Define to 1 if 'st_ino' is a member of 'struct stat'. */\r
+#undef HAVE_STRUCT_STAT_ST_INO\r
+\r
 /* Define to 1 if 'tm_zone' is a member of 'struct tm'. */\r
 #undef HAVE_STRUCT_TM_TM_ZONE\r
 \r
 /* Define to 1 if 'tm_zone' is a member of 'struct tm'. */\r
 #undef HAVE_STRUCT_TM_TM_ZONE\r
 \r
 #undef HAVE_SYS_NDIR_H\r
 \r
 /* Define to 1 if you have the <sys/param.h> header file. */\r
 #undef HAVE_SYS_NDIR_H\r
 \r
 /* Define to 1 if you have the <sys/param.h> header file. */\r
-#define HAVE_SYS_PARAM_H                1\r
+#define HAVE_SYS_PARAM_H    1\r
 \r
 /* Define to 1 if you have the <sys/poll.h> header file. */\r
 #define HAVE_SYS_POLL_H                 1\r
 \r
 /* Define to 1 if you have the <sys/resource.h> header file. */\r
 \r
 /* Define to 1 if you have the <sys/poll.h> header file. */\r
 #define HAVE_SYS_POLL_H                 1\r
 \r
 /* Define to 1 if you have the <sys/resource.h> header file. */\r
-#define HAVE_SYS_RESOURCE_H             1\r
+#define HAVE_SYS_RESOURCE_H   1\r
 \r
 /* Define to 1 if you have the <sys/select.h> header file. */\r
 #define HAVE_SYS_SELECT_H               1\r
 \r
 /* Define to 1 if you have the <sys/select.h> header file. */\r
 #define HAVE_SYS_SELECT_H               1\r
 #undef HAVE_SYS_STATVFS_H\r
 \r
 /* Define to 1 if you have the <sys/stat.h> header file. */\r
 #undef HAVE_SYS_STATVFS_H\r
 \r
 /* Define to 1 if you have the <sys/stat.h> header file. */\r
-#define HAVE_SYS_STAT_H                 1\r
+#define HAVE_SYS_STAT_H   1\r
 \r
 /* Define to 1 if you have the <sys/termio.h> header file. */\r
 #undef HAVE_SYS_TERMIO_H\r
 \r
 /* Define to 1 if you have the <sys/termio.h> header file. */\r
 #undef HAVE_SYS_TERMIO_H\r
 #undef HAVE_SYS_TIMES_H\r
 \r
 /* Define to 1 if you have the <sys/time.h> header file. */\r
 #undef HAVE_SYS_TIMES_H\r
 \r
 /* Define to 1 if you have the <sys/time.h> header file. */\r
-#define HAVE_SYS_TIME_H                 1\r
+#define HAVE_SYS_TIME_H     1\r
 \r
 /* Define to 1 if you have the <sys/types.h> header file. */\r
 \r
 /* Define to 1 if you have the <sys/types.h> header file. */\r
-#define HAVE_SYS_TYPES_H                1\r
+#define HAVE_SYS_TYPES_H    1\r
 \r
 /* Define to 1 if you have the <sys/un.h> header file. */\r
 #undef HAVE_SYS_UN_H\r
 \r
 /* Define to 1 if you have the <sys/un.h> header file. */\r
 #undef HAVE_SYS_UN_H\r
 #undef HAVE_TCSETPGRP\r
 \r
 /* Define to 1 if you have the 'tempnam' function. */\r
 #undef HAVE_TCSETPGRP\r
 \r
 /* Define to 1 if you have the 'tempnam' function. */\r
-#define HAVE_TEMPNAM                    1\r
+#define HAVE_TEMPNAM      1\r
 \r
 /* Define to 1 if you have the <termios.h> header file. */\r
 #undef HAVE_TERMIOS_H\r
 \r
 /* Define to 1 if you have the <termios.h> header file. */\r
 #undef HAVE_TERMIOS_H\r
 #undef HAVE_TIMES\r
 \r
 /* Define to 1 if you have the 'tmpfile' function. */\r
 #undef HAVE_TIMES\r
 \r
 /* Define to 1 if you have the 'tmpfile' function. */\r
-#define HAVE_TMPFILE                    1\r
+#define HAVE_TMPFILE    1\r
 \r
 /* Define to 1 if you have the 'tmpnam' function. */\r
 \r
 /* Define to 1 if you have the 'tmpnam' function. */\r
-#define HAVE_TMPNAM                     1\r
+#define HAVE_TMPNAM     1\r
 \r
 /* Define to 1 if you have the 'tmpnam_r' function. */\r
 #undef HAVE_TMPNAM_R\r
 \r
 /* Define to 1 if you have the 'tmpnam_r' function. */\r
 #undef HAVE_TMPNAM_R\r
 /* Define this if you have tcl and TCL_UTF_MAX==6 */\r
 #undef HAVE_UCS4_TCL\r
 \r
 /* Define this if you have tcl and TCL_UTF_MAX==6 */\r
 #undef HAVE_UCS4_TCL\r
 \r
+/* Define if your compiler provides uint32_t. */\r
+#undef HAVE_UINT32_T\r
+\r
+/* Define if your compiler provides uint64_t. */\r
+#undef HAVE_UINT64_T\r
+\r
 /* Define to 1 if the system has the type 'uintptr_t'. */\r
 /* Define to 1 if the system has the type 'uintptr_t'. */\r
-#define HAVE_UINTPTR_T                  1\r
+#define HAVE_UINTPTR_T    1\r
 \r
 /* Define to 1 if you have the 'uname' function. */\r
 #undef HAVE_UNAME\r
 \r
 /* Define to 1 if you have the 'uname' function. */\r
 #undef HAVE_UNAME\r
 #undef MVWDELCH_IS_EXPRESSION\r
 \r
 /* Define to the address where bug reports for this package should be sent. */\r
 #undef MVWDELCH_IS_EXPRESSION\r
 \r
 /* Define to the address where bug reports for this package should be sent. */\r
-#define PACKAGE_BUGREPORT   "edk2-devel@lists.sourceforge.net"\r
+#define PACKAGE_BUGREPORT   "edk2-devel@lists.01.org"\r
 \r
 /* Define to the full name of this package. */\r
 \r
 /* Define to the full name of this package. */\r
-#define PACKAGE_NAME    "EDK II Python Package"\r
+#define PACKAGE_NAME    "EDK II Python 2.7.10 Package"\r
 \r
 /* Define to the full name and version of this package. */\r
 \r
 /* Define to the full name and version of this package. */\r
-#define PACKAGE_STRING  "EDK II Python Package V0.8"\r
+#define PACKAGE_STRING  "EDK II Python 2.7.10 Package V0.1"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 \r
 /* Define to the home page for this package. */\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 \r
 /* Define to the home page for this package. */\r
-#define PACKAGE_URL   "http://edk2.tianocore.org/toolkit/python"\r
+#define PACKAGE_URL   "http://edk2.tianocore.org/"\r
 \r
 /* Define to the version of this package. */\r
 \r
 /* Define to the version of this package. */\r
-#define PACKAGE_VERSION  "V0.8"\r
+#define PACKAGE_VERSION  "V0.1"\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 #define SIZEOF__BOOL      1\r
 \r
 /* Define to 1 if you have the ANSI C header files. */\r
 #define SIZEOF__BOOL      1\r
 \r
 /* Define to 1 if you have the ANSI C header files. */\r
-#define STDC_HEADERS      1\r
+#define STDC_HEADERS    1\r
 \r
 /* Define if you can safely include both <sys/select.h> and <sys/time.h>\r
    (which you can't on SCO ODT 3.0). */\r
 \r
 /* Define if you can safely include both <sys/select.h> and <sys/time.h>\r
    (which you can't on SCO ODT 3.0). */\r
 /* This must be defined on some systems to enable large file support. */\r
 #undef _LARGEFILE_SOURCE\r
 \r
 /* This must be defined on some systems to enable large file support. */\r
 #undef _LARGEFILE_SOURCE\r
 \r
+/* This must be defined on AIX systems to enable large file support. */\r
+#undef _LARGE_FILES\r
+\r
 /* Define to 1 if on MINIX. */\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
 /* Define to 1 if on MINIX. */\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
-#ifndef _NETBSD_SOURCE\r
-  #define _NETBSD_SOURCE  1\r
-#endif\r
+#define _NETBSD_SOURCE  1\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
 //#undef volatile\r
 \r
 #endif /*Py_PYCONFIG_H*/\r
 //#undef volatile\r
 \r
 #endif /*Py_PYCONFIG_H*/\r
+\r
index ac89e2c9fe84b6e04fea0f5dcb2caa0ec4079963..ab10a28ac885afd84bd0552e718ca716261f3bea 100644 (file)
@@ -1,5 +1,18 @@
-# Module 'ntpath' -- common operations on WinNT/Win95 pathnames\r
-"""Common pathname manipulations, WindowsNT/95 version.\r
+\r
+# Module 'ntpath' -- common operations on WinNT/Win95 and UEFI pathnames.\r
+#\r
+# Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials are licensed and made available under\r
+# the terms and conditions of the BSD License that accompanies this distribution.\r
+# The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+\r
+"""Common pathname manipulations, WindowsNT/95 and UEFI version.\r
 \r
 Instead of importing this module directly, import os and refer to this\r
 module as os.path.\r
 \r
 Instead of importing this module directly, import os and refer to this\r
 module as os.path.\r
@@ -93,6 +106,9 @@ def join(path, *paths):
 # Split a path in a drive specification (a drive letter followed by a\r
 # colon) and the path specification.\r
 # It is always true that drivespec + pathspec == p\r
 # Split a path in a drive specification (a drive letter followed by a\r
 # colon) and the path specification.\r
 # It is always true that drivespec + pathspec == p\r
+# NOTE: for UEFI (and even Windows) you can have multiple characters to the left\r
+# of the ':' for the device or drive spec.  This is reflected in the modifications\r
+# to splitdrive() and splitunc().\r
 def splitdrive(p):\r
     """Split a pathname into drive/UNC sharepoint and relative path specifiers.\r
     Returns a 2-tuple (drive_or_unc, path); either part may be empty.\r
 def splitdrive(p):\r
     """Split a pathname into drive/UNC sharepoint and relative path specifiers.\r
     Returns a 2-tuple (drive_or_unc, path); either part may be empty.\r
@@ -130,8 +146,10 @@ def splitdrive(p):
             if index2 == -1:\r
                 index2 = len(p)\r
             return p[:index2], p[index2:]\r
             if index2 == -1:\r
                 index2 = len(p)\r
             return p[:index2], p[index2:]\r
-        if normp[1] == ':':\r
-            return p[:2], p[2:]\r
+        index = p.find(':')\r
+        if index != -1:\r
+            index = index + 1\r
+            return p[:index], p[index:]\r
     return '', p\r
 \r
 # Parse UNC paths\r
     return '', p\r
 \r
 # Parse UNC paths\r
@@ -143,8 +161,8 @@ def splitunc(p):
     using backslashes).  unc+rest is always the input path.\r
     Paths containing drive letters never have an UNC part.\r
     """\r
     using backslashes).  unc+rest is always the input path.\r
     Paths containing drive letters never have an UNC part.\r
     """\r
-    if p[1:2] == ':':\r
-        return '', p # Drive letter present\r
+    if ':' in p:\r
+        return '', p # Drive letter or device name present\r
     firstTwo = p[0:2]\r
     if firstTwo == '//' or firstTwo == '\\\\':\r
         # is a UNC path:\r
     firstTwo = p[0:2]\r
     if firstTwo == '//' or firstTwo == '\\\\':\r
         # is a UNC path:\r
index 1a4b73c964177fc2d508f34c1419fd7d77608da3..1175518f3e258ad8e194023bbd0106a7b1b9714c 100644 (file)
@@ -1,9 +1,22 @@
-r"""OS routines for NT or Posix depending on what system we're on.\r
+\r
+# Module 'os' -- OS routines for NT, Posix, or UEFI depending on what system we're on.\r
+#\r
+# Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials are licensed and made available under\r
+# the terms and conditions of the BSD License that accompanies this distribution.\r
+# The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+r"""OS routines for NT, Posix, or UEFI depending on what system we're on.\r
 \r
 This exports:\r
 \r
 This exports:\r
-  - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.\r
-  - os.path is one of the modules posixpath, or ntpath\r
-  - os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos'\r
+  - all functions from edk2, posix, nt, os2, or ce, e.g. unlink, stat, etc.\r
+  - os.path is one of the modules uefipath, posixpath, or ntpath\r
+  - os.name is 'edk2', 'posix', 'nt', 'os2', 'ce' or 'riscos'\r
   - os.curdir is a string representing the current directory ('.' or ':')\r
   - os.pardir is a string representing the parent directory ('..' or '::')\r
   - os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')\r
   - os.curdir is a string representing the current directory ('.' or ':')\r
   - os.pardir is a string representing the parent directory ('..' or '::')\r
   - os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')\r
@@ -113,6 +126,20 @@ elif 'riscos' in _names:
     __all__.extend(_get_exports_list(riscos))\r
     del riscos\r
 \r
     __all__.extend(_get_exports_list(riscos))\r
     del riscos\r
 \r
+elif 'edk2' in _names:\r
+    name = 'edk2'\r
+    linesep = '\n'\r
+    from edk2 import *\r
+    try:\r
+        from edk2 import _exit\r
+    except ImportError:\r
+        pass\r
+    import ntpath as path\r
+\r
+    import edk2\r
+    __all__.extend(_get_exports_list(edk2))\r
+    del edk2\r
+\r
 else:\r
     raise ImportError, 'no os specific module found'\r
 \r
 else:\r
     raise ImportError, 'no os specific module found'\r
 \r
index 06fa7dd89360d20945a5c5bc38d68d960fad493e..c5866f9621243902a59b90bff759af52dadbef9d 100644 (file)
@@ -1,5 +1,18 @@
 #!/usr/bin/env python\r
 # -*- coding: latin-1 -*-\r
 #!/usr/bin/env python\r
 # -*- coding: latin-1 -*-\r
+\r
+# Module 'pydoc' -- Generate Python documentation in HTML or text for interactive use.\r
+#\r
+# Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials are licensed and made available under\r
+# the terms and conditions of the BSD License that accompanies this distribution.\r
+# The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
 """Generate Python documentation in HTML or text for interactive use.\r
 \r
 In the Python interpreter, do "from pydoc import help" to provide online\r
 """Generate Python documentation in HTML or text for interactive use.\r
 \r
 In the Python interpreter, do "from pydoc import help" to provide online\r
@@ -1385,12 +1398,16 @@ def getpager():
     if 'PAGER' in os.environ:\r
         if sys.platform == 'win32': # pipes completely broken in Windows\r
             return lambda text: tempfilepager(plain(text), os.environ['PAGER'])\r
     if 'PAGER' in os.environ:\r
         if sys.platform == 'win32': # pipes completely broken in Windows\r
             return lambda text: tempfilepager(plain(text), os.environ['PAGER'])\r
+        elif sys.platform == 'uefi':\r
+            return lambda text: tempfilepager(plain(text), os.environ['PAGER'])\r
         elif os.environ.get('TERM') in ('dumb', 'emacs'):\r
             return lambda text: pipepager(plain(text), os.environ['PAGER'])\r
         else:\r
             return lambda text: pipepager(text, os.environ['PAGER'])\r
     if os.environ.get('TERM') in ('dumb', 'emacs'):\r
         return plainpager\r
         elif os.environ.get('TERM') in ('dumb', 'emacs'):\r
             return lambda text: pipepager(plain(text), os.environ['PAGER'])\r
         else:\r
             return lambda text: pipepager(text, os.environ['PAGER'])\r
     if os.environ.get('TERM') in ('dumb', 'emacs'):\r
         return plainpager\r
+    if sys.platform == 'uefi':\r
+        return plainpager\r
     if sys.platform == 'win32' or sys.platform.startswith('os2'):\r
         return lambda text: tempfilepager(plain(text), 'more <')\r
     if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:\r
     if sys.platform == 'win32' or sys.platform.startswith('os2'):\r
         return lambda text: tempfilepager(plain(text), 'more <')\r
     if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:\r
index ce60d4944a7b39d08382e0bb5a23c08b0992faec..e397b9de7ce10d375d41f35cd440738c0bef3e26 100644 (file)
@@ -4,18 +4,18 @@
 * This module is automatically imported during initialization. *\r
 ****************************************************************\r
 \r
 * This module is automatically imported during initialization. *\r
 ****************************************************************\r
 \r
+This is a UEFI-specific version of site.py.\r
+\r
 In earlier versions of Python (up to 1.5a3), scripts or modules that\r
 needed to use site-specific modules would place ``import site''\r
 somewhere near the top of their code.  Because of the automatic\r
 import, this is no longer necessary (but code that does it still\r
 works).\r
 \r
 In earlier versions of Python (up to 1.5a3), scripts or modules that\r
 needed to use site-specific modules would place ``import site''\r
 somewhere near the top of their code.  Because of the automatic\r
 import, this is no longer necessary (but code that does it still\r
 works).\r
 \r
-This will append site-specific paths to the module search path.  On\r
-Unix (including Mac OSX), it starts with sys.prefix and\r
+This will append site-specific paths to the module search path.  It starts with sys.prefix and\r
 sys.exec_prefix (if different) and appends\r
 lib/python<version>/site-packages as well as lib/site-python.\r
 sys.exec_prefix (if different) and appends\r
 lib/python<version>/site-packages as well as lib/site-python.\r
-On other platforms (such as Windows), it tries each of the\r
-prefixes directly, as well as with lib/site-packages appended.  The\r
+The\r
 resulting directories, if they exist, are appended to sys.path, and\r
 also inspected for path configuration files.\r
 \r
 resulting directories, if they exist, are appended to sys.path, and\r
 also inspected for path configuration files.\r
 \r
@@ -27,7 +27,7 @@ sys.path more than once.  Blank lines and lines beginning with
 '#' are skipped. Lines starting with 'import' are executed.\r
 \r
 For example, suppose sys.prefix and sys.exec_prefix are set to\r
 '#' are skipped. Lines starting with 'import' are executed.\r
 \r
 For example, suppose sys.prefix and sys.exec_prefix are set to\r
-/usr/local and there is a directory /usr/local/lib/python2.5/site-packages\r
+/Efi/StdLib and there is a directory /Efi/StdLib/lib/python27.10/site-packages\r
 with three subdirectories, foo, bar and spam, and two path\r
 configuration files, foo.pth and bar.pth.  Assume foo.pth contains the\r
 following:\r
 with three subdirectories, foo, bar and spam, and two path\r
 configuration files, foo.pth and bar.pth.  Assume foo.pth contains the\r
 following:\r
@@ -44,8 +44,8 @@ and bar.pth contains:
 \r
 Then the following directories are added to sys.path, in this order:\r
 \r
 \r
 Then the following directories are added to sys.path, in this order:\r
 \r
-  /usr/local/lib/python2.5/site-packages/bar\r
-  /usr/local/lib/python2.5/site-packages/foo\r
+  /Efi/StdLib/lib/python27.10/site-packages/bar\r
+  /Efi/StdLib/lib/python27.10/site-packages/foo\r
 \r
 Note that bletch is omitted because it doesn't exist; bar precedes foo\r
 because bar.pth comes alphabetically before foo.pth; and spam is\r
 \r
 Note that bletch is omitted because it doesn't exist; bar precedes foo\r
 because bar.pth comes alphabetically before foo.pth; and spam is\r
@@ -56,6 +56,15 @@ named sitecustomize, which can perform arbitrary additional
 site-specific customizations.  If this import fails with an\r
 ImportError exception, it is silently ignored.\r
 \r
 site-specific customizations.  If this import fails with an\r
 ImportError exception, it is silently ignored.\r
 \r
+Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 """\r
 \r
 import sys\r
 """\r
 \r
 import sys\r
@@ -67,7 +76,7 @@ import traceback
 PREFIXES = [sys.prefix, sys.exec_prefix]\r
 # Enable per user site-packages directory\r
 # set it to False to disable the feature or True to force the feature\r
 PREFIXES = [sys.prefix, sys.exec_prefix]\r
 # Enable per user site-packages directory\r
 # set it to False to disable the feature or True to force the feature\r
-ENABLE_USER_SITE = None\r
+ENABLE_USER_SITE = False\r
 \r
 # for distutils.commands.install\r
 # These values are initialized by the getuserbase() and getusersitepackages()\r
 \r
 # for distutils.commands.install\r
 # These values are initialized by the getuserbase() and getusersitepackages()\r
@@ -246,12 +255,6 @@ def getusersitepackages():
     from sysconfig import get_path\r
     import os\r
 \r
     from sysconfig import get_path\r
     import os\r
 \r
-    if sys.platform == 'darwin':\r
-        from sysconfig import get_config_var\r
-        if get_config_var('PYTHONFRAMEWORK'):\r
-            USER_SITE = get_path('purelib', 'osx_framework_user')\r
-            return USER_SITE\r
-\r
     USER_SITE = get_path('purelib', '%s_user' % os.name)\r
     return USER_SITE\r
 \r
     USER_SITE = get_path('purelib', '%s_user' % os.name)\r
     return USER_SITE\r
 \r
@@ -261,11 +264,11 @@ def addusersitepackages(known_paths):
     Each user has its own python directory with site-packages in the\r
     home directory.\r
     """\r
     Each user has its own python directory with site-packages in the\r
     home directory.\r
     """\r
-    # get the per user site-package path\r
-    # this call will also make sure USER_BASE and USER_SITE are set\r
-    user_site = getusersitepackages()\r
-\r
     if ENABLE_USER_SITE and os.path.isdir(user_site):\r
     if ENABLE_USER_SITE and os.path.isdir(user_site):\r
+        # get the per user site-package path\r
+        # this call will also make sure USER_BASE and USER_SITE are set\r
+        user_site = getusersitepackages()\r
+\r
         addsitedir(user_site, known_paths)\r
     return known_paths\r
 \r
         addsitedir(user_site, known_paths)\r
     return known_paths\r
 \r
@@ -285,25 +288,16 @@ def getsitepackages():
             continue\r
         seen.add(prefix)\r
 \r
             continue\r
         seen.add(prefix)\r
 \r
-        if sys.platform in ('os2emx', 'riscos'):\r
-            sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))\r
-        elif os.sep == '/':\r
-            sitepackages.append(os.path.join(prefix, "lib",\r
-                                        "python" + sys.version[:3],\r
-                                        "site-packages"))\r
-            sitepackages.append(os.path.join(prefix, "lib", "site-python"))\r
+        ix = sys.version.find(' ')\r
+        if ix != -1:\r
+            micro = sys.version[4:ix]\r
         else:\r
         else:\r
-            sitepackages.append(prefix)\r
-            sitepackages.append(os.path.join(prefix, "lib", "site-packages"))\r
-        if sys.platform == "darwin":\r
-            # for framework builds *only* we add the standard Apple\r
-            # locations.\r
-            from sysconfig import get_config_var\r
-            framework = get_config_var("PYTHONFRAMEWORK")\r
-            if framework:\r
-                sitepackages.append(\r
-                        os.path.join("/Library", framework,\r
-                            sys.version[:3], "site-packages"))\r
+            micro = '0'\r
+\r
+        sitepackages.append(os.path.join(prefix, "lib",\r
+                                    "python" + sys.version[0] + sys.version[2] + '.' + micro,\r
+                                    "site-packages"))\r
+        sitepackages.append(os.path.join(prefix, "lib", "site-python"))\r
     return sitepackages\r
 \r
 def addsitepackages(known_paths):\r
     return sitepackages\r
 \r
 def addsitepackages(known_paths):\r
@@ -315,20 +309,20 @@ def addsitepackages(known_paths):
     return known_paths\r
 \r
 def setBEGINLIBPATH():\r
     return known_paths\r
 \r
 def setBEGINLIBPATH():\r
-    """The OS/2 EMX port has optional extension modules that do double duty\r
-    as DLLs (and must use the .DLL file extension) for other extensions.\r
+    """The UEFI port has optional extension modules that do double duty\r
+    as DLLs (even though they have .efi file extensions) for other extensions.\r
     The library search path needs to be amended so these will be found\r
     during module import.  Use BEGINLIBPATH so that these are at the start\r
     of the library search path.\r
 \r
     """\r
     dllpath = os.path.join(sys.prefix, "Lib", "lib-dynload")\r
     The library search path needs to be amended so these will be found\r
     during module import.  Use BEGINLIBPATH so that these are at the start\r
     of the library search path.\r
 \r
     """\r
     dllpath = os.path.join(sys.prefix, "Lib", "lib-dynload")\r
-    libpath = os.environ['BEGINLIBPATH'].split(';')\r
+    libpath = os.environ['BEGINLIBPATH'].split(os.path.pathsep)\r
     if libpath[-1]:\r
         libpath.append(dllpath)\r
     else:\r
         libpath[-1] = dllpath\r
     if libpath[-1]:\r
         libpath.append(dllpath)\r
     else:\r
         libpath[-1] = dllpath\r
-    os.environ['BEGINLIBPATH'] = ';'.join(libpath)\r
+    os.environ['BEGINLIBPATH'] = os.path.pathsep.join(libpath)\r
 \r
 \r
 def setquit():\r
 \r
 \r
 def setquit():\r
@@ -338,12 +332,7 @@ def setquit():
     The repr of each object contains a hint at how it works.\r
 \r
     """\r
     The repr of each object contains a hint at how it works.\r
 \r
     """\r
-    if os.sep == ':':\r
-        eof = 'Cmd-Q'\r
-    elif os.sep == '\\':\r
-        eof = 'Ctrl-Z plus Return'\r
-    else:\r
-        eof = 'Ctrl-D (i.e. EOF)'\r
+    eof = 'Ctrl-D (i.e. EOF)'\r
 \r
     class Quitter(object):\r
         def __init__(self, name):\r
 \r
     class Quitter(object):\r
         def __init__(self, name):\r
@@ -426,12 +415,7 @@ class _Printer(object):
 def setcopyright():\r
     """Set 'copyright' and 'credits' in __builtin__"""\r
     __builtin__.copyright = _Printer("copyright", sys.copyright)\r
 def setcopyright():\r
     """Set 'copyright' and 'credits' in __builtin__"""\r
     __builtin__.copyright = _Printer("copyright", sys.copyright)\r
-    if sys.platform[:4] == 'java':\r
-        __builtin__.credits = _Printer(\r
-            "credits",\r
-            "Jython is maintained by the Jython developers (www.jython.org).")\r
-    else:\r
-        __builtin__.credits = _Printer("credits", """\\r
+    __builtin__.credits = _Printer("credits", """\\r
     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands\r
     for supporting Python development.  See www.python.org for more information.""")\r
     here = os.path.dirname(os.__file__)\r
     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands\r
     for supporting Python development.  See www.python.org for more information.""")\r
     here = os.path.dirname(os.__file__)\r
@@ -457,21 +441,6 @@ class _Helper(object):
 def sethelper():\r
     __builtin__.help = _Helper()\r
 \r
 def sethelper():\r
     __builtin__.help = _Helper()\r
 \r
-def aliasmbcs():\r
-    """On Windows, some default encodings are not provided by Python,\r
-    while they are always available as "mbcs" in each locale. Make\r
-    them usable by aliasing to "mbcs" in such a case."""\r
-    if sys.platform == 'win32':\r
-        import locale, codecs\r
-        enc = locale.getdefaultlocale()[1]\r
-        if enc.startswith('cp'):            # "cp***" ?\r
-            try:\r
-                codecs.lookup(enc)\r
-            except LookupError:\r
-                import encodings\r
-                encodings._cache[enc] = encodings._unknown\r
-                encodings.aliases.aliases[enc] = 'mbcs'\r
-\r
 def setencoding():\r
     """Set the string encoding used by the Unicode implementation.  The\r
     default is 'ascii', but if you're willing to experiment, you can\r
 def setencoding():\r
     """Set the string encoding used by the Unicode implementation.  The\r
     default is 'ascii', but if you're willing to experiment, you can\r
@@ -529,16 +498,11 @@ def main():
         ENABLE_USER_SITE = check_enableusersite()\r
     known_paths = addusersitepackages(known_paths)\r
     known_paths = addsitepackages(known_paths)\r
         ENABLE_USER_SITE = check_enableusersite()\r
     known_paths = addusersitepackages(known_paths)\r
     known_paths = addsitepackages(known_paths)\r
-    if sys.platform == 'os2emx':\r
-        setBEGINLIBPATH()\r
     setquit()\r
     setcopyright()\r
     sethelper()\r
     setquit()\r
     setcopyright()\r
     sethelper()\r
-    aliasmbcs()\r
     setencoding()\r
     execsitecustomize()\r
     setencoding()\r
     execsitecustomize()\r
-    if ENABLE_USER_SITE:\r
-        execusercustomize()\r
     # Remove sys.setdefaultencoding() so that users cannot change the\r
     # encoding after initialization.  The test for presence is needed when\r
     # this module is run as a script, because this code is executed twice.\r
     # Remove sys.setdefaultencoding() so that users cannot change the\r
     # encoding after initialization.  The test for presence is needed when\r
     # this module is run as a script, because this code is executed twice.\r
@@ -549,52 +513,19 @@ main()
 \r
 def _script():\r
     help = """\\r
 \r
 def _script():\r
     help = """\\r
-    %s [--user-base] [--user-site]\r
-\r
-    Without arguments print some useful information\r
-    With arguments print the value of USER_BASE and/or USER_SITE separated\r
-    by '%s'.\r
-\r
-    Exit codes with --user-base or --user-site:\r
-      0 - user site directory is enabled\r
-      1 - user site directory is disabled by user\r
-      2 - uses site directory is disabled by super user\r
-          or for security reasons\r
-     >2 - unknown error\r
+    %s\r
+\r
+    Path elements are normally separated by '%s'.\r
     """\r
     """\r
-    args = sys.argv[1:]\r
-    if not args:\r
-        print "sys.path = ["\r
-        for dir in sys.path:\r
-            print "    %r," % (dir,)\r
-        print "]"\r
-        print "USER_BASE: %r (%s)" % (USER_BASE,\r
-            "exists" if os.path.isdir(USER_BASE) else "doesn't exist")\r
-        print "USER_SITE: %r (%s)" % (USER_SITE,\r
-            "exists" if os.path.isdir(USER_SITE) else "doesn't exist")\r
-        print "ENABLE_USER_SITE: %r" %  ENABLE_USER_SITE\r
-        sys.exit(0)\r
-\r
-    buffer = []\r
-    if '--user-base' in args:\r
-        buffer.append(USER_BASE)\r
-    if '--user-site' in args:\r
-        buffer.append(USER_SITE)\r
-\r
-    if buffer:\r
-        print os.pathsep.join(buffer)\r
-        if ENABLE_USER_SITE:\r
-            sys.exit(0)\r
-        elif ENABLE_USER_SITE is False:\r
-            sys.exit(1)\r
-        elif ENABLE_USER_SITE is None:\r
-            sys.exit(2)\r
-        else:\r
-            sys.exit(3)\r
-    else:\r
-        import textwrap\r
-        print textwrap.dedent(help % (sys.argv[0], os.pathsep))\r
-        sys.exit(10)\r
+\r
+    print "sys.path = ["\r
+    for dir in sys.path:\r
+        print "    %r," % (dir,)\r
+    print "]"\r
+\r
+    import textwrap\r
+    print textwrap.dedent(help % (sys.argv[0], os.pathsep))\r
+    sys.exit(0)\r
 \r
 if __name__ == '__main__':\r
     _script()\r
 \r
 if __name__ == '__main__':\r
     _script()\r
index 399ea742cfac246c7217218c2b949d1b2b102db6..d6fd806b8a5525fc8aa8fbbd14394e0383148c02 100644 (file)
@@ -2,6 +2,16 @@
  * Secret Labs' Regular Expression Engine\r
  *\r
  * regular expression matching engine\r
  * Secret Labs' Regular Expression Engine\r
  *\r
  * regular expression matching engine\r
+\r
+  Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
  *\r
  * partial history:\r
  * 1999-10-24 fl  created (based on existing template matcher code)\r
  *\r
  * partial history:\r
  * 1999-10-24 fl  created (based on existing template matcher code)\r
  * other compatibility work.\r
  */\r
 \r
  * other compatibility work.\r
  */\r
 \r
+/* Get rid of these macros to prevent collisions between EFI and Python in this file. */\r
+#undef  RETURN_ERROR\r
+#undef  RETURN_SUCCESS\r
+\r
 #ifndef SRE_RECURSIVE\r
 \r
 static char copyright[] =\r
 #ifndef SRE_RECURSIVE\r
 \r
 static char copyright[] =\r
@@ -84,7 +98,7 @@ static char copyright[] =
 /* -------------------------------------------------------------------- */\r
 \r
 #if defined(_MSC_VER)\r
 /* -------------------------------------------------------------------- */\r
 \r
 #if defined(_MSC_VER)\r
-#pragma optimize("agtw", on) /* doesn't seem to make much difference... */\r
+#pragma optimize("gt", on) /* doesn't seem to make much difference... */\r
 #pragma warning(disable: 4710) /* who cares if functions are not inlined ;-) */\r
 /* fastest possible local call under MSVC */\r
 #define LOCAL(type) static __inline type __fastcall\r
 #pragma warning(disable: 4710) /* who cares if functions are not inlined ;-) */\r
 /* fastest possible local call under MSVC */\r
 #define LOCAL(type) static __inline type __fastcall\r
@@ -2147,8 +2161,8 @@ pattern_findall(PatternObject* self, PyObject* args, PyObject* kw)
 #endif\r
         }\r
 \r
 #endif\r
         }\r
 \r
-       if (PyErr_Occurred())\r
-           goto error;\r
+  if (PyErr_Occurred())\r
+      goto error;\r
 \r
         if (status <= 0) {\r
             if (status == 0)\r
 \r
         if (status <= 0) {\r
             if (status == 0)\r
@@ -2284,8 +2298,8 @@ pattern_split(PatternObject* self, PyObject* args, PyObject* kw)
 #endif\r
         }\r
 \r
 #endif\r
         }\r
 \r
-       if (PyErr_Occurred())\r
-           goto error;\r
+  if (PyErr_Occurred())\r
+      goto error;\r
 \r
         if (status <= 0) {\r
             if (status == 0)\r
 \r
         if (status <= 0) {\r
             if (status == 0)\r
@@ -2381,10 +2395,10 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string,
         b = bint;\r
         if (ptr) {\r
             if (b == 1) {\r
         b = bint;\r
         if (ptr) {\r
             if (b == 1) {\r
-                   literal = sre_literal_template((unsigned char *)ptr, n);\r
+        literal = sre_literal_template((unsigned char *)ptr, n);\r
             } else {\r
 #if defined(HAVE_UNICODE)\r
             } else {\r
 #if defined(HAVE_UNICODE)\r
-                   literal = sre_uliteral_template((Py_UNICODE *)ptr, n);\r
+        literal = sre_uliteral_template((Py_UNICODE *)ptr, n);\r
 #endif\r
             }\r
         } else {\r
 #endif\r
             }\r
         } else {\r
@@ -2436,8 +2450,8 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string,
 #endif\r
         }\r
 \r
 #endif\r
         }\r
 \r
-       if (PyErr_Occurred())\r
-           goto error;\r
+  if (PyErr_Occurred())\r
+      goto error;\r
 \r
         if (status <= 0) {\r
             if (status == 0)\r
 \r
         if (status <= 0) {\r
             if (status == 0)\r
@@ -2655,20 +2669,20 @@ PyDoc_STRVAR(pattern_doc, "Compiled regular expression objects");
 \r
 static PyMethodDef pattern_methods[] = {\r
     {"match", (PyCFunction) pattern_match, METH_VARARGS|METH_KEYWORDS,\r
 \r
 static PyMethodDef pattern_methods[] = {\r
     {"match", (PyCFunction) pattern_match, METH_VARARGS|METH_KEYWORDS,\r
-       pattern_match_doc},\r
+  pattern_match_doc},\r
     {"search", (PyCFunction) pattern_search, METH_VARARGS|METH_KEYWORDS,\r
     {"search", (PyCFunction) pattern_search, METH_VARARGS|METH_KEYWORDS,\r
-       pattern_search_doc},\r
+  pattern_search_doc},\r
     {"sub", (PyCFunction) pattern_sub, METH_VARARGS|METH_KEYWORDS,\r
     {"sub", (PyCFunction) pattern_sub, METH_VARARGS|METH_KEYWORDS,\r
-       pattern_sub_doc},\r
+  pattern_sub_doc},\r
     {"subn", (PyCFunction) pattern_subn, METH_VARARGS|METH_KEYWORDS,\r
     {"subn", (PyCFunction) pattern_subn, METH_VARARGS|METH_KEYWORDS,\r
-       pattern_subn_doc},\r
+  pattern_subn_doc},\r
     {"split", (PyCFunction) pattern_split, METH_VARARGS|METH_KEYWORDS,\r
     {"split", (PyCFunction) pattern_split, METH_VARARGS|METH_KEYWORDS,\r
-       pattern_split_doc},\r
+  pattern_split_doc},\r
     {"findall", (PyCFunction) pattern_findall, METH_VARARGS|METH_KEYWORDS,\r
     {"findall", (PyCFunction) pattern_findall, METH_VARARGS|METH_KEYWORDS,\r
-       pattern_findall_doc},\r
+  pattern_findall_doc},\r
 #if PY_VERSION_HEX >= 0x02020000\r
     {"finditer", (PyCFunction) pattern_finditer, METH_VARARGS,\r
 #if PY_VERSION_HEX >= 0x02020000\r
     {"finditer", (PyCFunction) pattern_finditer, METH_VARARGS,\r
-       pattern_finditer_doc},\r
+  pattern_finditer_doc},\r
 #endif\r
     {"scanner", (PyCFunction) pattern_scanner, METH_VARARGS},\r
     {"__copy__", (PyCFunction) pattern_copy, METH_NOARGS},\r
 #endif\r
     {"scanner", (PyCFunction) pattern_scanner, METH_VARARGS},\r
     {"__copy__", (PyCFunction) pattern_copy, METH_NOARGS},\r
@@ -2692,28 +2706,28 @@ statichere PyTypeObject Pattern_Type = {
     (destructor)pattern_dealloc, /*tp_dealloc*/\r
     0,                                  /* tp_print */\r
     0,                                  /* tp_getattrn */\r
     (destructor)pattern_dealloc, /*tp_dealloc*/\r
     0,                                  /* tp_print */\r
     0,                                  /* tp_getattrn */\r
-    0,                                 /* tp_setattr */\r
-    0,                                 /* tp_compare */\r
-    0,                                 /* tp_repr */\r
-    0,                                 /* tp_as_number */\r
-    0,                                 /* tp_as_sequence */\r
-    0,                                 /* tp_as_mapping */\r
-    0,                                 /* tp_hash */\r
-    0,                                 /* tp_call */\r
-    0,                                 /* tp_str */\r
-    0,                                 /* tp_getattro */\r
-    0,                                 /* tp_setattro */\r
-    0,                                 /* tp_as_buffer */\r
-    Py_TPFLAGS_DEFAULT,                        /* tp_flags */\r
-    pattern_doc,                       /* tp_doc */\r
-    0,                                 /* tp_traverse */\r
-    0,                                 /* tp_clear */\r
-    0,                                 /* tp_richcompare */\r
-    offsetof(PatternObject, weakreflist),      /* tp_weaklistoffset */\r
-    0,                                 /* tp_iter */\r
-    0,                                 /* tp_iternext */\r
-    pattern_methods,                   /* tp_methods */\r
-    pattern_members,                   /* tp_members */\r
+    0,          /* tp_setattr */\r
+    0,          /* tp_compare */\r
+    0,          /* tp_repr */\r
+    0,          /* tp_as_number */\r
+    0,          /* tp_as_sequence */\r
+    0,          /* tp_as_mapping */\r
+    0,          /* tp_hash */\r
+    0,          /* tp_call */\r
+    0,          /* tp_str */\r
+    0,          /* tp_getattro */\r
+    0,          /* tp_setattro */\r
+    0,          /* tp_as_buffer */\r
+    Py_TPFLAGS_DEFAULT,           /* tp_flags */\r
+    pattern_doc,      /* tp_doc */\r
+    0,          /* tp_traverse */\r
+    0,          /* tp_clear */\r
+    0,          /* tp_richcompare */\r
+    offsetof(PatternObject, weakreflist), /* tp_weaklistoffset */\r
+    0,          /* tp_iter */\r
+    0,          /* tp_iternext */\r
+    pattern_methods,      /* tp_methods */\r
+    pattern_members,      /* tp_members */\r
 };\r
 \r
 static int _validate(PatternObject *self); /* Forward */\r
 };\r
 \r
 static int _validate(PatternObject *self); /* Forward */\r
@@ -3756,9 +3770,9 @@ static PyTypeObject Match_Type = {
     0,                          /* tp_weaklistoffset */\r
     0,                          /* tp_iter */\r
     0,                          /* tp_iternext */\r
     0,                          /* tp_weaklistoffset */\r
     0,                          /* tp_iter */\r
     0,                          /* tp_iternext */\r
-    match_methods,             /* tp_methods */\r
-    match_members,             /* tp_members */\r
-    match_getset,              /* tp_getset */\r
+    match_methods,    /* tp_methods */\r
+    match_members,    /* tp_members */\r
+    match_getset,           /* tp_getset */\r
 };\r
 \r
 static PyObject*\r
 };\r
 \r
 static PyObject*\r
@@ -3909,7 +3923,7 @@ static PyMethodDef scanner_methods[] = {
 \r
 #define SCAN_OFF(x) offsetof(ScannerObject, x)\r
 static PyMemberDef scanner_members[] = {\r
 \r
 #define SCAN_OFF(x) offsetof(ScannerObject, x)\r
 static PyMemberDef scanner_members[] = {\r
-    {"pattern",        T_OBJECT,       SCAN_OFF(pattern),      READONLY},\r
+    {"pattern", T_OBJECT, SCAN_OFF(pattern),  READONLY},\r
     {NULL}  /* Sentinel */\r
 };\r
 \r
     {NULL}  /* Sentinel */\r
 };\r
 \r
@@ -3918,31 +3932,31 @@ statichere PyTypeObject Scanner_Type = {
     0, "_" SRE_MODULE ".SRE_Scanner",\r
     sizeof(ScannerObject), 0,\r
     (destructor)scanner_dealloc, /*tp_dealloc*/\r
     0, "_" SRE_MODULE ".SRE_Scanner",\r
     sizeof(ScannerObject), 0,\r
     (destructor)scanner_dealloc, /*tp_dealloc*/\r
-    0,                         /* tp_print */\r
-    0,                         /* tp_getattr */\r
-    0,                         /* tp_setattr */\r
-    0,                         /* tp_reserved */\r
-    0,                         /* tp_repr */\r
-    0,                         /* tp_as_number */\r
-    0,                         /* tp_as_sequence */\r
-    0,                         /* tp_as_mapping */\r
-    0,                         /* tp_hash */\r
-    0,                         /* tp_call */\r
-    0,                         /* tp_str */\r
-    0,                         /* tp_getattro */\r
-    0,                         /* tp_setattro */\r
-    0,                         /* tp_as_buffer */\r
-    Py_TPFLAGS_DEFAULT,                /* tp_flags */\r
-    0,                         /* tp_doc */\r
-    0,                         /* tp_traverse */\r
-    0,                         /* tp_clear */\r
-    0,                         /* tp_richcompare */\r
-    0,                         /* tp_weaklistoffset */\r
-    0,                         /* tp_iter */\r
-    0,                         /* tp_iternext */\r
-    scanner_methods,           /* tp_methods */\r
-    scanner_members,           /* tp_members */\r
-    0,                         /* tp_getset */\r
+    0,        /* tp_print */\r
+    0,        /* tp_getattr */\r
+    0,        /* tp_setattr */\r
+    0,        /* tp_reserved */\r
+    0,        /* tp_repr */\r
+    0,        /* tp_as_number */\r
+    0,        /* tp_as_sequence */\r
+    0,        /* tp_as_mapping */\r
+    0,        /* tp_hash */\r
+    0,        /* tp_call */\r
+    0,        /* tp_str */\r
+    0,        /* tp_getattro */\r
+    0,        /* tp_setattro */\r
+    0,        /* tp_as_buffer */\r
+    Py_TPFLAGS_DEFAULT,   /* tp_flags */\r
+    0,        /* tp_doc */\r
+    0,        /* tp_traverse */\r
+    0,        /* tp_clear */\r
+    0,        /* tp_richcompare */\r
+    0,        /* tp_weaklistoffset */\r
+    0,        /* tp_iter */\r
+    0,        /* tp_iternext */\r
+    scanner_methods,    /* tp_methods */\r
+    scanner_members,    /* tp_members */\r
+    0,        /* tp_getset */\r
 };\r
 \r
 static PyObject*\r
 };\r
 \r
 static PyObject*\r
@@ -4000,7 +4014,7 @@ PyMODINIT_FUNC init_sre(void)
 \r
     m = Py_InitModule("_" SRE_MODULE, _functions);\r
     if (m == NULL)\r
 \r
     m = Py_InitModule("_" SRE_MODULE, _functions);\r
     if (m == NULL)\r
-       return;\r
+      return;\r
     d = PyModule_GetDict(m);\r
 \r
     x = PyInt_FromLong(SRE_MAGIC);\r
     d = PyModule_GetDict(m);\r
 \r
     x = PyInt_FromLong(SRE_MAGIC);\r
index 6f8b4966580bd37e3344d6dfd4a90e0c77ab8059..edf74fa1374ac0ec57a419a6d432c10d04bb87c4 100644 (file)
@@ -1,4 +1,13 @@
-/*\r
+/** @file\r
+  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
  * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.\r
  * All rights reserved.\r
  *\r
  * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.\r
  * All rights reserved.\r
  *\r
@@ -25,7 +34,7 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
  * SUCH DAMAGE.\r
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
  * SUCH DAMAGE.\r
- */\r
+**/\r
 \r
 #ifndef HAVE_GETADDRINFO\r
 \r
 \r
 #ifndef HAVE_GETADDRINFO\r
 \r
 \r
 #endif /* !HAVE_GETNAMEINFO */\r
 \r
 \r
 #endif /* !HAVE_GETNAMEINFO */\r
 \r
-#ifndef HAVE_ADDRINFO\r
-struct addrinfo {\r
-    int         ai_flags;       /* AI_PASSIVE, AI_CANONNAME */\r
-    int         ai_family;      /* PF_xxx */\r
-    int         ai_socktype;    /* SOCK_xxx */\r
-    int         ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */\r
-    size_t      ai_addrlen;     /* length of ai_addr */\r
-    char        *ai_canonname;  /* canonical name for hostname */\r
-    struct sockaddr *ai_addr;           /* binary address */\r
-    struct addrinfo *ai_next;           /* next structure in linked list */\r
-};\r
-#endif /* !HAVE_ADDRINFO */\r
-\r
-#ifndef HAVE_SOCKADDR_STORAGE\r
-/*\r
- * RFC 2553: protocol-independent placeholder for socket addresses\r
- */\r
-#define _SS_MAXSIZE     128\r
-#ifdef HAVE_LONG_LONG\r
-#define _SS_ALIGNSIZE   (sizeof(PY_LONG_LONG))\r
-#else\r
-#define _SS_ALIGNSIZE   (sizeof(double))\r
-#endif /* HAVE_LONG_LONG */\r
-#define _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(u_char) * 2)\r
-#define _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(u_char) * 2 - \\r
-                _SS_PAD1SIZE - _SS_ALIGNSIZE)\r
-\r
-struct sockaddr_storage {\r
-#ifdef HAVE_SOCKADDR_SA_LEN\r
-    unsigned char ss_len;               /* address length */\r
-    unsigned char ss_family;            /* address family */\r
-#else\r
-    unsigned short ss_family;           /* address family */\r
-#endif /* HAVE_SOCKADDR_SA_LEN */\r
-    char        __ss_pad1[_SS_PAD1SIZE];\r
-#ifdef HAVE_LONG_LONG\r
-    PY_LONG_LONG __ss_align;            /* force desired structure storage alignment */\r
-#else\r
-    double __ss_align;          /* force desired structure storage alignment */\r
-#endif /* HAVE_LONG_LONG */\r
-    char        __ss_pad2[_SS_PAD2SIZE];\r
-};\r
-#endif /* !HAVE_SOCKADDR_STORAGE */\r
+#ifndef _SYS_SOCKET_H_\r
+  #ifndef HAVE_ADDRINFO\r
+    struct addrinfo {\r
+        int         ai_flags;       /* AI_PASSIVE, AI_CANONNAME */\r
+        int         ai_family;      /* PF_xxx */\r
+        int         ai_socktype;    /* SOCK_xxx */\r
+        int         ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */\r
+        size_t      ai_addrlen;     /* length of ai_addr */\r
+        char        *ai_canonname;  /* canonical name for hostname */\r
+        struct sockaddr *ai_addr;           /* binary address */\r
+        struct addrinfo *ai_next;           /* next structure in linked list */\r
+    };\r
+  #endif /* !HAVE_ADDRINFO */\r
+\r
+  #ifndef HAVE_SOCKADDR_STORAGE\r
+    /*\r
+     * RFC 2553: protocol-independent placeholder for socket addresses\r
+     */\r
+    #define _SS_MAXSIZE     128\r
+    #ifdef HAVE_LONG_LONG\r
+      #define _SS_ALIGNSIZE   (sizeof(PY_LONG_LONG))\r
+    #else\r
+      #define _SS_ALIGNSIZE   (sizeof(double))\r
+    #endif /* HAVE_LONG_LONG */\r
+    #define _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(u_char) * 2)\r
+    #define _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(u_char) * 2 - \\r
+                    _SS_PAD1SIZE - _SS_ALIGNSIZE)\r
+\r
+    struct sockaddr_storage {\r
+    #ifdef HAVE_SOCKADDR_SA_LEN\r
+        unsigned char ss_len;               /* address length */\r
+        unsigned char ss_family;            /* address family */\r
+    #else\r
+        unsigned short ss_family;           /* address family */\r
+    #endif /* HAVE_SOCKADDR_SA_LEN */\r
+        char        __ss_pad1[_SS_PAD1SIZE];\r
+    #ifdef HAVE_LONG_LONG\r
+        PY_LONG_LONG __ss_align;            /* force desired structure storage alignment */\r
+    #else\r
+        double __ss_align;          /* force desired structure storage alignment */\r
+    #endif /* HAVE_LONG_LONG */\r
+        char        __ss_pad2[_SS_PAD2SIZE];\r
+    };\r
+  #endif  /* !HAVE_SOCKADDR_STORAGE */\r
+#endif  /* _SYS_SOCKET_H_ */\r
 \r
 #ifdef __cplusplus\r
 extern "C" {\r
 \r
 #ifdef __cplusplus\r
 extern "C" {\r
index 349aaa8d6d8b897e493db5666f7688ef58ced50c..615af2cbae4e025eb5ef46f51077db0e8c075090 100644 (file)
@@ -1,5 +1,14 @@
+/* Errno module\r
 \r
 \r
-/* Errno module */\r
+    Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+    This program and the accompanying materials are licensed and made available under\r
+    the terms and conditions of the BSD License that accompanies this distribution.\r
+    The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+*/\r
 \r
 #include "Python.h"\r
 \r
 \r
 #include "Python.h"\r
 \r
@@ -783,8 +792,52 @@ initerrno(void)
 #ifdef WSAN\r
     inscode(d, ds, de, "WSAN", WSAN, "Error WSAN");\r
 #endif\r
 #ifdef WSAN\r
     inscode(d, ds, de, "WSAN", WSAN, "Error WSAN");\r
 #endif\r
+\r
+/* These symbols are added for EDK II support.  */\r
+#ifdef EMINERRORVAL\r
+  inscode(d, ds, de, "EMINERRORVAL", EMINERRORVAL, "Lowest valid error value");\r
+#endif\r
 #ifdef ENOTSUP\r
 #ifdef ENOTSUP\r
-    inscode(d, ds, de, "ENOTSUP", ENOTSUP, "Operation not supported");\r
+  inscode(d, ds, de, "ENOTSUP", ENOTSUP, "Operation not supported");\r
+#endif\r
+#ifdef EBADRPC\r
+  inscode(d, ds, de, "EBADRPC", EBADRPC, "RPC struct is bad");\r
+#endif\r
+#ifdef ERPCMISMATCH\r
+  inscode(d, ds, de, "ERPCMISMATCH", ERPCMISMATCH, "RPC version wrong");\r
+#endif\r
+#ifdef EPROGUNAVAIL\r
+  inscode(d, ds, de, "EPROGUNAVAIL", EPROGUNAVAIL, "RPC prog. not avail");\r
+#endif\r
+#ifdef EPROGMISMATCH\r
+  inscode(d, ds, de, "EPROGMISMATCH", EPROGMISMATCH, "Program version wrong");\r
+#endif\r
+#ifdef EPROCUNAVAIL\r
+  inscode(d, ds, de, "EPROCUNAVAIL", EPROCUNAVAIL, "Bad procedure for program");\r
+#endif\r
+#ifdef EFTYPE\r
+  inscode(d, ds, de, "EFTYPE", EFTYPE, "Inappropriate file type or format");\r
+#endif\r
+#ifdef EAUTH\r
+  inscode(d, ds, de, "EAUTH", EAUTH, "Authentication error");\r
+#endif\r
+#ifdef ENEEDAUTH\r
+  inscode(d, ds, de, "ENEEDAUTH", ENEEDAUTH, "Need authenticator");\r
+#endif\r
+#ifdef ECANCELED\r
+  inscode(d, ds, de, "ECANCELED", ECANCELED, "Operation canceled");\r
+#endif\r
+#ifdef ENOATTR\r
+  inscode(d, ds, de, "ENOATTR", ENOATTR, "Attribute not found");\r
+#endif\r
+#ifdef EDOOFUS\r
+  inscode(d, ds, de, "EDOOFUS", EDOOFUS, "Programming Error");\r
+#endif\r
+#ifdef EBUFSIZE\r
+  inscode(d, ds, de, "EBUFSIZE", EBUFSIZE, "Buffer too small to hold result");\r
+#endif\r
+#ifdef EMAXERRORVAL\r
+  inscode(d, ds, de, "EMAXERRORVAL", EMAXERRORVAL, "One more than the highest defined error value");\r
 #endif\r
 \r
     Py_DECREF(de);\r
 #endif\r
 \r
     Py_DECREF(de);\r
index 8210f416c518b1ea0de9362ee7ad84cb4cf550a6..8b312b56dbc27a698815f8dfa5971589adbf31b6 100644 (file)
@@ -9,7 +9,9 @@
 \r
 /* Namespace external symbols to allow multiple libexpat version to\r
    co-exist. */\r
 \r
 /* Namespace external symbols to allow multiple libexpat version to\r
    co-exist. */\r
-#include "pyexpatns.h"\r
+#if !defined(UEFI_C_SOURCE)\r
+  #include "pyexpatns.h"\r
+#endif\r
 \r
 #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)\r
 #define XML_USE_MSC_EXTENSIONS 1\r
 \r
 #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)\r
 #define XML_USE_MSC_EXTENSIONS 1\r
index 949286437900eddca4440ec768c2dc93cc596756..5564d17013bbb0e6f25666bdb40f18b30d968de8 100644 (file)
@@ -1,8 +1,19 @@
 /** @file\r
     Return the initial module search path.\r
 \r
 /** @file\r
     Return the initial module search path.\r
 \r
+    This file is based upon the Modules/getpath.c file from the Python distribution\r
+    but has had everything not exactly necessary for operation on EDK II stripped\r
+    out.\r
+\r
     Search in specified locations for the associated Python libraries.\r
 \r
     Search in specified locations for the associated Python libraries.\r
 \r
+    For the EDK II, UEFI, implementation of Python, PREFIX and EXEC_PREFIX\r
+    are set as follows:\r
+      PREFIX      = /Efi/StdLib\r
+      EXEC_PREFIX = PREFIX\r
+\r
+    The volume is assumed to be the current volume when Python was started.\r
+\r
     Py_GetPath returns module_search_path.\r
     Py_GetPrefix returns PREFIX\r
     Py_GetExec_Prefix returns PREFIX\r
     Py_GetPath returns module_search_path.\r
     Py_GetPrefix returns PREFIX\r
     Py_GetExec_Prefix returns PREFIX\r
     These are built dynamically so that the proper volume name can be prefixed\r
     to the paths.\r
 \r
     These are built dynamically so that the proper volume name can be prefixed\r
     to the paths.\r
 \r
-    For the EDK II, UEFI, implementation of Python, PREFIX and EXEC_PREFIX\r
-    are set as follows:\r
-      PREFIX      = /Efi/StdLib\r
-      EXEC_PREFIX = PREFIX\r
-\r
-    The following final paths are assumed:\r
+    The following final paths (for Python 2.7.10) are assumed:\r
       /Efi/Tools/Python.efi                     The Python executable.\r
       /Efi/Tools/Python.efi                     The Python executable.\r
-      /Efi/StdLib/lib/python.VERSION            The platform independent Python modules.\r
-      /Efi/StdLib/lib/python.VERSION/dynalib    Dynamically loadable Python extension modules.\r
+      /Efi/StdLib/lib/python27.10               The version dependent Python modules.\r
+      /Efi/StdLib/lib/python.27                 The version independent Python modules.\r
+      /Efi/StdLib/lib/python27.10/lib-dynload   Dynamically loadable Python extension modules.\r
 \r
 \r
+    Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
     Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
 #include <osdefs.h>\r
 #include  <ctype.h>\r
 \r
 #include <osdefs.h>\r
 #include  <ctype.h>\r
 \r
-#ifdef __cplusplus\r
- extern "C" {\r
-#endif\r
+#define SIFY_I( x ) #x\r
+#define SIFY( y )   SIFY_I( y )\r
 \r
 /* VERSION must be at least two characters long. */\r
 #ifndef VERSION\r
 \r
 /* VERSION must be at least two characters long. */\r
 #ifndef VERSION\r
-  #define VERSION     "27"\r
+  #define VERSION     SIFY(PY_MAJOR_VERSION) SIFY(PY_MINOR_VERSION)\r
 #endif\r
 \r
 #ifndef VPATH\r
 #endif\r
 \r
 #ifndef VPATH\r
 #endif\r
 \r
 #ifndef   LIBPYTHON\r
 #endif\r
 \r
 #ifndef   LIBPYTHON\r
-  #define   LIBPYTHON     "lib/python." VERSION\r
+  #define   LIBPYTHON     "lib/python" VERSION "." SIFY(PY_MICRO_VERSION)\r
 #endif\r
 \r
 #ifndef PYTHONPATH\r
 #endif\r
 \r
 #ifndef PYTHONPATH\r
-  #ifdef HAVE_ENVIRONMENT_OPS\r
-    #define PYTHONPATH  PREFIX LIBPYTHON sDELIM \\r
-                        EXEC_PREFIX LIBPYTHON "/lib-dynload"\r
-  #else\r
-    #define PYTHONPATH  LIBPYTHON\r
-  #endif\r
+  #define PYTHONPATH  LIBPYTHON\r
 #endif\r
 \r
 #ifndef LANDMARK\r
 #endif\r
 \r
 #ifndef LANDMARK\r
-#define LANDMARK    "os.py"\r
+  #define LANDMARK    "os.py"\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+ extern "C" {\r
 #endif\r
 \r
 static char   prefix[MAXPATHLEN+1];\r
 #endif\r
 \r
 static char   prefix[MAXPATHLEN+1];\r
@@ -94,11 +100,7 @@ static char   volume_name[32]             = { 0 };
 static int\r
 is_sep(char ch)\r
 {\r
 static int\r
 is_sep(char ch)\r
 {\r
-#ifdef ALTSEP\r
   return ch == SEP || ch == ALTSEP;\r
   return ch == SEP || ch == ALTSEP;\r
-#else\r
-  return ch == SEP;\r
-#endif\r
 }\r
 \r
 /** Reduce a path by its last element.\r
 }\r
 \r
 /** Reduce a path by its last element.\r
@@ -117,77 +119,6 @@ reduce(char *dir)
     dir[i] = '\0';\r
 }\r
 \r
     dir[i] = '\0';\r
 }\r
 \r
-#ifndef UEFI_C_SOURCE\r
-/** Does filename point to a file and not directory?\r
-\r
-    @param[in]    filename    The fully qualified path to the object to test.\r
-\r
-    @retval       0     Filename was not found, or is a directory.\r
-    @retval       1     Filename refers to a regular file.\r
-**/\r
-static int\r
-isfile(char *filename)\r
-{\r
-    struct stat buf;\r
-    if (stat(filename, &buf) != 0) {\r
-      return 0;\r
-    }\r
-    //if (!S_ISREG(buf.st_mode))\r
-    if (S_ISDIR(buf.st_mode)) {\r
-      return 0;\r
-    }\r
-    return 1;\r
-}\r
-\r
-/** Determine if filename refers to a Python module.\r
-\r
-    A Python module is indicated if the file exists, or if the file with\r
-    'o' or 'c' appended exists.\r
-\r
-    @param[in]    filename    The fully qualified path to the object to test.\r
-\r
-    @retval       0\r
-**/\r
-static int\r
-ismodule(char *filename)\r
-{\r
-  if (isfile(filename)) {\r
-    //if (Py_VerboseFlag) PySys_WriteStderr("%s[%d]: file = \"%s\"\n", __func__, __LINE__, filename);\r
-    return 1;\r
-  }\r
-\r
-    /* Check for the compiled version of prefix. */\r
-    if (strlen(filename) < MAXPATHLEN) {\r
-        strcat(filename, Py_OptimizeFlag ? "o" : "c");\r
-        if (isfile(filename)) {\r
-          return 1;\r
-        }\r
-    }\r
-    return 0;\r
-}\r
-\r
-/** Does filename point to a directory?\r
-\r
-    @param[in]    filename    The fully qualified path to the object to test.\r
-\r
-    @retval       0     Filename was not found, or is not a regular file.\r
-    @retval       1     Filename refers to a directory.\r
-**/\r
-static int\r
-isdir(char *filename)\r
-{\r
-    struct stat buf;\r
-\r
-    if (stat(filename, &buf) != 0)\r
-        return 0;\r
-\r
-    if (!S_ISDIR(buf.st_mode))\r
-        return 0;\r
-\r
-    return 1;\r
-}\r
-#endif  /* UEFI_C_SOURCE */\r
-\r
 /** Determine if a path is absolute, or not.\r
     An absolute path consists of a volume name, "VOL:", followed by a rooted path,\r
     "/path/elements".  If both of these components are present, the path is absolute.\r
 /** Determine if a path is absolute, or not.\r
     An absolute path consists of a volume name, "VOL:", followed by a rooted path,\r
     "/path/elements".  If both of these components are present, the path is absolute.\r
@@ -466,7 +397,7 @@ calculate_path(void)
     char *pythonpath = PYTHONPATH;\r
     char *rtpypath = Py_GETENV("PYTHONPATH");\r
     //char *home = Py_GetPythonHome();\r
     char *pythonpath = PYTHONPATH;\r
     char *rtpypath = Py_GETENV("PYTHONPATH");\r
     //char *home = Py_GetPythonHome();\r
-    char *path = getenv("PATH");\r
+    char *path = getenv("path");\r
     char *prog = Py_GetProgramName();\r
     char argv0_path[MAXPATHLEN+1];\r
     char zip_path[MAXPATHLEN+1];\r
     char *prog = Py_GetProgramName();\r
     char argv0_path[MAXPATHLEN+1];\r
     char zip_path[MAXPATHLEN+1];\r
@@ -531,9 +462,9 @@ calculate_path(void)
       This is the full path to the platform independent libraries.\r
 ########################################################################### */\r
 \r
       This is the full path to the platform independent libraries.\r
 ########################################################################### */\r
 \r
-        strncpy(prefix, volume_name, MAXPATHLEN);\r
-        joinpath(prefix, PREFIX);\r
-        joinpath(prefix, lib_python);\r
+    strncpy(prefix, volume_name, MAXPATHLEN);\r
+    joinpath(prefix, PREFIX);\r
+    joinpath(prefix, lib_python);\r
 \r
 /* ###########################################################################\r
       Build the FULL path to the zipped-up Python library.\r
 \r
 /* ###########################################################################\r
       Build the FULL path to the zipped-up Python library.\r
@@ -551,10 +482,10 @@ calculate_path(void)
       Build the FULL path to dynamically loadable libraries.\r
 ########################################################################### */\r
 \r
       Build the FULL path to dynamically loadable libraries.\r
 ########################################################################### */\r
 \r
-        strncpy(exec_prefix, volume_name, MAXPATHLEN);\r
-        joinpath(exec_prefix, EXEC_PREFIX);\r
-        joinpath(exec_prefix, lib_python);\r
-        joinpath(exec_prefix, "lib-dynload");\r
+    strncpy(exec_prefix, volume_name, MAXPATHLEN);    // "fs0:"\r
+    joinpath(exec_prefix, EXEC_PREFIX);               // "fs0:/Efi/StdLib"\r
+    joinpath(exec_prefix, lib_python);                // "fs0:/Efi/StdLib/lib/python.27"\r
+    joinpath(exec_prefix, "lib-dynload");             // "fs0:/Efi/StdLib/lib/python.27/lib-dynload"\r
 \r
 /* ###########################################################################\r
       Build the module search path.\r
 \r
 /* ###########################################################################\r
       Build the module search path.\r
@@ -573,9 +504,9 @@ calculate_path(void)
       strcpy(prefix, volume_name);\r
     }\r
     bufsz = strlen(prefix);\r
       strcpy(prefix, volume_name);\r
     }\r
     bufsz = strlen(prefix);\r
-    if(prefix[bufsz-1] == ':') {\r
-      prefix[bufsz] = SEP;\r
-      prefix[bufsz+1] = 0;\r
+    if(prefix[bufsz-1] == ':') {    // if prefix consists solely of a volume_name\r
+      prefix[bufsz] = SEP;          //    then append SEP indicating the root directory\r
+      prefix[bufsz+1] = 0;          //    and ensure the new string is terminated\r
     }\r
 \r
     /* Calculate size of return buffer.\r
     }\r
 \r
     /* Calculate size of return buffer.\r
index 1abed3725ae731c8b75f953afa340bb3a75a7f10..c7d6c5f68b2b2ee888eb622ec8d6b5685632533a 100644 (file)
@@ -1,4 +1,8 @@
-/* Python interpreter main program */\r
+/** @file\r
+  Python interpreter main program.\r
+\r
+  Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+**/\r
 \r
 #include "Python.h"\r
 #include "osdefs.h"\r
 \r
 #include "Python.h"\r
 #include "osdefs.h"\r
@@ -40,7 +44,7 @@ static char **orig_argv;
 static int  orig_argc;\r
 \r
 /* command line options */\r
 static int  orig_argc;\r
 \r
 /* command line options */\r
-#define BASE_OPTS "3bBc:dEhiJm:OQ:RsStuUvVW:xX?"\r
+#define BASE_OPTS "#3bBc:dEhiJm:OQ:sStuUvVW:xX?"\r
 \r
 #ifndef RISCOS\r
 #define PROGRAM_OPTS BASE_OPTS\r
 \r
 #ifndef RISCOS\r
 #define PROGRAM_OPTS BASE_OPTS\r
@@ -59,6 +63,7 @@ static char *usage_line =
 /* Long usage message, split into parts < 512 bytes */\r
 static char *usage_1 = "\\r
 Options and arguments (and corresponding environment variables):\n\\r
 /* Long usage message, split into parts < 512 bytes */\r
 static char *usage_1 = "\\r
 Options and arguments (and corresponding environment variables):\n\\r
+-#     : alias stderr to stdout for platforms without STDERR output.\n\\r
 -B     : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x\n\\r
 -c cmd : program passed in as string (terminates option list)\n\\r
 -d     : debug output from parser; also PYTHONDEBUG=x\n\\r
 -B     : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x\n\\r
 -c cmd : program passed in as string (terminates option list)\n\\r
 -d     : debug output from parser; also PYTHONDEBUG=x\n\\r
@@ -71,9 +76,6 @@ static char *usage_2 = "\
 -m mod : run library module as a script (terminates option list)\n\\r
 -O     : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\\r
 -OO    : remove doc-strings in addition to the -O optimizations\n\\r
 -m mod : run library module as a script (terminates option list)\n\\r
 -O     : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\\r
 -OO    : remove doc-strings in addition to the -O optimizations\n\\r
--R     : use a pseudo-random salt to make hash() values of various types be\n\\r
-         unpredictable between separate invocations of the interpreter, as\n\\r
-         a defense against denial-of-service attacks\n\\r
 -Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\\r
 -s     : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\\r
 -S     : don't imply 'import site' on initialization\n\\r
 -Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\\r
 -s     : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\\r
 -S     : don't imply 'import site' on initialization\n\\r
@@ -102,15 +104,9 @@ PYTHONPATH   : '%c'-separated list of directories prefixed to the\n\
 static char *usage_5 = "\\r
 PYTHONHOME   : alternate <prefix> directory (or <prefix>%c<exec_prefix>).\n\\r
                The default module search path uses %s.\n\\r
 static char *usage_5 = "\\r
 PYTHONHOME   : alternate <prefix> directory (or <prefix>%c<exec_prefix>).\n\\r
                The default module search path uses %s.\n\\r
-PYTHONCASEOK : ignore case in 'import' statements (Windows).\n\\r
+PYTHONCASEOK : ignore case in 'import' statements (UEFI default).\n\\r
 PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n\\r
 ";\r
 PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n\\r
 ";\r
-static char *usage_6 = "\\r
-PYTHONHASHSEED: if this variable is set to 'random', the effect is the same\n\\r
-   as specifying the -R option: a random value is used to seed the hashes of\n\\r
-   str, bytes and datetime objects.  It can also be set to an integer\n\\r
-   in the range [0,4294967295] to get hash values with a predictable seed.\n\\r
-";\r
 \r
 \r
 static int\r
 \r
 \r
 static int\r
@@ -127,7 +123,6 @@ usage(int exitcode, char* program)
         fputs(usage_3, f);\r
         fprintf(f, usage_4, DELIM);\r
         fprintf(f, usage_5, DELIM, PYTHONHOMEHELP);\r
         fputs(usage_3, f);\r
         fprintf(f, usage_4, DELIM);\r
         fprintf(f, usage_5, DELIM, PYTHONHOMEHELP);\r
-        fputs(usage_6, f);\r
     }\r
 #if defined(__VMS)\r
     if (exitcode == 0) {\r
     }\r
 #if defined(__VMS)\r
     if (exitcode == 0) {\r
@@ -251,6 +246,7 @@ Py_Main(int argc, char **argv)
     int help = 0;\r
     int version = 0;\r
     int saw_unbuffered_flag = 0;\r
     int help = 0;\r
     int version = 0;\r
     int saw_unbuffered_flag = 0;\r
+    int saw_pound_flag = 0;\r
     PyCompilerFlags cf;\r
 \r
     cf.cf_flags = 0;\r
     PyCompilerFlags cf;\r
 \r
     cf.cf_flags = 0;\r
@@ -266,26 +262,27 @@ Py_Main(int argc, char **argv)
        (including -W and -X options). */\r
     _PyOS_opterr = 0;  /* prevent printing the error in 1st pass */\r
     while ((c = _PyOS_GetOpt(argc, argv, PROGRAM_OPTS)) != EOF) {\r
        (including -W and -X options). */\r
     _PyOS_opterr = 0;  /* prevent printing the error in 1st pass */\r
     while ((c = _PyOS_GetOpt(argc, argv, PROGRAM_OPTS)) != EOF) {\r
-        if (c == 'm' || c == 'c') {\r
-            /* -c / -m is the last option: following arguments are\r
-               not interpreter options. */\r
-            break;\r
-        }\r
-        switch (c) {\r
+      if (c == 'm' || c == 'c') {\r
+        /* -c / -m is the last option: following arguments are\r
+           not interpreter options. */\r
+        break;\r
+      }\r
+      switch (c) {\r
+        case '#':\r
+          if (saw_pound_flag == 0) {\r
+            if(freopen("stdout:", "w", stderr) == NULL) {\r
+              puts("ERROR: Unable to reopen stderr as an alias to stdout!");\r
+            }\r
+            saw_pound_flag = 0xFF;\r
+          }\r
+          break;\r
         case 'E':\r
         case 'E':\r
-            Py_IgnoreEnvironmentFlag++;\r
-            break;\r
-        case 'R':\r
-            Py_HashRandomizationFlag++;\r
-            break;\r
-        }\r
+          Py_IgnoreEnvironmentFlag++;\r
+          break;\r
+        default:\r
+          break;\r
+      }\r
     }\r
     }\r
-    /* The variable is only tested for existence here; _PyRandom_Init will\r
-       check its value further. */\r
-    if (!Py_HashRandomizationFlag &&\r
-        (p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0')\r
-        Py_HashRandomizationFlag = 1;\r
-\r
     _PyRandom_Init();\r
 \r
     PySys_ResetWarnOptions();\r
     _PyRandom_Init();\r
 \r
     PySys_ResetWarnOptions();\r
@@ -426,7 +423,7 @@ Py_Main(int argc, char **argv)
             PySys_AddWarnOption(_PyOS_optarg);\r
             break;\r
 \r
             PySys_AddWarnOption(_PyOS_optarg);\r
             break;\r
 \r
-        case 'R':\r
+        case '#':\r
             /* Already handled above */\r
             break;\r
 \r
             /* Already handled above */\r
             break;\r
 \r
index 29e9d976710aa344f10812874ff1087b9ace9fa2..a62774a462b919d696d93f18d66ddc35e8d5dafe 100644 (file)
@@ -1,9 +1,20 @@
-/* select - Module containing unix select(2) call.\r
-   Under Unix, the file descriptors are small integers.\r
-   Under Win32, select only exists for sockets, and sockets may\r
-   have any value except INVALID_SOCKET.\r
-   Under BeOS, we suffer the same dichotomy as Win32; sockets can be anything\r
-   >= 0.\r
+/*  @file\r
+  select - Module containing unix select(2) call.\r
+  Under Unix, the file descriptors are small integers.\r
+  Under Win32, select only exists for sockets, and sockets may\r
+  have any value except INVALID_SOCKET.\r
+  Under BeOS, we suffer the same dichotomy as Win32; sockets can be anything\r
+  >= 0.\r
+\r
+  Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+  Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 */\r
 \r
 #include "Python.h"\r
 */\r
 \r
 #include "Python.h"\r
@@ -107,7 +118,7 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
         v = PyObject_AsFileDescriptor( o );\r
         if (v == -1) goto finally;\r
 \r
         v = PyObject_AsFileDescriptor( o );\r
         if (v == -1) goto finally;\r
 \r
-#if defined(_MSC_VER)\r
+#if defined(_MSC_VER) && !defined(UEFI_C_SOURCE)\r
         max = 0;                             /* not used for Win32 */\r
 #else  /* !_MSC_VER */\r
         if (!_PyIsSelectable_fd(v)) {\r
         max = 0;                             /* not used for Win32 */\r
 #else  /* !_MSC_VER */\r
         if (!_PyIsSelectable_fd(v)) {\r
@@ -1236,17 +1247,17 @@ static PyTypeObject kqueue_queue_Type;
  * kevent is not standard and its members vary across BSDs.\r
  */\r
 #if !defined(__OpenBSD__)\r
  * kevent is not standard and its members vary across BSDs.\r
  */\r
 #if !defined(__OpenBSD__)\r
-#   define IDENT_TYPE  T_UINTPTRT\r
-#   define IDENT_CAST  Py_intptr_t\r
-#   define DATA_TYPE   T_INTPTRT\r
+#   define IDENT_TYPE T_UINTPTRT\r
+#   define IDENT_CAST Py_intptr_t\r
+#   define DATA_TYPE  T_INTPTRT\r
 #   define DATA_FMT_UNIT INTPTRT_FMT_UNIT\r
 #   define DATA_FMT_UNIT INTPTRT_FMT_UNIT\r
-#   define IDENT_AsType        PyLong_AsUintptr_t\r
+#   define IDENT_AsType PyLong_AsUintptr_t\r
 #else\r
 #else\r
-#   define IDENT_TYPE  T_UINT\r
-#   define IDENT_CAST  int\r
-#   define DATA_TYPE   T_INT\r
+#   define IDENT_TYPE T_UINT\r
+#   define IDENT_CAST int\r
+#   define DATA_TYPE  T_INT\r
 #   define DATA_FMT_UNIT "i"\r
 #   define DATA_FMT_UNIT "i"\r
-#   define IDENT_AsType        PyLong_AsUnsignedLong\r
+#   define IDENT_AsType PyLong_AsUnsignedLong\r
 #endif\r
 \r
 /* Unfortunately, we can't store python objects in udata, because\r
 #endif\r
 \r
 /* Unfortunately, we can't store python objects in udata, because\r
@@ -1298,7 +1309,7 @@ kqueue_event_init(kqueue_event_Object *self, PyObject *args, PyObject *kwds)
 \r
     if (PyLong_Check(pfd)\r
 #if IDENT_TYPE == T_UINT\r
 \r
     if (PyLong_Check(pfd)\r
 #if IDENT_TYPE == T_UINT\r
-       && PyLong_AsUnsignedLong(pfd) <= UINT_MAX\r
+  && PyLong_AsUnsignedLong(pfd) <= UINT_MAX\r
 #endif\r
     ) {\r
         self->e.ident = IDENT_AsType(pfd);\r
 #endif\r
     ) {\r
         self->e.ident = IDENT_AsType(pfd);\r
index bef9749ee8d02e01e9e4c537aed250de9b5de0a6..d527486b10c942cb5e9a23dd4f16e04557ecf227 100644 (file)
@@ -1,4 +1,5 @@
 /* gzguts.h -- zlib internal header definitions for gz* operations\r
 /* gzguts.h -- zlib internal header definitions for gz* operations\r
+ * Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
  * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler\r
  * For conditions of distribution and use, see copyright notice in zlib.h\r
  */\r
  * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler\r
  * For conditions of distribution and use, see copyright notice in zlib.h\r
  */\r
@@ -31,7 +32,7 @@
 #  include <stddef.h>\r
 #endif\r
 \r
 #  include <stddef.h>\r
 #endif\r
 \r
-#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)\r
+#if (defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)) && !defined(UEFI_C_SOURCE)\r
 #  include <io.h>\r
 #endif\r
 \r
 #  include <io.h>\r
 #endif\r
 \r
 #  define close _close\r
 #endif\r
 \r
 #  define close _close\r
 #endif\r
 \r
+// Needed to get the declarations for open, read, write, close\r
+#ifdef  UEFI_C_SOURCE\r
+# include <unistd.h>\r
+#endif\r
+\r
 #ifdef NO_DEFLATE       /* for compatibility with old definition */\r
 #  define NO_GZCOMPRESS\r
 #endif\r
 #ifdef NO_DEFLATE       /* for compatibility with old definition */\r
 #  define NO_GZCOMPRESS\r
 #endif\r
    Microsoft more than a decade later!), _snprintf does not guarantee null\r
    termination of the result -- however this is only used in gzlib.c where\r
    the result is assured to fit in the space provided */\r
    Microsoft more than a decade later!), _snprintf does not guarantee null\r
    termination of the result -- however this is only used in gzlib.c where\r
    the result is assured to fit in the space provided */\r
-#ifdef _MSC_VER\r
+#if defined(_MSC_VER) && !defined(UEFI_C_SOURCE)\r
 #  define snprintf _snprintf\r
 #endif\r
 \r
 #  define snprintf _snprintf\r
 #endif\r
 \r
index f4e4d05917bed04180fb1b2a64017ae44602a895..fb716acfe54f32c1f186f453bd1dc3dc3e30bdfc 100644 (file)
@@ -1,7 +1,10 @@
-/* zutil.h -- internal interface and configuration of the compression library\r
+/** @file\r
+  zutil.h -- internal interface and configuration of the compression library\r
+\r
+   Copyright (C) 2015, Daryl McDaniel.<BR>\r
  * Copyright (C) 1995-2013 Jean-loup Gailly.\r
  * For conditions of distribution and use, see copyright notice in zlib.h\r
  * Copyright (C) 1995-2013 Jean-loup Gailly.\r
  * For conditions of distribution and use, see copyright notice in zlib.h\r
- */\r
+**/\r
 \r
 /* WARNING: this file should *not* be used by applications. It is\r
    part of the implementation of the compression library and is\r
 \r
 /* WARNING: this file should *not* be used by applications. It is\r
    part of the implementation of the compression library and is\r
@@ -21,7 +24,7 @@
 \r
 #include "zlib.h"\r
 \r
 \r
 #include "zlib.h"\r
 \r
-#if defined(STDC) && !defined(Z_SOLO)\r
+#if defined(UEFI_C_SOURCE) || (defined(STDC) && !defined(Z_SOLO))\r
 #  if !(defined(_WIN32_WCE) && defined(_MSC_VER))\r
 #    include <stddef.h>\r
 #  endif\r
 #  if !(defined(_WIN32_WCE) && defined(_MSC_VER))\r
 #    include <stddef.h>\r
 #  endif\r
@@ -149,7 +152,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
 #  define fdopen(fd,mode) NULL /* No fdopen() */\r
 #endif\r
 \r
 #  define fdopen(fd,mode) NULL /* No fdopen() */\r
 #endif\r
 \r
-#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX\r
+#if !defined(UEFI_C_SOURCE) && (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined(__INTERIX)\r
 #  if defined(_WIN32_WCE)\r
 #    define fdopen(fd,mode) NULL /* No fdopen() */\r
 #    ifndef _PTRDIFF_T_DEFINED\r
 #  if defined(_WIN32_WCE)\r
 #    define fdopen(fd,mode) NULL /* No fdopen() */\r
 #    ifndef _PTRDIFF_T_DEFINED\r
index 2c367ac8e1a0ec76e131385b5c39dd1e3b6b1ff8..1745ce97378773cec0267226823b1436a10696f7 100644 (file)
@@ -1,4 +1,15 @@
-/* Long (arbitrary precision) integer object implementation */\r
+/** @file\r
+  Long (arbitrary precision) integer object implementation.\r
+\r
+  Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
 \r
 /* XXX The functional organization of this file is terrible */\r
 \r
 \r
 /* XXX The functional organization of this file is terrible */\r
 \r
@@ -24,6 +35,7 @@
  */\r
 #define FIVEARY_CUTOFF 8\r
 \r
  */\r
 #define FIVEARY_CUTOFF 8\r
 \r
+#undef ABS\r
 #define ABS(x) ((x) < 0 ? -(x) : (x))\r
 \r
 #undef MIN\r
 #define ABS(x) ((x) < 0 ? -(x) : (x))\r
 \r
 #undef MIN\r
index 3ab7f559629e73ec5c451a528a735a9b0005042d..45c980c6a89a859b2430960be98b0b62899075ca 100644 (file)
@@ -1,10 +1,25 @@
-/* stringlib: locale related helpers implementation */\r
+/** @file\r
+    stringlib: locale related helpers implementation.\r
+\r
+    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    This program and the accompanying materials are licensed and made available under\r
+    the terms and conditions of the BSD License that accompanies this distribution.\r
+    The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
 \r
 #ifndef STRINGLIB_LOCALEUTIL_H\r
 #define STRINGLIB_LOCALEUTIL_H\r
 \r
 #include <locale.h>\r
 \r
 \r
 #ifndef STRINGLIB_LOCALEUTIL_H\r
 #define STRINGLIB_LOCALEUTIL_H\r
 \r
 #include <locale.h>\r
 \r
+// Prevent conflicts with EFI\r
+#undef  MAX\r
+#undef  MIN\r
+\r
 #define MAX(x, y) ((x) < (y) ? (y) : (x))\r
 #define MIN(x, y) ((x) < (y) ? (x) : (y))\r
 \r
 #define MAX(x, y) ((x) < (y) ? (y) : (x))\r
 #define MIN(x, y) ((x) < (y) ? (x) : (y))\r
 \r
index 314c5728bc233ae1223101bf4b7f692c1aea9a33..71279724db7c791a833c81fcdce9e80758afd6e5 100644 (file)
@@ -1,9 +1,27 @@
-/* Return the copyright string.  This is updated manually. */\r
+/** @file\r
+  Return the copyright string.  This is updated manually.\r
+\r
+  Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
 \r
 #include "Python.h"\r
 \r
 \r
 #include "Python.h"\r
 \r
-static char cprt[] = \r
+static char cprt[] =\r
 "\\r
 "\\r
+Copyright (c) 2015 Daryl McDaniel.\n\\r
+All Rights Reserved.\n\\r
+\n\\r
+Copyright (c) 2010-2014 Intel Corporation.\n\\r
+All Rights Reserved.\n\\r
+\n\\r
 Copyright (c) 2001-2015 Python Software Foundation.\n\\r
 All Rights Reserved.\n\\r
 \n\\r
 Copyright (c) 2001-2015 Python Software Foundation.\n\\r
 All Rights Reserved.\n\\r
 \n\\r
@@ -19,5 +37,5 @@ All Rights Reserved.";
 const char *\r
 Py_GetCopyright(void)\r
 {\r
 const char *\r
 Py_GetCopyright(void)\r
 {\r
-       return cprt;\r
+  return cprt;\r
 }\r
 }\r
index 290be0db8e0801d2a23396657e7f9782e2b37c2d..3890d131e8fab6fc5ba3d4c29345609199bcb1a9 100644 (file)
@@ -1,8 +1,18 @@
-\r
-/* Write Python objects to files and read them back.\r
-   This is intended for writing and reading compiled Python code only;\r
-   a true persistent storage facility would be much harder, since\r
-   it would have to take circular links and sharing into account. */\r
+/** @file\r
+  Write Python objects to files and read them back.\r
+  This is intended for writing and reading compiled Python code only;\r
+  a true persistent storage facility would be much harder, since\r
+  it would have to take circular links and sharing into account.\r
+\r
+  Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
 \r
 #define PY_SSIZE_T_CLEAN\r
 \r
 \r
 #define PY_SSIZE_T_CLEAN\r
 \r
@@ -11,6 +21,7 @@
 #include "code.h"\r
 #include "marshal.h"\r
 \r
 #include "code.h"\r
 #include "marshal.h"\r
 \r
+#undef ABS\r
 #define ABS(x) ((x) < 0 ? -(x) : (x))\r
 \r
 /* High water mark to determine when the marshalled object is dangerously deep\r
 #define ABS(x) ((x) < 0 ? -(x) : (x))\r
 \r
 /* High water mark to determine when the marshalled object is dangerously deep\r
index 14d81a91a7997c364b1f1714ac7a8d058ee33213..e69c6ddf6cb2b2734c54b85db6de403277699a49 100644 (file)
@@ -1,3 +1,15 @@
+/** @file\r
+\r
+  Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
+\r
 #include "Python.h"\r
 #ifdef MS_WINDOWS\r
 #include <windows.h>\r
 #include "Python.h"\r
 #ifdef MS_WINDOWS\r
 #include <windows.h>\r
@@ -153,8 +165,12 @@ vms_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
 \r
 static struct {\r
     int fd;\r
 \r
 static struct {\r
     int fd;\r
+#ifdef HAVE_STRUCT_STAT_ST_DEV\r
     dev_t st_dev;\r
     dev_t st_dev;\r
+#endif\r
+#ifdef HAVE_STRUCT_STAT_ST_INO\r
     ino_t st_ino;\r
     ino_t st_ino;\r
+#endif\r
 } urandom_cache = { -1 };\r
 \r
 /* Read size bytes from /dev/urandom into buffer.\r
 } urandom_cache = { -1 };\r
 \r
 /* Read size bytes from /dev/urandom into buffer.\r
@@ -167,7 +183,7 @@ dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size)
 \r
     assert (0 < size);\r
 \r
 \r
     assert (0 < size);\r
 \r
-    fd = open("/dev/urandom", O_RDONLY);\r
+    fd = open("/dev/urandom", O_RDONLY, 0);\r
     if (fd < 0)\r
         Py_FatalError("Failed to open /dev/urandom");\r
 \r
     if (fd < 0)\r
         Py_FatalError("Failed to open /dev/urandom");\r
 \r
@@ -204,8 +220,14 @@ dev_urandom_python(char *buffer, Py_ssize_t size)
     if (urandom_cache.fd >= 0) {\r
         /* Does the fd point to the same thing as before? (issue #21207) */\r
         if (fstat(urandom_cache.fd, &st)\r
     if (urandom_cache.fd >= 0) {\r
         /* Does the fd point to the same thing as before? (issue #21207) */\r
         if (fstat(urandom_cache.fd, &st)\r
+#ifdef HAVE_STRUCT_STAT_ST_DEV\r
             || st.st_dev != urandom_cache.st_dev\r
             || st.st_dev != urandom_cache.st_dev\r
-            || st.st_ino != urandom_cache.st_ino) {\r
+#endif\r
+#ifdef  HAVE_STRUCT_STAT_ST_INO\r
+            || st.st_ino != urandom_cache.st_ino\r
+#endif\r
+           )\r
+        {\r
             /* Something changed: forget the cached fd (but don't close it,\r
                since it probably points to something important for some\r
                third-party code). */\r
             /* Something changed: forget the cached fd (but don't close it,\r
                since it probably points to something important for some\r
                third-party code). */\r
@@ -216,7 +238,7 @@ dev_urandom_python(char *buffer, Py_ssize_t size)
         fd = urandom_cache.fd;\r
     else {\r
         Py_BEGIN_ALLOW_THREADS\r
         fd = urandom_cache.fd;\r
     else {\r
         Py_BEGIN_ALLOW_THREADS\r
-        fd = open("/dev/urandom", O_RDONLY);\r
+        fd = open("/dev/urandom", O_RDONLY, 0);\r
         Py_END_ALLOW_THREADS\r
         if (fd < 0)\r
         {\r
         Py_END_ALLOW_THREADS\r
         if (fd < 0)\r
         {\r
@@ -250,8 +272,12 @@ dev_urandom_python(char *buffer, Py_ssize_t size)
             }\r
             else {\r
                 urandom_cache.fd = fd;\r
             }\r
             else {\r
                 urandom_cache.fd = fd;\r
+#ifdef HAVE_STRUCT_STAT_ST_DEV\r
                 urandom_cache.st_dev = st.st_dev;\r
                 urandom_cache.st_dev = st.st_dev;\r
+#endif\r
+#ifdef HAVE_STRUCT_STAT_ST_INO\r
                 urandom_cache.st_ino = st.st_ino;\r
                 urandom_cache.st_ino = st.st_ino;\r
+#endif\r
             }\r
         }\r
     }\r
             }\r
         }\r
     }\r
index d0b6df9bdc90d7c07fc0ae9ade4704606db35581..13a4e9daddccd50f26e25bf661d1c8f3ef6861ea 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
+    Copyright (c) 2015, Daryl McDaniel. All rights reserved.<BR>\r
     Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
@@ -67,6 +68,9 @@
 /* Define to 1 if you have the 'alarm' function. */\r
 #undef HAVE_ALARM\r
 \r
 /* Define to 1 if you have the 'alarm' function. */\r
 #undef HAVE_ALARM\r
 \r
+/* Define to 1 if you have the <alloca.h> header file. */\r
+#undef HAVE_ALLOCA_H\r
+\r
 /* Define this if your time.h defines altzone. */\r
 #undef HAVE_ALTZONE\r
 \r
 /* Define this if your time.h defines altzone. */\r
 #undef HAVE_ALTZONE\r
 \r
 /* define to 1 if your sem_getvalue is broken. */\r
 #define HAVE_BROKEN_SEM_GETVALUE      1\r
 \r
 /* define to 1 if your sem_getvalue is broken. */\r
 #define HAVE_BROKEN_SEM_GETVALUE      1\r
 \r
+/* Define if 'unsetenv' does not return an int. */\r
+#undef HAVE_BROKEN_UNSETENV\r
+\r
 /* Define this if you have the type _Bool. */\r
 #define HAVE_C99_BOOL                 1\r
 \r
 /* Define this if you have the type _Bool. */\r
 #define HAVE_C99_BOOL                 1\r
 \r
 /* Define to 1 if you have the device macros. */\r
 #undef HAVE_DEVICE_MACROS\r
 \r
 /* Define to 1 if you have the device macros. */\r
 #undef HAVE_DEVICE_MACROS\r
 \r
-/* Define if we have /dev/ptc. */\r
+/* Define to 1 if you have the /dev/ptc device file. */\r
 #undef HAVE_DEV_PTC\r
 \r
 #undef HAVE_DEV_PTC\r
 \r
-/* Define if we have /dev/ptmx. */\r
+/* Define to 1 if you have the /dev/ptmx device file. */\r
 #undef HAVE_DEV_PTMX\r
 \r
 /* Define to 1 if you have the <direct.h> header file. */\r
 #undef HAVE_DEV_PTMX\r
 \r
 /* Define to 1 if you have the <direct.h> header file. */\r
 #undef HAVE_GAMMA\r
 \r
 /* Define if we can use gcc inline assembler to get and set x87 control word\r
 #undef HAVE_GAMMA\r
 \r
 /* Define if we can use gcc inline assembler to get and set x87 control word\r
-*/\r
+   */\r
 #if defined(__GNUC__)\r
   #define HAVE_GCC_ASM_FOR_X87  1\r
 #else\r
 #if defined(__GNUC__)\r
   #define HAVE_GCC_ASM_FOR_X87  1\r
 #else\r
-  #undef HAVE_GCC_ASM_FOR_X87\r
+#undef HAVE_GCC_ASM_FOR_X87\r
 #endif\r
 \r
 /* Define if you have the getaddrinfo function. */\r
 #endif\r
 \r
 /* Define if you have the getaddrinfo function. */\r
 /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */\r
 #undef HAVE_GETC_UNLOCKED\r
 \r
 /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */\r
 #undef HAVE_GETC_UNLOCKED\r
 \r
+/* Define to 1 if you have the 'getentropy' function. */\r
+#undef HAVE_GETENTROPY\r
+\r
 /* Define to 1 if you have the 'getgroups' function. */\r
 #undef HAVE_GETGROUPS\r
 \r
 /* Define to 1 if you have the 'getgroups' function. */\r
 #undef HAVE_GETGROUPS\r
 \r
 /* Define to 1 if you have the 'initgroups' function. */\r
 #undef HAVE_INITGROUPS\r
 \r
 /* Define to 1 if you have the 'initgroups' function. */\r
 #undef HAVE_INITGROUPS\r
 \r
+/* Define if your compiler provides int32_t. */\r
+#undef HAVE_INT32_T\r
+\r
+/* Define if your compiler provides int64_t. */\r
+#undef HAVE_INT64_T\r
+\r
 /* Define to 1 if you have the <inttypes.h> header file. */\r
 #define HAVE_INTTYPES_H   1\r
 \r
 /* Define to 1 if you have the <inttypes.h> header file. */\r
 #define HAVE_INTTYPES_H   1\r
 \r
 /* Define to 1 if you have the 'mktime' function. */\r
 #define HAVE_MKTIME     1\r
 \r
 /* Define to 1 if you have the 'mktime' function. */\r
 #define HAVE_MKTIME     1\r
 \r
+/* Define to 1 if you have the 'mmap' function. */\r
+#undef HAVE_MMAP\r
+\r
 /* Define to 1 if you have the 'mremap' function. */\r
 #undef HAVE_MREMAP\r
 \r
 /* Define to 1 if you have the 'mremap' function. */\r
 #undef HAVE_MREMAP\r
 \r
 /* Define if you have GNU PTH threads. */\r
 #undef HAVE_PTH\r
 \r
 /* Define if you have GNU PTH threads. */\r
 #undef HAVE_PTH\r
 \r
+/* Define to 1 if you have the 'pthread_atfork' function. */\r
+#undef HAVE_PTHREAD_ATFORK\r
+\r
 /* Defined for Solaris 2.6 bug in pthread header. */\r
 #undef HAVE_PTHREAD_DESTRUCTOR\r
 \r
 /* Defined for Solaris 2.6 bug in pthread header. */\r
 #undef HAVE_PTHREAD_DESTRUCTOR\r
 \r
 /* Define to 1 if you have the 'putenv' function. */\r
 #undef HAVE_PUTENV\r
 \r
 /* Define to 1 if you have the 'putenv' function. */\r
 #undef HAVE_PUTENV\r
 \r
+/* Define if the libcrypto has RAND_egd */\r
+#undef HAVE_RAND_EGD\r
+\r
 /* Define to 1 if you have the 'readlink' function. */\r
 #undef HAVE_READLINK\r
 \r
 /* Define to 1 if you have the 'readlink' function. */\r
 #undef HAVE_READLINK\r
 \r
 /* Define to 1 if 'st_rdev' is a member of 'struct stat'. */\r
 #undef HAVE_STRUCT_STAT_ST_RDEV\r
 \r
 /* Define to 1 if 'st_rdev' is a member of 'struct stat'. */\r
 #undef HAVE_STRUCT_STAT_ST_RDEV\r
 \r
+/* Define to 1 if 'st_dev' is a member of 'struct stat'. */\r
+#undef HAVE_STRUCT_STAT_ST_DEV\r
+\r
+/* Define to 1 if 'st_ino' is a member of 'struct stat'. */\r
+#undef HAVE_STRUCT_STAT_ST_INO\r
+\r
 /* Define to 1 if 'tm_zone' is a member of 'struct tm'. */\r
 #undef HAVE_STRUCT_TM_TM_ZONE\r
 \r
 /* Define to 1 if 'tm_zone' is a member of 'struct tm'. */\r
 #undef HAVE_STRUCT_TM_TM_ZONE\r
 \r
 /* Define this if you have tcl and TCL_UTF_MAX==6 */\r
 #undef HAVE_UCS4_TCL\r
 \r
 /* Define this if you have tcl and TCL_UTF_MAX==6 */\r
 #undef HAVE_UCS4_TCL\r
 \r
+/* Define if your compiler provides uint32_t. */\r
+#undef HAVE_UINT32_T\r
+\r
+/* Define if your compiler provides uint64_t. */\r
+#undef HAVE_UINT64_T\r
+\r
 /* Define to 1 if the system has the type 'uintptr_t'. */\r
 #define HAVE_UINTPTR_T    1\r
 \r
 /* Define to 1 if the system has the type 'uintptr_t'. */\r
 #define HAVE_UINTPTR_T    1\r
 \r
 #undef MVWDELCH_IS_EXPRESSION\r
 \r
 /* Define to the address where bug reports for this package should be sent. */\r
 #undef MVWDELCH_IS_EXPRESSION\r
 \r
 /* Define to the address where bug reports for this package should be sent. */\r
-#define PACKAGE_BUGREPORT   "edk2-devel@lists.sourceforge.net"\r
+#define PACKAGE_BUGREPORT   "edk2-devel@lists.01.org"\r
 \r
 /* Define to the full name of this package. */\r
 \r
 /* Define to the full name of this package. */\r
-#define PACKAGE_NAME    "EDK II Python Package"\r
+#define PACKAGE_NAME    "EDK II Python 2.7.10 Package"\r
 \r
 /* Define to the full name and version of this package. */\r
 \r
 /* Define to the full name and version of this package. */\r
-#define PACKAGE_STRING  "EDK II Python Package V0.8"\r
+#define PACKAGE_STRING  "EDK II Python 2.7.10 Package V0.1"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 \r
 /* Define to the home page for this package. */\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 \r
 /* Define to the home page for this package. */\r
-#define PACKAGE_URL   "http://edk2.tianocore.org/toolkit/python"\r
+#define PACKAGE_URL   "http://edk2.tianocore.org/"\r
 \r
 /* Define to the version of this package. */\r
 \r
 /* Define to the version of this package. */\r
-#define PACKAGE_VERSION  "V0.8"\r
+#define PACKAGE_VERSION  "V0.1"\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 /* This must be defined on some systems to enable large file support. */\r
 #undef _LARGEFILE_SOURCE\r
 \r
 /* This must be defined on some systems to enable large file support. */\r
 #undef _LARGEFILE_SOURCE\r
 \r
+/* This must be defined on AIX systems to enable large file support. */\r
+#undef _LARGE_FILES\r
+\r
 /* Define to 1 if on MINIX. */\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
 /* Define to 1 if on MINIX. */\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
-#ifndef _NETBSD_SOURCE\r
-  #define _NETBSD_SOURCE  1\r
-#endif\r
+#define _NETBSD_SOURCE  1\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
 //#undef volatile\r
 \r
 #endif /*Py_PYCONFIG_H*/\r
 //#undef volatile\r
 \r
 #endif /*Py_PYCONFIG_H*/\r
+\r