curl-library
Re: curl and curllib on Interix/SFU
Date: Mon, 11 Nov 2002 23:23:16 +0100 (MET)
On Fri, 8 Nov 2002, Nedelcho Stanev wrote:
> i try to compile curl on sfu 3.0 and i have some probs with compilation so
> i made little patch for interix.Is someone need its, they are welcome i
> know that may be this is not a best way, but it's work :)
Hoa! Thanks! This looks like a fairly advanced fix, but if this is what it
takes then I guess I can't object. Are you *sure* that all this magic isn't
already present in a header file we can include instead?
[from the header file patch]
> +#define ifr_addr ifr_ifru.ifru_addr /* address */
[from the C file]
> +#ifdef __INTERIX
> +#include <sys/socket.h>
> +#endif
You should check for #ifdef HAVE_SYS_SOCKET_H and include the file then,
independent of what OS you're using.
> +#ifndef __INTERIX
> struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_dstaddr;
> +#else
> + struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_addr;
> +#endif
This doesn't really make sense. Since you've added the defines in the header
file, why can't you add a define that is named the same way the other
platforms have named their struct field?
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2002-11-11