Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4ab66ad1
Commit
4ab66ad1
authored
Jun 17, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check in configure script if iconv() needs CONST
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1523
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
cbc2825a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
configure.ac
configure.ac
+20
-0
charConv.c
src/charConv.c
+1
-1
charConv.h
src/charConv.h
+1
-1
No files found.
configure.ac
View file @
4ab66ad1
...
...
@@ -157,6 +157,26 @@ if test x$enable_iconv = xyes; then
if test x$enable_iconv = xyes; then
AC_CHECK_LIB(iconv,main,MPD_LIBS="$MPD_LIBS $ICONV_LIBS",)
AC_DEFINE(HAVE_ICONV,1,[Define to use iconv])
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(proto_iconv, [
AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
], [], iconv_arg1="", iconv_arg1="const")
proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:-}[$]proto_iconv)
AC_DEFINE_UNQUOTED(ICONV_CONST, $proto_iconv_arg1,
[Define as const if the declaration of iconv() needs const.])
fi
CFLAGS=$oldcflags
LIBS=$oldlibs
...
...
src/charConv.c
View file @
4ab66ad1
...
...
@@ -83,7 +83,7 @@ int setCharSetConversion(char * to, char * from) {
return
-
1
;
}
char
*
convStrDup
(
char
*
string
)
{
char
*
convStrDup
(
ICONV_CONST
char
*
string
)
{
if
(
!
char_conv_to
)
return
NULL
;
if
(
char_conv_same
)
return
strdup
(
string
);
...
...
src/charConv.h
View file @
4ab66ad1
...
...
@@ -23,7 +23,7 @@
int
setCharSetConversion
(
char
*
to
,
char
*
from
);
char
*
convStrDup
(
char
*
string
);
char
*
convStrDup
(
ICONV_CONST
char
*
string
);
void
closeCharSetConversion
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment