1616 * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
1717 * Portions Copyright (c) 1994, Regents of the University of California
1818 *
19- *$Id: pqformat.c,v 1.21 2002/06/20 20:29:28 momjian Exp $
19+ *$Id: pqformat.c,v 1.22 2002/08/08 06:32:26 ishii Exp $
2020 *
2121 *-------------------------------------------------------------------------
2222 */
5252
5353#include "libpq/libpq.h"
5454#include "libpq/pqformat.h"
55- #ifdef MULTIBYTE
5655#include "mb/pg_wchar.h"
57- #endif
5856#ifdef HAVE_ENDIAN_H
5957#include <endian.h>
6058#endif
@@ -127,7 +125,6 @@ pq_sendbytes(StringInfo buf, const char *data, int datalen)
127125void
128126pq_sendcountedtext (StringInfo buf ,const char * str ,int slen )
129127{
130- #ifdef MULTIBYTE
131128char * p ;
132129
133130p = (char * )pg_server_to_client ((unsignedchar * )str ,slen );
@@ -139,7 +136,6 @@ pq_sendcountedtext(StringInfo buf, const char *str, int slen)
139136pfree (p );
140137return ;
141138}
142- #endif
143139pq_sendint (buf ,slen + 4 ,4 );
144140appendBinaryStringInfo (buf ,str ,slen );
145141}
@@ -156,7 +152,6 @@ pq_sendstring(StringInfo buf, const char *str)
156152{
157153int slen = strlen (str );
158154
159- #ifdef MULTIBYTE
160155char * p ;
161156
162157p = (char * )pg_server_to_client ((unsignedchar * )str ,slen );
@@ -167,7 +162,6 @@ pq_sendstring(StringInfo buf, const char *str)
167162pfree (p );
168163return ;
169164}
170- #endif
171165appendBinaryStringInfo (buf ,str ,slen + 1 );
172166}
173167
232226pq_puttextmessage (char msgtype ,const char * str )
233227{
234228int slen = strlen (str );
235-
236- #ifdef MULTIBYTE
237229char * p ;
238230
239231p = (char * )pg_server_to_client ((unsignedchar * )str ,slen );
@@ -244,7 +236,6 @@ pq_puttextmessage(char msgtype, const char *str)
244236pfree (p );
245237return result ;
246238}
247- #endif
248239return pq_putmessage (msgtype ,str ,slen + 1 );
249240}
250241
@@ -305,14 +296,10 @@ int
305296pq_getstr (StringInfo s )
306297{
307298int result ;
308-
309- #ifdef MULTIBYTE
310299char * p ;
311- #endif
312300
313301result = pq_getstring (s );
314302
315- #ifdef MULTIBYTE
316303p = (char * )pg_client_to_server ((unsignedchar * )s -> data ,s -> len );
317304if (p != s -> data )/* actual conversion has been done? */
318305{
@@ -322,7 +309,6 @@ pq_getstr(StringInfo s)
322309appendBinaryStringInfo (s ,p ,strlen (p ));
323310pfree (p );
324311}
325- #endif
326312
327313return result ;
328314}