diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-09 09:00:17 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-07-09 09:00:17 -0300 |
commit | 11fae04527098cb6c266eae41188504bd22a5b52 (patch) | |
tree | 92777d90b1eaff5ab0cb99603ecd3c4abf18d145 /configure.in | |
parent | cd37b73fe5107098c669fcbf569e9f20de013141 (diff) | |
download | mariadb-git-11fae04527098cb6c266eae41188504bd22a5b52.tar.gz |
Bug#45288: pb2 returns a lot of compilation warnings on linux
Although the C standard mandates that sprintf return the number
of bytes written, some very ancient systems (i.e. SunOS 4)
returned a pointer to the buffer instead. Since these systems
are not supported anymore and are hopefully long dead by now,
simply remove the portability wrapper that dealt with this
discrepancy. The autoconf check was causing trouble with GCC.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/configure.in b/configure.in index bc1d7df6703..0264c351b07 100644 --- a/configure.in +++ b/configure.in @@ -278,40 +278,6 @@ AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL']) AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf) AC_CHECK_PROG(DVIS, tex, manual.dvi) -#check the return type of sprintf -AC_MSG_CHECKING("return type of sprintf") -AC_TRY_RUN([ - int main() - { - char* s = "hello"; - char buf[6]; - if((int)sprintf(buf, s) == strlen(s)) - return 0; - - return -1; - } - ], - [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) - AC_MSG_RESULT("int")], - [AC_TRY_RUN([ - int main() - { - char* s = "hello"; - char buf[6]; - if((char*)sprintf(buf,s) == buf + strlen(s)) - return 0; - return -1; - } ], - [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf]) - AC_MSG_RESULT("ptr")], - [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf]) - AC_MSG_RESULT("garbage")] - )], - # Cross compile, assume POSIX - [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) - AC_MSG_RESULT("int (we assume)")] -) - AC_PATH_PROG(uname_prog, uname, no) # We should go through this and put all the explictly system dependent |