diff options
author | Bruce Momjian <bruce@momjian.us> | 2000-05-16 20:48:52 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2000-05-16 20:48:52 +0000 |
commit | a47e20b049a293d47a0f22e96447a38b717327a5 (patch) | |
tree | de389d919b4dcabb455d8c8bd6fa1c49be39ba0b /src/interfaces/odbc/misc.c | |
parent | 5128d145a8f04bdee6ebf73314437b36871a847b (diff) |
Several compilation and run-time problems occur when building on SGI
IRIX systems using the native compilers. A summary is:
- Various files use "//" as a comment delimiter in c files.
- Problems caused by assuming "char" is signed.
cash.in: building -signed the rules regression test fails as described
in FAQ_QNX4. If CHAR_MAX is "255U" then ((signed char)CHAR_MAX) is -1.
postmaster.c: random number regression test failed without this change.
- Some generic build issues and warning message cleanup.
David Kaelbling
Diffstat (limited to 'src/interfaces/odbc/misc.c')
-rw-r--r-- | src/interfaces/odbc/misc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/interfaces/odbc/misc.c b/src/interfaces/odbc/misc.c index 2833a353530..9c3c009b60c 100644 --- a/src/interfaces/odbc/misc.c +++ b/src/interfaces/odbc/misc.c @@ -169,10 +169,10 @@ my_strcpy(char *dst, int dst_len, char *src, int src_len) return strlen(dst); } -// strncpy copies up to len characters, and doesn't terminate -// the destination string if src has len characters or more. -// instead, I want it to copy up to len-1 characters and always -// terminate the destination string. +/* strncpy copies up to len characters, and doesn't terminate */ +/* the destination string if src has len characters or more. */ +/* instead, I want it to copy up to len-1 characters and always */ +/* terminate the destination string. */ char *strncpy_null(char *dst, const char *src, int len) { int i; @@ -199,9 +199,9 @@ int i; return dst; } -// Create a null terminated string (handling the SQL_NTS thing): -// 1. If buf is supplied, place the string in there (assumes enough space) and return buf. -// 2. If buf is not supplied, malloc space and return this string +/* Create a null terminated string (handling the SQL_NTS thing): */ +/* 1. If buf is supplied, place the string in there (assumes enough space) and return buf. */ +/* 2. If buf is not supplied, malloc space and return this string */ char * make_string(char *s, int len, char *buf) { @@ -227,10 +227,10 @@ char *str; return NULL; } -// Concatenate a single formatted argument to a given buffer handling the SQL_NTS thing. -// "fmt" must contain somewhere in it the single form '%.*s' -// This is heavily used in creating queries for info routines (SQLTables, SQLColumns). -// This routine could be modified to use vsprintf() to handle multiple arguments. +/* Concatenate a single formatted argument to a given buffer handling the SQL_NTS thing. */ +/* "fmt" must contain somewhere in it the single form '%.*s' */ +/* This is heavily used in creating queries for info routines (SQLTables, SQLColumns). */ +/* This routine could be modified to use vsprintf() to handle multiple arguments. */ char * my_strcat(char *buf, char *fmt, char *s, int len) { |