From: <dg...@us...> - 2006-07-06 17:14:03
|
Update of /cvsroot/xine/xine-ui/src/common In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv14344/src/common Modified Files: Makefile.am getline.c strndup.c strsep.c Log Message: The AC_REPLACE_FUNCS situation does not work, so replace it with some working #ifdef code. Index: Makefile.am =================================================================== RCS file: /cvsroot/xine/xine-ui/src/common/Makefile.am,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Makefile.am 1 Jul 2006 12:24:09 -0000 1.23 +++ Makefile.am 6 Jul 2006 17:13:59 -0000 1.24 @@ -14,7 +14,8 @@ GETOPT_HDR = getopt.h endif -libcommon_a_SOURCES = $(GETOPT_SRC) utils.c +libcommon_a_SOURCES = $(GETOPT_SRC) utils.c getline.c strndup.c strsep.c + libcommonx_a_CFLAGS = $(X_CFLAGS) libcommonx_a_SOURCES = x11utils.c Index: getline.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/common/getline.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- getline.c 7 Jan 2006 19:50:03 -0000 1.1 +++ getline.c 6 Jul 2006 17:13:59 -0000 1.2 @@ -5,6 +5,10 @@ * */ +#include <config.h> + +#ifndef HAVE_GETLINE + #include <stdlib.h> #include <stdio.h> #include <errno.h> @@ -12,7 +16,6 @@ #define BLOCK_SIZE 128 - ssize_t getdelims(char **lineptr, size_t *n, const char *delims, FILE *stream) { void *tmp; int c; @@ -46,3 +49,5 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream) { return getdelims(lineptr, n, "\n\r", stream); } + +#endif Index: strndup.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/common/strndup.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- strndup.c 19 Jun 2006 00:24:16 -0000 1.2 +++ strndup.c 6 Jul 2006 17:13:59 -0000 1.3 @@ -2,6 +2,10 @@ * taken from xine-lib */ +#include <config.h> + +#ifndef HAVE_STRNDUP + #include <stdlib.h> #include <string.h> @@ -13,3 +17,7 @@ ret[n] = '\0'; return ret; } + +#endif + + Index: strsep.c =================================================================== RCS file: /cvsroot/xine/xine-ui/src/common/strsep.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- strsep.c 19 Jun 2006 00:24:16 -0000 1.1 +++ strsep.c 6 Jul 2006 17:13:59 -0000 1.2 @@ -2,6 +2,10 @@ * taken from xine-lib */ +#include <config.h> + +#ifndef HAVE_STRSEP + #include <string.h> char *strsep(char **stringp, const char *delim) { @@ -37,3 +41,5 @@ return begin; } + +#endif |