Subject: Re: without windns.h,warnings in wince

Re: without windns.h,warnings in wince

From: julien thai <julienresiprocate_at_gmail.com>
Date: 2005-04-26

In SDK include of wince 4.0, i found in string.h the prototype of _strdup
like this:
 _CRTIMP char * __cdecl _strdup(const char *);
 and in the Visual C++ 7.1, in string.h i found the prototype of strdup
like:
 
_CRTIMP
char * __cdecl strdup(const char *);

So i think to pass the error, it should to replace _strdup for strdup.

everything is allright when i compiled.
 What do you think? Tell me more about your idea of windns.h for wince,
 the role of windns in c-ares library?
 Julien

On 4/26/05, julien thai <julienresiprocate@gmail.com> wrote:
>
>
> I included
> #include <stdlib.h> // for strdup()
> #include <string.h> //getenv()
> but the warning still remain. I will test some function to know that
> it works correctly or not.
> Someone know the role of Windns.h in ares library, exactly in
> ares_init.h,
> cos if i removed it, i don't know if the library will still run correctly
> or not?
> What do you think?
> Julien
>
> On 4/26/05, Daniel Stenberg <daniel@haxx.se> wrote:
> >
> > On Tue, 26 Apr 2005, julien thai wrote:
> >
> > > D:\PortWinCE\contrib\ares\ares_init.c(240) : warning C4013: 'strdup'
> > > undefined; assuming extern returning int
> >
> > Isn't there a strdup() in wince? If so, you should include the header
> > that has
> > the prototype.
> >
> > > D:\PortWinCE\contrib\ares\ares_init.c(240) : warning C4047: '=' :
> > 'char *'
> > > differs in levels of indirection from 'int '
> >
> > What's this?
> >
> > > D:\PortWinCE\contrib\ares\ares_init.c(250) : warning C4047: '=' :
> > 'char *'
> > > differs in levels of indirection from 'int '
> >
> > And this?
> >
> > > D:\PortWinCE\contrib\ares\ares_init.c(263) : warning C4013: 'getenv'
> > > undefined; assuming extern returning int
> >
> > Is there a getenv() in wince and if so, can you include the header for
> > the
> > proto?
> >
> > [snip]
> >
> > In general, warnings are only warnings and you can fix them or ignore
> > them.
> > The errors are what you should start focusing on.
> >
> > --
> > c-ares -- my preferred DNS asynch resolver library
> >
>
>

_______________________________________________
http://cool.haxx.se/mailman/listinfo/c-ares
Received on Tue Apr 26 14:46:58 2005