1111 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
1212 * Portions Copyright (c) 1994, Regents of the University of California
1313 *
14- * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.58 2009/01/27 12:46:16 mha Exp $
14+ * $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.59 2009/01/28 15:32:21 mha Exp $
1515 *
1616 *-------------------------------------------------------------------------
1717 */
@@ -1333,9 +1333,9 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests)
13331333while (tests_left > 0 )
13341334{
13351335PID_TYPE p ;
1336- int exit_status ;
13371336
13381337#ifndef WIN32
1338+ int exit_status ;
13391339p = wait (& exit_status );
13401340
13411341if (p == INVALID_PID )
@@ -1345,6 +1345,7 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests)
13451345exit_nicely (2 );
13461346}
13471347#else
1348+ DWORD exit_status ;
13481349int r ;
13491350
13501351r = WaitForMultipleObjects (tests_left ,active_pids , FALSE,INFINITE );
@@ -1364,11 +1365,11 @@ wait_for_tests(PID_TYPE *pids, int *statuses, char **names, int num_tests)
13641365if (p == pids [i ])
13651366{
13661367#ifdef WIN32
1367- GetExitCodeProcess (pids [i ],( LPDWORD ) & exit_status );
1368+ GetExitCodeProcess (pids [i ],& exit_status );
13681369CloseHandle (pids [i ]);
13691370#endif
13701371pids [i ]= INVALID_PID ;
1371- statuses [i ]= exit_status ;
1372+ statuses [i ]= ( int ) exit_status ;
13721373if (names )
13731374status (" %s" ,names [i ]);
13741375tests_left -- ;