]> git.proxmox.com Git - mirror_edk2.git/commitdiff
AppPkg/.../Python-2.7.10: Rename identifiers beginning with "posix_" to "edk2_".
authorDaryl McDaniel <edk2-lists@mc2research.org>
Wed, 23 Dec 2015 00:04:20 +0000 (00:04 +0000)
committerdarylm503 <darylm503@Edk2>
Wed, 23 Dec 2015 00:04:20 +0000 (00:04 +0000)
Rename identifiers to have an edk2_ prefix instead of posix_ in order to
conform to the convention used in other environment-specific Python modules.
This also makes the names match the module instead of implying that these are
Posix compatible routines.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19460 6f19259b-4bc3-4df7-8a09-765794883524

AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Modules/edk2module.c

index 9460a50bc5e614284bbcc60ec6ad074ea1e5b0e0..bce08ab9d2dd0f061d7cc34a4edc383c855d7321 100644 (file)
@@ -201,19 +201,19 @@ convertenviron(void)
 /* Set a POSIX-specific error from errno, and return NULL */\r
 \r
 static PyObject *\r
-posix_error(void)\r
+edk2_error(void)\r
 {\r
     return PyErr_SetFromErrno(PyExc_OSError);\r
 }\r
 static PyObject *\r
-posix_error_with_filename(char* name)\r
+edk2_error_with_filename(char* name)\r
 {\r
     return PyErr_SetFromErrnoWithFilename(PyExc_OSError, name);\r
 }\r
 \r
 \r
 static PyObject *\r
-posix_error_with_allocated_filename(char* name)\r
+edk2_error_with_allocated_filename(char* name)\r
 {\r
     PyObject *rc = PyErr_SetFromErrnoWithFilename(PyExc_OSError, name);\r
     PyMem_Free(name);\r
@@ -224,7 +224,7 @@ posix_error_with_allocated_filename(char* name)
 \r
 #ifndef UEFI_C_SOURCE\r
   static PyObject *\r
-  posix_fildes(PyObject *fdobj, int (*func)(int))\r
+  edk2_fildes(PyObject *fdobj, int (*func)(int))\r
   {\r
       int fd;\r
       int res;\r
@@ -232,19 +232,19 @@ posix_error_with_allocated_filename(char* name)
       if (fd < 0)\r
           return NULL;\r
       if (!_PyVerify_fd(fd))\r
-          return posix_error();\r
+          return edk2_error();\r
       Py_BEGIN_ALLOW_THREADS\r
       res = (*func)(fd);\r
       Py_END_ALLOW_THREADS\r
       if (res < 0)\r
-          return posix_error();\r
+          return edk2_error();\r
       Py_INCREF(Py_None);\r
       return Py_None;\r
   }\r
 #endif  /* UEFI_C_SOURCE */\r
 \r
 static PyObject *\r
-posix_1str(PyObject *args, char *format, int (*func)(const char*))\r
+edk2_1str(PyObject *args, char *format, int (*func)(const char*))\r
 {\r
     char *path1 = NULL;\r
     int res;\r
@@ -255,14 +255,14 @@ posix_1str(PyObject *args, char *format, int (*func)(const char*))
     res = (*func)(path1);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error_with_allocated_filename(path1);\r
+        return edk2_error_with_allocated_filename(path1);\r
     PyMem_Free(path1);\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
 \r
 static PyObject *\r
-posix_2str(PyObject *args,\r
+edk2_2str(PyObject *args,\r
            char *format,\r
            int (*func)(const char *, const char *))\r
 {\r
@@ -279,7 +279,7 @@ posix_2str(PyObject *args,
     PyMem_Free(path2);\r
     if (res != 0)\r
         /* XXX how to report both path1 and path2??? */\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
@@ -486,7 +486,7 @@ fill_time(PyObject *v, int index, time_t sec, unsigned long nsec)
 }\r
 \r
 /* pack a system stat C structure into the Python stat tuple\r
-   (used by posix_stat() and posix_fstat()) */\r
+   (used by edk2_stat() and edk2_fstat()) */\r
 static PyObject*\r
 _pystat_fromstructstat(STRUCT_STAT *st)\r
 {\r
@@ -556,7 +556,7 @@ _pystat_fromstructstat(STRUCT_STAT *st)
 }\r
 \r
 static PyObject *\r
-posix_do_stat(PyObject *self, PyObject *args,\r
+edk2_do_stat(PyObject *self, PyObject *args,\r
               char *format,\r
               int (*statfunc)(const char *, STRUCT_STAT *),\r
               char *wformat,\r
@@ -578,7 +578,7 @@ posix_do_stat(PyObject *self, PyObject *args,
     Py_END_ALLOW_THREADS\r
 \r
     if (res != 0) {\r
-        result = posix_error_with_filename(pathfree);\r
+        result = edk2_error_with_filename(pathfree);\r
     }\r
     else\r
         result = _pystat_fromstructstat(&st);\r
@@ -589,7 +589,7 @@ posix_do_stat(PyObject *self, PyObject *args,
 \r
 /* POSIX methods */\r
 \r
-PyDoc_STRVAR(posix_access__doc__,\r
+PyDoc_STRVAR(edk2_access__doc__,\r
 "access(path, mode) -> True if granted, False otherwise\n\n\\r
 Use the real uid/gid to test for access to a path.  Note that most\n\\r
 operations will use the effective uid/gid, therefore this routine can\n\\r
@@ -598,7 +598,7 @@ specified access to the path.  The mode argument can be F_OK to test\n\
 existence, or the inclusive-OR of R_OK, W_OK, and X_OK.");\r
 \r
 static PyObject *\r
-posix_access(PyObject *self, PyObject *args)\r
+edk2_access(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     int mode;\r
@@ -627,22 +627,22 @@ posix_access(PyObject *self, PyObject *args)
   #define X_OK 1\r
 #endif\r
 \r
-PyDoc_STRVAR(posix_chdir__doc__,\r
+PyDoc_STRVAR(edk2_chdir__doc__,\r
 "chdir(path)\n\n\\r
 Change the current working directory to the specified path.");\r
 \r
 static PyObject *\r
-posix_chdir(PyObject *self, PyObject *args)\r
+edk2_chdir(PyObject *self, PyObject *args)\r
 {\r
-    return posix_1str(args, "et:chdir", chdir);\r
+    return edk2_1str(args, "et:chdir", chdir);\r
 }\r
 \r
-PyDoc_STRVAR(posix_chmod__doc__,\r
+PyDoc_STRVAR(edk2_chmod__doc__,\r
 "chmod(path, mode)\n\n\\r
 Change the access permissions of a file.");\r
 \r
 static PyObject *\r
-posix_chmod(PyObject *self, PyObject *args)\r
+edk2_chmod(PyObject *self, PyObject *args)\r
 {\r
     char *path = NULL;\r
     int i;\r
@@ -654,20 +654,20 @@ posix_chmod(PyObject *self, PyObject *args)
     res = chmod(path, i);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
     PyMem_Free(path);\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
 \r
 #ifdef HAVE_FCHMOD\r
-PyDoc_STRVAR(posix_fchmod__doc__,\r
+PyDoc_STRVAR(edk2_fchmod__doc__,\r
 "fchmod(fd, mode)\n\n\\r
 Change the access permissions of the file given by file\n\\r
 descriptor fd.");\r
 \r
 static PyObject *\r
-posix_fchmod(PyObject *self, PyObject *args)\r
+edk2_fchmod(PyObject *self, PyObject *args)\r
 {\r
     int fd, mode, res;\r
     if (!PyArg_ParseTuple(args, "ii:fchmod", &fd, &mode))\r
@@ -676,19 +676,19 @@ posix_fchmod(PyObject *self, PyObject *args)
     res = fchmod(fd, mode);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_RETURN_NONE;\r
 }\r
 #endif /* HAVE_FCHMOD */\r
 \r
 #ifdef HAVE_LCHMOD\r
-PyDoc_STRVAR(posix_lchmod__doc__,\r
+PyDoc_STRVAR(edk2_lchmod__doc__,\r
 "lchmod(path, mode)\n\n\\r
 Change the access permissions of a file. If path is a symlink, this\n\\r
 affects the link itself rather than the target.");\r
 \r
 static PyObject *\r
-posix_lchmod(PyObject *self, PyObject *args)\r
+edk2_lchmod(PyObject *self, PyObject *args)\r
 {\r
     char *path = NULL;\r
     int i;\r
@@ -700,7 +700,7 @@ posix_lchmod(PyObject *self, PyObject *args)
     res = lchmod(path, i);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
     PyMem_Free(path);\r
     Py_RETURN_NONE;\r
 }\r
@@ -708,12 +708,12 @@ posix_lchmod(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_CHFLAGS\r
-PyDoc_STRVAR(posix_chflags__doc__,\r
+PyDoc_STRVAR(edk2_chflags__doc__,\r
 "chflags(path, flags)\n\n\\r
 Set file flags.");\r
 \r
 static PyObject *\r
-posix_chflags(PyObject *self, PyObject *args)\r
+edk2_chflags(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     unsigned long flags;\r
@@ -725,7 +725,7 @@ posix_chflags(PyObject *self, PyObject *args)
     res = chflags(path, flags);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
     PyMem_Free(path);\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
@@ -733,13 +733,13 @@ posix_chflags(PyObject *self, PyObject *args)
 #endif /* HAVE_CHFLAGS */\r
 \r
 #ifdef HAVE_LCHFLAGS\r
-PyDoc_STRVAR(posix_lchflags__doc__,\r
+PyDoc_STRVAR(edk2_lchflags__doc__,\r
 "lchflags(path, flags)\n\n\\r
 Set file flags.\n\\r
 This function will not follow symbolic links.");\r
 \r
 static PyObject *\r
-posix_lchflags(PyObject *self, PyObject *args)\r
+edk2_lchflags(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     unsigned long flags;\r
@@ -751,7 +751,7 @@ posix_lchflags(PyObject *self, PyObject *args)
     res = lchflags(path, flags);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
     PyMem_Free(path);\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
@@ -759,26 +759,26 @@ posix_lchflags(PyObject *self, PyObject *args)
 #endif /* HAVE_LCHFLAGS */\r
 \r
 #ifdef HAVE_CHROOT\r
-PyDoc_STRVAR(posix_chroot__doc__,\r
+PyDoc_STRVAR(edk2_chroot__doc__,\r
 "chroot(path)\n\n\\r
 Change root directory to path.");\r
 \r
 static PyObject *\r
-posix_chroot(PyObject *self, PyObject *args)\r
+edk2_chroot(PyObject *self, PyObject *args)\r
 {\r
-    return posix_1str(args, "et:chroot", chroot);\r
+    return edk2_1str(args, "et:chroot", chroot);\r
 }\r
 #endif\r
 \r
 #ifdef HAVE_FSYNC\r
-PyDoc_STRVAR(posix_fsync__doc__,\r
+PyDoc_STRVAR(edk2_fsync__doc__,\r
 "fsync(fildes)\n\n\\r
 force write of file with filedescriptor to disk.");\r
 \r
 static PyObject *\r
-posix_fsync(PyObject *self, PyObject *fdobj)\r
+edk2_fsync(PyObject *self, PyObject *fdobj)\r
 {\r
-    return posix_fildes(fdobj, fsync);\r
+    return edk2_fildes(fdobj, fsync);\r
 }\r
 #endif /* HAVE_FSYNC */\r
 \r
@@ -788,26 +788,26 @@ posix_fsync(PyObject *self, PyObject *fdobj)
 extern int fdatasync(int); /* On HP-UX, in libc but not in unistd.h */\r
 #endif\r
 \r
-PyDoc_STRVAR(posix_fdatasync__doc__,\r
+PyDoc_STRVAR(edk2_fdatasync__doc__,\r
 "fdatasync(fildes)\n\n\\r
 force write of file with filedescriptor to disk.\n\\r
  does not force update of metadata.");\r
 \r
 static PyObject *\r
-posix_fdatasync(PyObject *self, PyObject *fdobj)\r
+edk2_fdatasync(PyObject *self, PyObject *fdobj)\r
 {\r
-    return posix_fildes(fdobj, fdatasync);\r
+    return edk2_fildes(fdobj, fdatasync);\r
 }\r
 #endif /* HAVE_FDATASYNC */\r
 \r
 \r
 #ifdef HAVE_CHOWN\r
-PyDoc_STRVAR(posix_chown__doc__,\r
+PyDoc_STRVAR(edk2_chown__doc__,\r
 "chown(path, uid, gid)\n\n\\r
 Change the owner and group id of path to the numeric uid and gid.");\r
 \r
 static PyObject *\r
-posix_chown(PyObject *self, PyObject *args)\r
+edk2_chown(PyObject *self, PyObject *args)\r
 {\r
     char *path = NULL;\r
     long uid, gid;\r
@@ -820,7 +820,7 @@ posix_chown(PyObject *self, PyObject *args)
     res = chown(path, (uid_t) uid, (gid_t) gid);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
     PyMem_Free(path);\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
@@ -828,13 +828,13 @@ posix_chown(PyObject *self, PyObject *args)
 #endif /* HAVE_CHOWN */\r
 \r
 #ifdef HAVE_FCHOWN\r
-PyDoc_STRVAR(posix_fchown__doc__,\r
+PyDoc_STRVAR(edk2_fchown__doc__,\r
 "fchown(fd, uid, gid)\n\n\\r
 Change the owner and group id of the file given by file descriptor\n\\r
 fd to the numeric uid and gid.");\r
 \r
 static PyObject *\r
-posix_fchown(PyObject *self, PyObject *args)\r
+edk2_fchown(PyObject *self, PyObject *args)\r
 {\r
     int fd;\r
     long uid, gid;\r
@@ -845,19 +845,19 @@ posix_fchown(PyObject *self, PyObject *args)
     res = fchown(fd, (uid_t) uid, (gid_t) gid);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_RETURN_NONE;\r
 }\r
 #endif /* HAVE_FCHOWN */\r
 \r
 #ifdef HAVE_LCHOWN\r
-PyDoc_STRVAR(posix_lchown__doc__,\r
+PyDoc_STRVAR(edk2_lchown__doc__,\r
 "lchown(path, uid, gid)\n\n\\r
 Change the owner and group id of path to the numeric uid and gid.\n\\r
 This function will not follow symbolic links.");\r
 \r
 static PyObject *\r
-posix_lchown(PyObject *self, PyObject *args)\r
+edk2_lchown(PyObject *self, PyObject *args)\r
 {\r
     char *path = NULL;\r
     long uid, gid;\r
@@ -870,7 +870,7 @@ posix_lchown(PyObject *self, PyObject *args)
     res = lchown(path, (uid_t) uid, (gid_t) gid);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
     PyMem_Free(path);\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
@@ -879,12 +879,12 @@ posix_lchown(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_GETCWD\r
-PyDoc_STRVAR(posix_getcwd__doc__,\r
+PyDoc_STRVAR(edk2_getcwd__doc__,\r
 "getcwd() -> path\n\n\\r
 Return a string representing the current working directory.");\r
 \r
 static PyObject *\r
-posix_getcwd(PyObject *self, PyObject *noargs)\r
+edk2_getcwd(PyObject *self, PyObject *noargs)\r
 {\r
     int bufsize_incr = 1024;\r
     int bufsize = 0;\r
@@ -907,7 +907,7 @@ posix_getcwd(PyObject *self, PyObject *noargs)
     Py_END_ALLOW_THREADS\r
 \r
     if (res == NULL)\r
-        return posix_error();\r
+        return edk2_error();\r
 \r
     dynamic_return = PyString_FromString(tmpbuf);\r
     free(tmpbuf);\r
@@ -916,12 +916,12 @@ posix_getcwd(PyObject *self, PyObject *noargs)
 }\r
 \r
 #ifdef Py_USING_UNICODE\r
-PyDoc_STRVAR(posix_getcwdu__doc__,\r
+PyDoc_STRVAR(edk2_getcwdu__doc__,\r
 "getcwdu() -> path\n\n\\r
 Return a unicode string representing the current working directory.");\r
 \r
 static PyObject *\r
-posix_getcwdu(PyObject *self, PyObject *noargs)\r
+edk2_getcwdu(PyObject *self, PyObject *noargs)\r
 {\r
     char buf[1026];\r
     char *res;\r
@@ -930,14 +930,14 @@ posix_getcwdu(PyObject *self, PyObject *noargs)
     res = getcwd(buf, sizeof buf);\r
     Py_END_ALLOW_THREADS\r
     if (res == NULL)\r
-        return posix_error();\r
+        return edk2_error();\r
     return PyUnicode_Decode(buf, strlen(buf), Py_FileSystemDefaultEncoding,"strict");\r
 }\r
 #endif /* Py_USING_UNICODE */\r
 #endif /* HAVE_GETCWD */\r
 \r
 \r
-PyDoc_STRVAR(posix_listdir__doc__,\r
+PyDoc_STRVAR(edk2_listdir__doc__,\r
 "listdir(path) -> list_of_strings\n\n\\r
 Return a list containing the names of the entries in the directory.\n\\r
 \n\\r
@@ -947,7 +947,7 @@ The list is in arbitrary order.  It does not include the special\n\
 entries '.' and '..' even if they are present in the directory.");\r
 \r
 static PyObject *\r
-posix_listdir(PyObject *self, PyObject *args)\r
+edk2_listdir(PyObject *self, PyObject *args)\r
 {\r
     /* XXX Should redo this putting the (now four) versions of opendir\r
        in separate files instead of having them all here... */\r
@@ -970,7 +970,7 @@ posix_listdir(PyObject *self, PyObject *args)
     dirp = opendir(name);\r
     Py_END_ALLOW_THREADS\r
     if (dirp == NULL) {\r
-        return posix_error_with_allocated_filename(name);\r
+        return edk2_error_with_allocated_filename(name);\r
     }\r
     if ((d = PyList_New(0)) == NULL) {\r
         Py_BEGIN_ALLOW_THREADS\r
@@ -1000,7 +1000,7 @@ posix_listdir(PyObject *self, PyObject *args)
                 closedir(dirp);\r
                 Py_END_ALLOW_THREADS\r
                 Py_DECREF(d);\r
-                return posix_error_with_allocated_filename(name);\r
+                return edk2_error_with_allocated_filename(name);\r
             }\r
         }\r
         if (ep->FileName[0] == L'.' &&\r
@@ -1058,14 +1058,14 @@ posix_listdir(PyObject *self, PyObject *args)
 \r
     return d;\r
 \r
-}  /* end of posix_listdir */\r
+}  /* end of edk2_listdir */\r
 \r
-PyDoc_STRVAR(posix_mkdir__doc__,\r
+PyDoc_STRVAR(edk2_mkdir__doc__,\r
 "mkdir(path [, mode=0777])\n\n\\r
 Create a directory.");\r
 \r
 static PyObject *\r
-posix_mkdir(PyObject *self, PyObject *args)\r
+edk2_mkdir(PyObject *self, PyObject *args)\r
 {\r
     int res;\r
     char *path = NULL;\r
@@ -1078,7 +1078,7 @@ posix_mkdir(PyObject *self, PyObject *args)
     res = mkdir(path, mode);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
     PyMem_Free(path);\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
@@ -1092,12 +1092,12 @@ posix_mkdir(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_NICE\r
-PyDoc_STRVAR(posix_nice__doc__,\r
+PyDoc_STRVAR(edk2_nice__doc__,\r
 "nice(inc) -> new_priority\n\n\\r
 Decrease the priority of process by inc and return the new priority.");\r
 \r
 static PyObject *\r
-posix_nice(PyObject *self, PyObject *args)\r
+edk2_nice(PyObject *self, PyObject *args)\r
 {\r
     int increment, value;\r
 \r
@@ -1111,7 +1111,7 @@ posix_nice(PyObject *self, PyObject *args)
 \r
        If we are of the nice family that returns the new priority, we\r
        need to clear errno before the call, and check if errno is filled\r
-       before calling posix_error() on a returnvalue of -1, because the\r
+       before calling edk2_error() on a returnvalue of -1, because the\r
        -1 may be the actual new priority! */\r
 \r
     errno = 0;\r
@@ -1122,51 +1122,51 @@ posix_nice(PyObject *self, PyObject *args)
 #endif\r
     if (value == -1 && errno != 0)\r
         /* either nice() or getpriority() returned an error */\r
-        return posix_error();\r
+        return edk2_error();\r
     return PyInt_FromLong((long) value);\r
 }\r
 #endif /* HAVE_NICE */\r
 \r
-PyDoc_STRVAR(posix_rename__doc__,\r
+PyDoc_STRVAR(edk2_rename__doc__,\r
 "rename(old, new)\n\n\\r
 Rename a file or directory.");\r
 \r
 static PyObject *\r
-posix_rename(PyObject *self, PyObject *args)\r
+edk2_rename(PyObject *self, PyObject *args)\r
 {\r
-    return posix_2str(args, "etet:rename", rename);\r
+    return edk2_2str(args, "etet:rename", rename);\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_rmdir__doc__,\r
+PyDoc_STRVAR(edk2_rmdir__doc__,\r
 "rmdir(path)\n\n\\r
 Remove a directory.");\r
 \r
 static PyObject *\r
-posix_rmdir(PyObject *self, PyObject *args)\r
+edk2_rmdir(PyObject *self, PyObject *args)\r
 {\r
-    return posix_1str(args, "et:rmdir", rmdir);\r
+    return edk2_1str(args, "et:rmdir", rmdir);\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_stat__doc__,\r
+PyDoc_STRVAR(edk2_stat__doc__,\r
 "stat(path) -> stat result\n\n\\r
 Perform a stat system call on the given path.");\r
 \r
 static PyObject *\r
-posix_stat(PyObject *self, PyObject *args)\r
+edk2_stat(PyObject *self, PyObject *args)\r
 {\r
-    return posix_do_stat(self, args, "et:stat", STAT, NULL, NULL);\r
+    return edk2_do_stat(self, args, "et:stat", STAT, NULL, NULL);\r
 }\r
 \r
 \r
 #ifdef HAVE_SYSTEM\r
-PyDoc_STRVAR(posix_system__doc__,\r
+PyDoc_STRVAR(edk2_system__doc__,\r
 "system(command) -> exit_status\n\n\\r
 Execute the command (a string) in a subshell.");\r
 \r
 static PyObject *\r
-posix_system(PyObject *self, PyObject *args)\r
+edk2_system(PyObject *self, PyObject *args)\r
 {\r
     char *command;\r
     long sts;\r
@@ -1180,35 +1180,35 @@ posix_system(PyObject *self, PyObject *args)
 #endif\r
 \r
 \r
-PyDoc_STRVAR(posix_umask__doc__,\r
+PyDoc_STRVAR(edk2_umask__doc__,\r
 "umask(new_mask) -> old_mask\n\n\\r
 Set the current numeric umask and return the previous umask.");\r
 \r
 static PyObject *\r
-posix_umask(PyObject *self, PyObject *args)\r
+edk2_umask(PyObject *self, PyObject *args)\r
 {\r
     int i;\r
     if (!PyArg_ParseTuple(args, "i:umask", &i))\r
         return NULL;\r
     i = (int)umask(i);\r
     if (i < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     return PyInt_FromLong((long)i);\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_unlink__doc__,\r
+PyDoc_STRVAR(edk2_unlink__doc__,\r
 "unlink(path)\n\n\\r
 Remove a file (same as remove(path)).");\r
 \r
-PyDoc_STRVAR(posix_remove__doc__,\r
+PyDoc_STRVAR(edk2_remove__doc__,\r
 "remove(path)\n\n\\r
 Remove a file (same as unlink(path)).");\r
 \r
 static PyObject *\r
-posix_unlink(PyObject *self, PyObject *args)\r
+edk2_unlink(PyObject *self, PyObject *args)\r
 {\r
-    return posix_1str(args, "et:remove", unlink);\r
+    return edk2_1str(args, "et:remove", unlink);\r
 }\r
 \r
 \r
@@ -1249,14 +1249,14 @@ extract_time(PyObject *t, time_t* sec, long* usec)
     return 0;\r
 }\r
 \r
-PyDoc_STRVAR(posix_utime__doc__,\r
+PyDoc_STRVAR(edk2_utime__doc__,\r
 "utime(path, (atime, mtime))\n\\r
 utime(path, None)\n\n\\r
 Set the access and modified time of the file to the given values.  If the\n\\r
 second form is used, set the access and modified times to the current time.");\r
 \r
 static PyObject *\r
-posix_utime(PyObject *self, PyObject *args)\r
+edk2_utime(PyObject *self, PyObject *args)\r
 {\r
     char *path = NULL;\r
     time_t atime, mtime;\r
@@ -1323,7 +1323,7 @@ posix_utime(PyObject *self, PyObject *args)
 #endif /* HAVE_UTIMES */\r
     }\r
     if (res < 0) {\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
     }\r
     PyMem_Free(path);\r
     Py_INCREF(Py_None);\r
@@ -1336,12 +1336,12 @@ posix_utime(PyObject *self, PyObject *args)
 \r
 /* Process operations */\r
 \r
-PyDoc_STRVAR(posix__exit__doc__,\r
+PyDoc_STRVAR(edk2__exit__doc__,\r
 "_exit(status)\n\n\\r
 Exit to the system with specified status, without normal exit processing.");\r
 \r
 static PyObject *\r
-posix__exit(PyObject *self, PyObject *args)\r
+edk2__exit(PyObject *self, PyObject *args)\r
 {\r
     int sts;\r
     if (!PyArg_ParseTuple(args, "i:_exit", &sts))\r
@@ -1363,7 +1363,7 @@ free_string_array(char **array, Py_ssize_t count)
 \r
 \r
 #ifdef HAVE_EXECV\r
-PyDoc_STRVAR(posix_execv__doc__,\r
+PyDoc_STRVAR(edk2_execv__doc__,\r
 "execv(path, args)\n\n\\r
 Execute an executable path with arguments, replacing current process.\n\\r
 \n\\r
@@ -1371,7 +1371,7 @@ Execute an executable path with arguments, replacing current process.\n\
     args: tuple or list of strings");\r
 \r
 static PyObject *\r
-posix_execv(PyObject *self, PyObject *args)\r
+edk2_execv(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     PyObject *argv;\r
@@ -1430,11 +1430,11 @@ posix_execv(PyObject *self, PyObject *args)
 \r
     free_string_array(argvlist, argc);\r
     PyMem_Free(path);\r
-    return posix_error();\r
+    return edk2_error();\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_execve__doc__,\r
+PyDoc_STRVAR(edk2_execve__doc__,\r
 "execve(path, args, env)\n\n\\r
 Execute a path with arguments and environment, replacing current process.\n\\r
 \n\\r
@@ -1443,7 +1443,7 @@ Execute a path with arguments and environment, replacing current process.\n\
     env: dictionary of strings mapping to strings");\r
 \r
 static PyObject *\r
-posix_execve(PyObject *self, PyObject *args)\r
+edk2_execve(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     PyObject *argv, *env;\r
@@ -1561,7 +1561,7 @@ posix_execve(PyObject *self, PyObject *args)
 \r
     /* If we get here it's definitely an error */\r
 \r
-    (void) posix_error();\r
+    (void) edk2_error();\r
 \r
   fail_2:\r
     while (--envc >= 0)\r
@@ -1579,7 +1579,7 @@ posix_execve(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_SPAWNV\r
-PyDoc_STRVAR(posix_spawnv__doc__,\r
+PyDoc_STRVAR(edk2_spawnv__doc__,\r
 "spawnv(mode, path, args)\n\n\\r
 Execute the program 'path' in a new process.\n\\r
 \n\\r
@@ -1588,7 +1588,7 @@ Execute the program 'path' in a new process.\n\
     args: tuple or list of strings");\r
 \r
 static PyObject *\r
-posix_spawnv(PyObject *self, PyObject *args)\r
+edk2_spawnv(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     PyObject *argv;\r
@@ -1656,7 +1656,7 @@ posix_spawnv(PyObject *self, PyObject *args)
     PyMem_Free(path);\r
 \r
     if (spawnval == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
     else\r
 #if SIZEOF_LONG == SIZEOF_VOID_P\r
         return Py_BuildValue("l", (long) spawnval);\r
@@ -1666,7 +1666,7 @@ posix_spawnv(PyObject *self, PyObject *args)
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_spawnve__doc__,\r
+PyDoc_STRVAR(edk2_spawnve__doc__,\r
 "spawnve(mode, path, args, env)\n\n\\r
 Execute the program 'path' in a new process.\n\\r
 \n\\r
@@ -1676,7 +1676,7 @@ Execute the program 'path' in a new process.\n\
     env: dictionary of strings mapping to strings");\r
 \r
 static PyObject *\r
-posix_spawnve(PyObject *self, PyObject *args)\r
+edk2_spawnve(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     PyObject *argv, *env;\r
@@ -1798,7 +1798,7 @@ posix_spawnve(PyObject *self, PyObject *args)
 #endif\r
 \r
     if (spawnval == -1)\r
-        (void) posix_error();\r
+        (void) edk2_error();\r
     else\r
 #if SIZEOF_LONG == SIZEOF_VOID_P\r
         res = Py_BuildValue("l", (long) spawnval);\r
@@ -1821,7 +1821,7 @@ posix_spawnve(PyObject *self, PyObject *args)
 \r
 /* OS/2 supports spawnvp & spawnvpe natively */\r
 #if defined(PYOS_OS2)\r
-PyDoc_STRVAR(posix_spawnvp__doc__,\r
+PyDoc_STRVAR(edk2_spawnvp__doc__,\r
 "spawnvp(mode, file, args)\n\n\\r
 Execute the program 'file' in a new process, using the environment\n\\r
 search path to find the file.\n\\r
@@ -1831,7 +1831,7 @@ search path to find the file.\n\
     args: tuple or list of strings");\r
 \r
 static PyObject *\r
-posix_spawnvp(PyObject *self, PyObject *args)\r
+edk2_spawnvp(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     PyObject *argv;\r
@@ -1893,13 +1893,13 @@ posix_spawnvp(PyObject *self, PyObject *args)
     PyMem_Free(path);\r
 \r
     if (spawnval == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
     else\r
         return Py_BuildValue("l", (long) spawnval);\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_spawnvpe__doc__,\r
+PyDoc_STRVAR(edk2_spawnvpe__doc__,\r
 "spawnvpe(mode, file, args, env)\n\n\\r
 Execute the program 'file' in a new process, using the environment\n\\r
 search path to find the file.\n\\r
@@ -1910,7 +1910,7 @@ search path to find the file.\n\
     env: dictionary of strings mapping to strings");\r
 \r
 static PyObject *\r
-posix_spawnvpe(PyObject *self, PyObject *args)\r
+edk2_spawnvpe(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     PyObject *argv, *env;\r
@@ -2026,7 +2026,7 @@ posix_spawnvpe(PyObject *self, PyObject *args)
     Py_END_ALLOW_THREADS\r
 \r
     if (spawnval == -1)\r
-        (void) posix_error();\r
+        (void) edk2_error();\r
     else\r
         res = Py_BuildValue("l", (long) spawnval);\r
 \r
@@ -2047,14 +2047,14 @@ posix_spawnvpe(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_FORK1\r
-PyDoc_STRVAR(posix_fork1__doc__,\r
+PyDoc_STRVAR(edk2_fork1__doc__,\r
 "fork1() -> pid\n\n\\r
 Fork a child process with a single multiplexed (i.e., not bound) thread.\n\\r
 \n\\r
 Return 0 to child process and PID of child to parent process.");\r
 \r
 static PyObject *\r
-posix_fork1(PyObject *self, PyObject *noargs)\r
+edk2_fork1(PyObject *self, PyObject *noargs)\r
 {\r
     pid_t pid;\r
     int result = 0;\r
@@ -2068,7 +2068,7 @@ posix_fork1(PyObject *self, PyObject *noargs)
         result = _PyImport_ReleaseLock();\r
     }\r
     if (pid == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
     if (result < 0) {\r
         /* Don't clobber the OSError if the fork failed. */\r
         PyErr_SetString(PyExc_RuntimeError,\r
@@ -2081,13 +2081,13 @@ posix_fork1(PyObject *self, PyObject *noargs)
 \r
 \r
 #ifdef HAVE_FORK\r
-PyDoc_STRVAR(posix_fork__doc__,\r
+PyDoc_STRVAR(edk2_fork__doc__,\r
 "fork() -> pid\n\n\\r
 Fork a child process.\n\\r
 Return 0 to child process and PID of child to parent process.");\r
 \r
 static PyObject *\r
-posix_fork(PyObject *self, PyObject *noargs)\r
+edk2_fork(PyObject *self, PyObject *noargs)\r
 {\r
     pid_t pid;\r
     int result = 0;\r
@@ -2101,7 +2101,7 @@ posix_fork(PyObject *self, PyObject *noargs)
         result = _PyImport_ReleaseLock();\r
     }\r
     if (pid == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
     if (result < 0) {\r
         /* Don't clobber the OSError if the fork failed. */\r
         PyErr_SetString(PyExc_RuntimeError,\r
@@ -2139,12 +2139,12 @@ posix_fork(PyObject *self, PyObject *noargs)
 #endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX */\r
 \r
 #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)\r
-PyDoc_STRVAR(posix_openpty__doc__,\r
+PyDoc_STRVAR(edk2_openpty__doc__,\r
 "openpty() -> (master_fd, slave_fd)\n\n\\r
 Open a pseudo-terminal, returning open fd's for both master and slave end.\n");\r
 \r
 static PyObject *\r
-posix_openpty(PyObject *self, PyObject *noargs)\r
+edk2_openpty(PyObject *self, PyObject *noargs)\r
 {\r
     int master_fd, slave_fd;\r
 #ifndef HAVE_OPENPTY\r
@@ -2159,37 +2159,37 @@ posix_openpty(PyObject *self, PyObject *noargs)
 \r
 #ifdef HAVE_OPENPTY\r
     if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0)\r
-        return posix_error();\r
+        return edk2_error();\r
 #elif defined(HAVE__GETPTY)\r
     slave_name = _getpty(&master_fd, O_RDWR, 0666, 0);\r
     if (slave_name == NULL)\r
-        return posix_error();\r
+        return edk2_error();\r
 \r
     slave_fd = open(slave_name, O_RDWR);\r
     if (slave_fd < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
 #else\r
     master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */\r
     if (master_fd < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     sig_saved = PyOS_setsig(SIGCHLD, SIG_DFL);\r
     /* change permission of slave */\r
     if (grantpt(master_fd) < 0) {\r
         PyOS_setsig(SIGCHLD, sig_saved);\r
-        return posix_error();\r
+        return edk2_error();\r
     }\r
     /* unlock slave */\r
     if (unlockpt(master_fd) < 0) {\r
         PyOS_setsig(SIGCHLD, sig_saved);\r
-        return posix_error();\r
+        return edk2_error();\r
     }\r
     PyOS_setsig(SIGCHLD, sig_saved);\r
     slave_name = ptsname(master_fd); /* get name of slave */\r
     if (slave_name == NULL)\r
-        return posix_error();\r
+        return edk2_error();\r
     slave_fd = open(slave_name, O_RDWR | O_NOCTTY); /* open slave */\r
     if (slave_fd < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
 #if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC)\r
     ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */\r
     ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */\r
@@ -2205,14 +2205,14 @@ posix_openpty(PyObject *self, PyObject *noargs)
 #endif /* defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX) */\r
 \r
 #ifdef HAVE_FORKPTY\r
-PyDoc_STRVAR(posix_forkpty__doc__,\r
+PyDoc_STRVAR(edk2_forkpty__doc__,\r
 "forkpty() -> (pid, master_fd)\n\n\\r
 Fork a new process with a new pseudo-terminal as controlling tty.\n\n\\r
 Like fork(), return 0 as pid to child process, and PID of child to parent.\n\\r
 To both, return fd of newly opened pseudo-terminal.\n");\r
 \r
 static PyObject *\r
-posix_forkpty(PyObject *self, PyObject *noargs)\r
+edk2_forkpty(PyObject *self, PyObject *noargs)\r
 {\r
     int master_fd = -1, result = 0;\r
     pid_t pid;\r
@@ -2227,7 +2227,7 @@ posix_forkpty(PyObject *self, PyObject *noargs)
         result = _PyImport_ReleaseLock();\r
     }\r
     if (pid == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
     if (result < 0) {\r
         /* Don't clobber the OSError if the fork failed. */\r
         PyErr_SetString(PyExc_RuntimeError,\r
@@ -2238,23 +2238,23 @@ posix_forkpty(PyObject *self, PyObject *noargs)
 }\r
 #endif\r
 \r
-PyDoc_STRVAR(posix_getpid__doc__,\r
+PyDoc_STRVAR(edk2_getpid__doc__,\r
 "getpid() -> pid\n\n\\r
 Return the current process id");\r
 \r
 static PyObject *\r
-posix_getpid(PyObject *self, PyObject *noargs)\r
+edk2_getpid(PyObject *self, PyObject *noargs)\r
 {\r
     return PyLong_FromPid(getpid());\r
 }\r
 \r
 #ifdef HAVE_GETLOGIN\r
-PyDoc_STRVAR(posix_getlogin__doc__,\r
+PyDoc_STRVAR(edk2_getlogin__doc__,\r
 "getlogin() -> string\n\n\\r
 Return the actual login name.");\r
 \r
 static PyObject *\r
-posix_getlogin(PyObject *self, PyObject *noargs)\r
+edk2_getlogin(PyObject *self, PyObject *noargs)\r
 {\r
     PyObject *result = NULL;\r
     char *name;\r
@@ -2264,7 +2264,7 @@ posix_getlogin(PyObject *self, PyObject *noargs)
     name = getlogin();\r
     if (name == NULL) {\r
         if (errno)\r
-        posix_error();\r
+        edk2_error();\r
         else\r
         PyErr_SetString(PyExc_OSError,\r
                         "unable to determine login name");\r
@@ -2278,12 +2278,12 @@ posix_getlogin(PyObject *self, PyObject *noargs)
 #endif\r
 \r
 #ifdef HAVE_KILL\r
-PyDoc_STRVAR(posix_kill__doc__,\r
+PyDoc_STRVAR(edk2_kill__doc__,\r
 "kill(pid, sig)\n\n\\r
 Kill a process with a signal.");\r
 \r
 static PyObject *\r
-posix_kill(PyObject *self, PyObject *args)\r
+edk2_kill(PyObject *self, PyObject *args)\r
 {\r
     pid_t pid;\r
     int sig;\r
@@ -2304,7 +2304,7 @@ posix_kill(PyObject *self, PyObject *args)
         return NULL; /* Unrecognized Signal Requested */\r
 #else\r
     if (kill(pid, sig) == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
 #endif\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
@@ -2317,18 +2317,18 @@ posix_kill(PyObject *self, PyObject *args)
 #include <sys/lock.h>\r
 #endif\r
 \r
-PyDoc_STRVAR(posix_plock__doc__,\r
+PyDoc_STRVAR(edk2_plock__doc__,\r
 "plock(op)\n\n\\r
 Lock program segments into memory.");\r
 \r
 static PyObject *\r
-posix_plock(PyObject *self, PyObject *args)\r
+edk2_plock(PyObject *self, PyObject *args)\r
 {\r
     int op;\r
     if (!PyArg_ParseTuple(args, "i:plock", &op))\r
         return NULL;\r
     if (plock(op) == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
@@ -2336,13 +2336,13 @@ posix_plock(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_POPEN\r
-PyDoc_STRVAR(posix_popen__doc__,\r
+PyDoc_STRVAR(edk2_popen__doc__,\r
 "popen(command [, mode='r' [, bufsize]]) -> pipe\n\n\\r
 Open a pipe to/from a command returning a file object.");\r
 \r
 /* standard posix version of popen() support */\r
 static PyObject *\r
-posix_popen(PyObject *self, PyObject *args)\r
+edk2_popen(PyObject *self, PyObject *args)\r
 {\r
     char *name;\r
     char *mode = "r";\r
@@ -2360,7 +2360,7 @@ posix_popen(PyObject *self, PyObject *args)
     fp = popen(name, mode);\r
     Py_END_ALLOW_THREADS\r
     if (fp == NULL)\r
-        return posix_error();\r
+        return edk2_error();\r
     f = PyFile_FromFile(fp, name, mode, pclose);\r
     if (f != NULL)\r
         PyFile_SetBufSize(f, bufsize);\r
@@ -2377,7 +2377,7 @@ wait_helper(pid_t pid, int status, struct rusage *ru)
     static PyObject *struct_rusage;\r
 \r
     if (pid == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
 \r
     if (struct_rusage == NULL) {\r
         PyObject *m = PyImport_ImportModuleNoBlock("resource");\r
@@ -2430,12 +2430,12 @@ wait_helper(pid_t pid, int status, struct rusage *ru)
 #endif /* HAVE_WAIT3 || HAVE_WAIT4 */\r
 \r
 #ifdef HAVE_WAIT3\r
-PyDoc_STRVAR(posix_wait3__doc__,\r
+PyDoc_STRVAR(edk2_wait3__doc__,\r
 "wait3(options) -> (pid, status, rusage)\n\n\\r
 Wait for completion of a child process.");\r
 \r
 static PyObject *\r
-posix_wait3(PyObject *self, PyObject *args)\r
+edk2_wait3(PyObject *self, PyObject *args)\r
 {\r
     pid_t pid;\r
     int options;\r
@@ -2455,12 +2455,12 @@ posix_wait3(PyObject *self, PyObject *args)
 #endif /* HAVE_WAIT3 */\r
 \r
 #ifdef HAVE_WAIT4\r
-PyDoc_STRVAR(posix_wait4__doc__,\r
+PyDoc_STRVAR(edk2_wait4__doc__,\r
 "wait4(pid, options) -> (pid, status, rusage)\n\n\\r
 Wait for completion of a given child process.");\r
 \r
 static PyObject *\r
-posix_wait4(PyObject *self, PyObject *args)\r
+edk2_wait4(PyObject *self, PyObject *args)\r
 {\r
     pid_t pid;\r
     int options;\r
@@ -2480,12 +2480,12 @@ posix_wait4(PyObject *self, PyObject *args)
 #endif /* HAVE_WAIT4 */\r
 \r
 #ifdef HAVE_WAITPID\r
-PyDoc_STRVAR(posix_waitpid__doc__,\r
+PyDoc_STRVAR(edk2_waitpid__doc__,\r
 "waitpid(pid, options) -> (pid, status)\n\n\\r
 Wait for completion of a given child process.");\r
 \r
 static PyObject *\r
-posix_waitpid(PyObject *self, PyObject *args)\r
+edk2_waitpid(PyObject *self, PyObject *args)\r
 {\r
     pid_t pid;\r
     int options;\r
@@ -2498,7 +2498,7 @@ posix_waitpid(PyObject *self, PyObject *args)
     pid = waitpid(pid, &status, options);\r
     Py_END_ALLOW_THREADS\r
     if (pid == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
 \r
     return Py_BuildValue("Ni", PyLong_FromPid(pid), WAIT_STATUS_INT(status));\r
 }\r
@@ -2506,12 +2506,12 @@ posix_waitpid(PyObject *self, PyObject *args)
 #elif defined(HAVE_CWAIT)\r
 \r
 /* MS C has a variant of waitpid() that's usable for most purposes. */\r
-PyDoc_STRVAR(posix_waitpid__doc__,\r
+PyDoc_STRVAR(edk2_waitpid__doc__,\r
 "waitpid(pid, options) -> (pid, status << 8)\n\n"\r
 "Wait for completion of a given process.  options is ignored on Windows.");\r
 \r
 static PyObject *\r
-posix_waitpid(PyObject *self, PyObject *args)\r
+edk2_waitpid(PyObject *self, PyObject *args)\r
 {\r
     Py_intptr_t pid;\r
     int status, options;\r
@@ -2522,7 +2522,7 @@ posix_waitpid(PyObject *self, PyObject *args)
     pid = _cwait(&status, pid, options);\r
     Py_END_ALLOW_THREADS\r
     if (pid == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
 \r
     /* shift the status left a byte so this is more like the POSIX waitpid */\r
     return Py_BuildValue("Ni", PyLong_FromPid(pid), status << 8);\r
@@ -2530,12 +2530,12 @@ posix_waitpid(PyObject *self, PyObject *args)
 #endif /* HAVE_WAITPID || HAVE_CWAIT */\r
 \r
 #ifdef HAVE_WAIT\r
-PyDoc_STRVAR(posix_wait__doc__,\r
+PyDoc_STRVAR(edk2_wait__doc__,\r
 "wait() -> (pid, status)\n\n\\r
 Wait for completion of a child process.");\r
 \r
 static PyObject *\r
-posix_wait(PyObject *self, PyObject *noargs)\r
+edk2_wait(PyObject *self, PyObject *noargs)\r
 {\r
     pid_t pid;\r
     WAIT_TYPE status;\r
@@ -2545,35 +2545,35 @@ posix_wait(PyObject *self, PyObject *noargs)
     pid = wait(&status);\r
     Py_END_ALLOW_THREADS\r
     if (pid == -1)\r
-        return posix_error();\r
+        return edk2_error();\r
 \r
     return Py_BuildValue("Ni", PyLong_FromPid(pid), WAIT_STATUS_INT(status));\r
 }\r
 #endif\r
 \r
 \r
-PyDoc_STRVAR(posix_lstat__doc__,\r
+PyDoc_STRVAR(edk2_lstat__doc__,\r
 "lstat(path) -> stat result\n\n\\r
 Like stat(path), but do not follow symbolic links.");\r
 \r
 static PyObject *\r
-posix_lstat(PyObject *self, PyObject *args)\r
+edk2_lstat(PyObject *self, PyObject *args)\r
 {\r
 #ifdef HAVE_LSTAT\r
-    return posix_do_stat(self, args, "et:lstat", lstat, NULL, NULL);\r
+    return edk2_do_stat(self, args, "et:lstat", lstat, NULL, NULL);\r
 #else /* !HAVE_LSTAT */\r
-    return posix_do_stat(self, args, "et:lstat", STAT, NULL, NULL);\r
+    return edk2_do_stat(self, args, "et:lstat", STAT, NULL, NULL);\r
 #endif /* !HAVE_LSTAT */\r
 }\r
 \r
 \r
 #ifdef HAVE_READLINK\r
-PyDoc_STRVAR(posix_readlink__doc__,\r
+PyDoc_STRVAR(edk2_readlink__doc__,\r
 "readlink(path) -> path\n\n\\r
 Return a string representing the path to which the symbolic link points.");\r
 \r
 static PyObject *\r
-posix_readlink(PyObject *self, PyObject *args)\r
+edk2_readlink(PyObject *self, PyObject *args)\r
 {\r
     PyObject* v;\r
     char buf[MAXPATHLEN];\r
@@ -2603,7 +2603,7 @@ posix_readlink(PyObject *self, PyObject *args)
     n = readlink(path, buf, (int) sizeof buf);\r
     Py_END_ALLOW_THREADS\r
     if (n < 0)\r
-        return posix_error_with_allocated_filename(path);\r
+        return edk2_error_with_allocated_filename(path);\r
 \r
     PyMem_Free(path);\r
     v = PyString_FromStringAndSize(buf, n);\r
@@ -2631,14 +2631,14 @@ posix_readlink(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_SYMLINK\r
-PyDoc_STRVAR(posix_symlink__doc__,\r
+PyDoc_STRVAR(edk2_symlink__doc__,\r
 "symlink(src, dst)\n\n\\r
 Create a symbolic link pointing to src named dst.");\r
 \r
 static PyObject *\r
-posix_symlink(PyObject *self, PyObject *args)\r
+edk2_symlink(PyObject *self, PyObject *args)\r
 {\r
-    return posix_2str(args, "etet:symlink", symlink);\r
+    return edk2_2str(args, "etet:symlink", symlink);\r
 }\r
 #endif /* HAVE_SYMLINK */\r
 \r
@@ -2647,14 +2647,14 @@ posix_symlink(PyObject *self, PyObject *args)
 #define NEED_TICKS_PER_SECOND\r
 static long ticks_per_second = -1;\r
 static PyObject *\r
-posix_times(PyObject *self, PyObject *noargs)\r
+edk2_times(PyObject *self, PyObject *noargs)\r
 {\r
     struct tms t;\r
     clock_t c;\r
     errno = 0;\r
     c = times(&t);\r
     if (c == (clock_t) -1)\r
-        return posix_error();\r
+        return edk2_error();\r
     return Py_BuildValue("ddddd",\r
                          (double)t.tms_utime / ticks_per_second,\r
                          (double)t.tms_stime / ticks_per_second,\r
@@ -2666,19 +2666,19 @@ posix_times(PyObject *self, PyObject *noargs)
 \r
 \r
 #ifdef HAVE_TIMES\r
-PyDoc_STRVAR(posix_times__doc__,\r
+PyDoc_STRVAR(edk2_times__doc__,\r
 "times() -> (utime, stime, cutime, cstime, elapsed_time)\n\n\\r
 Return a tuple of floating point numbers indicating process times.");\r
 #endif\r
 \r
 \r
 #ifdef HAVE_GETSID\r
-PyDoc_STRVAR(posix_getsid__doc__,\r
+PyDoc_STRVAR(edk2_getsid__doc__,\r
 "getsid(pid) -> sid\n\n\\r
 Call the system call getsid().");\r
 \r
 static PyObject *\r
-posix_getsid(PyObject *self, PyObject *args)\r
+edk2_getsid(PyObject *self, PyObject *args)\r
 {\r
     pid_t pid;\r
     int sid;\r
@@ -2686,41 +2686,41 @@ posix_getsid(PyObject *self, PyObject *args)
         return NULL;\r
     sid = getsid(pid);\r
     if (sid < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     return PyInt_FromLong((long)sid);\r
 }\r
 #endif /* HAVE_GETSID */\r
 \r
 \r
 #ifdef HAVE_SETSID\r
-PyDoc_STRVAR(posix_setsid__doc__,\r
+PyDoc_STRVAR(edk2_setsid__doc__,\r
 "setsid()\n\n\\r
 Call the system call setsid().");\r
 \r
 static PyObject *\r
-posix_setsid(PyObject *self, PyObject *noargs)\r
+edk2_setsid(PyObject *self, PyObject *noargs)\r
 {\r
     if (setsid() < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
 #endif /* HAVE_SETSID */\r
 \r
 #ifdef HAVE_SETPGID\r
-PyDoc_STRVAR(posix_setpgid__doc__,\r
+PyDoc_STRVAR(edk2_setpgid__doc__,\r
 "setpgid(pid, pgrp)\n\n\\r
 Call the system call setpgid().");\r
 \r
 static PyObject *\r
-posix_setpgid(PyObject *self, PyObject *args)\r
+edk2_setpgid(PyObject *self, PyObject *args)\r
 {\r
     pid_t pid;\r
     int pgrp;\r
     if (!PyArg_ParseTuple(args, PARSE_PID "i:setpgid", &pid, &pgrp))\r
         return NULL;\r
     if (setpgid(pid, pgrp) < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
@@ -2728,12 +2728,12 @@ posix_setpgid(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_TCGETPGRP\r
-PyDoc_STRVAR(posix_tcgetpgrp__doc__,\r
+PyDoc_STRVAR(edk2_tcgetpgrp__doc__,\r
 "tcgetpgrp(fd) -> pgid\n\n\\r
 Return the process group associated with the terminal given by a fd.");\r
 \r
 static PyObject *\r
-posix_tcgetpgrp(PyObject *self, PyObject *args)\r
+edk2_tcgetpgrp(PyObject *self, PyObject *args)\r
 {\r
     int fd;\r
     pid_t pgid;\r
@@ -2741,26 +2741,26 @@ posix_tcgetpgrp(PyObject *self, PyObject *args)
         return NULL;\r
     pgid = tcgetpgrp(fd);\r
     if (pgid < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     return PyLong_FromPid(pgid);\r
 }\r
 #endif /* HAVE_TCGETPGRP */\r
 \r
 \r
 #ifdef HAVE_TCSETPGRP\r
-PyDoc_STRVAR(posix_tcsetpgrp__doc__,\r
+PyDoc_STRVAR(edk2_tcsetpgrp__doc__,\r
 "tcsetpgrp(fd, pgid)\n\n\\r
 Set the process group associated with the terminal given by a fd.");\r
 \r
 static PyObject *\r
-posix_tcsetpgrp(PyObject *self, PyObject *args)\r
+edk2_tcsetpgrp(PyObject *self, PyObject *args)\r
 {\r
     int fd;\r
     pid_t pgid;\r
     if (!PyArg_ParseTuple(args, "i" PARSE_PID ":tcsetpgrp", &fd, &pgid))\r
         return NULL;\r
     if (tcsetpgrp(fd, pgid) < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
@@ -2768,12 +2768,12 @@ posix_tcsetpgrp(PyObject *self, PyObject *args)
 \r
 /* Functions acting on file descriptors */\r
 \r
-PyDoc_STRVAR(posix_open__doc__,\r
+PyDoc_STRVAR(edk2_open__doc__,\r
 "open(filename, flag [, mode=0777]) -> fd\n\n\\r
 Open a file (for low level IO).");\r
 \r
 static PyObject *\r
-posix_open(PyObject *self, PyObject *args)\r
+edk2_open(PyObject *self, PyObject *args)\r
 {\r
     char *file = NULL;\r
     int flag;\r
@@ -2789,40 +2789,40 @@ posix_open(PyObject *self, PyObject *args)
     fd = open(file, flag, mode);\r
     Py_END_ALLOW_THREADS\r
     if (fd < 0)\r
-        return posix_error_with_allocated_filename(file);\r
+        return edk2_error_with_allocated_filename(file);\r
     PyMem_Free(file);\r
     return PyInt_FromLong((long)fd);\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_close__doc__,\r
+PyDoc_STRVAR(edk2_close__doc__,\r
 "close(fd)\n\n\\r
 Close a file descriptor (for low level IO).");\r
 \r
 static PyObject *\r
-posix_close(PyObject *self, PyObject *args)\r
+edk2_close(PyObject *self, PyObject *args)\r
 {\r
     int fd, res;\r
     if (!PyArg_ParseTuple(args, "i:close", &fd))\r
         return NULL;\r
     if (!_PyVerify_fd(fd))\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_BEGIN_ALLOW_THREADS\r
     res = close(fd);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_closerange__doc__,\r
+PyDoc_STRVAR(edk2_closerange__doc__,\r
 "closerange(fd_low, fd_high)\n\n\\r
 Closes all file descriptors in [fd_low, fd_high), ignoring errors.");\r
 \r
 static PyObject *\r
-posix_closerange(PyObject *self, PyObject *args)\r
+edk2_closerange(PyObject *self, PyObject *args)\r
 {\r
     int fd_from, fd_to, i;\r
     if (!PyArg_ParseTuple(args, "ii:closerange", &fd_from, &fd_to))\r
@@ -2836,55 +2836,55 @@ posix_closerange(PyObject *self, PyObject *args)
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_dup__doc__,\r
+PyDoc_STRVAR(edk2_dup__doc__,\r
 "dup(fd) -> fd2\n\n\\r
 Return a duplicate of a file descriptor.");\r
 \r
 static PyObject *\r
-posix_dup(PyObject *self, PyObject *args)\r
+edk2_dup(PyObject *self, PyObject *args)\r
 {\r
     int fd;\r
     if (!PyArg_ParseTuple(args, "i:dup", &fd))\r
         return NULL;\r
     if (!_PyVerify_fd(fd))\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_BEGIN_ALLOW_THREADS\r
     fd = dup(fd);\r
     Py_END_ALLOW_THREADS\r
     if (fd < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     return PyInt_FromLong((long)fd);\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_dup2__doc__,\r
+PyDoc_STRVAR(edk2_dup2__doc__,\r
 "dup2(old_fd, new_fd)\n\n\\r
 Duplicate file descriptor.");\r
 \r
 static PyObject *\r
-posix_dup2(PyObject *self, PyObject *args)\r
+edk2_dup2(PyObject *self, PyObject *args)\r
 {\r
     int fd, fd2, res;\r
     if (!PyArg_ParseTuple(args, "ii:dup2", &fd, &fd2))\r
         return NULL;\r
     if (!_PyVerify_fd_dup2(fd, fd2))\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_BEGIN_ALLOW_THREADS\r
     res = dup2(fd, fd2);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_lseek__doc__,\r
+PyDoc_STRVAR(edk2_lseek__doc__,\r
 "lseek(fd, pos, how) -> newpos\n\n\\r
 Set the current position of a file descriptor.");\r
 \r
 static PyObject *\r
-posix_lseek(PyObject *self, PyObject *args)\r
+edk2_lseek(PyObject *self, PyObject *args)\r
 {\r
     int fd, how;\r
     off_t pos, res;\r
@@ -2910,12 +2910,12 @@ posix_lseek(PyObject *self, PyObject *args)
         return NULL;\r
 \r
     if (!_PyVerify_fd(fd))\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_BEGIN_ALLOW_THREADS\r
     res = lseek(fd, pos, how);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
 \r
 #if !defined(HAVE_LARGEFILE_SUPPORT)\r
     return PyInt_FromLong(res);\r
@@ -2925,12 +2925,12 @@ posix_lseek(PyObject *self, PyObject *args)
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_read__doc__,\r
+PyDoc_STRVAR(edk2_read__doc__,\r
 "read(fd, buffersize) -> string\n\n\\r
 Read a file descriptor.");\r
 \r
 static PyObject *\r
-posix_read(PyObject *self, PyObject *args)\r
+edk2_read(PyObject *self, PyObject *args)\r
 {\r
     int fd, size, n;\r
     PyObject *buffer;\r
@@ -2938,21 +2938,21 @@ posix_read(PyObject *self, PyObject *args)
         return NULL;\r
     if (size < 0) {\r
         errno = EINVAL;\r
-        return posix_error();\r
+        return edk2_error();\r
     }\r
     buffer = PyString_FromStringAndSize((char *)NULL, size);\r
     if (buffer == NULL)\r
         return NULL;\r
     if (!_PyVerify_fd(fd)) {\r
         Py_DECREF(buffer);\r
-        return posix_error();\r
+        return edk2_error();\r
     }\r
     Py_BEGIN_ALLOW_THREADS\r
     n = read(fd, PyString_AsString(buffer), size);\r
     Py_END_ALLOW_THREADS\r
     if (n < 0) {\r
         Py_DECREF(buffer);\r
-        return posix_error();\r
+        return edk2_error();\r
     }\r
     if (n != size)\r
         _PyString_Resize(&buffer, n);\r
@@ -2960,12 +2960,12 @@ posix_read(PyObject *self, PyObject *args)
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_write__doc__,\r
+PyDoc_STRVAR(edk2_write__doc__,\r
 "write(fd, string) -> byteswritten\n\n\\r
 Write a string to a file descriptor.");\r
 \r
 static PyObject *\r
-posix_write(PyObject *self, PyObject *args)\r
+edk2_write(PyObject *self, PyObject *args)\r
 {\r
     Py_buffer pbuf;\r
     int fd;\r
@@ -2975,24 +2975,24 @@ posix_write(PyObject *self, PyObject *args)
         return NULL;\r
     if (!_PyVerify_fd(fd)) {\r
         PyBuffer_Release(&pbuf);\r
-        return posix_error();\r
+        return edk2_error();\r
     }\r
     Py_BEGIN_ALLOW_THREADS\r
     size = write(fd, pbuf.buf, (size_t)pbuf.len);\r
     Py_END_ALLOW_THREADS\r
     PyBuffer_Release(&pbuf);\r
     if (size < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     return PyInt_FromSsize_t(size);\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_fstat__doc__,\r
+PyDoc_STRVAR(edk2_fstat__doc__,\r
 "fstat(fd) -> stat result\n\n\\r
 Like stat(), but for an open file descriptor.");\r
 \r
 static PyObject *\r
-posix_fstat(PyObject *self, PyObject *args)\r
+edk2_fstat(PyObject *self, PyObject *args)\r
 {\r
     int fd;\r
     STRUCT_STAT st;\r
@@ -3000,24 +3000,24 @@ posix_fstat(PyObject *self, PyObject *args)
     if (!PyArg_ParseTuple(args, "i:fstat", &fd))\r
         return NULL;\r
     if (!_PyVerify_fd(fd))\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_BEGIN_ALLOW_THREADS\r
     res = FSTAT(fd, &st);\r
     Py_END_ALLOW_THREADS\r
     if (res != 0) {\r
-      return posix_error();\r
+      return edk2_error();\r
     }\r
 \r
     return _pystat_fromstructstat(&st);\r
 }\r
 \r
 \r
-PyDoc_STRVAR(posix_fdopen__doc__,\r
+PyDoc_STRVAR(edk2_fdopen__doc__,\r
 "fdopen(fd [, mode='r' [, bufsize]]) -> file_object\n\n\\r
 Return an open file object connected to a file descriptor.");\r
 \r
 static PyObject *\r
-posix_fdopen(PyObject *self, PyObject *args)\r
+edk2_fdopen(PyObject *self, PyObject *args)\r
 {\r
     int fd;\r
     char *orgmode = "r";\r
@@ -3040,9 +3040,9 @@ posix_fdopen(PyObject *self, PyObject *args)
         return NULL;\r
     }\r
     if (!_PyVerify_fd(fd))\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_BEGIN_ALLOW_THREADS\r
-#if !defined(MS_WINDOWS) && defined(HAVE_FCNTL_H)\r
+#if defined(HAVE_FCNTL_H)\r
     if (mode[0] == 'a') {\r
         /* try to make sure the O_APPEND flag is set */\r
         int flags;\r
@@ -3062,20 +3062,20 @@ posix_fdopen(PyObject *self, PyObject *args)
     Py_END_ALLOW_THREADS\r
     PyMem_FREE(mode);\r
     if (fp == NULL)\r
-        return posix_error();\r
+        return edk2_error();\r
     f = PyFile_FromFile(fp, "<fdopen>", orgmode, fclose);\r
     if (f != NULL)\r
         PyFile_SetBufSize(f, bufsize);\r
     return f;\r
 }\r
 \r
-PyDoc_STRVAR(posix_isatty__doc__,\r
+PyDoc_STRVAR(edk2_isatty__doc__,\r
 "isatty(fd) -> bool\n\n\\r
 Return True if the file descriptor 'fd' is an open file descriptor\n\\r
 connected to the slave end of a terminal.");\r
 \r
 static PyObject *\r
-posix_isatty(PyObject *self, PyObject *args)\r
+edk2_isatty(PyObject *self, PyObject *args)\r
 {\r
     int fd;\r
     if (!PyArg_ParseTuple(args, "i:isatty", &fd))\r
@@ -3086,12 +3086,12 @@ posix_isatty(PyObject *self, PyObject *args)
 }\r
 \r
 #ifdef HAVE_PIPE\r
-PyDoc_STRVAR(posix_pipe__doc__,\r
+PyDoc_STRVAR(edk2_pipe__doc__,\r
 "pipe() -> (read_end, write_end)\n\n\\r
 Create a pipe.");\r
 \r
 static PyObject *\r
-posix_pipe(PyObject *self, PyObject *noargs)\r
+edk2_pipe(PyObject *self, PyObject *noargs)\r
 {\r
     int fds[2];\r
     int res;\r
@@ -3099,19 +3099,19 @@ posix_pipe(PyObject *self, PyObject *noargs)
     res = pipe(fds);\r
     Py_END_ALLOW_THREADS\r
     if (res != 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     return Py_BuildValue("(ii)", fds[0], fds[1]);\r
 }\r
 #endif  /* HAVE_PIPE */\r
 \r
 \r
 #ifdef HAVE_MKFIFO\r
-PyDoc_STRVAR(posix_mkfifo__doc__,\r
+PyDoc_STRVAR(edk2_mkfifo__doc__,\r
 "mkfifo(filename [, mode=0666])\n\n\\r
 Create a FIFO (a POSIX named pipe).");\r
 \r
 static PyObject *\r
-posix_mkfifo(PyObject *self, PyObject *args)\r
+edk2_mkfifo(PyObject *self, PyObject *args)\r
 {\r
     char *filename;\r
     int mode = 0666;\r
@@ -3122,7 +3122,7 @@ posix_mkfifo(PyObject *self, PyObject *args)
     res = mkfifo(filename, mode);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
@@ -3130,7 +3130,7 @@ posix_mkfifo(PyObject *self, PyObject *args)
 \r
 \r
 #if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)\r
-PyDoc_STRVAR(posix_mknod__doc__,\r
+PyDoc_STRVAR(edk2_mknod__doc__,\r
 "mknod(filename [, mode=0600, device])\n\n\\r
 Create a filesystem node (file, device special file or named pipe)\n\\r
 named filename. mode specifies both the permissions to use and the\n\\r
@@ -3141,7 +3141,7 @@ os.makedev()), otherwise it is ignored.");
 \r
 \r
 static PyObject *\r
-posix_mknod(PyObject *self, PyObject *args)\r
+edk2_mknod(PyObject *self, PyObject *args)\r
 {\r
     char *filename;\r
     int mode = 0600;\r
@@ -3153,19 +3153,19 @@ posix_mknod(PyObject *self, PyObject *args)
     res = mknod(filename, mode, device);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
 #endif\r
 \r
 #ifdef HAVE_DEVICE_MACROS\r
-PyDoc_STRVAR(posix_major__doc__,\r
+PyDoc_STRVAR(edk2_major__doc__,\r
 "major(device) -> major number\n\\r
 Extracts a device major number from a raw device number.");\r
 \r
 static PyObject *\r
-posix_major(PyObject *self, PyObject *args)\r
+edk2_major(PyObject *self, PyObject *args)\r
 {\r
     int device;\r
     if (!PyArg_ParseTuple(args, "i:major", &device))\r
@@ -3173,12 +3173,12 @@ posix_major(PyObject *self, PyObject *args)
     return PyInt_FromLong((long)major(device));\r
 }\r
 \r
-PyDoc_STRVAR(posix_minor__doc__,\r
+PyDoc_STRVAR(edk2_minor__doc__,\r
 "minor(device) -> minor number\n\\r
 Extracts a device minor number from a raw device number.");\r
 \r
 static PyObject *\r
-posix_minor(PyObject *self, PyObject *args)\r
+edk2_minor(PyObject *self, PyObject *args)\r
 {\r
     int device;\r
     if (!PyArg_ParseTuple(args, "i:minor", &device))\r
@@ -3186,12 +3186,12 @@ posix_minor(PyObject *self, PyObject *args)
     return PyInt_FromLong((long)minor(device));\r
 }\r
 \r
-PyDoc_STRVAR(posix_makedev__doc__,\r
+PyDoc_STRVAR(edk2_makedev__doc__,\r
 "makedev(major, minor) -> device number\n\\r
 Composes a raw device number from the major and minor device numbers.");\r
 \r
 static PyObject *\r
-posix_makedev(PyObject *self, PyObject *args)\r
+edk2_makedev(PyObject *self, PyObject *args)\r
 {\r
     int major, minor;\r
     if (!PyArg_ParseTuple(args, "ii:makedev", &major, &minor))\r
@@ -3202,12 +3202,12 @@ posix_makedev(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_FTRUNCATE\r
-PyDoc_STRVAR(posix_ftruncate__doc__,\r
+PyDoc_STRVAR(edk2_ftruncate__doc__,\r
 "ftruncate(fd, length)\n\n\\r
 Truncate a file to a specified length.");\r
 \r
 static PyObject *\r
-posix_ftruncate(PyObject *self, PyObject *args)\r
+edk2_ftruncate(PyObject *self, PyObject *args)\r
 {\r
     int fd;\r
     off_t length;\r
@@ -3230,23 +3230,23 @@ posix_ftruncate(PyObject *self, PyObject *args)
     res = ftruncate(fd, length);\r
     Py_END_ALLOW_THREADS\r
     if (res < 0)\r
-        return posix_error();\r
+        return edk2_error();\r
     Py_INCREF(Py_None);\r
     return Py_None;\r
 }\r
 #endif\r
 \r
 #ifdef HAVE_PUTENV\r
-PyDoc_STRVAR(posix_putenv__doc__,\r
+PyDoc_STRVAR(edk2_putenv__doc__,\r
 "putenv(key, value)\n\n\\r
 Change or add an environment variable.");\r
 \r
 /* Save putenv() parameters as values here, so we can collect them when they\r
  * get re-set with another call for the same key. */\r
-static PyObject *posix_putenv_garbage;\r
+static PyObject *edk2_putenv_garbage;\r
 \r
 static PyObject *\r
-posix_putenv(PyObject *self, PyObject *args)\r
+edk2_putenv(PyObject *self, PyObject *args)\r
 {\r
     char *s1, *s2;\r
     char *newenv;\r
@@ -3267,14 +3267,14 @@ posix_putenv(PyObject *self, PyObject *args)
     PyOS_snprintf(newenv, len, "%s=%s", s1, s2);\r
     if (putenv(newenv)) {\r
         Py_DECREF(newstr);\r
-        posix_error();\r
+        edk2_error();\r
         return NULL;\r
     }\r
-    /* Install the first arg and newstr in posix_putenv_garbage;\r
+    /* Install the first arg and newstr in edk2_putenv_garbage;\r
      * this will cause previous value to be collected.  This has to\r
      * happen after the real putenv() call because the old value\r
      * was still accessible until then. */\r
-    if (PyDict_SetItem(posix_putenv_garbage,\r
+    if (PyDict_SetItem(edk2_putenv_garbage,\r
                        PyTuple_GET_ITEM(args, 0), newstr)) {\r
         /* really not much we can do; just leak */\r
         PyErr_Clear();\r
@@ -3289,12 +3289,12 @@ posix_putenv(PyObject *self, PyObject *args)
 #endif /* putenv */\r
 \r
 #ifdef HAVE_UNSETENV\r
-PyDoc_STRVAR(posix_unsetenv__doc__,\r
+PyDoc_STRVAR(edk2_unsetenv__doc__,\r
 "unsetenv(key)\n\n\\r
 Delete an environment variable.");\r
 \r
 static PyObject *\r
-posix_unsetenv(PyObject *self, PyObject *args)\r
+edk2_unsetenv(PyObject *self, PyObject *args)\r
 {\r
     char *s1;\r
 \r
@@ -3303,12 +3303,12 @@ posix_unsetenv(PyObject *self, PyObject *args)
 \r
     unsetenv(s1);\r
 \r
-    /* Remove the key from posix_putenv_garbage;\r
+    /* Remove the key from edk2_putenv_garbage;\r
      * this will cause it to be collected.  This has to\r
      * happen after the real unsetenv() call because the\r
      * old value was still accessible until then.\r
      */\r
-    if (PyDict_DelItem(posix_putenv_garbage,\r
+    if (PyDict_DelItem(edk2_putenv_garbage,\r
                        PyTuple_GET_ITEM(args, 0))) {\r
         /* really not much we can do; just leak */\r
         PyErr_Clear();\r
@@ -3319,12 +3319,12 @@ posix_unsetenv(PyObject *self, PyObject *args)
 }\r
 #endif /* unsetenv */\r
 \r
-PyDoc_STRVAR(posix_strerror__doc__,\r
+PyDoc_STRVAR(edk2_strerror__doc__,\r
 "strerror(code) -> string\n\n\\r
 Translate an error code to a message string.");\r
 \r
 static PyObject *\r
-posix_strerror(PyObject *self, PyObject *args)\r
+edk2_strerror(PyObject *self, PyObject *args)\r
 {\r
     int code;\r
     char *message;\r
@@ -3343,12 +3343,12 @@ posix_strerror(PyObject *self, PyObject *args)
 #ifdef HAVE_SYS_WAIT_H\r
 \r
 #ifdef WCOREDUMP\r
-PyDoc_STRVAR(posix_WCOREDUMP__doc__,\r
+PyDoc_STRVAR(edk2_WCOREDUMP__doc__,\r
 "WCOREDUMP(status) -> bool\n\n\\r
 Return True if the process returning 'status' was dumped to a core file.");\r
 \r
 static PyObject *\r
-posix_WCOREDUMP(PyObject *self, PyObject *args)\r
+edk2_WCOREDUMP(PyObject *self, PyObject *args)\r
 {\r
     WAIT_TYPE status;\r
     WAIT_STATUS_INT(status) = 0;\r
@@ -3361,13 +3361,13 @@ posix_WCOREDUMP(PyObject *self, PyObject *args)
 #endif /* WCOREDUMP */\r
 \r
 #ifdef WIFCONTINUED\r
-PyDoc_STRVAR(posix_WIFCONTINUED__doc__,\r
+PyDoc_STRVAR(edk2_WIFCONTINUED__doc__,\r
 "WIFCONTINUED(status) -> bool\n\n\\r
 Return True if the process returning 'status' was continued from a\n\\r
 job control stop.");\r
 \r
 static PyObject *\r
-posix_WIFCONTINUED(PyObject *self, PyObject *args)\r
+edk2_WIFCONTINUED(PyObject *self, PyObject *args)\r
 {\r
     WAIT_TYPE status;\r
     WAIT_STATUS_INT(status) = 0;\r
@@ -3380,12 +3380,12 @@ posix_WIFCONTINUED(PyObject *self, PyObject *args)
 #endif /* WIFCONTINUED */\r
 \r
 #ifdef WIFSTOPPED\r
-PyDoc_STRVAR(posix_WIFSTOPPED__doc__,\r
+PyDoc_STRVAR(edk2_WIFSTOPPED__doc__,\r
 "WIFSTOPPED(status) -> bool\n\n\\r
 Return True if the process returning 'status' was stopped.");\r
 \r
 static PyObject *\r
-posix_WIFSTOPPED(PyObject *self, PyObject *args)\r
+edk2_WIFSTOPPED(PyObject *self, PyObject *args)\r
 {\r
     WAIT_TYPE status;\r
     WAIT_STATUS_INT(status) = 0;\r
@@ -3398,12 +3398,12 @@ posix_WIFSTOPPED(PyObject *self, PyObject *args)
 #endif /* WIFSTOPPED */\r
 \r
 #ifdef WIFSIGNALED\r
-PyDoc_STRVAR(posix_WIFSIGNALED__doc__,\r
+PyDoc_STRVAR(edk2_WIFSIGNALED__doc__,\r
 "WIFSIGNALED(status) -> bool\n\n\\r
 Return True if the process returning 'status' was terminated by a signal.");\r
 \r
 static PyObject *\r
-posix_WIFSIGNALED(PyObject *self, PyObject *args)\r
+edk2_WIFSIGNALED(PyObject *self, PyObject *args)\r
 {\r
     WAIT_TYPE status;\r
     WAIT_STATUS_INT(status) = 0;\r
@@ -3416,13 +3416,13 @@ posix_WIFSIGNALED(PyObject *self, PyObject *args)
 #endif /* WIFSIGNALED */\r
 \r
 #ifdef WIFEXITED\r
-PyDoc_STRVAR(posix_WIFEXITED__doc__,\r
+PyDoc_STRVAR(edk2_WIFEXITED__doc__,\r
 "WIFEXITED(status) -> bool\n\n\\r
 Return true if the process returning 'status' exited using the exit()\n\\r
 system call.");\r
 \r
 static PyObject *\r
-posix_WIFEXITED(PyObject *self, PyObject *args)\r
+edk2_WIFEXITED(PyObject *self, PyObject *args)\r
 {\r
     WAIT_TYPE status;\r
     WAIT_STATUS_INT(status) = 0;\r
@@ -3435,12 +3435,12 @@ posix_WIFEXITED(PyObject *self, PyObject *args)
 #endif /* WIFEXITED */\r
 \r
 #ifdef WEXITSTATUS\r
-PyDoc_STRVAR(posix_WEXITSTATUS__doc__,\r
+PyDoc_STRVAR(edk2_WEXITSTATUS__doc__,\r
 "WEXITSTATUS(status) -> integer\n\n\\r
 Return the process return code from 'status'.");\r
 \r
 static PyObject *\r
-posix_WEXITSTATUS(PyObject *self, PyObject *args)\r
+edk2_WEXITSTATUS(PyObject *self, PyObject *args)\r
 {\r
     WAIT_TYPE status;\r
     WAIT_STATUS_INT(status) = 0;\r
@@ -3453,13 +3453,13 @@ posix_WEXITSTATUS(PyObject *self, PyObject *args)
 #endif /* WEXITSTATUS */\r
 \r
 #ifdef WTERMSIG\r
-PyDoc_STRVAR(posix_WTERMSIG__doc__,\r
+PyDoc_STRVAR(edk2_WTERMSIG__doc__,\r
 "WTERMSIG(status) -> integer\n\n\\r
 Return the signal that terminated the process that provided the 'status'\n\\r
 value.");\r
 \r
 static PyObject *\r
-posix_WTERMSIG(PyObject *self, PyObject *args)\r
+edk2_WTERMSIG(PyObject *self, PyObject *args)\r
 {\r
     WAIT_TYPE status;\r
     WAIT_STATUS_INT(status) = 0;\r
@@ -3472,13 +3472,13 @@ posix_WTERMSIG(PyObject *self, PyObject *args)
 #endif /* WTERMSIG */\r
 \r
 #ifdef WSTOPSIG\r
-PyDoc_STRVAR(posix_WSTOPSIG__doc__,\r
+PyDoc_STRVAR(edk2_WSTOPSIG__doc__,\r
 "WSTOPSIG(status) -> integer\n\n\\r
 Return the signal that stopped the process that provided\n\\r
 the 'status' value.");\r
 \r
 static PyObject *\r
-posix_WSTOPSIG(PyObject *self, PyObject *args)\r
+edk2_WSTOPSIG(PyObject *self, PyObject *args)\r
 {\r
     WAIT_TYPE status;\r
     WAIT_STATUS_INT(status) = 0;\r
@@ -3535,12 +3535,12 @@ _pystatvfs_fromstructstatvfs(struct statvfs st) {
     return v;\r
 }\r
 \r
-PyDoc_STRVAR(posix_fstatvfs__doc__,\r
+PyDoc_STRVAR(edk2_fstatvfs__doc__,\r
 "fstatvfs(fd) -> statvfs result\n\n\\r
 Perform an fstatvfs system call on the given fd.");\r
 \r
 static PyObject *\r
-posix_fstatvfs(PyObject *self, PyObject *args)\r
+edk2_fstatvfs(PyObject *self, PyObject *args)\r
 {\r
     int fd, res;\r
     struct statvfs st;\r
@@ -3551,7 +3551,7 @@ posix_fstatvfs(PyObject *self, PyObject *args)
     res = fstatvfs(fd, &st);\r
     Py_END_ALLOW_THREADS\r
     if (res != 0)\r
-        return posix_error();\r
+        return edk2_error();\r
 \r
     return _pystatvfs_fromstructstatvfs(st);\r
 }\r
@@ -3561,12 +3561,12 @@ posix_fstatvfs(PyObject *self, PyObject *args)
 #if defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)\r
 #include <sys/statvfs.h>\r
 \r
-PyDoc_STRVAR(posix_statvfs__doc__,\r
+PyDoc_STRVAR(edk2_statvfs__doc__,\r
 "statvfs(path) -> statvfs result\n\n\\r
 Perform a statvfs system call on the given path.");\r
 \r
 static PyObject *\r
-posix_statvfs(PyObject *self, PyObject *args)\r
+edk2_statvfs(PyObject *self, PyObject *args)\r
 {\r
     char *path;\r
     int res;\r
@@ -3577,7 +3577,7 @@ posix_statvfs(PyObject *self, PyObject *args)
     res = statvfs(path, &st);\r
     Py_END_ALLOW_THREADS\r
     if (res != 0)\r
-        return posix_error_with_filename(path);\r
+        return edk2_error_with_filename(path);\r
 \r
     return _pystatvfs_fromstructstatvfs(st);\r
 }\r
@@ -3585,14 +3585,14 @@ posix_statvfs(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_TEMPNAM\r
-PyDoc_STRVAR(posix_tempnam__doc__,\r
+PyDoc_STRVAR(edk2_tempnam__doc__,\r
 "tempnam([dir[, prefix]]) -> string\n\n\\r
 Return a unique name for a temporary file.\n\\r
 The directory and a prefix may be specified as strings; they may be omitted\n\\r
 or None if not needed.");\r
 \r
 static PyObject *\r
-posix_tempnam(PyObject *self, PyObject *args)\r
+edk2_tempnam(PyObject *self, PyObject *args)\r
 {\r
     PyObject *result = NULL;\r
     char *dir = NULL;\r
@@ -3621,12 +3621,12 @@ posix_tempnam(PyObject *self, PyObject *args)
 \r
 \r
 #ifdef HAVE_TMPFILE\r
-PyDoc_STRVAR(posix_tmpfile__doc__,\r
+PyDoc_STRVAR(edk2_tmpfile__doc__,\r
 "tmpfile() -> file object\n\n\\r
 Create a temporary file with no directory entries.");\r
 \r
 static PyObject *\r
-posix_tmpfile(PyObject *self, PyObject *noargs)\r
+edk2_tmpfile(PyObject *self, PyObject *noargs)\r
 {\r
     FILE *fp;\r
 \r
@@ -3636,19 +3636,19 @@ posix_tmpfile(PyObject *self, PyObject *noargs)
 \r
     fp = tmpfile();\r
     if (fp == NULL)\r
-        return posix_error();\r
+        return edk2_error();\r
     return PyFile_FromFile(fp, "<tmpfile>", "w+b", fclose);\r
 }\r
 #endif\r
 \r
 \r
 #ifdef HAVE_TMPNAM\r
-PyDoc_STRVAR(posix_tmpnam__doc__,\r
+PyDoc_STRVAR(edk2_tmpnam__doc__,\r
 "tmpnam() -> string\n\n\\r
 Return a unique name for a temporary file.");\r
 \r
 static PyObject *\r
-posix_tmpnam(PyObject *self, PyObject *noargs)\r
+edk2_tmpnam(PyObject *self, PyObject *noargs)\r
 {\r
     char buffer[L_tmpnam];\r
     char *name;\r
@@ -3682,13 +3682,13 @@ posix_tmpnam(PyObject *self, PyObject *noargs)
 }\r
 #endif\r
 \r
-PyDoc_STRVAR(posix_abort__doc__,\r
+PyDoc_STRVAR(edk2_abort__doc__,\r
 "abort() -> does not return!\n\n\\r
 Abort the interpreter immediately.  This 'dumps core' or otherwise fails\n\\r
 in the hardest way possible on the hosting operating system.");\r
 \r
 static PyObject *\r
-posix_abort(PyObject *self, PyObject *noargs)\r
+edk2_abort(PyObject *self, PyObject *noargs)\r
 {\r
     abort();\r
     /*NOTREACHED*/\r
@@ -3696,262 +3696,262 @@ posix_abort(PyObject *self, PyObject *noargs)
     return NULL;\r
 }\r
 \r
-static PyMethodDef posix_methods[] = {\r
-    {"access",          posix_access,     METH_VARARGS, posix_access__doc__},\r
+static PyMethodDef edk2_methods[] = {\r
+    {"access",          edk2_access,     METH_VARARGS, edk2_access__doc__},\r
 #ifdef HAVE_TTYNAME\r
-    {"ttyname",         posix_ttyname, METH_VARARGS, posix_ttyname__doc__},\r
+    {"ttyname",         edk2_ttyname, METH_VARARGS, edk2_ttyname__doc__},\r
 #endif\r
-    {"chdir",           posix_chdir,      METH_VARARGS, posix_chdir__doc__},\r
+    {"chdir",           edk2_chdir,      METH_VARARGS, edk2_chdir__doc__},\r
 #ifdef HAVE_CHFLAGS\r
-    {"chflags",         posix_chflags, METH_VARARGS, posix_chflags__doc__},\r
+    {"chflags",         edk2_chflags, METH_VARARGS, edk2_chflags__doc__},\r
 #endif /* HAVE_CHFLAGS */\r
-    {"chmod",           posix_chmod,      METH_VARARGS, posix_chmod__doc__},\r
+    {"chmod",           edk2_chmod,      METH_VARARGS, edk2_chmod__doc__},\r
 #ifdef HAVE_FCHMOD\r
-    {"fchmod",          posix_fchmod, METH_VARARGS, posix_fchmod__doc__},\r
+    {"fchmod",          edk2_fchmod, METH_VARARGS, edk2_fchmod__doc__},\r
 #endif /* HAVE_FCHMOD */\r
 #ifdef HAVE_CHOWN\r
-    {"chown",           posix_chown, METH_VARARGS, posix_chown__doc__},\r
+    {"chown",           edk2_chown, METH_VARARGS, edk2_chown__doc__},\r
 #endif /* HAVE_CHOWN */\r
 #ifdef HAVE_LCHMOD\r
-    {"lchmod",          posix_lchmod, METH_VARARGS, posix_lchmod__doc__},\r
+    {"lchmod",          edk2_lchmod, METH_VARARGS, edk2_lchmod__doc__},\r
 #endif /* HAVE_LCHMOD */\r
 #ifdef HAVE_FCHOWN\r
-    {"fchown",          posix_fchown, METH_VARARGS, posix_fchown__doc__},\r
+    {"fchown",          edk2_fchown, METH_VARARGS, edk2_fchown__doc__},\r
 #endif /* HAVE_FCHOWN */\r
 #ifdef HAVE_LCHFLAGS\r
-    {"lchflags",        posix_lchflags, METH_VARARGS, posix_lchflags__doc__},\r
+    {"lchflags",        edk2_lchflags, METH_VARARGS, edk2_lchflags__doc__},\r
 #endif /* HAVE_LCHFLAGS */\r
 #ifdef HAVE_LCHOWN\r
-    {"lchown",          posix_lchown, METH_VARARGS, posix_lchown__doc__},\r
+    {"lchown",          edk2_lchown, METH_VARARGS, edk2_lchown__doc__},\r
 #endif /* HAVE_LCHOWN */\r
 #ifdef HAVE_CHROOT\r
-    {"chroot",          posix_chroot, METH_VARARGS, posix_chroot__doc__},\r
+    {"chroot",          edk2_chroot, METH_VARARGS, edk2_chroot__doc__},\r
 #endif\r
 #ifdef HAVE_CTERMID\r
-    {"ctermid",         posix_ctermid, METH_NOARGS, posix_ctermid__doc__},\r
+    {"ctermid",         edk2_ctermid, METH_NOARGS, edk2_ctermid__doc__},\r
 #endif\r
 #ifdef HAVE_GETCWD\r
-    {"getcwd",          posix_getcwd,     METH_NOARGS,  posix_getcwd__doc__},\r
+    {"getcwd",          edk2_getcwd,     METH_NOARGS,  edk2_getcwd__doc__},\r
 #ifdef Py_USING_UNICODE\r
-    {"getcwdu",         posix_getcwdu,    METH_NOARGS,  posix_getcwdu__doc__},\r
+    {"getcwdu",         edk2_getcwdu,    METH_NOARGS,  edk2_getcwdu__doc__},\r
 #endif\r
 #endif\r
 #ifdef HAVE_LINK\r
-    {"link",            posix_link, METH_VARARGS, posix_link__doc__},\r
+    {"link",            edk2_link, METH_VARARGS, edk2_link__doc__},\r
 #endif /* HAVE_LINK */\r
-    {"listdir",         posix_listdir,    METH_VARARGS, posix_listdir__doc__},\r
-    {"lstat",           posix_lstat,      METH_VARARGS, posix_lstat__doc__},\r
-    {"mkdir",           posix_mkdir,      METH_VARARGS, posix_mkdir__doc__},\r
+    {"listdir",         edk2_listdir,    METH_VARARGS, edk2_listdir__doc__},\r
+    {"lstat",           edk2_lstat,      METH_VARARGS, edk2_lstat__doc__},\r
+    {"mkdir",           edk2_mkdir,      METH_VARARGS, edk2_mkdir__doc__},\r
 #ifdef HAVE_NICE\r
-    {"nice",            posix_nice, METH_VARARGS, posix_nice__doc__},\r
+    {"nice",            edk2_nice, METH_VARARGS, edk2_nice__doc__},\r
 #endif /* HAVE_NICE */\r
 #ifdef HAVE_READLINK\r
-    {"readlink",        posix_readlink, METH_VARARGS, posix_readlink__doc__},\r
+    {"readlink",        edk2_readlink, METH_VARARGS, edk2_readlink__doc__},\r
 #endif /* HAVE_READLINK */\r
-    {"rename",          posix_rename,     METH_VARARGS, posix_rename__doc__},\r
-    {"rmdir",           posix_rmdir,      METH_VARARGS, posix_rmdir__doc__},\r
-    {"stat",            posix_stat,       METH_VARARGS, posix_stat__doc__},\r
+    {"rename",          edk2_rename,     METH_VARARGS, edk2_rename__doc__},\r
+    {"rmdir",           edk2_rmdir,      METH_VARARGS, edk2_rmdir__doc__},\r
+    {"stat",            edk2_stat,       METH_VARARGS, edk2_stat__doc__},\r
     //{"stat_float_times", stat_float_times, METH_VARARGS, stat_float_times__doc__},\r
 #ifdef HAVE_SYMLINK\r
-    {"symlink",         posix_symlink, METH_VARARGS, posix_symlink__doc__},\r
+    {"symlink",         edk2_symlink, METH_VARARGS, edk2_symlink__doc__},\r
 #endif /* HAVE_SYMLINK */\r
 #ifdef HAVE_SYSTEM\r
-    {"system",          posix_system, METH_VARARGS, posix_system__doc__},\r
+    {"system",          edk2_system, METH_VARARGS, edk2_system__doc__},\r
 #endif\r
-    {"umask",           posix_umask,      METH_VARARGS, posix_umask__doc__},\r
+    {"umask",           edk2_umask,      METH_VARARGS, edk2_umask__doc__},\r
 #ifdef HAVE_UNAME\r
-    {"uname",           posix_uname, METH_NOARGS, posix_uname__doc__},\r
+    {"uname",           edk2_uname, METH_NOARGS, edk2_uname__doc__},\r
 #endif /* HAVE_UNAME */\r
-    {"unlink",          posix_unlink,     METH_VARARGS, posix_unlink__doc__},\r
-    {"remove",          posix_unlink,     METH_VARARGS, posix_remove__doc__},\r
-    {"utime",           posix_utime,      METH_VARARGS, posix_utime__doc__},\r
+    {"unlink",          edk2_unlink,     METH_VARARGS, edk2_unlink__doc__},\r
+    {"remove",          edk2_unlink,     METH_VARARGS, edk2_remove__doc__},\r
+    {"utime",           edk2_utime,      METH_VARARGS, edk2_utime__doc__},\r
 #ifdef HAVE_TIMES\r
-    {"times",           posix_times, METH_NOARGS, posix_times__doc__},\r
+    {"times",           edk2_times, METH_NOARGS, edk2_times__doc__},\r
 #endif /* HAVE_TIMES */\r
-    {"_exit",           posix__exit,      METH_VARARGS, posix__exit__doc__},\r
+    {"_exit",           edk2__exit,      METH_VARARGS, edk2__exit__doc__},\r
 #ifdef HAVE_EXECV\r
-    {"execv",           posix_execv, METH_VARARGS, posix_execv__doc__},\r
-    {"execve",          posix_execve, METH_VARARGS, posix_execve__doc__},\r
+    {"execv",           edk2_execv, METH_VARARGS, edk2_execv__doc__},\r
+    {"execve",          edk2_execve, METH_VARARGS, edk2_execve__doc__},\r
 #endif /* HAVE_EXECV */\r
 #ifdef HAVE_SPAWNV\r
-    {"spawnv",          posix_spawnv, METH_VARARGS, posix_spawnv__doc__},\r
-    {"spawnve",         posix_spawnve, METH_VARARGS, posix_spawnve__doc__},\r
+    {"spawnv",          edk2_spawnv, METH_VARARGS, edk2_spawnv__doc__},\r
+    {"spawnve",         edk2_spawnve, METH_VARARGS, edk2_spawnve__doc__},\r
 #if defined(PYOS_OS2)\r
-    {"spawnvp",         posix_spawnvp, METH_VARARGS, posix_spawnvp__doc__},\r
-    {"spawnvpe",        posix_spawnvpe, METH_VARARGS, posix_spawnvpe__doc__},\r
+    {"spawnvp",         edk2_spawnvp, METH_VARARGS, edk2_spawnvp__doc__},\r
+    {"spawnvpe",        edk2_spawnvpe, METH_VARARGS, edk2_spawnvpe__doc__},\r
 #endif /* PYOS_OS2 */\r
 #endif /* HAVE_SPAWNV */\r
 #ifdef HAVE_FORK1\r
-    {"fork1",       posix_fork1, METH_NOARGS, posix_fork1__doc__},\r
+    {"fork1",       edk2_fork1, METH_NOARGS, edk2_fork1__doc__},\r
 #endif /* HAVE_FORK1 */\r
 #ifdef HAVE_FORK\r
-    {"fork",            posix_fork, METH_NOARGS, posix_fork__doc__},\r
+    {"fork",            edk2_fork, METH_NOARGS, edk2_fork__doc__},\r
 #endif /* HAVE_FORK */\r
 #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)\r
-    {"openpty",         posix_openpty, METH_NOARGS, posix_openpty__doc__},\r
+    {"openpty",         edk2_openpty, METH_NOARGS, edk2_openpty__doc__},\r
 #endif /* HAVE_OPENPTY || HAVE__GETPTY || HAVE_DEV_PTMX */\r
 #ifdef HAVE_FORKPTY\r
-    {"forkpty",         posix_forkpty, METH_NOARGS, posix_forkpty__doc__},\r
+    {"forkpty",         edk2_forkpty, METH_NOARGS, edk2_forkpty__doc__},\r
 #endif /* HAVE_FORKPTY */\r
-    {"getpid",          posix_getpid,     METH_NOARGS,  posix_getpid__doc__},\r
+    {"getpid",          edk2_getpid,     METH_NOARGS,  edk2_getpid__doc__},\r
 #ifdef HAVE_GETPGRP\r
-    {"getpgrp",         posix_getpgrp, METH_NOARGS, posix_getpgrp__doc__},\r
+    {"getpgrp",         edk2_getpgrp, METH_NOARGS, edk2_getpgrp__doc__},\r
 #endif /* HAVE_GETPGRP */\r
 #ifdef HAVE_GETPPID\r
-    {"getppid",         posix_getppid, METH_NOARGS, posix_getppid__doc__},\r
+    {"getppid",         edk2_getppid, METH_NOARGS, edk2_getppid__doc__},\r
 #endif /* HAVE_GETPPID */\r
 #ifdef HAVE_GETLOGIN\r
-    {"getlogin",        posix_getlogin, METH_NOARGS, posix_getlogin__doc__},\r
+    {"getlogin",        edk2_getlogin, METH_NOARGS, edk2_getlogin__doc__},\r
 #endif\r
 #ifdef HAVE_KILL\r
-    {"kill",            posix_kill, METH_VARARGS, posix_kill__doc__},\r
+    {"kill",            edk2_kill, METH_VARARGS, edk2_kill__doc__},\r
 #endif /* HAVE_KILL */\r
 #ifdef HAVE_KILLPG\r
-    {"killpg",          posix_killpg, METH_VARARGS, posix_killpg__doc__},\r
+    {"killpg",          edk2_killpg, METH_VARARGS, edk2_killpg__doc__},\r
 #endif /* HAVE_KILLPG */\r
 #ifdef HAVE_PLOCK\r
-    {"plock",           posix_plock, METH_VARARGS, posix_plock__doc__},\r
+    {"plock",           edk2_plock, METH_VARARGS, edk2_plock__doc__},\r
 #endif /* HAVE_PLOCK */\r
 #ifdef HAVE_POPEN\r
-    {"popen",           posix_popen, METH_VARARGS, posix_popen__doc__},\r
+    {"popen",           edk2_popen, METH_VARARGS, edk2_popen__doc__},\r
 #endif /* HAVE_POPEN */\r
 #ifdef HAVE_SETGROUPS\r
-    {"setgroups",       posix_setgroups, METH_O, posix_setgroups__doc__},\r
+    {"setgroups",       edk2_setgroups, METH_O, edk2_setgroups__doc__},\r
 #endif /* HAVE_SETGROUPS */\r
 #ifdef HAVE_INITGROUPS\r
-    {"initgroups",      posix_initgroups, METH_VARARGS, posix_initgroups__doc__},\r
+    {"initgroups",      edk2_initgroups, METH_VARARGS, edk2_initgroups__doc__},\r
 #endif /* HAVE_INITGROUPS */\r
 #ifdef HAVE_GETPGID\r
-    {"getpgid",         posix_getpgid, METH_VARARGS, posix_getpgid__doc__},\r
+    {"getpgid",         edk2_getpgid, METH_VARARGS, edk2_getpgid__doc__},\r
 #endif /* HAVE_GETPGID */\r
 #ifdef HAVE_SETPGRP\r
-    {"setpgrp",         posix_setpgrp, METH_NOARGS, posix_setpgrp__doc__},\r
+    {"setpgrp",         edk2_setpgrp, METH_NOARGS, edk2_setpgrp__doc__},\r
 #endif /* HAVE_SETPGRP */\r
 #ifdef HAVE_WAIT\r
-    {"wait",            posix_wait, METH_NOARGS, posix_wait__doc__},\r
+    {"wait",            edk2_wait, METH_NOARGS, edk2_wait__doc__},\r
 #endif /* HAVE_WAIT */\r
 #ifdef HAVE_WAIT3\r
-    {"wait3",           posix_wait3, METH_VARARGS, posix_wait3__doc__},\r
+    {"wait3",           edk2_wait3, METH_VARARGS, edk2_wait3__doc__},\r
 #endif /* HAVE_WAIT3 */\r
 #ifdef HAVE_WAIT4\r
-    {"wait4",           posix_wait4, METH_VARARGS, posix_wait4__doc__},\r
+    {"wait4",           edk2_wait4, METH_VARARGS, edk2_wait4__doc__},\r
 #endif /* HAVE_WAIT4 */\r
 #if defined(HAVE_WAITPID) || defined(HAVE_CWAIT)\r
-    {"waitpid",         posix_waitpid, METH_VARARGS, posix_waitpid__doc__},\r
+    {"waitpid",         edk2_waitpid, METH_VARARGS, edk2_waitpid__doc__},\r
 #endif /* HAVE_WAITPID */\r
 #ifdef HAVE_GETSID\r
-    {"getsid",          posix_getsid, METH_VARARGS, posix_getsid__doc__},\r
+    {"getsid",          edk2_getsid, METH_VARARGS, edk2_getsid__doc__},\r
 #endif /* HAVE_GETSID */\r
 #ifdef HAVE_SETSID\r
-    {"setsid",          posix_setsid, METH_NOARGS, posix_setsid__doc__},\r
+    {"setsid",          edk2_setsid, METH_NOARGS, edk2_setsid__doc__},\r
 #endif /* HAVE_SETSID */\r
 #ifdef HAVE_SETPGID\r
-    {"setpgid",         posix_setpgid, METH_VARARGS, posix_setpgid__doc__},\r
+    {"setpgid",         edk2_setpgid, METH_VARARGS, edk2_setpgid__doc__},\r
 #endif /* HAVE_SETPGID */\r
 #ifdef HAVE_TCGETPGRP\r
-    {"tcgetpgrp",       posix_tcgetpgrp, METH_VARARGS, posix_tcgetpgrp__doc__},\r
+    {"tcgetpgrp",       edk2_tcgetpgrp, METH_VARARGS, edk2_tcgetpgrp__doc__},\r
 #endif /* HAVE_TCGETPGRP */\r
 #ifdef HAVE_TCSETPGRP\r
-    {"tcsetpgrp",       posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__},\r
+    {"tcsetpgrp",       edk2_tcsetpgrp, METH_VARARGS, edk2_tcsetpgrp__doc__},\r
 #endif /* HAVE_TCSETPGRP */\r
-    {"open",            posix_open,       METH_VARARGS, posix_open__doc__},\r
-    {"close",           posix_close,      METH_VARARGS, posix_close__doc__},\r
-    {"closerange",      posix_closerange, METH_VARARGS, posix_closerange__doc__},\r
-    {"dup",             posix_dup,        METH_VARARGS, posix_dup__doc__},\r
-    {"dup2",            posix_dup2,       METH_VARARGS, posix_dup2__doc__},\r
-    {"lseek",           posix_lseek,      METH_VARARGS, posix_lseek__doc__},\r
-    {"read",            posix_read,       METH_VARARGS, posix_read__doc__},\r
-    {"write",           posix_write,      METH_VARARGS, posix_write__doc__},\r
-    {"fstat",           posix_fstat,      METH_VARARGS, posix_fstat__doc__},\r
-    {"fdopen",          posix_fdopen,     METH_VARARGS, posix_fdopen__doc__},\r
-    {"isatty",          posix_isatty,     METH_VARARGS, posix_isatty__doc__},\r
+    {"open",            edk2_open,       METH_VARARGS, edk2_open__doc__},\r
+    {"close",           edk2_close,      METH_VARARGS, edk2_close__doc__},\r
+    {"closerange",      edk2_closerange, METH_VARARGS, edk2_closerange__doc__},\r
+    {"dup",             edk2_dup,        METH_VARARGS, edk2_dup__doc__},\r
+    {"dup2",            edk2_dup2,       METH_VARARGS, edk2_dup2__doc__},\r
+    {"lseek",           edk2_lseek,      METH_VARARGS, edk2_lseek__doc__},\r
+    {"read",            edk2_read,       METH_VARARGS, edk2_read__doc__},\r
+    {"write",           edk2_write,      METH_VARARGS, edk2_write__doc__},\r
+    {"fstat",           edk2_fstat,      METH_VARARGS, edk2_fstat__doc__},\r
+    {"fdopen",          edk2_fdopen,     METH_VARARGS, edk2_fdopen__doc__},\r
+    {"isatty",          edk2_isatty,     METH_VARARGS, edk2_isatty__doc__},\r
 #ifdef HAVE_PIPE\r
-    {"pipe",            posix_pipe, METH_NOARGS, posix_pipe__doc__},\r
+    {"pipe",            edk2_pipe, METH_NOARGS, edk2_pipe__doc__},\r
 #endif\r
 #ifdef HAVE_MKFIFO\r
-    {"mkfifo",          posix_mkfifo, METH_VARARGS, posix_mkfifo__doc__},\r
+    {"mkfifo",          edk2_mkfifo, METH_VARARGS, edk2_mkfifo__doc__},\r
 #endif\r
 #if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)\r
-    {"mknod",           posix_mknod, METH_VARARGS, posix_mknod__doc__},\r
+    {"mknod",           edk2_mknod, METH_VARARGS, edk2_mknod__doc__},\r
 #endif\r
 #ifdef HAVE_DEVICE_MACROS\r
-    {"major",           posix_major, METH_VARARGS, posix_major__doc__},\r
-    {"minor",           posix_minor, METH_VARARGS, posix_minor__doc__},\r
-    {"makedev",         posix_makedev, METH_VARARGS, posix_makedev__doc__},\r
+    {"major",           edk2_major, METH_VARARGS, edk2_major__doc__},\r
+    {"minor",           edk2_minor, METH_VARARGS, edk2_minor__doc__},\r
+    {"makedev",         edk2_makedev, METH_VARARGS, edk2_makedev__doc__},\r
 #endif\r
 #ifdef HAVE_FTRUNCATE\r
-    {"ftruncate",       posix_ftruncate, METH_VARARGS, posix_ftruncate__doc__},\r
+    {"ftruncate",       edk2_ftruncate, METH_VARARGS, edk2_ftruncate__doc__},\r
 #endif\r
 #ifdef HAVE_PUTENV\r
-    {"putenv",          posix_putenv, METH_VARARGS, posix_putenv__doc__},\r
+    {"putenv",          edk2_putenv, METH_VARARGS, edk2_putenv__doc__},\r
 #endif\r
 #ifdef HAVE_UNSETENV\r
-    {"unsetenv",        posix_unsetenv, METH_VARARGS, posix_unsetenv__doc__},\r
+    {"unsetenv",        edk2_unsetenv, METH_VARARGS, edk2_unsetenv__doc__},\r
 #endif\r
-    {"strerror",        posix_strerror,   METH_VARARGS, posix_strerror__doc__},\r
+    {"strerror",        edk2_strerror,   METH_VARARGS, edk2_strerror__doc__},\r
 #ifdef HAVE_FCHDIR\r
-    {"fchdir",          posix_fchdir, METH_O, posix_fchdir__doc__},\r
+    {"fchdir",          edk2_fchdir, METH_O, edk2_fchdir__doc__},\r
 #endif\r
 #ifdef HAVE_FSYNC\r
-    {"fsync",       posix_fsync, METH_O, posix_fsync__doc__},\r
+    {"fsync",       edk2_fsync, METH_O, edk2_fsync__doc__},\r
 #endif\r
 #ifdef HAVE_FDATASYNC\r
-    {"fdatasync",   posix_fdatasync,  METH_O, posix_fdatasync__doc__},\r
+    {"fdatasync",   edk2_fdatasync,  METH_O, edk2_fdatasync__doc__},\r
 #endif\r
 #ifdef HAVE_SYS_WAIT_H\r
 #ifdef WCOREDUMP\r
-    {"WCOREDUMP",       posix_WCOREDUMP, METH_VARARGS, posix_WCOREDUMP__doc__},\r
+    {"WCOREDUMP",       edk2_WCOREDUMP, METH_VARARGS, edk2_WCOREDUMP__doc__},\r
 #endif /* WCOREDUMP */\r
 #ifdef WIFCONTINUED\r
-    {"WIFCONTINUED",posix_WIFCONTINUED, METH_VARARGS, posix_WIFCONTINUED__doc__},\r
+    {"WIFCONTINUED",edk2_WIFCONTINUED, METH_VARARGS, edk2_WIFCONTINUED__doc__},\r
 #endif /* WIFCONTINUED */\r
 #ifdef WIFSTOPPED\r
-    {"WIFSTOPPED",      posix_WIFSTOPPED, METH_VARARGS, posix_WIFSTOPPED__doc__},\r
+    {"WIFSTOPPED",      edk2_WIFSTOPPED, METH_VARARGS, edk2_WIFSTOPPED__doc__},\r
 #endif /* WIFSTOPPED */\r
 #ifdef WIFSIGNALED\r
-    {"WIFSIGNALED",     posix_WIFSIGNALED, METH_VARARGS, posix_WIFSIGNALED__doc__},\r
+    {"WIFSIGNALED",     edk2_WIFSIGNALED, METH_VARARGS, edk2_WIFSIGNALED__doc__},\r
 #endif /* WIFSIGNALED */\r
 #ifdef WIFEXITED\r
-    {"WIFEXITED",       posix_WIFEXITED, METH_VARARGS, posix_WIFEXITED__doc__},\r
+    {"WIFEXITED",       edk2_WIFEXITED, METH_VARARGS, edk2_WIFEXITED__doc__},\r
 #endif /* WIFEXITED */\r
 #ifdef WEXITSTATUS\r
-    {"WEXITSTATUS",     posix_WEXITSTATUS, METH_VARARGS, posix_WEXITSTATUS__doc__},\r
+    {"WEXITSTATUS",     edk2_WEXITSTATUS, METH_VARARGS, edk2_WEXITSTATUS__doc__},\r
 #endif /* WEXITSTATUS */\r
 #ifdef WTERMSIG\r
-    {"WTERMSIG",        posix_WTERMSIG, METH_VARARGS, posix_WTERMSIG__doc__},\r
+    {"WTERMSIG",        edk2_WTERMSIG, METH_VARARGS, edk2_WTERMSIG__doc__},\r
 #endif /* WTERMSIG */\r
 #ifdef WSTOPSIG\r
-    {"WSTOPSIG",        posix_WSTOPSIG, METH_VARARGS, posix_WSTOPSIG__doc__},\r
+    {"WSTOPSIG",        edk2_WSTOPSIG, METH_VARARGS, edk2_WSTOPSIG__doc__},\r
 #endif /* WSTOPSIG */\r
 #endif /* HAVE_SYS_WAIT_H */\r
 #if defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H)\r
-    {"fstatvfs",        posix_fstatvfs, METH_VARARGS, posix_fstatvfs__doc__},\r
+    {"fstatvfs",        edk2_fstatvfs, METH_VARARGS, edk2_fstatvfs__doc__},\r
 #endif\r
 #if defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)\r
-    {"statvfs",         posix_statvfs, METH_VARARGS, posix_statvfs__doc__},\r
+    {"statvfs",         edk2_statvfs, METH_VARARGS, edk2_statvfs__doc__},\r
 #endif\r
 #ifdef HAVE_TMPFILE\r
-    {"tmpfile",         posix_tmpfile,    METH_NOARGS,  posix_tmpfile__doc__},\r
+    {"tmpfile",         edk2_tmpfile,    METH_NOARGS,  edk2_tmpfile__doc__},\r
 #endif\r
 #ifdef HAVE_TEMPNAM\r
-    {"tempnam",         posix_tempnam,    METH_VARARGS, posix_tempnam__doc__},\r
+    {"tempnam",         edk2_tempnam,    METH_VARARGS, edk2_tempnam__doc__},\r
 #endif\r
 #ifdef HAVE_TMPNAM\r
-    {"tmpnam",          posix_tmpnam,     METH_NOARGS,  posix_tmpnam__doc__},\r
+    {"tmpnam",          edk2_tmpnam,     METH_NOARGS,  edk2_tmpnam__doc__},\r
 #endif\r
 #ifdef HAVE_CONFSTR\r
-    {"confstr",         posix_confstr, METH_VARARGS, posix_confstr__doc__},\r
+    {"confstr",         edk2_confstr, METH_VARARGS, edk2_confstr__doc__},\r
 #endif\r
 #ifdef HAVE_SYSCONF\r
-    {"sysconf",         posix_sysconf, METH_VARARGS, posix_sysconf__doc__},\r
+    {"sysconf",         edk2_sysconf, METH_VARARGS, edk2_sysconf__doc__},\r
 #endif\r
 #ifdef HAVE_FPATHCONF\r
-    {"fpathconf",       posix_fpathconf, METH_VARARGS, posix_fpathconf__doc__},\r
+    {"fpathconf",       edk2_fpathconf, METH_VARARGS, edk2_fpathconf__doc__},\r
 #endif\r
 #ifdef HAVE_PATHCONF\r
-    {"pathconf",        posix_pathconf, METH_VARARGS, posix_pathconf__doc__},\r
+    {"pathconf",        edk2_pathconf, METH_VARARGS, edk2_pathconf__doc__},\r
 #endif\r
-    {"abort",           posix_abort,      METH_NOARGS,  posix_abort__doc__},\r
+    {"abort",           edk2_abort,      METH_NOARGS,  edk2_abort__doc__},\r
 \r
     {NULL,              NULL}            /* Sentinel */\r
 };\r
@@ -4170,7 +4170,7 @@ INITFUNC(void)
 #endif\r
 \r
     m = Py_InitModule3(MODNAME,\r
-                       posix_methods,\r
+                       edk2_methods,\r
                        edk2__doc__);\r
     if (m == NULL)\r
         return;\r
@@ -4194,8 +4194,8 @@ INITFUNC(void)
     PyModule_AddObject(m, "error", PyExc_OSError);\r
 \r
 #ifdef HAVE_PUTENV\r
-    if (posix_putenv_garbage == NULL)\r
-        posix_putenv_garbage = PyDict_New();\r
+    if (edk2_putenv_garbage == NULL)\r
+        edk2_putenv_garbage = PyDict_New();\r
 #endif\r
 \r
     if (!initialized) {\r