Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ Help please.

Help please.

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by DarkAura   (2 posts)  Bio
Date Wed 15 Oct 2003 04:07 AM (UTC)
Message
i'm getting these errors

comm.c:86: warning: conflicting types for built-in function `log'
comm.c:969:1: missing terminating " character
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: parse error before "r"
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: parse error before "r"
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:975:41: missing terminating " character
comm.c:992: error: parse error before string constant
comm.c:992: error: conflicting types for `log'
comm.c:86: error: previous declaration of `log'
comm.c:992: warning: data definition has no type or storage class
comm.c:994: error: parse error before '(' token
comm.c:1002: error: `input_set' undeclared here (not in a function)
comm.c:1002: error: parse error before "for"
comm.c:1009: error: parse error before numeric constant
comm.c:1009: warning: data definition has no type or storage class
comm.c:1016: error: parse error before numeric constant
comm.c:1016: warning: data definition has no type or storage class
comm.c:1022: error: parse error before numeric constant
comm.c:1022: warning: data definition has no type or storage class
comm.c:1023: warning: parameter names (without types) in function declaration
comm.c:1023: warning: data definition has no type or storage class
comm.c:1024: error: parse error before '}' token
comm.c:1027: error: redefinition of `tics'
comm.c:59: error: `tics' previously defined here
comm.c:1027: warning: data definition has no type or storage class
comm.c:1028: error: parse error before "if"
comm.c:1031: error: parse error before numeric constant
comm.c:1031: warning: data definition has no type or storage class
comm.c:1036: error: parse error before string constant
comm.c:1036: warning: data definition has no type or storage class
comm.c:1037: error: parse error before numeric constant
comm.c:1037: warning: data definition has no type or storage class
make: *** [comm.o] Error 1
void point_update( void ); /* In limits.c */
void free_char(struct char_data *ch);
void log(char *str);
void mobile_activity(void);
void string_add(struct descriptor_data *d, char *str); that is for the 86
84. void point_update( void ); /* In limits.c */
85. void free_char(struct char_data *ch);
86. void log(char *str);
87. void mobile_activity(void);
88. void string_add(struct descriptor_data *d, char *str);
968. #define COMA_SIGN \
969. "\n\r\
970. DikuMUD is currently inactive due to excessive load on the host machine.\n\r\
971. Please try again later.\n\r\n
972. \n\r\
973. Sadly,\n\r\
974. \n\r\
975. the DikuMUD system operators\n\r\n\r"
Top

Posted by DarkAura   (2 posts)  Bio
Date Reply #1 on Wed 15 Oct 2003 04:17 AM (UTC)
Message
989. int workhours(void);
990. int load(void);
991.
992. log("Entering comatose state.");
993.
994. sigsetmask(sigmask(SIGUSR1) | sigmask(SIGUSR2) | sigmask(SIGINT) |
995. sigmask(SIGPIPE) | sigmask(SIGALRM) | sigmask(SIGTERM) |
996. sigmask(SIGURG) | sigmask(SIGXCPU) | sigmask(SIGHUP));
997.
998.
999. while (descriptor_list)
1000. close_socket(descriptor_list);
1001.
1002. FD_ZERO(&input_set);
1003. do
1004. {
1005. FD_SET(s, &input_set);
1006. if (select(64, &input_set, 0, 0, &timeout) < 0)
1007. {
1008. perror("coma select");
1009. exit(1);
1010. }
1011. if (FD_ISSET(s, &input_set))
1012. {
1013. if (load() < 6)
1014. {
1015. log("Leaving coma with visitor.");
1016. sigsetmask(0);
1017. return;
1018. }
1019. if ((conn = new_connection(s)) >= 0)
1020. {
1021. write_to_descriptor(conn, COMA_SIGN);
1022. sleep(2);
1023. close(conn);
1024. }
1025. }
1026.
1027. tics = 1;
1028. if (workhours())
1029. {
1030. log("Working hours collision during coma. Exit.");
1031. exit(0);
1032. }
1033. }
1034. while (load() >= 6);
1035.
1036. log("Leaving coma.");
1037. sigsetmask(0);
1038. }

gcc -c -g comm.c
comm.c:86: warning: conflicting types for built-in function `log'
comm.c:969:1: missing terminating " character
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: parse error before "r"
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: parse error before "r"
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:972: error: stray '\' in program
comm.c:975:41: missing terminating " character
comm.c:992: error: parse error before string constant
comm.c:992: error: conflicting types for `log'
comm.c:86: error: previous declaration of `log'
comm.c:992: warning: data definition has no type or storage class
comm.c:994: error: parse error before '(' token
comm.c:1002: error: `input_set' undeclared here (not in a function)
comm.c:1002: error: parse error before "for"
comm.c:1009: error: parse error before numeric constant
comm.c:1009: warning: data definition has no type or storage class
comm.c:1016: error: parse error before numeric constant
comm.c:1016: warning: data definition has no type or storage class
comm.c:1022: error: parse error before numeric constant
comm.c:1022: warning: data definition has no type or storage class
comm.c:1023: warning: parameter names (without types) in function declaration
comm.c:1023: warning: data definition has no type or storage class
comm.c:1024: error: parse error before '}' token
comm.c:1027: error: redefinition of `tics'
comm.c:59: error: `tics' previously defined here
comm.c:1027: warning: data definition has no type or storage class
comm.c:1028: error: parse error before "if"
comm.c:1031: error: parse error before numeric constant
comm.c:1031: warning: data definition has no type or storage class
comm.c:1036: error: parse error before string constant
comm.c:1036: warning: data definition has no type or storage class
comm.c:1037: error: parse error before numeric constant
comm.c:1037: warning: data definition has no type or storage class
make: *** [comm.o] Error 1
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #2 on Wed 15 Oct 2003 05:08 PM (UTC)
Message
This is not right:

968. #define COMA_SIGN \
969. "\n\r\
970. DikuMUD is currently inactive due to excessive load on the host machine.\n\r\
971. Please try again later.\n\r\n
972. \n\r\
973. Sadly,\n\r\
974. \n\r\
975. the DikuMUD system operators\n\r\n\r"

It should be:

968. #define COMA_SIGN \
969. "\n\r\
970. DikuMUD is currently inactive due to excessive load on the host machine.\n\r\
971. Please try again later.\n\r\n\
972. \n\r\
973. Sadly,\n\r\
974. \n\r\
975. the DikuMUD system operators\n\r\n\r"

This is, however, not good practice... it would be better to make it just one line, without using the \ continue-to-next-line indicator.


Also, about the log function, is that something you added? It seems that it's having a conflict with the built in log (i.e. logarithm) function.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #3 on Thu 16 Oct 2003 02:39 AM (UTC)
Message
The conflicting types message is going to come up more and more since many common codebases used log() as the name of their generic logging function. As more and more servers update to gcc 3.3.x this will become an issue. It already has for me and AFKMud because I tend to stay on the bleeding edge of compilers as soon as they're available.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,801 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.