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

Commit77f5428

Browse files
committed
Fix a couple little problems with signed vs. unsigned
characters ...
1 parent17467bb commit77f5428

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/backend/libpq/pqcomm.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* Copyright (c) 1994, Regents of the University of California
77
*
8-
* $Id: pqcomm.c,v 1.64 1999/01/23 22:27:28 tgl Exp $
8+
* $Id: pqcomm.c,v 1.65 1999/01/24 02:47:15 tgl Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -83,8 +83,8 @@ extern FILE * debug_port; /* in util.c */
8383
/*
8484
* Buffers
8585
*/
86-
charPqSendBuffer[PQ_BUFFER_SIZE];
87-
charPqRecvBuffer[PQ_BUFFER_SIZE];
86+
unsignedcharPqSendBuffer[PQ_BUFFER_SIZE];
87+
unsignedcharPqRecvBuffer[PQ_BUFFER_SIZE];
8888
intPqSendPointer,PqRecvPointer,PqRecvLength;
8989

9090

@@ -173,8 +173,8 @@ pq_close()
173173
int
174174
pq_flush()
175175
{
176-
char*bufptr=PqSendBuffer;
177-
char*bufend=PqSendBuffer+PqSendPointer;
176+
unsignedchar*bufptr=PqSendBuffer;
177+
unsignedchar*bufend=PqSendBuffer+PqSendPointer;
178178

179179
while (bufptr<bufend)
180180
{
@@ -725,7 +725,7 @@ pq_putncharlen(char *s, int n)
725725
* Act like the stdio putc() function. Write one character
726726
* to the stream. Return this character, or EOF on error.
727727
*/
728-
intpq_putchar(charc)
728+
intpq_putchar(unsignedcharc)
729729
{
730730
if (PqSendPointer >=PQ_BUFFER_SIZE)
731731
if (pq_flush())/* If buffer is full, then flush it out */

‎src/include/libpq/libpq.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: libpq.h,v 1.24 1999/01/23 22:27:25 tgl Exp $
9+
* $Id: libpq.h,v 1.25 1999/01/24 02:47:15 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -263,7 +263,7 @@ extern intpq_getchar(void);
263263
externintpq_peekchar(void);
264264
externintpq_getnchar(char*s,intoff,intmaxlen);
265265
externintpq_getint(intb);
266-
externintpq_putchar(charc);
266+
externintpq_putchar(unsignedcharc);
267267
externvoidpq_putstr(char*s);
268268
externvoidpq_putnchar(char*s,intn);
269269
externvoidpq_putint(inti,intb);
@@ -291,9 +291,9 @@ extern void StreamClose(int sock);
291291

292292
#definePQ_BUFFER_SIZE 8192
293293

294-
externcharPqSendBuffer[PQ_BUFFER_SIZE];
294+
externunsignedcharPqSendBuffer[PQ_BUFFER_SIZE];
295295
externintPqSendPointer;/* Next index to store a byte in PqSendBuffer */
296-
externcharPqRecvBuffer[PQ_BUFFER_SIZE];
296+
externunsignedcharPqRecvBuffer[PQ_BUFFER_SIZE];
297297
externintPqRecvPointer;/* Next index to read a byte from PqRecvBuffer */
298298
externintPqRecvLength;/* End of data available in PqRecvBuffer */
299299

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp