Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 87ea6f0

Browse files
committed
Use #define instead of typedef for plperl because perl defines
uid_t/gid_t too.
1 parent afa66ff commit 87ea6f0

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/include/port/win32.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.37 2004/10/06 09:35:23 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.38 2004/10/06 16:36:02 momjian Exp $ */
22

33
/* undefine and redefine after #include */
44
#undef mkdir
@@ -194,9 +194,17 @@ int setitimer(int which, const struct itimerval * value, struct itimerval * ov
194194

195195
/*
196196
* Supplement to <sys/types.h>.
197+
*
198+
* Perl already has conflicting defines for uid_t and gid_t.
197199
*/
200+
#ifndef PLPERL_HAVE_UID_GID
198201
typedef int uid_t;
199202
typedef int gid_t;
203+
#else
204+
/* These are redefined by perl. */
205+
#define int uid_t;
206+
#define int gid_t;
207+
#endif
200208
typedef long key_t;
201209

202210
/*

src/pl/plperl/plperl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
* ENHANCEMENTS, OR MODIFICATIONS.
3434
*
3535
* IDENTIFICATION
36-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.51 2004/09/13 20:08:59 tgl Exp $
36+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.52 2004/10/06 16:36:02 momjian Exp $
3737
*
3838
**********************************************************************/
3939

40+
#define PLPERL_HAVE_UID_GID
4041
#include "postgres.h"
4142

4243
/* system stuff */

0 commit comments

Comments
 (0)