1 #ifndef COMMON_h 2 #define COMMON_h 3 4 #undef NDEBUG 5 #include <config.h> 6 7 #include <stdarg.h> 8 #include <stdio.h> 9 10 #if HAVE_STDLIB_H 11 #include <stdlib.h> 12 #endif /* HAVE_STDLIB_H */ 13 14 #if HAVE_STRING_H 15 #include <string.h> 16 #endif /* HAVE_STRING_H */ 17 18 #include <freetds/tds.h> 19 #include <freetds/data.h> 20 21 #ifndef FREETDS_SRCDIR 22 #define FREETDS_SRCDIR FREETDS_TOPDIR "/src/tds/unittests" 23 #endif 24 25 extern char PASSWORD[512]; 26 extern char USER[512]; 27 extern char SERVER[512]; 28 extern char DATABASE[512]; 29 extern char CHARSET[512]; 30 31 extern TDSCONTEXT *test_context; 32 33 int try_tds_login(TDSLOGIN ** login, TDSSOCKET ** tds, const char *appname, int verbose); 34 int try_tds_logout(TDSLOGIN * login, TDSSOCKET * tds, int verbose); 35 36 int run_query(TDSSOCKET * tds, const char *query); 37 38 extern int utf8_max_len; 39 40 int get_unichar(const char **psrc); 41 char *to_utf8(const char *src, char *dest); 42 43 #endif 44