Hi
I have the following .x file
Also I implement the remote functions in ex_proc.c like belowCode:#define VERSION_NUMBER 1 struct mytimeval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; struct struct_t { struct mytimeval tv; char *str; }; /************************************** * Since only one argument is allowed * I pack the data in a struct **************************************/ struct dataPack_t { struct struct_t data; int fd; }; program MYRPC { version MYRPC_VERSION { int OPENREMOTE(string) = 1; int STOREREMOTE(dataPack_t) = 2; int CLOSEREMOTE(int) = 3; } = VERSION_NUMBER; } = 555555555;
When I compile the code i have following errorsCode:int * openremote_1 (char **file_name) { ..... } int * storeremote_1 (struct dataPack_t *dp) { ..... } int * closeremote_1 (int *my_file) { ..... }
I have Sun's RPCGEN programming guide. Maybe it is from "stone age", I don't know!? I follow the steps in the document. The "client" part is compiled successfully.Code:fnoyan@linux:~/c/rpc/17.1> rpcgen ex.x fnoyan@linux:~/c/rpc/17.1> gcc ex_client.c ex_clnt.c ex_xdr.c -o client fnoyan@linux:~/c/rpc/17.1> gcc -Wall ex_svc.c ex_proc.c ex_xdr.c -o server ex_proc.c:16: error: conflicting types for ‘openremote_1’ ex.h:40: error: previous declaration of ‘openremote_1’ was here ex_proc.c:34: error: conflicting types for ‘storeremote_1’ ex.h:43: error: previous declaration of ‘storeremote_1’ was here ex_proc.c:54: error: conflicting types for ‘closeremote_1’ ex.h:46: error: previous declaration of ‘closeremote_1’ was here
what may be the reason of errors?
Thanks...



LinkBack URL
About LinkBacks



