diff options
author | František Dvořák <valtri@users.sourceforge.net> | 2004-09-20 19:30:02 +0000 |
---|---|---|
committer | František Dvořák <valtri@users.sourceforge.net> | 2004-09-20 19:30:02 +0000 |
commit | 7204b84beb0f5cfb166e8d56402371d05bece83b (patch) | |
tree | 16b76662489bd637b04e06e5ee6ca1ea98186dec /src/xine-utils/xineutils.h | |
parent | 747ab57ec201661d72adfdf0ce538d728c0013c5 (diff) | |
download | xine-lib-7204b84beb0f5cfb166e8d56402371d05bece83b.tar.gz xine-lib-7204b84beb0f5cfb166e8d56402371d05bece83b.tar.bz2 |
Build system improvements:
- use replacement functions (macro AC_REPLACE_FUNCS and variable LTLIBOBJS),
each function is in a file placed into lib/ directory,
it was not necessary, but it looks nice, IMHO
- headers cleanups (this was needed):
- prototypes of replacement funtions and macros are placed
into separate os_internal.h (and included by config.h)
- drop include inttypes.h from public xine.h, replaced by custom
os_type.h, idea origins from Ogg/Vorbis public headers
- disable generating inttypes.h: generated replacement isn't enough for
xine-lib but nobody complained (and for M$VC we have special version)
- better including headers for win32, let dvdnav use its mutex wrapper
- updated M$VC port
Result:
- xine is compiled nicely by MinGW, CygWin and paritaly M$VC
- frontends in M$VC port don't require additional helping headers
- moved some platform specific things from xine-utils and win32/contrib
to lib/
Finally I can start with real coding. :-)
CVS patchset: 6982
CVS date: 2004/09/20 19:30:02
Diffstat (limited to 'src/xine-utils/xineutils.h')
-rw-r--r-- | src/xine-utils/xineutils.h | 109 |
1 files changed, 5 insertions, 104 deletions
diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index 6f5fecdf8..6a4be56bf 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.92 2004/09/06 18:34:39 valtri Exp $ + * $Id: xineutils.h,v 1.93 2004/09/20 19:30:05 valtri Exp $ * */ #ifndef XINEUTILS_H @@ -577,27 +577,6 @@ typedef union { #endif /*ARCH_X86 */ -#ifndef HAVE_LSTAT -# define lstat(FILENAME, BUF) stat((FILENAME), (BUF)) -#endif - - -#ifdef _MSC_VER -# define snprintf _snprintf -# define vsnprintf _vsnprintf -#endif - - -#ifdef WIN32 -# ifndef strcasecmp -# define strcasecmp _stricmp -# endif -# ifndef strncasecmp -# define strncasecmp _strnicmp -# endif -#endif - - /* Optimized/fast memcpy */ /* @@ -679,78 +658,10 @@ void xine_strdupa(char *dest, char *src); } \ } while(0) -/* Shamefully copied from glibc 2.2.3 */ -#ifdef HAVE_STRPBRK -#define xine_strpbrk strpbrk -#else -static inline char *_private_strpbrk(const char *s, const char *accept) { - - while(*s != '\0') { - const char *a = accept; - while(*a != '\0') - if(*a++ == *s) - return(char *) s; - ++s; - } - - return NULL; -} -#define xine_strpbrk _private_strpbrk -#endif - -#if defined HAVE_STRSEP && !defined(_MSC_VER) -#define xine_strsep strsep -#else -static inline char *_private_strsep(char **stringp, const char *delim) { - char *begin, *end; - - begin = *stringp; - if(begin == NULL) - return NULL; - - if(delim[0] == '\0' || delim[1] == '\0') { - char ch = delim[0]; - - if(ch == '\0') - end = NULL; - else { - if(*begin == ch) - end = begin; - else if(*begin == '\0') - end = NULL; - else - end = strchr(begin + 1, ch); - } - } - else - end = xine_strpbrk(begin, delim); - - if(end) { - *end++ = '\0'; - *stringp = end; - } - else - *stringp = NULL; - - return begin; -} -#define xine_strsep _private_strsep -#endif - - -#ifdef HAVE_SETENV -#define xine_setenv setenv -#else -static inline void _private_setenv(const char *name, const char *val, int _xx) { - int len = strlen(name) + strlen(val) + 2; - char *env = (char *)malloc(len); - - sprintf(env, "%s%c%s", name, '=', val); - putenv(env); - /*free(env); The string passed to putenv must not be freed*/ -} -#define xine_setenv _private_setenv -#endif +/* compatibility macros */ +#define xine_strpbrk(S, ACCEPT) strpbrk((S), (ACCEPT)) +#define xine_strsep(STRINGP, DELIM) strsep((STRINGP), (DELIM)) +#define xine_setenv(NAME, VAL, XX) setenv((NAME), (VAL), (XX)) /* * Color Conversion Utility Functions @@ -1118,16 +1029,6 @@ char *xine_get_system_encoding(void); */ const char *xine_guess_spu_encoding(void); -/** - * get base name - */ -char *xine_basename (char *name); - -/** - * get error descriptions in DNS lookups - */ -const char *xine_hstrerror(int err); - #if defined(__CYGWIN__) || defined(WIN32) char *exec_path_append_subdir(char * string); #endif |