diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/c.h | 6 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/include/port.h | 16 | ||||
-rw-r--r-- | src/include/port/qnx4.h | 2 | ||||
-rw-r--r-- | src/include/port/ultrix4.h | 3 | ||||
-rw-r--r-- | src/include/regex/regcustom.h | 10 |
6 files changed, 17 insertions, 23 deletions
diff --git a/src/include/c.h b/src/include/c.h index b3ee88968d0..d607677aa3f 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/c.h,v 1.163 2004/05/05 21:18:29 tgl Exp $ + * $PostgreSQL: pgsql/src/include/c.h,v 1.164 2004/05/07 00:24:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -720,10 +720,6 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list args); #define memmove(d, s, c) bcopy(s, d, c) #endif -#ifndef HAVE_UNSETENV -extern void unsetenv(const char *name); -#endif - #ifndef DLLIMPORT #define DLLIMPORT /* no special DLL markers on most ports */ #endif diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index aea533ad83f..e8158a678a3 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -385,9 +385,6 @@ /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP diff --git a/src/include/port.h b/src/include/port.h index 4fb42bf74dd..2f5123483bf 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/port.h,v 1.27 2004/04/30 17:52:07 momjian Exp $ + * $PostgreSQL: pgsql/src/include/port.h,v 1.28 2004/05/07 00:24:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -30,6 +30,12 @@ extern char *get_progname(char *argv0); /* Portable delay handling */ extern void pg_usleep(long microsec); +/* Portable SQL-like case-independent comparisons and conversions */ +extern int pg_strcasecmp(const char *s1, const char *s2); +extern int pg_strncasecmp(const char *s1, const char *s2, size_t n); +extern unsigned char pg_toupper(unsigned char ch); +extern unsigned char pg_tolower(unsigned char ch); + /* Portable prompt handling */ extern char *simple_prompt(const char *prompt, int maxlen, bool echo); @@ -130,10 +136,6 @@ extern double rint(double x); extern int inet_aton(const char *cp, struct in_addr * addr); #endif -#ifndef HAVE_STRCASECMP -extern int strcasecmp(char *s1, char *s2); -#endif - #ifndef HAVE_STRDUP extern char *strdup(char const *); #endif @@ -142,6 +144,10 @@ extern char *strdup(char const *); extern long random(void); #endif +#ifndef HAVE_UNSETENV +extern void unsetenv(const char *name); +#endif + #ifndef HAVE_SRANDOM extern void srandom(unsigned int seed); #endif diff --git a/src/include/port/qnx4.h b/src/include/port/qnx4.h index 68deca4a1c3..94ae9a87c17 100644 --- a/src/include/port/qnx4.h +++ b/src/include/port/qnx4.h @@ -7,8 +7,6 @@ #undef HAVE_GETRUSAGE -#define strncasecmp strnicmp - typedef u_short ushort; extern int isnan(double dsrc); diff --git a/src/include/port/ultrix4.h b/src/include/port/ultrix4.h index 2dbbe6ceecd..4600dd36bd2 100644 --- a/src/include/port/ultrix4.h +++ b/src/include/port/ultrix4.h @@ -26,9 +26,6 @@ #include <sys/types.h> /* Declare various types, e.g. size_t, * fd_set */ -extern int strcasecmp(const char *, const char *); -extern void bzero(void *, size_t); - extern int fp_class_d(double); extern long random(void); diff --git a/src/include/regex/regcustom.h b/src/include/regex/regcustom.h index 2d111f796be..9b0c691de03 100644 --- a/src/include/regex/regcustom.h +++ b/src/include/regex/regcustom.h @@ -25,7 +25,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $PostgreSQL: pgsql/src/include/regex/regcustom.h,v 1.3 2003/11/29 22:41:10 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/regex/regcustom.h,v 1.4 2004/05/07 00:24:58 tgl Exp $ */ /* headers if any */ @@ -59,10 +59,10 @@ typedef int celt; /* type to hold chr, MCCE number, or #define CHR_MAX 0xfffffffe /* CHR_MAX-CHR_MIN+1 should fit in uchr */ /* functions operating on chr */ -#define iscalnum(x) pg_isalnum(x) -#define iscalpha(x) pg_isalpha(x) -#define iscdigit(x) pg_isdigit(x) -#define iscspace(x) pg_isspace(x) +#define iscalnum(x) pg_wc_isalnum(x) +#define iscalpha(x) pg_wc_isalpha(x) +#define iscdigit(x) pg_wc_isdigit(x) +#define iscspace(x) pg_wc_isspace(x) /* and pick up the standard header */ #include "regex.h" |