]> granicus.if.org Git - postgresql/blobdiff - src/include/port.h
Centralize definition of integer limits.
[postgresql] / src / include / port.h
index 58677ec6bdfac577c018aa27b641233bb60809a3..29854dd752e8887d5e7a513fcc0d792d95657ba2 100644 (file)
@@ -3,7 +3,7 @@
  * port.h
  *       Header for src/port/ compatibility functions.
  *
- * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * src/include/port.h
@@ -61,7 +61,7 @@ extern void get_man_path(const char *my_exec_path, char *ret_path);
 extern bool get_home_path(char *ret_path);
 extern void get_parent_directory(char *path);
 
-/* port/dirmod.c */
+/* common/pgfnames.c */
 extern char **pgfnames(const char *path);
 extern void pgfnames_cleanup(char **filenames);
 
@@ -156,25 +156,25 @@ extern int        pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
 extern int
 pg_snprintf(char *str, size_t count, const char *fmt,...)
 /* This extension allows gcc to check the format string */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4)));
+pg_attribute_printf(3, 4);
 extern int
 pg_sprintf(char *str, const char *fmt,...)
 /* This extension allows gcc to check the format string */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
+pg_attribute_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 */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
+pg_attribute_printf(2, 3);
 extern int
 pg_printf(const char *fmt,...)
 /* This extension allows gcc to check the format string */
-__attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
+pg_attribute_printf(1, 2);
 
 /*
- *     The GCC-specific code below prevents the __attribute__(... 'printf')
- *     above from being replaced, and this is required because gcc doesn't
- *     know anything about pg_printf.
+ *     The GCC-specific code below prevents the pg_attribute_printf above from
+ *     being replaced, and this is required because gcc doesn't know anything
+ *     about pg_printf.
  */
 #ifdef __GNUC__
 #define vsnprintf(...) pg_vsnprintf(__VA_ARGS__)
@@ -328,8 +328,6 @@ extern FILE *pgwin32_popen(const char *command, const char *type);
 #ifndef HAVE_GETTIMEOFDAY
 /* Last parameter not used */
 extern int     gettimeofday(struct timeval * tp, struct timezone * tzp);
-/* On windows we need to call some backend start setup for accurate timing */
-extern void init_win32_gettimeofday(void);
 #endif
 #else                                                  /* !WIN32 */
 
@@ -433,7 +431,7 @@ extern void srandom(unsigned int seed);
 /* thread.h */
 extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen);
 
-#if !defined(WIN32) || defined(__CYGWIN__)
+#ifndef WIN32
 extern int pqGetpwuid(uid_t uid, struct passwd * resultbuf, char *buffer,
                   size_t buflen, struct passwd ** result);
 #endif