[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

building ripe-whois on woody?

After taking a look at the IRRd, I (with the benefit of hindsight, perhaps
not-so-wisely) tried ripe-dbase whoisd first.

After working through a few tweaks (which I take to be normal source
portability issues) I've hit a brick wall, which I think is distilled down
to the attached file.

It won't compile as-is (implicit declaration of function `int
getopt(...)') yet I can't figure out how to include getopt.h (or <shudder>
even explicitly declare enough to get past this) - various attempts have
just produced different errors. Anyone spot the obvious here?

Anyone ever tried to build this beastie on Debian?

Are there any other whois databases/servers I might consider?

The source I am using is 3.01 from ftp://ftp.ripe.net/ripe/dbase/software/


/* #include <config.h> */
#include <stdio.h>

/* do we process a mail */
int reading_from_mail = 0;

void main(int argc, char **argv, char **envp){
  //init_and_set_options(argc, argv, envp);

/* XXX These includes will not work :-( */
/* #include <unistd.h> */
/* #include <getopt.h> */
/*  extern int getopt(int, char **, char *); */
/*  extern int getopt(); */
  /* optarg & optind are necessary to use getopt(3C) */ 
  extern char *optarg;
  extern int optind;

  int ch;

  while ((ch = getopt(argc, argv, "MtSTf:c:sn")) != -1){
	  switch(ch) {
	  case 'M':
	  	  reading_from_mail = 1;
	  case '?':
	  	  printf("Unknown option\n"); exit(1);

Reply to: