[comp.sys.dec] Ultrix 4.1 rexec-problems

michaelp@forst.informatik.rwth-aachen.de (Michael Portz) (06/19/91)

We are running Ultrix 4.1 on a DECStation 3100. Our linker is
not able to successfully link any program containing a call to
the rexec-routine. The following is the smallest example for
our problems:

THE PROGRAM:

Misc 204) cat test.c

main()
{
  char **ahost;
  short inport;
  char *user, *passwd, *cmd;
  int *fd2p;

  rexec(ahost,inport,user,passwd,cmd,fd2p);
}


THE RESULT:

Misc 205) cc test.c
ld:
Undefined:
macnum
proxy
macros
macbuf

Any help is appreciated. Thanks

Michael Portz

|==============================================================|
|                                                              |
| email: michaelp@terpi.informatik.rwth-aachen.de              |
|                                                              |
| Michael Portz                                                |
| Lehrstuhl fuer angewandte Mathematik insbesondere Informatik |
| RWTH Aachen                                                  |
| Ahornstr.55                                                  |
| D-5100 Aachen                                                |
|                                                              |
|==============================================================|

fingerhu@ircam.fr (Michel Fingerhut) (06/20/91)

Michael Portz complains about unresolved references to macnum, proxy, macros and macbuf
when using the rexec library call.

These are variables which are used by ruserpass (as called from rexec) in order to execute
macros and proxy commands which might be found in a .netrc file as needed by the ftp command in
auto-login mode.

Actually, 4.3 has two different ruserpass sources, one specific for ftp, which contains this
code together with a .h defining these (and other) global variables, while the one in their libc
does not contain it nor those variables.  I guess ultrix used the same routine.  Since no
utility actually uses rexec, I suppose they never were aware of the missing variables.

Anyway, I suggest you include the following lines in your code:

		int proxy;		    /* proxy server connection active */
		int macnum;		    /* number of defined macros */
		struct macel {
		    char mac_name[9];       /* macro name */
		    char *mac_start;        /* start of macro in macbuf */
		    char *mac_end;          /* end of macro in macbuf */
		};
		char macbuf[4096];
		struct macel macros[16];
		
Michael Fingerhut