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
796a3f37
Commit
796a3f37
authored
Nov 28, 2006
by
Andrew Dunstan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
c15de02f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
src/include/port.h
src/include/port.h
+7
-1
src/port/snprintf.c
src/port/snprintf.c
+3
-2
No files found.
src/include/port.h
View file @
796a3f37
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.10
5 2006/10/19 20:56:22 tgl
Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.10
6 2006/11/28 01:12:33 adunstan
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -145,6 +145,9 @@ extern unsigned char pg_tolower(unsigned char ch);
#ifdef sprintf
#undef sprintf
#endif
#ifdef vfprintf
#undef vfprintf
#endif
#ifdef fprintf
#undef fprintf
#endif
...
...
@@ -161,6 +164,7 @@ extern int
pg_sprintf
(
char
*
str
,
const
char
*
fmt
,...)
/* This extension allows gcc to check the format string */
__attribute__
((
format
(
printf
,
2
,
3
)));
extern
int
pg_vfprintf
(
FILE
*
stream
,
const
char
*
fmt
,
va_list
args
);
extern
int
pg_fprintf
(
FILE
*
stream
,
const
char
*
fmt
,...)
/* This extension allows gcc to check the format string */
...
...
@@ -179,12 +183,14 @@ __attribute__((format(printf, 1, 2)));
#define vsnprintf(...) pg_vsnprintf(__VA_ARGS__)
#define snprintf(...) pg_snprintf(__VA_ARGS__)
#define sprintf(...) pg_sprintf(__VA_ARGS__)
#define vfprintf(...) pg_vfprintf(__VA_ARGS__)
#define fprintf(...) pg_fprintf(__VA_ARGS__)
#define printf(...) pg_printf(__VA_ARGS__)
#else
#define vsnprintf pg_vsnprintf
#define snprintf pg_snprintf
#define sprintf pg_sprintf
#define vfprintf pg_vfprintf
#define fprintf pg_fprintf
#define printf pg_printf
#endif
...
...
src/port/snprintf.c
View file @
796a3f37
...
...
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $PostgreSQL: pgsql/src/port/snprintf.c,v 1.3
2 2006/10/04 00:30:14 momji
an Exp $
* $PostgreSQL: pgsql/src/port/snprintf.c,v 1.3
3 2006/11/28 01:12:34 adunst
an Exp $
*/
#include "c.h"
...
...
@@ -99,6 +99,7 @@
#undef vsnprintf
#undef snprintf
#undef sprintf
#undef vfprintf
#undef fprintf
#undef printf
...
...
@@ -209,7 +210,7 @@ pg_sprintf(char *str, const char *fmt,...)
return
len
;
}
static
int
int
pg_vfprintf
(
FILE
*
stream
,
const
char
*
fmt
,
va_list
args
)
{
PrintfTarget
target
;
...
...
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