[Python-checkins] python/dist/src/Modules posixmodule.c,2.284,2.285

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Mon, 17 Feb 2003 10:17:08 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv21363/Modules

Modified Files:
	posixmodule.c 
Log Message:
Added test_posix (hopefully it works on Windows).
Remove PyArg_ParseTuple() for methods which take no args,
use METH_NOARGS instead


Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.284
retrieving revision 2.285
diff -C2 -d -r2.284 -r2.285
*** posixmodule.c	11 Feb 2003 23:05:39 -0000	2.284
--- posixmodule.c	17 Feb 2003 18:17:03 -0000	2.285
***************
*** 1314,1325 ****
  
  static PyObject *
! posix_ctermid(PyObject *self, PyObject *args)
  {
          char *ret;
          char buffer[L_ctermid];
  
- 	if (!PyArg_ParseTuple(args, ":ctermid"))
- 		return NULL;
- 
  #ifdef USE_CTERMID_R
  	ret = ctermid_r(buffer);
--- 1314,1322 ----
  
  static PyObject *
! posix_ctermid(PyObject *self, PyObject *noargs)
  {
          char *ret;
          char buffer[L_ctermid];
  
  #ifdef USE_CTERMID_R
  	ret = ctermid_r(buffer);
***************
*** 1480,1484 ****
  	res = lchown(path, (uid_t) uid, (gid_t) gid);
  	Py_END_ALLOW_THREADS
! 	if (res < 0)
  		return posix_error_with_allocated_filename(path);
  	PyMem_Free(path);
--- 1477,1481 ----
  	res = lchown(path, (uid_t) uid, (gid_t) gid);
  	Py_END_ALLOW_THREADS
! 	if (res < 0) 
  		return posix_error_with_allocated_filename(path);
  	PyMem_Free(path);
***************
*** 1495,1504 ****
  
  static PyObject *
! posix_getcwd(PyObject *self, PyObject *args)
  {
  	char buf[1026];
  	char *res;
! 	if (!PyArg_ParseTuple(args, ":getcwd"))
! 		return NULL;
  	Py_BEGIN_ALLOW_THREADS
  #if defined(PYOS_OS2) && defined(PYCC_GCC)
--- 1492,1500 ----
  
  static PyObject *
! posix_getcwd(PyObject *self, PyObject *noargs)
  {
  	char buf[1026];
  	char *res;
! 
  	Py_BEGIN_ALLOW_THREADS
  #if defined(PYOS_OS2) && defined(PYCC_GCC)
***************
*** 1524,1533 ****
  
  static PyObject *
! posix_getcwdu(PyObject *self, PyObject *args)
  {
  	char buf[1026];
  	char *res;
- 	if (!PyArg_ParseTuple(args, ":getcwd"))
- 		return NULL;
  
  #ifdef Py_WIN_WIDE_FILENAMES
--- 1520,1527 ----
  
  static PyObject *
! posix_getcwdu(PyObject *self, PyObject *noargs)
  {
  	char buf[1026];
  	char *res;
  
  #ifdef Py_WIN_WIDE_FILENAMES
***************
*** 2055,2064 ****
  
  static PyObject *
! posix_uname(PyObject *self, PyObject *args)
  {
  	struct utsname u;
  	int res;
! 	if (!PyArg_ParseTuple(args, ":uname"))
! 		return NULL;
  	Py_BEGIN_ALLOW_THREADS
  	res = uname(&u);
--- 2049,2057 ----
  
  static PyObject *
! posix_uname(PyObject *self, PyObject *noargs)
  {
  	struct utsname u;
  	int res;
! 
  	Py_BEGIN_ALLOW_THREADS
  	res = uname(&u);
***************
*** 2686,2697 ****
  
  static PyObject *
! posix_fork1(self, args)
! 	PyObject *self;
! 	PyObject *args;
  {
! 	int pid;
! 	if (!PyArg_ParseTuple(args, ":fork1"))
! 		return NULL;
! 	pid = fork1();
  	if (pid == -1)
  		return posix_error();
--- 2679,2685 ----
  
  static PyObject *
! posix_fork1(PyObject *self, PyObject *noargs)
  {
! 	int pid = fork1();
  	if (pid == -1)
  		return posix_error();
***************
*** 2709,2718 ****
  
  static PyObject *
! posix_fork(PyObject *self, PyObject *args)
  {
! 	int pid;
! 	if (!PyArg_ParseTuple(args, ":fork"))
! 		return NULL;
! 	pid = fork();
  	if (pid == -1)
  		return posix_error();
--- 2697,2703 ----
  
  static PyObject *
! posix_fork(PyObject *self, PyObject *noargs)
  {
! 	int pid = fork();
  	if (pid == -1)
  		return posix_error();
***************
*** 2742,2746 ****
  
  static PyObject *
! posix_openpty(PyObject *self, PyObject *args)
  {
  	int master_fd, slave_fd;
--- 2727,2731 ----
  
  static PyObject *
! posix_openpty(PyObject *self, PyObject *noargs)
  {
  	int master_fd, slave_fd;
***************
*** 2755,2761 ****
  #endif
  
- 	if (!PyArg_ParseTuple(args, ":openpty"))
- 		return NULL;
- 
  #ifdef HAVE_OPENPTY
  	if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0)
--- 2740,2743 ----
***************
*** 2813,2822 ****
  
  static PyObject *
! posix_forkpty(PyObject *self, PyObject *args)
  {
  	int master_fd, pid;
  
- 	if (!PyArg_ParseTuple(args, ":forkpty"))
- 		return NULL;
  	pid = forkpty(&master_fd, NULL, NULL, NULL);
  	if (pid == -1)
--- 2795,2802 ----
  
  static PyObject *
! posix_forkpty(PyObject *self, PyObject *noargs)
  {
  	int master_fd, pid;
  
  	pid = forkpty(&master_fd, NULL, NULL, NULL);
  	if (pid == -1)
***************
*** 2834,2841 ****
  
  static PyObject *
! posix_getegid(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":getegid"))
- 		return NULL;
  	return PyInt_FromLong((long)getegid());
  }
--- 2814,2819 ----
  
  static PyObject *
! posix_getegid(PyObject *self, PyObject *noargs)
  {
  	return PyInt_FromLong((long)getegid());
  }
***************
*** 2849,2856 ****
  
  static PyObject *
! posix_geteuid(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":geteuid"))
- 		return NULL;
  	return PyInt_FromLong((long)geteuid());
  }
--- 2827,2832 ----
  
  static PyObject *
! posix_geteuid(PyObject *self, PyObject *noargs)
  {
  	return PyInt_FromLong((long)geteuid());
  }
***************
*** 2864,2871 ****
  
  static PyObject *
! posix_getgid(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":getgid"))
- 		return NULL;
  	return PyInt_FromLong((long)getgid());
  }
--- 2840,2845 ----
  
  static PyObject *
! posix_getgid(PyObject *self, PyObject *noargs)
  {
  	return PyInt_FromLong((long)getgid());
  }
***************
*** 2878,2885 ****
  
  static PyObject *
! posix_getpid(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":getpid"))
- 		return NULL;
  	return PyInt_FromLong((long)getpid());
  }
--- 2852,2857 ----
  
  static PyObject *
! posix_getpid(PyObject *self, PyObject *noargs)
  {
  	return PyInt_FromLong((long)getpid());
  }
***************
*** 2892,2900 ****
  
  static PyObject *
! posix_getgroups(PyObject *self, PyObject *args)
  {
      PyObject *result = NULL;
  
-     if (PyArg_ParseTuple(args, ":getgroups")) {
  #ifdef NGROUPS_MAX
  #define MAX_GROUPS NGROUPS_MAX
--- 2864,2871 ----
  
  static PyObject *
! posix_getgroups(PyObject *self, PyObject *noargs)
  {
      PyObject *result = NULL;
  
  #ifdef NGROUPS_MAX
  #define MAX_GROUPS NGROUPS_MAX
***************
*** 2912,2919 ****
              result = PyList_New(n);
              if (result != NULL) {
-                 PyObject *o;
                  int i;
                  for (i = 0; i < n; ++i) {
!                     o = PyInt_FromLong((long)grouplist[i]);
                      if (o == NULL) {
                          Py_DECREF(result);
--- 2883,2889 ----
              result = PyList_New(n);
              if (result != NULL) {
                  int i;
                  for (i = 0; i < n; ++i) {
!                     PyObject *o = PyInt_FromLong((long)grouplist[i]);
                      if (o == NULL) {
                          Py_DECREF(result);
***************
*** 2925,2929 ****
              }
          }
!     }
      return result;
  }
--- 2895,2899 ----
              }
          }
! 
      return result;
  }
***************
*** 2955,2962 ****
  
  static PyObject *
! posix_getpgrp(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":getpgrp"))
- 		return NULL;
  #ifdef GETPGRP_HAVE_ARG
  	return PyInt_FromLong((long)getpgrp(0));
--- 2925,2930 ----
  
  static PyObject *
! posix_getpgrp(PyObject *self, PyObject *noargs)
  {
  #ifdef GETPGRP_HAVE_ARG
  	return PyInt_FromLong((long)getpgrp(0));
***************
*** 2974,2981 ****
  
  static PyObject *
! posix_setpgrp(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":setpgrp"))
- 		return NULL;
  #ifdef SETPGRP_HAVE_ARG
  	if (setpgrp(0, 0) < 0)
--- 2942,2947 ----
  
  static PyObject *
! posix_setpgrp(PyObject *self, PyObject *noargs)
  {
  #ifdef SETPGRP_HAVE_ARG
  	if (setpgrp(0, 0) < 0)
***************
*** 2996,3003 ****
  
  static PyObject *
! posix_getppid(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":getppid"))
- 		return NULL;
  	return PyInt_FromLong((long)getppid());
  }
--- 2962,2967 ----
  
  static PyObject *
! posix_getppid(PyObject *self, PyObject *noargs)
  {
  	return PyInt_FromLong((long)getppid());
  }
***************
*** 3011,3019 ****
  
  static PyObject *
! posix_getlogin(PyObject *self, PyObject *args)
  {
!     PyObject *result = NULL;
! 
!     if (PyArg_ParseTuple(args, ":getlogin")) {
          char *name;
          int old_errno = errno;
--- 2975,2981 ----
  
  static PyObject *
! posix_getlogin(PyObject *self, PyObject *noargs)
  {
!         PyObject *result = NULL;
          char *name;
          int old_errno = errno;
***************
*** 3031,3035 ****
              result = PyString_FromString(name);
          errno = old_errno;
!     }
      return result;
  }
--- 2993,2997 ----
              result = PyString_FromString(name);
          errno = old_errno;
! 
      return result;
  }
***************
*** 3042,3049 ****
  
  static PyObject *
! posix_getuid(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":getuid"))
- 		return NULL;
  	return PyInt_FromLong((long)getuid());
  }
--- 3004,3009 ----
  
  static PyObject *
! posix_getuid(PyObject *self, PyObject *noargs)
  {
  	return PyInt_FromLong((long)getuid());
  }
***************
*** 4902,4906 ****
  
  static PyObject *
! posix_wait(PyObject *self, PyObject *args)
  {
  	int pid;
--- 4862,4866 ----
  
  static PyObject *
! posix_wait(PyObject *self, PyObject *noargs)
  {
  	int pid;
***************
*** 4912,4917 ****
  #define status_i status
  #endif
!         if (!PyArg_ParseTuple(args, ":wait"))
!                 return NULL;
  	status_i = 0;
  	Py_BEGIN_ALLOW_THREADS
--- 4872,4876 ----
  #define status_i status
  #endif
! 
  	status_i = 0;
  	Py_BEGIN_ALLOW_THREADS
***************
*** 5001,5009 ****
  
  static PyObject *
! posix_times(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":times"))
- 		return NULL;
- 
      /* Currently Only Uptime is Provided -- Others Later */
  	return Py_BuildValue("ddddd",
--- 4960,4965 ----
  
  static PyObject *
! posix_times(PyObject *self, PyObject *noargs)
  {
      /* Currently Only Uptime is Provided -- Others Later */
  	return Py_BuildValue("ddddd",
***************
*** 5016,5025 ****
  #else /* not OS2 */
  static PyObject *
! posix_times(PyObject *self, PyObject *args)
  {
  	struct tms t;
  	clock_t c;
- 	if (!PyArg_ParseTuple(args, ":times"))
- 		return NULL;
  	errno = 0;
  	c = times(&t);
--- 4972,4979 ----
  #else /* not OS2 */
  static PyObject *
! posix_times(PyObject *self, PyObject *noargs)
  {
  	struct tms t;
  	clock_t c;
  	errno = 0;
  	c = times(&t);
***************
*** 5040,5049 ****
  #define HAVE_TIMES	/* so the method table will pick it up */
  static PyObject *
! posix_times(PyObject *self, PyObject *args)
  {
  	FILETIME create, exit, kernel, user;
  	HANDLE hProc;
- 	if (!PyArg_ParseTuple(args, ":times"))
- 		return NULL;
  	hProc = GetCurrentProcess();
  	GetProcessTimes(hProc, &create, &exit, &kernel, &user);
--- 4994,5001 ----
  #define HAVE_TIMES	/* so the method table will pick it up */
  static PyObject *
! posix_times(PyObject *self, PyObject *noargs)
  {
  	FILETIME create, exit, kernel, user;
  	HANDLE hProc;
  	hProc = GetCurrentProcess();
  	GetProcessTimes(hProc, &create, &exit, &kernel, &user);
***************
*** 5078,5085 ****
  
  static PyObject *
! posix_setsid(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":setsid"))
- 		return NULL;
  	if (setsid() < 0)
  		return posix_error();
--- 5030,5035 ----
  
  static PyObject *
! posix_setsid(PyObject *self, PyObject *noargs)
  {
  	if (setsid() < 0)
  		return posix_error();
***************
*** 5425,5429 ****
  
  static PyObject *
! posix_pipe(PyObject *self, PyObject *args)
  {
  #if defined(PYOS_OS2)
--- 5375,5379 ----
  
  static PyObject *
! posix_pipe(PyObject *self, PyObject *noargs)
  {
  #if defined(PYOS_OS2)
***************
*** 5431,5437 ****
      APIRET rc;
  
-     if (!PyArg_ParseTuple(args, ":pipe"))
-         return NULL;
- 
  	Py_BEGIN_ALLOW_THREADS
      rc = DosCreatePipe( &read, &write, 4096);
--- 5381,5384 ----
***************
*** 5445,5450 ****
  	int fds[2];
  	int res;
- 	if (!PyArg_ParseTuple(args, ":pipe"))
- 		return NULL;
  	Py_BEGIN_ALLOW_THREADS
  #if defined(__VMS)
--- 5392,5395 ----
***************
*** 5461,5466 ****
  	int read_fd, write_fd;
  	BOOL ok;
- 	if (!PyArg_ParseTuple(args, ":pipe"))
- 		return NULL;
  	Py_BEGIN_ALLOW_THREADS
  	ok = CreatePipe(&read, &write, NULL, 0);
--- 5406,5409 ----
***************
*** 6105,6114 ****
  
  static PyObject *
! posix_tmpfile(PyObject *self, PyObject *args)
  {
      FILE *fp;
  
-     if (!PyArg_ParseTuple(args, ":tmpfile"))
-         return NULL;
      fp = tmpfile();
      if (fp == NULL)
--- 6048,6055 ----
  
  static PyObject *
! posix_tmpfile(PyObject *self, PyObject *noargs)
  {
      FILE *fp;
  
      fp = tmpfile();
      if (fp == NULL)
***************
*** 6125,6136 ****
  
  static PyObject *
! posix_tmpnam(PyObject *self, PyObject *args)
  {
      char buffer[L_tmpnam];
      char *name;
  
-     if (!PyArg_ParseTuple(args, ":tmpnam"))
-         return NULL;
- 
      if (PyErr_Warn(PyExc_RuntimeWarning,
  		  "tmpnam is a potential security risk to your program") < 0)
--- 6066,6074 ----
  
  static PyObject *
! posix_tmpnam(PyObject *self, PyObject *noargs)
  {
      char buffer[L_tmpnam];
      char *name;
  
      if (PyErr_Warn(PyExc_RuntimeWarning,
  		  "tmpnam is a potential security risk to your program") < 0)
***************
*** 7136,7143 ****
  
  static PyObject *
! posix_abort(PyObject *self, PyObject *args)
  {
-     if (!PyArg_ParseTuple(args, ":abort"))
-         return NULL;
      abort();
      /*NOTREACHED*/
--- 7074,7079 ----
  
  static PyObject *
! posix_abort(PyObject *self, PyObject *noargs)
  {
      abort();
      /*NOTREACHED*/
***************
*** 7187,7195 ****
  
  static PyObject *
! posix_getloadavg(PyObject *self, PyObject *args)
  {
      double loadavg[3];
-     if (!PyArg_ParseTuple(args, ":getloadavg"))
-         return NULL;
      if (getloadavg(loadavg, 3)!=3) {
          PyErr_SetString(PyExc_OSError, "Load averages are unobtainable");
--- 7123,7129 ----
  
  static PyObject *
! posix_getloadavg(PyObject *self, PyObject *noargs)
  {
      double loadavg[3];
      if (getloadavg(loadavg, 3)!=3) {
          PyErr_SetString(PyExc_OSError, "Load averages are unobtainable");
***************
*** 7218,7227 ****
  #endif
  #ifdef HAVE_CTERMID
! 	{"ctermid",	posix_ctermid, METH_VARARGS, posix_ctermid__doc__},
  #endif
  #ifdef HAVE_GETCWD
! 	{"getcwd",	posix_getcwd, METH_VARARGS, posix_getcwd__doc__},
  #ifdef Py_USING_UNICODE
! 	{"getcwdu",	posix_getcwdu, METH_VARARGS, posix_getcwdu__doc__},
  #endif
  #endif
--- 7152,7161 ----
  #endif
  #ifdef HAVE_CTERMID
! 	{"ctermid",	posix_ctermid, METH_NOARGS, posix_ctermid__doc__},
  #endif
  #ifdef HAVE_GETCWD
! 	{"getcwd",	posix_getcwd, METH_NOARGS, posix_getcwd__doc__},
  #ifdef Py_USING_UNICODE
! 	{"getcwdu",	posix_getcwdu, METH_NOARGS, posix_getcwdu__doc__},
  #endif
  #endif
***************
*** 7250,7254 ****
  	{"umask",	posix_umask, METH_VARARGS, posix_umask__doc__},
  #ifdef HAVE_UNAME
! 	{"uname",	posix_uname, METH_VARARGS, posix_uname__doc__},
  #endif /* HAVE_UNAME */
  	{"unlink",	posix_unlink, METH_VARARGS, posix_unlink__doc__},
--- 7184,7188 ----
  	{"umask",	posix_umask, METH_VARARGS, posix_umask__doc__},
  #ifdef HAVE_UNAME
! 	{"uname",	posix_uname, METH_NOARGS, posix_uname__doc__},
  #endif /* HAVE_UNAME */
  	{"unlink",	posix_unlink, METH_VARARGS, posix_unlink__doc__},
***************
*** 7256,7260 ****
  	{"utime",	posix_utime, METH_VARARGS, posix_utime__doc__},
  #ifdef HAVE_TIMES
! 	{"times",	posix_times, METH_VARARGS, posix_times__doc__},
  #endif /* HAVE_TIMES */
  	{"_exit",	posix__exit, METH_VARARGS, posix__exit__doc__},
--- 7190,7194 ----
  	{"utime",	posix_utime, METH_VARARGS, posix_utime__doc__},
  #ifdef HAVE_TIMES
! 	{"times",	posix_times, METH_NOARGS, posix_times__doc__},
  #endif /* HAVE_TIMES */
  	{"_exit",	posix__exit, METH_VARARGS, posix__exit__doc__},
***************
*** 7268,7306 ****
  #endif /* HAVE_SPAWNV */
  #ifdef HAVE_FORK1
! 	{"fork1",       posix_fork1, METH_VARARGS, posix_fork1__doc__},
  #endif /* HAVE_FORK1 */
  #ifdef HAVE_FORK
! 	{"fork",	posix_fork, METH_VARARGS, posix_fork__doc__},
  #endif /* HAVE_FORK */
  #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)
! 	{"openpty",	posix_openpty, METH_VARARGS, posix_openpty__doc__},
  #endif /* HAVE_OPENPTY || HAVE__GETPTY || HAVE_DEV_PTMX */
  #ifdef HAVE_FORKPTY
! 	{"forkpty",	posix_forkpty, METH_VARARGS, posix_forkpty__doc__},
  #endif /* HAVE_FORKPTY */
  #ifdef HAVE_GETEGID
! 	{"getegid",	posix_getegid, METH_VARARGS, posix_getegid__doc__},
  #endif /* HAVE_GETEGID */
  #ifdef HAVE_GETEUID
! 	{"geteuid",	posix_geteuid, METH_VARARGS, posix_geteuid__doc__},
  #endif /* HAVE_GETEUID */
  #ifdef HAVE_GETGID
! 	{"getgid",	posix_getgid, METH_VARARGS, posix_getgid__doc__},
  #endif /* HAVE_GETGID */
  #ifdef HAVE_GETGROUPS
! 	{"getgroups",	posix_getgroups, METH_VARARGS, posix_getgroups__doc__},
  #endif
! 	{"getpid",	posix_getpid, METH_VARARGS, posix_getpid__doc__},
  #ifdef HAVE_GETPGRP
! 	{"getpgrp",	posix_getpgrp, METH_VARARGS, posix_getpgrp__doc__},
  #endif /* HAVE_GETPGRP */
  #ifdef HAVE_GETPPID
! 	{"getppid",	posix_getppid, METH_VARARGS, posix_getppid__doc__},
  #endif /* HAVE_GETPPID */
  #ifdef HAVE_GETUID
! 	{"getuid",	posix_getuid, METH_VARARGS, posix_getuid__doc__},
  #endif /* HAVE_GETUID */
  #ifdef HAVE_GETLOGIN
! 	{"getlogin",	posix_getlogin, METH_VARARGS, posix_getlogin__doc__},
  #endif
  #ifdef HAVE_KILL
--- 7202,7240 ----
  #endif /* HAVE_SPAWNV */
  #ifdef HAVE_FORK1
! 	{"fork1",       posix_fork1, METH_NOARGS, posix_fork1__doc__},
  #endif /* HAVE_FORK1 */
  #ifdef HAVE_FORK
! 	{"fork",	posix_fork, METH_NOARGS, posix_fork__doc__},
  #endif /* HAVE_FORK */
  #if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)
! 	{"openpty",	posix_openpty, METH_NOARGS, posix_openpty__doc__},
  #endif /* HAVE_OPENPTY || HAVE__GETPTY || HAVE_DEV_PTMX */
  #ifdef HAVE_FORKPTY
! 	{"forkpty",	posix_forkpty, METH_NOARGS, posix_forkpty__doc__},
  #endif /* HAVE_FORKPTY */
  #ifdef HAVE_GETEGID
! 	{"getegid",	posix_getegid, METH_NOARGS, posix_getegid__doc__},
  #endif /* HAVE_GETEGID */
  #ifdef HAVE_GETEUID
! 	{"geteuid",	posix_geteuid, METH_NOARGS, posix_geteuid__doc__},
  #endif /* HAVE_GETEUID */
  #ifdef HAVE_GETGID
! 	{"getgid",	posix_getgid, METH_NOARGS, posix_getgid__doc__},
  #endif /* HAVE_GETGID */
  #ifdef HAVE_GETGROUPS
! 	{"getgroups",	posix_getgroups, METH_NOARGS, posix_getgroups__doc__},
  #endif
! 	{"getpid",	posix_getpid, METH_NOARGS, posix_getpid__doc__},
  #ifdef HAVE_GETPGRP
! 	{"getpgrp",	posix_getpgrp, METH_NOARGS, posix_getpgrp__doc__},
  #endif /* HAVE_GETPGRP */
  #ifdef HAVE_GETPPID
! 	{"getppid",	posix_getppid, METH_NOARGS, posix_getppid__doc__},
  #endif /* HAVE_GETPPID */
  #ifdef HAVE_GETUID
! 	{"getuid",	posix_getuid, METH_NOARGS, posix_getuid__doc__},
  #endif /* HAVE_GETUID */
  #ifdef HAVE_GETLOGIN
! 	{"getlogin",	posix_getlogin, METH_NOARGS, posix_getlogin__doc__},
  #endif
  #ifdef HAVE_KILL
***************
*** 7353,7360 ****
  #endif /* HAVE_GETPGID */
  #ifdef HAVE_SETPGRP
! 	{"setpgrp",	posix_setpgrp, METH_VARARGS, posix_setpgrp__doc__},
  #endif /* HAVE_SETPGRP */
  #ifdef HAVE_WAIT
! 	{"wait",	posix_wait, METH_VARARGS, posix_wait__doc__},
  #endif /* HAVE_WAIT */
  #if defined(HAVE_WAITPID) || defined(HAVE_CWAIT)
--- 7287,7294 ----
  #endif /* HAVE_GETPGID */
  #ifdef HAVE_SETPGRP
! 	{"setpgrp",	posix_setpgrp, METH_NOARGS, posix_setpgrp__doc__},
  #endif /* HAVE_SETPGRP */
  #ifdef HAVE_WAIT
! 	{"wait",	posix_wait, METH_NOARGS, posix_wait__doc__},
  #endif /* HAVE_WAIT */
  #if defined(HAVE_WAITPID) || defined(HAVE_CWAIT)
***************
*** 7362,7366 ****
  #endif /* HAVE_WAITPID */
  #ifdef HAVE_SETSID
! 	{"setsid",	posix_setsid, METH_VARARGS, posix_setsid__doc__},
  #endif /* HAVE_SETSID */
  #ifdef HAVE_SETPGID
--- 7296,7300 ----
  #endif /* HAVE_WAITPID */
  #ifdef HAVE_SETSID
! 	{"setsid",	posix_setsid, METH_NOARGS, posix_setsid__doc__},
  #endif /* HAVE_SETSID */
  #ifdef HAVE_SETPGID
***************
*** 7384,7388 ****
  	{"isatty",	posix_isatty, METH_VARARGS, posix_isatty__doc__},
  #ifdef HAVE_PIPE
! 	{"pipe",	posix_pipe, METH_VARARGS, posix_pipe__doc__},
  #endif
  #ifdef HAVE_MKFIFO
--- 7318,7322 ----
  	{"isatty",	posix_isatty, METH_VARARGS, posix_isatty__doc__},
  #ifdef HAVE_PIPE
! 	{"pipe",	posix_pipe, METH_NOARGS, posix_pipe__doc__},
  #endif
  #ifdef HAVE_MKFIFO
***************
*** 7451,7455 ****
  #endif
  #ifdef HAVE_TMPFILE
! 	{"tmpfile",	posix_tmpfile, METH_VARARGS, posix_tmpfile__doc__},
  #endif
  #ifdef HAVE_TEMPNAM
--- 7385,7389 ----
  #endif
  #ifdef HAVE_TMPFILE
! 	{"tmpfile",	posix_tmpfile, METH_NOARGS, posix_tmpfile__doc__},
  #endif
  #ifdef HAVE_TEMPNAM
***************
*** 7457,7461 ****
  #endif
  #ifdef HAVE_TMPNAM
! 	{"tmpnam",	posix_tmpnam, METH_VARARGS, posix_tmpnam__doc__},
  #endif
  #ifdef HAVE_CONFSTR
--- 7391,7395 ----
  #endif
  #ifdef HAVE_TMPNAM
! 	{"tmpnam",	posix_tmpnam, METH_NOARGS, posix_tmpnam__doc__},
  #endif
  #ifdef HAVE_CONFSTR
***************
*** 7471,7480 ****
  	{"pathconf",	posix_pathconf, METH_VARARGS, posix_pathconf__doc__},
  #endif
! 	{"abort",	posix_abort, METH_VARARGS, posix_abort__doc__},
  #ifdef MS_WINDOWS
  	{"_getfullpathname",	posix__getfullpathname, METH_VARARGS, NULL},
  #endif
  #ifdef HAVE_GETLOADAVG
! 	{"getloadavg",	posix_getloadavg, METH_VARARGS, posix_getloadavg__doc__},
  #endif
  	{NULL,		NULL}		 /* Sentinel */
--- 7405,7414 ----
  	{"pathconf",	posix_pathconf, METH_VARARGS, posix_pathconf__doc__},
  #endif
! 	{"abort",	posix_abort, METH_NOARGS, posix_abort__doc__},
  #ifdef MS_WINDOWS
  	{"_getfullpathname",	posix__getfullpathname, METH_VARARGS, NULL},
  #endif
  #ifdef HAVE_GETLOADAVG
! 	{"getloadavg",	posix_getloadavg, METH_NOARGS, posix_getloadavg__doc__},
  #endif
  	{NULL,		NULL}		 /* Sentinel */