Dear all,
I am trying to understand how c preprocessor works in c
I have built that simple environment
Code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
int main(int argc, char *argv[])
{
int i;
#ifdef IPV6
if( ( i = socket( AF_INET6, SOCK_STREAM, 0 ) ) < 0 )
#else
if( ( i = socket( AF_INET, SOCK_STREAM, 0 ) ) < 0 )
#endif
perror("error");
else{
printf("socket created %d");
}
return 0;
}
and I am trying to see
a) How to set manually IPV6
b) How to make the system set it.
I have heard about a tool that is called autoconf that can do that by it asks for a template for doing that.
Could you please help me with that?
B.R
Alex