Mass ANSIfication of function definitions. Doesn't cover all 'extern'
declarations yet, those come later.
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index e788d82..2ef46c0 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -100,11 +100,13 @@
*/
#ifdef _HAVE_BSDI
-static void _noop()
+static
+void _noop(void)
{
}
-static void PyThread__init_thread _P0()
+static void
+PyThread__init_thread(void)
{
/* DO AN INIT BY STARTING THE THREAD */
static int dummy = 0;
@@ -115,7 +117,8 @@
#else /* !_HAVE_BSDI */
-static void PyThread__init_thread _P0()
+static void
+PyThread__init_thread(void)
{
#if defined(_AIX) && defined(__GNUC__)
pthread_init();
@@ -129,7 +132,8 @@
*/
-int PyThread_start_new_thread _P2(func, void (*func) _P((void *)), arg, void *arg)
+int
+PyThread_start_new_thread(void (*func)(void *), void *arg)
{
pthread_t th;
int success;
@@ -144,7 +148,7 @@
(pthread_addr_t)arg
#elif defined(PY_PTHREAD_D6)
pthread_attr_default,
- (void* (*)_P((void *)))func,
+ (void* (*)(void *))func,
arg
#elif defined(PY_PTHREAD_D7)
pthread_attr_default,
@@ -152,7 +156,7 @@
arg
#elif defined(PY_PTHREAD_STD)
(pthread_attr_t*)NULL,
- (void* (*)_P((void *)))func,
+ (void* (*)(void *))func,
(void *)arg
#endif
);
@@ -167,7 +171,8 @@
return success != 0 ? 0 : 1;
}
-long PyThread_get_thread_ident _P0()
+long
+PyThread_get_thread_ident(void)
{
volatile pthread_t threadid;
if (!initialized)
@@ -177,7 +182,8 @@
return (long) *(long *) &threadid;
}
-static void do_PyThread_exit_thread _P1(no_cleanup, int no_cleanup)
+static void
+do_PyThread_exit_thread(int no_cleanup)
{
dprintf(("PyThread_exit_thread called\n"));
if (!initialized) {
@@ -188,18 +194,21 @@
}
}
-void PyThread_exit_thread _P0()
+void
+PyThread_exit_thread(void)
{
do_PyThread_exit_thread(0);
}
-void PyThread__exit_thread _P0()
+void
+PyThread__exit_thread(void)
{
do_PyThread_exit_thread(1);
}
#ifndef NO_EXIT_PROG
-static void do_PyThread_exit_prog _P2(status, int status, no_cleanup, int no_cleanup)
+static void
+do_PyThread_exit_prog(int status, int no_cleanup)
{
dprintf(("PyThread_exit_prog(%d) called\n", status));
if (!initialized)
@@ -209,12 +218,14 @@
exit(status);
}
-void PyThread_exit_prog _P1(status, int status)
+void
+PyThread_exit_prog(int status)
{
do_PyThread_exit_prog(status, 0);
}
-void PyThread__exit_prog _P1(status, int status)
+void
+PyThread__exit_prog(int status)
{
do_PyThread_exit_prog(status, 1);
}
@@ -223,7 +234,8 @@
/*
* Lock support.
*/
-PyThread_type_lock PyThread_allocate_lock _P0()
+PyThread_type_lock
+PyThread_allocate_lock(void)
{
pthread_lock *lock;
int status, error = 0;
@@ -255,7 +267,8 @@
return (PyThread_type_lock) lock;
}
-void PyThread_free_lock _P1(lock, PyThread_type_lock lock)
+void
+PyThread_free_lock(PyThread_type_lock lock)
{
pthread_lock *thelock = (pthread_lock *)lock;
int status, error = 0;
@@ -271,7 +284,8 @@
free((void *)thelock);
}
-int PyThread_acquire_lock _P2(lock, PyThread_type_lock lock, waitflag, int waitflag)
+int
+PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
{
int success;
pthread_lock *thelock = (pthread_lock *)lock;
@@ -308,7 +322,8 @@
return success;
}
-void PyThread_release_lock _P1(lock, PyThread_type_lock lock)
+void
+PyThread_release_lock(PyThread_type_lock lock)
{
pthread_lock *thelock = (pthread_lock *)lock;
int status, error = 0;
@@ -338,7 +353,8 @@
int value;
};
-PyThread_type_sema PyThread_allocate_sema _P1(value, int value)
+PyThread_type_sema
+PyThread_allocate_sema(int value)
{
struct semaphore *sema;
int status, error = 0;
@@ -365,7 +381,8 @@
return (PyThread_type_sema) sema;
}
-void PyThread_free_sema _P1(sema, PyThread_type_sema sema)
+void
+PyThread_free_sema(PyThread_type_sema sema)
{
int status, error = 0;
struct semaphore *thesema = (struct semaphore *) sema;
@@ -378,7 +395,8 @@
free((void *) thesema);
}
-int PyThread_down_sema _P2(sema, PyThread_type_sema sema, waitflag, int waitflag)
+int
+PyThread_down_sema(PyThread_type_sema sema, int waitflag)
{
int status, error = 0, success;
struct semaphore *thesema = (struct semaphore *) sema;
@@ -407,7 +425,8 @@
return success;
}
-void PyThread_up_sema _P1(sema, PyThread_type_sema sema)
+void
+PyThread_up_sema(PyThread_type_sema sema)
{
int status, error = 0;
struct semaphore *thesema = (struct semaphore *) sema;