Codebase list freetds / 5f9f4ab
fixes some cross compile issues with hp-ux Frediano Ziglio 17 years ago
8 changed file(s) with 50 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
0 Wed Aug 23 16:25:25 CET 2006 Frediano Ziglio <freddy77_A_gmail_D_com>
1 * m4/ac_tds_func_which_getpwuid_r.m4 m4/sprintf_i64_format.m4:
2 * configure.ac src/ctlib/cs.c src/apps/tsql.c:
3 * src/replacements/asprintf.c src/tds/query.c:
4 - fixes some cross compile issues with hp-ux
5
06 Mon Aug 21 11:08:37 CET 2006 Frediano Ziglio <freddy77_A_gmail_D_com>
17 * src/dblib/dblib.c: remove small buffer overflow
28
00 dnl Process this file with autoconf to produce a configure script.
11
22 dnl ------------------------------------------------------------
3 dnl $Id: configure.ac,v 1.10 2006-08-17 14:29:19 freddy77 Exp $
3 dnl $Id: configure.ac,v 1.11 2006-08-23 14:26:20 freddy77 Exp $
44 dnl If you're trying to create a new configure test, try
55 dnl
66 dnl http://autogen.sourceforge.net/conftest.html
1414 AC_INIT(FreeTDS, 0.65.dev.esyscmd(echo -n $(date +"%Y%m%d")))
1515 AC_CONFIG_SRCDIR(src/dblib/dblib.c)
1616 AC_PREREQ(2.53)
17 AC_REVISION($Revision: 1.10 $)
17 AC_REVISION($Revision: 1.11 $)
1818
1919 AM_INIT_AUTOMAKE
2020 AC_CONFIG_HEADERS(include/config.h)
176176 #include <$ac_cv_struct_tm>
177177 ])
178178 AC_CHECK_HEADERS([unistd.h errno.h wchar.h sys/time.h malloc.h sys/types.h \
179 sys/param.h sys/stat.h sys/wait.h locale.h odbcss.h readpassphrase.h signal.h \
179 sys/param.h sys/stat.h sys/wait.h limits.h locale.h odbcss.h readpassphrase.h signal.h \
180180 winsock2.h])
181181 if test $tds_mingw = no; then
182182 AC_CHECK_HEADERS([sys/socket.h arpa/inet.h netdb.h netinet/in.h \
0 dnl $Id: ac_tds_func_which_getpwuid_r.m4,v 1.3 2006-03-29 16:24:37 freddy77 Exp $
0 dnl $Id: ac_tds_func_which_getpwuid_r.m4,v 1.4 2006-08-23 14:26:20 freddy77 Exp $
11 ##
22 # Check getpwuid_r parameters
33 # There are three version of this function
3939 return 0;
4040 }
4141 ],ac_cv_func_which_getpwuid_r=five,
42 ac_cv_func_which_getpwuid_r=no)]
42 ac_cv_func_which_getpwuid_r=no)],
43 [# cross compile case
44 ac_cv_func_which_getpwuid_r=no
45 num_params=four
46 for params in "int" "size_t, struct passwd **"; do
47 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([
48 #include <unistd.h>
49 #include <pwd.h>
50 extern int getpwuid_r(uid_t, struct passwd *, char *, $params);
51 ],[]),[
52 if test $ac_cv_func_which_getpwuid_r != no; then
53 AC_ERROR([Two types of getpwuid_r detected])
54 fi
55 ac_cv_func_which_getpwuid_r=$num_params
56 ])
57 num_params=five
58 done
59 ]
4360 )]
4461 )])
4562
0 dnl $Id: sprintf_i64_format.m4,v 1.6 2006-06-12 20:00:32 freddy77 Exp $
0 dnl $Id: sprintf_i64_format.m4,v 1.7 2006-08-23 14:26:20 freddy77 Exp $
11 ##
22 # Test for 64bit integer sprintf format specifier
33 # ld 64 bit machine
1313 this should produce an error!
1414 #endif
1515 ],[return 0;]),[tds_i64_format="I64d"])
16
17 if test "x$ac_cv_sizeof_long" = "x8"; then
18 tds_i64_format=l
19 fi
1620
1721 if test "x$tds_i64_format" = "x"; then
1822 for arg in l ll I64 L; do
5656 #include <unistd.h>
5757 #endif /* HAVE_UNISTD_H */
5858
59 /* HP-UX require some constants defined by limits.h */
60 #ifdef HAVE_LIMITS_H
61 #include <limits.h>
62 #endif /* HAVE_LIMITS_H */
63
64 #if defined(__hpux__) && !defined(_POSIX_PATH_MAX)
65 #define _POSIX_PATH_MAX 255
66 #endif
67
5968 #ifdef HAVE_LOCALE_H
6069 #include <locale.h>
6170 #endif /* HAVE_LOCALE_H */
6877 #include "tdsconvert.h"
6978 #include "replacements.h"
7079
71 TDS_RCSID(var, "$Id: tsql.c,v 1.88 2006-06-09 18:35:25 castellano Exp $");
80 TDS_RCSID(var, "$Id: tsql.c,v 1.89 2006-08-23 14:26:20 freddy77 Exp $");
7281
7382 enum
7483 {
2020 #include <config.h>
2121 #endif
2222
23 #include <stdarg.h>
24
2325 #if TIME_WITH_SYS_TIME
2426 # include <sys/time.h>
2527 # include <time.h>
4648 #include "tdsconvert.h"
4749 #include "replacements.h"
4850
49 TDS_RCSID(var, "$Id: cs.c,v 1.61 2005-07-15 11:52:18 freddy77 Exp $");
51 TDS_RCSID(var, "$Id: cs.c,v 1.62 2006-08-23 14:26:20 freddy77 Exp $");
5052
5153 static int _cs_datatype_length(int dtype);
5254 static CS_INT cs_diag_storemsg(CS_CONTEXT *context, CS_CLIENTMSG *message);
77 #include <config.h>
88 #endif
99
10 #include <stdarg.h>
1011 #include <stdio.h>
11 #include <stdarg.h>
1212
1313 #if HAVE_STRING_H
1414 #include <string.h>
1717 #include "tds_sysdep_private.h"
1818 #include "replacements.h"
1919
20 TDS_RCSID(var, "$Id: asprintf.c,v 1.6 2005-07-15 11:52:18 freddy77 Exp $");
20 TDS_RCSID(var, "$Id: asprintf.c,v 1.7 2006-08-23 14:26:20 freddy77 Exp $");
2121
2222 int
2323 asprintf(char **ret, const char *fmt, ...)
2020 #include <config.h>
2121 #endif
2222
23 #include <stdarg.h>
2324 #include <stdio.h>
2425
2526 #if HAVE_STDLIB_H
4344
4445 #include <assert.h>
4546
46 TDS_RCSID(var, "$Id: query.c,v 1.199 2006-08-17 09:15:25 freddy77 Exp $");
47 TDS_RCSID(var, "$Id: query.c,v 1.200 2006-08-23 14:26:20 freddy77 Exp $");
4748
4849 static void tds_put_params(TDSSOCKET * tds, TDSPARAMINFO * info, int flags);
4950 static void tds7_put_query_params(TDSSOCKET * tds, const char *query, int query_len);