Skip to Content.
Sympa Menu

freetds - atoll.c does not make

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: atoll.c does not make
  • Date: Mon, 14 Oct 2002 19:32:19 -0400


Hi Nick,

One advantage, as it were, to running a stone age OS is that it might
flush out things that you wouldn't otherwise trip over.

Making all in replacements
gmake[2]: Entering directory
`/usr/local/website/DocumentRoot/projects/freetds/src/replacements'
source='atoll.c' object='atoll.lo' libtool=yes \
depfile='.deps/atoll.Plo' tmpdepfile='.deps/atoll.TPlo' \
depmode=gcc /usr/local/bin/bash ../../depcomp \
/usr/local/bin/bash ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I.
-I. -I../../include -I../../include -I/usr/pkg/include
-D_FREETDS_LIBRARY_SOURCE -DTDS50 -c -o atoll.lo `test -f 'atoll.c' ||
echo './'`atoll.c
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include
-I/usr/pkg/include -D_FREETDS_LIBRARY_SOURCE -DTDS50 -c atoll.c
-Wp,-MD,.deps/atoll.TPlo -fPIC -DPIC -o .libs/atoll.o
atoll.c:28: syntax error before `atoll'
atoll.c:29: conflicting types for `atoll'
../../include/replacements.h:45: previous declaration of `atoll'
gmake[2]: *** [atoll.lo] Error 1

I do indeed need an atoll() on my NetBSD 1.4.2 machine. I think the
problem might be:

replacements.h:
#if !HAVE_ATOLL
typedef long long atoll_return_t;
atoll_return_t atoll(const char *nptr);
#endif /* !HAVE_ATOLL */

but the definition of the function is slightly different:

tds_sysdep_int64_type
atoll(const char *nptr)
{
return atol(nptr);
}

even though they're pretty much the same thing:

$ grep tds_sysdep_int64 include/*.h
include/tds_sysdep_public.h:#define tds_sysdep_int64_type long long
/* 64-bit int */
include/tds_sysdep_public.h:#ifndef tds_sysdep_int64_type
include/tds_sysdep_public.h:#define tds_sysdep_int64_type long long /*
64-bit int */
include/tds_sysdep_public.h:#endif /* !tds_sysdep_int64_type */


I guess the typedef in replacements.h should be

typedef tds_sysdep_int64_type atoll_return_t;

Is that what you had in mind?

--jkl






Archive powered by MHonArc 2.6.24.

Top of Page