summaryrefslogtreecommitdiff
path: root/src/include/port/win32.h
diff options
context:
space:
mode:
authorTom Lane2013-10-22 22:42:13 +0000
committerTom Lane2013-10-22 22:42:13 +0000
commit09a89cb5fc29b47c26d151e82293fd3bef592b7b (patch)
tree0ac288fac9c8b34730cca74bd90afa06752988ce /src/include/port/win32.h
parent586a8fc75bf266214d635cdcf527176b80f808ea (diff)
Get rid of use of asprintf() in favor of a more portable implementation.
asprintf(), aside from not being particularly portable, has a fundamentally badly-designed API; the psprintf() function that was added in passing in the previous patch has a much better API choice. Moreover, the NetBSD implementation that was borrowed for the previous patch doesn't work with non-C99-compliant vsnprintf, which is something we still have to cope with on some platforms; and it depends on va_copy which isn't all that portable either. Get rid of that code in favor of an implementation similar to what we've used for many years in stringinfo.c. Also, move it into libpgcommon since it's not really libpgport material. I think this patch will be enough to turn the buildfarm green again, but there's still cosmetic work left to do, namely get rid of pg_asprintf() in favor of using psprintf(). That will come in a followon patch.
Diffstat (limited to 'src/include/port/win32.h')
-rw-r--r--src/include/port/win32.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index 70175d14a57..2c2d93765ee 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -238,15 +238,6 @@ int setitimer(int which, const struct itimerval * value, struct itimerval * ov
#endif
/*
- * Supplement to <stdarg.h>
- */
-
-/* Visual Studios 2012 and earlier don't have va_copy() */
-#if defined(_MSC_VER) && _MSC_VER <= 1700
-#define va_copy(dest, src) ((dest) = (src))
-#endif
-
-/*
* Supplement to <sys/types.h>.
*
* Perl already has typedefs for uid_t and gid_t.