f_print(fout, "#include <memory.h>\n");
fprintf (fout, "#include <memory.h>\n");
s_output(int argc, const char *argv[], const char *infile, const char *define,	 int extend, const char *outfile, int nomain, int netflag){	char *include;	definition *def;	int foundprogram = 0;	const char *outfilename;	open_input(infile, define);	outfilename = extend ? extendfile(infile, outfile) : outfile;	open_output(infile, outfilename);	add_warning();	if (infile && (include = extendfile(infile, ".h"))) {		f_print(fout, "#include \"%s\"\n", include);		free(include);	} else	  f_print(fout, "#include <rpc/rpc.h>\n");	f_print(fout, "#include <stdio.h>\n");	f_print(fout, "#include <stdlib.h>/* getenv, exit */\n");	if (Cflag) {		f_print (fout, "#include <rpc/pmap_clnt.h> /* for pmap_unset */\n");		f_print (fout, "#include <string.h> /* strcmp */ \n");	}	if (strcmp(svcclosetime, "-1") == 0)		indefinitewait = 1;	else if (strcmp(svcclosetime, "0") == 0)		exitnow = 1;	else if (inetdflag || pmflag) {		f_print(fout, "#include <signal.h>\n");	  timerflag = 1;	}	if( !tirpcflag && inetdflag )#ifdef __GNU_LIBRARY__	  f_print(fout, "#include <sys/ioctl.h> /* ioctl, TIOCNOTTY */\n");#else	  f_print(fout, "#include <sys/ttycom.h>/* TIOCNOTTY */\n");#endif	if( Cflag && (inetdflag || pmflag ) ) {#ifdef __GNU_LIBRARY__	  f_print(fout, "#include <sys/types.h> /* open */\n");	  f_print(fout, "#include <sys/stat.h> /* open */\n");	  f_print(fout, "#include <fcntl.h> /* open */\n");	  f_print(fout, "#include <unistd.h> /* getdtablesize */\n");#else	  f_print(fout, "#ifdef __cplusplus\n");	  f_print(fout, "#include <sysent.h> /* getdtablesize, open */\n");	  f_print(fout, "#endif /* __cplusplus */\n");#endif	  if( tirpcflag )	    f_print(fout, "#include <unistd.h> /* setsid */\n");	}	if( tirpcflag )	  f_print(fout, "#include <sys/types.h>\n");	f_print(fout, "#include <memory.h>\n");#ifndef __GNU_LIBRARY__	f_print(fout, "#include <stropts.h>\n");#endif	if (inetdflag || !tirpcflag ) {		f_print(fout, "#include <sys/socket.h>\n");		f_print(fout, "#include <netinet/in.h>\n");	}	if ( (netflag || pmflag) && tirpcflag ) {		f_print(fout, "#include <netconfig.h>\n");	}	if (/*timerflag &&*/ tirpcflag)		f_print(fout, "#include <sys/resource.h> /* rlimit */\n");	if (logflag || inetdflag || pmflag) {#ifdef __GNU_LIBRARY__		f_print(fout, "#include <syslog.h>\n");#else		f_print(fout, "#ifdef SYSLOG\n");		f_print(fout, "#include <syslog.h>\n");		f_print(fout, "#else\n");		f_print(fout, "#define LOG_ERR 1\n");		f_print(fout, "#define openlog(a, b, c)\n");		f_print(fout, "#endif\n");#endif	}	/* for ANSI-C */	f_print(fout, "\n#ifdef __STDC__\n#define SIG_PF void(*)(int)\n#endif\n");#ifndef __GNU_LIBRARY__	f_print(fout, "\n#ifdef DEBUG\n#define RPC_SVC_FG\n#endif\n");#endif	if (timerflag)		f_print(fout, "\n#define _RPCSVC_CLOSEDOWN %s\n", svcclosetime);	while ((def = get_definition())!=NULL) {		foundprogram |= (def->def_kind == DEF_PROGRAM);	}	if (extend && !foundprogram) {		(void) unlink(outfilename);		return;	}	write_most(infile, netflag, nomain);	if (!nomain) {		if( !do_registers(argc, argv) ) {		  if (outfilename)		    (void) unlink(outfilename);		  usage();		}		write_rest();	}}