Lines Matching refs:fout

233 		fout = stdout;
241 fout = fopen(outfile, "w");
242 if (fout == NULL) {
254 f_print(fout, "/*\n");
255 f_print(fout, " * Please do not edit this file.\n");
256 f_print(fout, " * It was generated using rpcgen.\n");
257 f_print(fout, " */\n\n");
476 f_print(fout, "#include \"%s\"\n", include);
480 f_print(fout, "#include <rpc/rpc.h>\n");
481 tell = ftell(fout);
485 if (extend && tell == ftell(fout)) {
586 f_print(fout, "#ifndef _%s\n#define _%s\n\n", guard,
589 f_print(fout, "#include <rpc/rpc.h>\n");
592 f_print(fout, "#include <pthread.h>\n");
596 f_print(fout, "\n#ifdef __cplusplus\n");
597 f_print(fout, "extern \"C\" {\n");
598 f_print(fout, "#endif\n\n");
603 tell = ftell(fout);
621 f_print(fout,
625 f_print(fout, "\n#ifdef __cplusplus\n");
626 f_print(fout, "extern \"C\" {\n");
627 f_print(fout, "#endif\n");
637 if (extend && tell == ftell(fout)) {
640 f_print(fout, rpcgen_table_dcl);
643 f_print(fout, "\n#ifdef __cplusplus\n");
644 f_print(fout, "}\n");
645 f_print(fout, "#endif\n");
647 f_print(fout, "\n#endif /* !_%s */\n", guard);
668 f_print(fout, "#include \"%s\"\n", include);
671 f_print(fout, "#include <rpc/rpc.h>\n");
673 f_print(fout, "#include <stdio.h>\n");
674 f_print(fout, "#include <stdlib.h> /* getenv, exit */\n");
675 f_print (fout, "#include <rpc/pmap_clnt.h> /* for pmap_unset */\n");
676 f_print (fout, "#include <string.h> /* strcmp */\n");
678 f_print(fout, "#include <rpc/rpc_com.h>\n");
684 f_print(fout, "#include <signal.h>\n");
689 f_print(fout, "#include <sys/ttycom.h> /* TIOCNOTTY */\n");
691 f_print(fout, "#ifdef __cplusplus\n");
692 f_print(fout,
694 f_print(fout, "#endif /* __cplusplus */\n");
697 f_print(fout, "#include <fcntl.h> /* open */\n");
698 f_print(fout, "#include <unistd.h> /* fork / setsid */\n");
699 f_print(fout, "#include <sys/types.h>\n");
702 f_print(fout, "#include <string.h>\n");
704 f_print(fout, "#include <sys/socket.h>\n");
705 f_print(fout, "#include <netinet/in.h>\n");
709 f_print(fout, "#include <netconfig.h>\n");
712 f_print(fout, "#include <sys/resource.h> /* rlimit */\n");
714 f_print(fout, "#include <syslog.h>\n");
716 f_print(fout, "\n#ifdef DEBUG\n#define RPC_SVC_FG\n#endif\n");
718 f_print(fout, "\n#define _RPCSVC_CLOSEDOWN %s\n",
753 f_print (fout, "#include <string.h> /* for memset */\n");
755 f_print(fout, "#include \"%s\"\n", include);
758 f_print(fout, "#include <rpc/rpc.h>\n");
812 f_print(fout, "#include \"%s\"\n", include);
815 f_print(fout, "#include <rpc/rpc.h>\n");
817 tell = ftell(fout);
821 if (extend && tell == ftell(fout)) {
847 f_print(fout, "#include \"%s\"\n", include);
850 f_print(fout, "#include <rpc/rpc.h>\n");
851 f_print(fout, "#include <stdio.h>\n");
852 f_print(fout, "#include <stdlib.h>\n");
853 tell = ftell(fout);
861 if (extend && tell == ftell(fout)) {
904 f_print(fout, "\n# This is a template makefile generated\
907 f_print(fout, "\n# Parameters \n\n");
909 f_print(fout, "CLIENT = %s\nSERVER = %s\n\n",
911 f_print(fout, "SOURCES_CLNT.c = \nSOURCES_CLNT.h = \n");
912 f_print(fout, "SOURCES_SVC.c = \nSOURCES_SVC.h = \n");
913 f_print(fout, "SOURCES.x = %s\n\n", cmd->infile);
914 f_print(fout, "TARGETS_SVC.c = %s %s %s \n",
916 f_print(fout, "TARGETS_CLNT.c = %s %s %s \n",
918 f_print(fout, "TARGETS = %s %s %s %s %s %s\n\n",
922 f_print(fout, "OBJECTS_CLNT = $(SOURCES_CLNT.c:%%.c=%%.o) \
925 f_print(fout, "\nOBJECTS_SVC = $(SOURCES_SVC.c:%%.c=%%.o) \
929 f_print(fout, "\n# Compiler flags \n");
931 f_print(fout, "\nCFLAGS += -D_REENTRANT -D_THEAD_SAFE \nLDLIBS += -pthread\n");
933 f_print(fout, "RPCGENFLAGS = \n");
935 f_print(fout, "\n# Targets \n\n");
937 f_print(fout, "all : $(CLIENT) $(SERVER)\n\n");
938 f_print(fout, "$(TARGETS) : $(SOURCES.x) \n");
939 f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n");
941 f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", clientname);
942 f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", servername);
944 f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) \
947 f_print(fout, "$(OBJECTS_SVC) : $(SOURCES_SVC.c) $(SOURCES_SVC.h) \
949 f_print(fout, "$(CLIENT) : $(OBJECTS_CLNT) \n");
950 f_print(fout, "\t$(CC) -o $(CLIENT) $(OBJECTS_CLNT) \
952 f_print(fout, "$(SERVER) : $(OBJECTS_SVC) \n");
953 f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n");
954 f_print(fout, "clean:\n\t rm -f core $(TARGETS) $(OBJECTS_CLNT) \