Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9bb76d0

Browse files
committed
Rationalise perl header inclusions via a common include file, which alsodeclares routines in plperl.c and spi_internal.c used in other files.Along the way, also stop perl from hijacking stdio and other stuff on Windows.
1 parent2645cb5 commit9bb76d0

File tree

5 files changed

+54
-43
lines changed

5 files changed

+54
-43
lines changed

‎src/pl/plperl/SPI.xs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
#undef _
55

66
/* perl stuff */
7-
#include"EXTERN.h"
8-
#include"perl.h"
9-
#include"XSUB.h"
10-
#include"ppport.h"
11-
12-
#include"spi_internal.h"
7+
#include"plperl.h"
138

149

1510
/*

‎src/pl/plperl/plperl.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ENHANCEMENTS, OR MODIFICATIONS.
3434
*
3535
* IDENTIFICATION
36-
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.98 2005/12/29 14:28:31 adunstan Exp $
36+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.99 2006/01/08 22:27:52 adunstan Exp $
3737
*
3838
**********************************************************************/
3939

@@ -60,18 +60,7 @@
6060
externDLLIMPORTboolcheck_function_bodies;
6161

6262
/* perl stuff */
63-
#include"EXTERN.h"
64-
#include"perl.h"
65-
#include"XSUB.h"
66-
#include"ppport.h"
67-
#include"spi_internal.h"
68-
69-
/* just in case these symbols aren't provided */
70-
#ifndefpTHX_
71-
#definepTHX_
72-
#definepTHX void
73-
#endif
74-
63+
#include"plperl.h"
7564

7665
/**********************************************************************
7766
* The information we cache about loaded procedures

‎src/pl/plperl/plperl.h

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* plperl.h
4+
* Common include file for PL/Perl files
5+
*
6+
* This should be included _AFTER_ postgres.h and system include files
7+
*
8+
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
9+
* Portions Copyright (c) 1995, Regents of the University of California
10+
*
11+
* $PostgreSQL: pgsql/src/pl/plperl/plperl.h,v 1.1 2006/01/08 22:27:52 adunstan Exp $
12+
*/
13+
14+
#ifndefPL_PERL_H
15+
#definePL_PERL_H
16+
17+
/* stop perl headers from hijacking stdio and other stuff on Windows */
18+
#ifdefWIN32
19+
#defineWIN32IO_IS_STDIO
20+
#endif
21+
22+
/* required for perl API */
23+
#include"EXTERN.h"
24+
#include"perl.h"
25+
#include"XSUB.h"
26+
#include"ppport.h"
27+
28+
/* just in case these symbols aren't provided */
29+
#ifndefpTHX_
30+
#definepTHX_
31+
#definepTHX void
32+
#endif
33+
34+
/* routines from spi_internal.c */
35+
intspi_DEBUG(void);
36+
intspi_LOG(void);
37+
intspi_INFO(void);
38+
intspi_NOTICE(void);
39+
intspi_WARNING(void);
40+
intspi_ERROR(void);
41+
42+
/* routines from plperl.c */
43+
HV*plperl_spi_exec(char*,int);
44+
voidplperl_return_next(SV*);
45+
SV*plperl_spi_query(char*);
46+
SV*plperl_spi_fetchrow(char*);
47+
48+
49+
#endif/* PL_PERL_H */

‎src/pl/plperl/spi_internal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
/* Defined by Perl */
99
#undef _
1010

11-
#include"spi_internal.h"
12-
11+
/* perl stuff */
12+
#include"plperl.h"
1313

1414
int
1515
spi_DEBUG(void)

‎src/pl/plperl/spi_internal.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp