[141] in Hesiod

home help back first fref pref prev next nref lref last post

Compiling on the Alpha

daemon@ATHENA.MIT.EDU (Gregory Neil Shapiro)
Mon Jun 14 19:30:54 1993

From: Gregory Neil Shapiro <gshapiro@wpi.WPI.EDU>
Date: Mon, 14 Jun 1993 19:25:33 -0400
To: hesiod@Athena.MIT.EDU


To get the Hesiod working under DEC OSF/1 1.3, I had to make the
following source changes:

diff -cr hesiod/hesiod.c hesiod_alpha/hesiod.c
*** hesiod/hesiod.c	Tue Mar  6 12:48:56 1990
--- hesiod_alpha/hesiod.c	Mon Jun 14 19:19:17 1993
***************
*** 98,103 ****
--- 98,106 ----
  			else if (strcmp(key, "rhs") == 0) cpp = &Hes_RHS;
  			else continue;
  			while(*cp == ' ' || *cp == '\t' || *cp == '=') cp++;
+ #ifdef __alpha
+        		     if (*cp != '\n') {
+ #endif
  			if (*cp != '.') {
  				Hes_Errno = HES_ER_CONFIG;
  				fclose(fp);
***************
*** 106,111 ****
--- 109,117 ----
  			len = strlen(cp);
  			*cpp = calloc((unsigned int) len, sizeof(char));
  			(void) strncpy(*cpp, cp, len-1);
+ #ifdef __alpha
+ 		      }
+ #endif
  		}
  		fclose(fp);
  	}
diff -cr hesiod/hesiod.h hesiod_alpha/hesiod.h
*** hesiod/hesiod.h	Sun Aug  7 21:52:54 1988
--- hesiod_alpha/hesiod.h	Mon Jun 14 19:20:57 1993
***************
*** 36,41 ****
--- 36,44 ----
  
  char *hes_to_bind();
  char **hes_resolve();
+ #ifdef __alpha
+ char *getenv();
+ #endif
  
  /* For use in getting post-office information. */
  
diff -cr hesiod/resolve.c hesiod_alpha/resolve.c
*** hesiod/resolve.c	Sun Aug  7 21:59:27 1988
--- hesiod_alpha/resolve.c	Mon Jun 14 19:17:46 1993
***************
*** 39,45 ****
--- 39,49 ----
      cp += sizeof(u_short/*type*/);
  
      rr->class = _getshort(cp);
+ #ifdef __alpha
+     cp += sizeof(u_short/*class*/) + sizeof(u_int/*ttl*/);
+ #else
      cp += sizeof(u_short/*class*/) + sizeof(u_long/*ttl*/);
+ #endif
  
      rr->dlen = (int)_getshort(cp);
      rr->data = cp + sizeof(u_short/*dlen*/);
***************
*** 141,147 ****
--- 145,155 ----
  {
      static char qbuf[PACKETSZ], abuf[PACKETSZ];
      register int n;
+ #ifdef __alpha
+     register int res_options = _res.options;
+ #else
      register long res_options = _res.options;
+ #endif
      register int res_retrans = _res.retrans;
      register int res_retry = _res.retry;
  

Now I have to figure out how to integrate it into OSF/1's SIA
architecture and have it talk with our DECstations for password
information.

home help back first fref pref prev next nref lref last post