Skip to content

Commit e3c1dee

Browse files
higuoxingBradford Boyle
authored andcommitted
[orafce] Rename pipe type to orafce_pipe to resolve its conflict with (#13938)
pipe function from unistd.h. This PR is back-ported from orafce/orafce@1f162a6 Co-authored-by: Bradford Boyle <bradfordb@vmware.com>
1 parent 60790f0 commit e3c1dee

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

gpcontrib/orafce/pipe.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ typedef struct {
9191
int16 count;
9292
int16 limit;
9393
int size;
94-
} pipe_desc;
94+
} orafce_pipe;
9595

9696
typedef struct {
9797
int32 size;
@@ -130,7 +130,7 @@ typedef struct
130130

131131
#endif
132132

133-
pipe_desc *pipes;
133+
orafce_pipe *pipes;
134134
alert_event *events;
135135
alert_lock *locks;
136136
size_t size;
@@ -143,7 +143,7 @@ typedef struct
143143
message_buffer *output_buffer = NULL;
144144
message_buffer *input_buffer = NULL;
145145

146-
pipe_desc* pipes = NULL;
146+
orafce_pipe* pipes = NULL;
147147

148148
#define NOT_INITIALIZED NULL
149149

@@ -274,7 +274,7 @@ ora_lock_shmem(size_t size, int max_pipes, int max_events, int max_locks, bool r
274274

275275
sh_mem->size = size - sh_memory_size;
276276
ora_sinit(sh_mem->data, size, true);
277-
pipes = sh_mem->pipes = ora_salloc(max_pipes*sizeof(pipe_desc));
277+
pipes = sh_mem->pipes = ora_salloc(max_pipes*sizeof(orafce_pipe));
278278
sid = sh_mem->sid = 1;
279279
for (i = 0; i < max_pipes; i++)
280280
pipes[i].is_valid = false;
@@ -347,11 +347,11 @@ ora_lock_shmem(size_t size, int max_pipes, int max_events, int max_locks, bool r
347347
* can be enhanced access/hash.h
348348
*/
349349

350-
static pipe_desc*
350+
static orafce_pipe*
351351
find_pipe(text* pipe_name, bool* created, bool only_check)
352352
{
353353
int i;
354-
pipe_desc *result = NULL;
354+
orafce_pipe *result = NULL;
355355

356356
*created = false;
357357
for (i = 0; i < MAX_PIPES; i++)
@@ -401,7 +401,7 @@ find_pipe(text* pipe_name, bool* created, bool only_check)
401401

402402

403403
static bool
404-
new_last(pipe_desc *p, void *ptr)
404+
new_last(orafce_pipe *p, void *ptr)
405405
{
406406
queue_item *q, *aux_q;
407407

@@ -436,7 +436,7 @@ new_last(pipe_desc *p, void *ptr)
436436

437437

438438
static void*
439-
remove_first(pipe_desc *p, bool *found)
439+
remove_first(orafce_pipe *p, bool *found)
440440
{
441441
struct _queue_item *q;
442442
void *ptr = NULL;
@@ -468,7 +468,7 @@ remove_first(pipe_desc *p, bool *found)
468468
static message_buffer*
469469
get_from_pipe(text *pipe_name, bool *found)
470470
{
471-
pipe_desc *p;
471+
orafce_pipe *p;
472472
bool created;
473473
message_buffer *shm_msg;
474474
message_buffer *result = NULL;
@@ -504,7 +504,7 @@ get_from_pipe(text *pipe_name, bool *found)
504504
static bool
505505
add_to_pipe(text *pipe_name, message_buffer *ptr, int limit, bool limit_is_valid)
506506
{
507-
pipe_desc *p;
507+
orafce_pipe *p;
508508
bool created;
509509
bool result = false;
510510
message_buffer *sh_ptr;
@@ -556,7 +556,7 @@ add_to_pipe(text *pipe_name, message_buffer *ptr, int limit, bool limit_is_valid
556556
static void
557557
remove_pipe(text *pipe_name, bool purge)
558558
{
559-
pipe_desc *p;
559+
orafce_pipe *p;
560560
bool created;
561561

562562
if (NULL != (p = find_pipe(pipe_name, &created, true)))
@@ -1162,7 +1162,7 @@ dbms_pipe_create_pipe (PG_FUNCTION_ARGS)
11621162
WATCH_PRE(timeout, endtime, cycle);
11631163
if (ora_lock_shmem(SHMEMMSGSZ, MAX_PIPES,MAX_EVENTS,MAX_LOCKS,false))
11641164
{
1165-
pipe_desc *p;
1165+
orafce_pipe *p;
11661166
if (NULL != (p = find_pipe(pipe_name, &created, false)))
11671167
{
11681168
if (!created)

gpcontrib/orafce/sqlscan.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#line 2 "sqlscan.c"
1+
#line 1 "sqlscan.c"
22

3-
#line 4 "sqlscan.c"
3+
#line 3 "sqlscan.c"
44

55
#define YY_INT_ALIGNED short int
66

@@ -1004,7 +1004,7 @@ static unsigned char unescape_single_char(unsigned char c);
10041004
#define _pg_mbstrlen_with_len(buf,loc) pg_mbstrlen_with_len(buf,loc)
10051005
#endif
10061006

1007-
#line 1008 "sqlscan.c"
1007+
#line 1007 "sqlscan.c"
10081008
#define YY_NO_INPUT 1
10091009
/*
10101010
* OK, here is a short description of lex/flex rules behavior.
@@ -1132,7 +1132,7 @@ static unsigned char unescape_single_char(unsigned char c);
11321132
* Note that xcstart must appear before operator, as explained above!
11331133
* Also whitespace (comment) must appear before operator.
11341134
*/
1135-
#line 1136 "sqlscan.c"
1135+
#line 1135 "sqlscan.c"
11361136

11371137
#define INITIAL 0
11381138
#define xb 1
@@ -1357,7 +1357,7 @@ YY_DECL
13571357
#line 308 "sqlscan.l"
13581358

13591359

1360-
#line 1361 "sqlscan.c"
1360+
#line 1360 "sqlscan.c"
13611361

13621362
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
13631363
{
@@ -2176,7 +2176,7 @@ YY_RULE_SETUP
21762176
#line 862 "sqlscan.l"
21772177
YY_FATAL_ERROR( "flex scanner jammed" );
21782178
YY_BREAK
2179-
#line 2180 "sqlscan.c"
2179+
#line 2179 "sqlscan.c"
21802180

21812181
case YY_END_OF_BUFFER:
21822182
{

0 commit comments

Comments
 (0)