Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
6b7cf132
Commit
6b7cf132
authored
Dec 18, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for snprintf with long long's, define problem.
parent
c29d0f31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
src/backend/port/snprintf.c
src/backend/port/snprintf.c
+12
-12
No files found.
src/backend/port/snprintf.c
View file @
6b7cf132
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
#include <sys/param.h>
#include <sys/param.h>
/* IRIX doesn't do 'long long' in va_arg(), so use a typedef */
/* IRIX doesn't do 'long long' in va_arg(), so use a typedef */
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
typedef
long
long
long_long
;
typedef
long
long
long_long
;
#endif
#endif
...
@@ -75,7 +75,7 @@ typedef long long long_long;
...
@@ -75,7 +75,7 @@ typedef long long long_long;
* causing nast effects.
* causing nast effects.
**************************************************************/
**************************************************************/
/*static char _id[] = "$Id: snprintf.c,v 1.1
1 1998/12/12 21:30:57
momjian Exp $";*/
/*static char _id[] = "$Id: snprintf.c,v 1.1
2 1998/12/18 06:59:39
momjian Exp $";*/
static
char
*
end
;
static
char
*
end
;
static
int
SnprfOverflow
;
static
int
SnprfOverflow
;
...
@@ -122,7 +122,7 @@ vsnprintf(char *str, size_t count, const char *fmt,...)
...
@@ -122,7 +122,7 @@ vsnprintf(char *str, size_t count, const char *fmt,...)
static
void
fmtstr
__P
((
char
*
value
,
int
ljust
,
int
len
,
int
zpad
,
int
maxwidth
));
static
void
fmtstr
__P
((
char
*
value
,
int
ljust
,
int
len
,
int
zpad
,
int
maxwidth
));
#ifndef HAVE_LONG_INT_64
#ifndef HAVE_LONG_
LONG_
INT_64
static
void
fmtnum
__P
((
long
value
,
int
base
,
int
dosign
,
int
ljust
,
int
len
,
int
zpad
));
static
void
fmtnum
__P
((
long
value
,
int
base
,
int
dosign
,
int
ljust
,
int
len
,
int
zpad
));
#else
#else
static
void
fmtnum
__P
((
long_long
value
,
int
base
,
int
dosign
,
int
ljust
,
int
len
,
int
zpad
));
static
void
fmtnum
__P
((
long_long
value
,
int
base
,
int
dosign
,
int
ljust
,
int
len
,
int
zpad
));
...
@@ -136,7 +136,7 @@ static void
...
@@ -136,7 +136,7 @@ static void
dopr
(
char
*
buffer
,
const
char
*
format
,...)
dopr
(
char
*
buffer
,
const
char
*
format
,...)
{
{
int
ch
;
int
ch
;
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
long_long
value
;
long_long
value
;
#else
#else
long
value
;
long
value
;
...
@@ -215,7 +215,7 @@ dopr(char *buffer, const char *format,...)
...
@@ -215,7 +215,7 @@ dopr(char *buffer, const char *format,...)
/* fmtnum(value,base,dosign,ljust,len,zpad) */
/* fmtnum(value,base,dosign,ljust,len,zpad) */
if
(
longflag
)
if
(
longflag
)
{
{
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
if
(
longlongflag
)
if
(
longlongflag
)
value
=
va_arg
(
args
,
long_long
);
value
=
va_arg
(
args
,
long_long
);
else
else
...
@@ -231,7 +231,7 @@ dopr(char *buffer, const char *format,...)
...
@@ -231,7 +231,7 @@ dopr(char *buffer, const char *format,...)
/* fmtnum(value,base,dosign,ljust,len,zpad) */
/* fmtnum(value,base,dosign,ljust,len,zpad) */
if
(
longflag
)
if
(
longflag
)
{
{
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
if
(
longlongflag
)
if
(
longlongflag
)
value
=
va_arg
(
args
,
long_long
);
value
=
va_arg
(
args
,
long_long
);
else
else
...
@@ -246,7 +246,7 @@ dopr(char *buffer, const char *format,...)
...
@@ -246,7 +246,7 @@ dopr(char *buffer, const char *format,...)
case
'D'
:
case
'D'
:
if
(
longflag
)
if
(
longflag
)
{
{
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
if
(
longlongflag
)
if
(
longlongflag
)
value
=
va_arg
(
args
,
long_long
);
value
=
va_arg
(
args
,
long_long
);
else
else
...
@@ -260,7 +260,7 @@ dopr(char *buffer, const char *format,...)
...
@@ -260,7 +260,7 @@ dopr(char *buffer, const char *format,...)
case
'x'
:
case
'x'
:
if
(
longflag
)
if
(
longflag
)
{
{
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
if
(
longlongflag
)
if
(
longlongflag
)
value
=
va_arg
(
args
,
long_long
);
value
=
va_arg
(
args
,
long_long
);
else
else
...
@@ -274,7 +274,7 @@ dopr(char *buffer, const char *format,...)
...
@@ -274,7 +274,7 @@ dopr(char *buffer, const char *format,...)
case
'X'
:
case
'X'
:
if
(
longflag
)
if
(
longflag
)
{
{
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
if
(
longlongflag
)
if
(
longlongflag
)
value
=
va_arg
(
args
,
long_long
);
value
=
va_arg
(
args
,
long_long
);
else
else
...
@@ -350,7 +350,7 @@ int ljust,
...
@@ -350,7 +350,7 @@ int ljust,
static
void
static
void
fmtnum
(
value
,
base
,
dosign
,
ljust
,
len
,
zpad
)
fmtnum
(
value
,
base
,
dosign
,
ljust
,
len
,
zpad
)
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
long_long
value
;
long_long
value
;
#else
#else
long
value
;
long
value
;
...
@@ -362,8 +362,8 @@ int base,
...
@@ -362,8 +362,8 @@ int base,
zpad
;
zpad
;
{
{
int
signvalue
=
0
;
int
signvalue
=
0
;
#ifdef HAVE_LONG_INT_64
#ifdef HAVE_LONG_
LONG_
INT_64
unsigned
long
long
uvalue
;
unsigned
long
_
long
uvalue
;
#else
#else
unsigned
long
uvalue
;
unsigned
long
uvalue
;
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment