[1251] in Kerberos-V5-bugs

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

lib/krb5/os/{hst_realm,dom_realm} windows integration broke unix

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Thu Mar 23 07:55:54 1995

From: epeisach@MIT.EDU
Date: Thu, 23 Mar 1995 07:55:38 -0500
To: krb5-bugs@MIT.EDU


a) Not all C preprocessors allow you to get away with indented
conditionals... 

b) There was a syntax error in the modified line. (extra close paren).

Index: hst_realm.c
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb5/os/hst_realm.c,v
retrieving revision 5.14
diff -c -r5.14 hst_realm.c
*** hst_realm.c	1995/03/23 03:46:05	5.14
--- hst_realm.c	1995/03/23 12:51:19
***************
*** 186,197 ****
      (void) sprintf(scanstring, "%%%ds %%%ds",
  		   sizeof(trans_host)-1,sizeof(trans_realm)-1);
      while (1) {
!         #ifdef _WINDOWS
              scanval = read_2str (trans_file, trans_host, sizeof(trans_host)-1,
                  trans_realm, sizeof(trans_realm)-1);
!         #else
!             scanval = fscanf(trans_file, scanstring, trans_host, trans_realm));
!         #endif
  	if (scanval != 2) {
  	    if (scanval == EOF) {
  		fclose(trans_file);
--- 186,197 ----
      (void) sprintf(scanstring, "%%%ds %%%ds",
  		   sizeof(trans_host)-1,sizeof(trans_realm)-1);
      while (1) {
! #ifdef _WINDOWS
              scanval = read_2str (trans_file, trans_host, sizeof(trans_host)-1,
                  trans_realm, sizeof(trans_realm)-1);
! #else
!             scanval = fscanf(trans_file, scanstring, trans_host, trans_realm);
! #endif
  	if (scanval != 2) {
  	    if (scanval == EOF) {
  		fclose(trans_file);
***************
*** 230,235 ****
      *realmsp = retrealms;
      return 0;
  }
- 
- 
- 
--- 230,232 ----
Index: realm_dom.c
===================================================================
RCS file: /mit/krb5/.cvsroot/src/lib/krb5/os/realm_dom.c,v
retrieving revision 5.8
diff -c -r5.8 realm_dom.c
*** realm_dom.c	1995/03/23 03:46:07	5.8
--- realm_dom.c	1995/03/23 12:51:59
***************
*** 132,143 ****
      (void) sprintf(scanstring, "%%%ds %%%ds",
  		   sizeof(trans_host)-1,sizeof(trans_realm)-1);
      while (1) {
!         #ifdef _WINDOWS
              scanval = read_2str (trans_file, trans_host, sizeof(trans_host)-1,
                  trans_realm, sizeof(trans_realm)-1);
!         #else
!             scanval = fscanf(trans_file, scanstring, trans_host, trans_realm));
!         #endif
  	if (scanval != 2) {
  	    if (scanval == EOF) {
  		fclose(trans_file);
--- 132,143 ----
      (void) sprintf(scanstring, "%%%ds %%%ds",
  		   sizeof(trans_host)-1,sizeof(trans_realm)-1);
      while (1) {
! #ifdef _WINDOWS
              scanval = read_2str (trans_file, trans_host, sizeof(trans_host)-1,
                  trans_realm, sizeof(trans_realm)-1);
! #else
!             scanval = fscanf(trans_file, scanstring, trans_host, trans_realm);
! #endif
  	if (scanval != 2) {
  	    if (scanval == EOF) {
  		fclose(trans_file);

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