[746] in Zephyr_Bugs

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

zmailnotify should use varargs....

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Tue Feb 20 10:20:39 1996

From: epeisach@MIT.EDU
Date: Tue, 20 Feb 1996 10:20:24 -0500
To: bug-zephyr@MIT.EDU


For pop_command, the old variable numbre of argument passing 
does not work for DU.... This is a kludge, as configure should detect
it.. (this is based on old sources, but the bug is still there)

*** 1.21	1994/02/17 16:08:43
--- zmailnotify.c	1996/02/20 15:14:54
***************
*** 32,37 ****
--- 32,42 ----
  #include <krb.h>
  #endif
  
+ #if defined(__osf__)
+ #define USE_VARARGS
+ #include <varargs.h>
+ #endif
+ 
  #define NOTOK (-1)
  #define OK 0
  #define DONE 1
***************
*** 471,482 ****
--- 476,500 ----
  }
  
  /*VARARGS1*/
+ #ifdef USE_VARARGS
+ pop_command(fmt, va_alist)
+ char *fmt;
+ va_dcl
+ #else
  pop_command(fmt, a, b, c, d)
  char *fmt;
+ #endif
  {
      char buf[4096];
+ #ifdef USE_VARARGS
+     va_list args;
  
+     va_start(args);
+     (void) vsprintf(buf, fmt, args);
+     va_end(args);
+ #else
      (void) sprintf(buf, fmt, a, b, c, d);
+ #endif
  
      if (putline(buf, Errmsg, sfo) == NOTOK) return(NOTOK);
  


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