diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-03-25 19:25:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-03-25 19:25:41 +0000 |
commit | 9f1bd74b09810565502451047b06b6eca7e47f7f (patch) | |
tree | a82551e9129f988c83fb55a2d5357340ae30ee22 /configure | |
parent | ad75aac62374e74a9829dc2f43939f4f8148a0f4 (diff) |
Added implementation of strlcpy and strlcat for systems that dont have it
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@905 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -100,6 +100,12 @@ exists () { # because some shells don't have test -e fi } +echo "#include <string.h>">.test.cpp +echo >"int main() { char a[10]; char b[10]; strlcpy(a,b,10); sprintf("999"); }" >>.test.cpp +gcc -o .test .test.cpp +$HAS_STRLCPY=`./.test` +rm -f .test.cpp .test + clear echo -e "'\033[1;33m####\033[0;37m:'\033[1;33m##\033[0;37m::: \033[1;33m##\033[0;37m::'\033[1;33m######\033[0;37m::'\033[1;33m########\033[0;37m::'\033[1;33m####\033[0;37m:'\033[1;33m########\033[0;37m:::'\033[1;33m######\033[0;37m::'\033[1;33m########\033[0;37m::" echo -e ". \033[1;33m##\033[0;37m:: \033[1;33m###\033[0;37m:: \033[1;33m##\033[0;37m:'\033[1;33m##\033[0;37m... \033[1;33m##\033[0;37m: \033[1;33m##\033[0;37m.... \033[1;33m##\033[0;37m:. \033[1;33m##\033[0;37m:: \033[1;33m##\033[0;37m.... \033[1;33m##\033[0;37m:'\033[1;33m##\033[0;37m... \033[1;33m##\033[0;37m: \033[1;33m##\033[0;37m.... \033[1;33m##\033[0;37m:" @@ -399,7 +405,7 @@ echo -e "\033[0;37mGCC Version Found:\033[1;32m\t\t$GCCVER.$GCC34" echo -e "\033[0;37mOptimatizaton Flag:\033[1;32m\t\t$OPTIMISATI" echo -e "\033[0;37m" -echo "Writing cache file for future ./configures ..." +yyecho "Writing cache file for future ./configures ..." if [ "$CONFIG_DIR" != "$ME/conf" ] ; then COPY_CONF=1 @@ -419,6 +425,7 @@ echo "MAXI_MODES=\"$MAXI_MODES\"" >> .config.cache echo "OPTIMITEMP=\"$OPTIMITEMP\"" >> .config.cache echo "OPTIMISATI=\"$OPTIMISATI\"" >> .config.cache echo "GCC34=\"$GCC34\"" >> .config.cache +echo "HAS_STRLCPY=\"$HAS_STRLCPY\"" >> .config.cache echo "COPY_CONF=\"$COPY_CONF\"" >> .config.cache echo "Writing include/inspircd_config.h ..." @@ -431,6 +438,9 @@ echo "#define GCC3" >>include/inspircd_config.h echo "#define GCC34" >>include/inspircd_config.h fi fi +if [ "$HAS_STRLCPY" -eq "999" ] ; then + echo "#define HAS_STRLCPY" >>include/inspircd_config.h +fi echo "#define SYSLOG_FACILITY LOG_DAEMON" >>include/inspircd_config.h echo "#define SYSLOG_LEVEL LOG_NOTICE" >>include/inspircd_config.h echo "#define CONFIG_FILE \"$CONFIG_DIR/inspircd.conf\"" >>include/inspircd_config.h @@ -508,4 +518,3 @@ fi echo -e "*** \033[1;32mRemember to edit your configuration files!!!\033[0;37m ***" echo "" - |