Skip to content

Commit 9ea4191

Browse files
committed
Fix for HAVE_LONG bug in snprintf.c.
1 parent a4c8fa7 commit 9ea4191

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/backend/port/snprintf.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#include <sys/param.h>
5050

5151
/* IRIX doesn't do 'long long' in va_arg(), so use a typedef */
52-
#ifdef HAVE_LONG_INT_64
52+
#ifdef HAVE_LONG_LONG_INT_64
5353
typedef long long long_long;
5454
#endif
5555

@@ -75,7 +75,7 @@ typedef long long long_long;
7575
* causing nast effects.
7676
**************************************************************/
7777

78-
/*static char _id[] = "$Id: snprintf.c,v 1.10.2.1 1998/12/12 21:31:20 momjian Exp $";*/
78+
/*static char _id[] = "$Id: snprintf.c,v 1.10.2.2 1998/12/18 07:03:29 momjian Exp $";*/
7979
static char *end;
8080
static int SnprfOverflow;
8181

@@ -122,7 +122,7 @@ vsnprintf(char *str, size_t count, const char *fmt,...)
122122

123123
static void fmtstr __P((char *value, int ljust, int len, int zpad, int maxwidth));
124124

125-
#ifndef HAVE_LONG_INT_64
125+
#ifndef HAVE_LONG_LONG_INT_64
126126
static void fmtnum __P((long value, int base, int dosign, int ljust, int len, int zpad));
127127
#else
128128
static void fmtnum __P((long_long value, int base, int dosign, int ljust, int len, int zpad));
@@ -136,7 +136,7 @@ static void
136136
dopr(char *buffer, const char *format,...)
137137
{
138138
int ch;
139-
#ifdef HAVE_LONG_INT_64
139+
#ifdef HAVE_LONG_LONG_INT_64
140140
long_long value;
141141
#else
142142
long value;
@@ -215,7 +215,7 @@ dopr(char *buffer, const char *format,...)
215215
/* fmtnum(value,base,dosign,ljust,len,zpad) */
216216
if (longflag)
217217
{
218-
#ifdef HAVE_LONG_INT_64
218+
#ifdef HAVE_LONG_LONG_INT_64
219219
if (longlongflag)
220220
value = va_arg(args, long_long);
221221
else
@@ -231,7 +231,7 @@ dopr(char *buffer, const char *format,...)
231231
/* fmtnum(value,base,dosign,ljust,len,zpad) */
232232
if (longflag)
233233
{
234-
#ifdef HAVE_LONG_INT_64
234+
#ifdef HAVE_LONG_LONG_INT_64
235235
if (longlongflag)
236236
value = va_arg(args, long_long);
237237
else
@@ -246,7 +246,7 @@ dopr(char *buffer, const char *format,...)
246246
case 'D':
247247
if (longflag)
248248
{
249-
#ifdef HAVE_LONG_INT_64
249+
#ifdef HAVE_LONG_LONG_INT_64
250250
if (longlongflag)
251251
value = va_arg(args, long_long);
252252
else
@@ -260,7 +260,7 @@ dopr(char *buffer, const char *format,...)
260260
case 'x':
261261
if (longflag)
262262
{
263-
#ifdef HAVE_LONG_INT_64
263+
#ifdef HAVE_LONG_LONG_INT_64
264264
if (longlongflag)
265265
value = va_arg(args, long_long);
266266
else
@@ -274,7 +274,7 @@ dopr(char *buffer, const char *format,...)
274274
case 'X':
275275
if (longflag)
276276
{
277-
#ifdef HAVE_LONG_INT_64
277+
#ifdef HAVE_LONG_LONG_INT_64
278278
if (longlongflag)
279279
value = va_arg(args, long_long);
280280
else
@@ -350,7 +350,7 @@ int ljust,
350350

351351
static void
352352
fmtnum(value, base, dosign, ljust, len, zpad)
353-
#ifdef HAVE_LONG_INT_64
353+
#ifdef HAVE_LONG_LONG_INT_64
354354
long_long value;
355355
#else
356356
long value;
@@ -362,7 +362,7 @@ int base,
362362
zpad;
363363
{
364364
int signvalue = 0;
365-
#ifdef HAVE_LONG_INT_64
365+
#ifdef HAVE_LONG_LONG_INT_64
366366
unsigned long long uvalue;
367367
#else
368368
unsigned long uvalue;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy