Skip to Content.
Sympa Menu

freetds - Re: [freetds] include order

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] include order
  • Date: Mon, 18 Dec 2006 08:13:44 -0500

ZIGLIO, Frediano, VF-IT wrote:
> As you can see from
> http://freetds.sourceforge.net/outsf/alpha-linux1/make.1.html
> it seems that there can be problem in the definition of va_list for some
> platforms.
> Can cause some problems where va_list is really used.
> A solution is to include stdarg.h before stdio.h (see
> src/tds/vstrbuild.c for instance).
> There are however a lot of files to change...

Perhaps, remove from tds.h:

#include <stdio.h>
#include <stdarg.h>
#include <time.h>

'time.h' is wrong anyway; sometimes sys/time.h is needed. And most files
include stdio.h already.

Only 12 files use va_list:

$ find src -name \*.c | xargs grep -l va_list
src/ctlib/cs.c
src/ctlib/ct.c
src/dblib/unittests/t0016.c
src/dblib/dblib.c
src/odbc/unittests/describecol.c
src/odbc/odbc.c
src/tds/unittests/dataread.c
src/tds/vstrbuild.c
src/tds/query.c
src/tds/util.c
src/replacements/vasprintf.c
src/replacements/asprintf.c

and 11 of them explicitly include stdarg.h already, too.

--jkl



  • [freetds] include order, ZIGLIO, Frediano, VF-IT, 12/18/2006
    • Re: [freetds] include order, James K. Lowden, 12/18/2006

Archive powered by MHonArc 2.6.24.

Top of Page