From 218554d60a648bb92bc46489888587cd59946a42 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 13 Dec 2001 20:44:32 +0000 Subject: [PATCH] move include/QF/string.h to include/qstring.h and include it automaticly if needed in compat.h --- include/Makefile.am | 2 +- include/QF/Makefile.am | 2 +- include/compat.h | 6 ++++++ include/{QF/string.h => qstring.h} | 0 libs/util/string.c | 1 - 5 files changed, 8 insertions(+), 3 deletions(-) rename include/{QF/string.h => qstring.h} (100%) diff --git a/include/Makefile.am b/include/Makefile.am index 41067de32..4f90a21b7 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = QF EXTRA_DIST = asm_i386.h adivtab.h anorm_dots.h anorms.h asm_draw.h block16.h \ block8.h buildnum.h compat.h context_x11.h d_iface.h d_ifacea.h \ d_local.h dga_check.h fbset.h gl_warp_sin.h \ - in_win.h logos.h menu.h old_keys.h quakeasm.h r_cvar.h \ + in_win.h logos.h menu.h old_keys.h qstring.h quakeasm.h r_cvar.h \ r_dynamic.h r_local.h r_shared.h sbar.h stamp-h.in varrays.h \ vgamodes.h view.h vregset.h winquake.h world.h \ \ diff --git a/include/QF/Makefile.am b/include/QF/Makefile.am index a0f281ecc..9b93c7d79 100644 --- a/include/QF/Makefile.am +++ b/include/QF/Makefile.am @@ -7,5 +7,5 @@ include_HEADERS = bspfile.h cdaudio.h checksum.h clip_hull.h cmd.h \ mathlib.h mdfour.h model.h modelgen.h msg.h pcx.h plugin.h \ pr_comp.h pr_debug.h progs.h qargs.h qdefs.h qendian.h qfplist.h \ qtypes.h render.h screen.h sizebuf.h skin.h sound.h spritegn.h \ - string.h sys.h teamplay.h texture.h tga.h uint32.h va.h \ + sys.h teamplay.h texture.h tga.h uint32.h va.h \ ver_check.h vfile.h vfs.h vid.h wad.h zone.h diff --git a/include/compat.h b/include/compat.h index b1e5bc5f3..9326a876e 100644 --- a/include/compat.h +++ b/include/compat.h @@ -92,10 +92,16 @@ extern int vsnprintf(char *s, size_t maxlen, const char *format, va_list arg); // FIXME: glibc has strcasestr, but only declares it if __USE_GNU is defined #if !defined(strcasestr) # define strcasestr Q_strcasestr +# define need_qstring_h #endif // FIXME: same as above #if !defined(strnlen) # define strnlen Q_strnlen +# define need_qstring_h +#endif + +#ifdef need_qstring_h +# include "qstring.h" #endif #undef field_offset diff --git a/include/QF/string.h b/include/qstring.h similarity index 100% rename from include/QF/string.h rename to include/qstring.h diff --git a/libs/util/string.c b/libs/util/string.c index 503236159..d58fe26a2 100644 --- a/libs/util/string.c +++ b/libs/util/string.c @@ -34,7 +34,6 @@ static const char rcsid[] = #include #include "compat.h" -#include "string.h" /*