fixes some cross compile issues with hp-ux
Frediano Ziglio
17 years ago
|
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 |
|
0 | 6 |
Mon Aug 21 11:08:37 CET 2006 Frediano Ziglio <freddy77_A_gmail_D_com>
|
1 | 7 |
* src/dblib/dblib.c: remove small buffer overflow
|
2 | 8 |
|
0 | 0 |
dnl Process this file with autoconf to produce a configure script.
|
1 | 1 |
|
2 | 2 |
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 $
|
4 | 4 |
dnl If you're trying to create a new configure test, try
|
5 | 5 |
dnl
|
6 | 6 |
dnl http://autogen.sourceforge.net/conftest.html
|
|
14 | 14 |
AC_INIT(FreeTDS, 0.65.dev.esyscmd(echo -n $(date +"%Y%m%d")))
|
15 | 15 |
AC_CONFIG_SRCDIR(src/dblib/dblib.c)
|
16 | 16 |
AC_PREREQ(2.53)
|
17 | |
AC_REVISION($Revision: 1.10 $)
|
|
17 |
AC_REVISION($Revision: 1.11 $)
|
18 | 18 |
|
19 | 19 |
AM_INIT_AUTOMAKE
|
20 | 20 |
AC_CONFIG_HEADERS(include/config.h)
|
|
176 | 176 |
#include <$ac_cv_struct_tm>
|
177 | 177 |
])
|
178 | 178 |
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 \
|
180 | 180 |
winsock2.h])
|
181 | 181 |
if test $tds_mingw = no; then
|
182 | 182 |
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 $
|
1 | 1 |
##
|
2 | 2 |
# Check getpwuid_r parameters
|
3 | 3 |
# There are three version of this function
|
|
39 | 39 |
return 0;
|
40 | 40 |
}
|
41 | 41 |
],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 |
]
|
43 | 60 |
)]
|
44 | 61 |
)])
|
45 | 62 |
|
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 $
|
1 | 1 |
##
|
2 | 2 |
# Test for 64bit integer sprintf format specifier
|
3 | 3 |
# ld 64 bit machine
|
|
13 | 13 |
this should produce an error!
|
14 | 14 |
#endif
|
15 | 15 |
],[return 0;]),[tds_i64_format="I64d"])
|
|
16 |
|
|
17 |
if test "x$ac_cv_sizeof_long" = "x8"; then
|
|
18 |
tds_i64_format=l
|
|
19 |
fi
|
16 | 20 |
|
17 | 21 |
if test "x$tds_i64_format" = "x"; then
|
18 | 22 |
for arg in l ll I64 L; do
|
56 | 56 |
#include <unistd.h>
|
57 | 57 |
#endif /* HAVE_UNISTD_H */
|
58 | 58 |
|
|
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 |
|
59 | 68 |
#ifdef HAVE_LOCALE_H
|
60 | 69 |
#include <locale.h>
|
61 | 70 |
#endif /* HAVE_LOCALE_H */
|
|
68 | 77 |
#include "tdsconvert.h"
|
69 | 78 |
#include "replacements.h"
|
70 | 79 |
|
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 $");
|
72 | 81 |
|
73 | 82 |
enum
|
74 | 83 |
{
|
20 | 20 |
#include <config.h>
|
21 | 21 |
#endif
|
22 | 22 |
|
|
23 |
#include <stdarg.h>
|
|
24 |
|
23 | 25 |
#if TIME_WITH_SYS_TIME
|
24 | 26 |
# include <sys/time.h>
|
25 | 27 |
# include <time.h>
|
|
46 | 48 |
#include "tdsconvert.h"
|
47 | 49 |
#include "replacements.h"
|
48 | 50 |
|
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 $");
|
50 | 52 |
|
51 | 53 |
static int _cs_datatype_length(int dtype);
|
52 | 54 |
static CS_INT cs_diag_storemsg(CS_CONTEXT *context, CS_CLIENTMSG *message);
|
7 | 7 |
#include <config.h>
|
8 | 8 |
#endif
|
9 | 9 |
|
|
10 |
#include <stdarg.h>
|
10 | 11 |
#include <stdio.h>
|
11 | |
#include <stdarg.h>
|
12 | 12 |
|
13 | 13 |
#if HAVE_STRING_H
|
14 | 14 |
#include <string.h>
|
|
17 | 17 |
#include "tds_sysdep_private.h"
|
18 | 18 |
#include "replacements.h"
|
19 | 19 |
|
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 $");
|
21 | 21 |
|
22 | 22 |
int
|
23 | 23 |
asprintf(char **ret, const char *fmt, ...)
|
20 | 20 |
#include <config.h>
|
21 | 21 |
#endif
|
22 | 22 |
|
|
23 |
#include <stdarg.h>
|
23 | 24 |
#include <stdio.h>
|
24 | 25 |
|
25 | 26 |
#if HAVE_STDLIB_H
|
|
43 | 44 |
|
44 | 45 |
#include <assert.h>
|
45 | 46 |
|
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 $");
|
47 | 48 |
|
48 | 49 |
static void tds_put_params(TDSSOCKET * tds, TDSPARAMINFO * info, int flags);
|
49 | 50 |
static void tds7_put_query_params(TDSSOCKET * tds, const char *query, int query_len);
|