Merge branch 'server-1.5-branch' into xorg-server-1.5-apple
This commit is contained in:
commit
0b2ab2327e
|
@ -1051,6 +1051,8 @@ AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
|
|||
[Do not have 'strcasecmp'.]))
|
||||
AC_CHECK_FUNC(strncasecmp, [], AC_DEFINE([NEED_STRNCASECMP], 1,
|
||||
[Do not have 'strncasecmp'.]))
|
||||
AC_CHECK_FUNC(strcasestr, [], AC_DEFINE([NEED_STRCASESTR], 1,
|
||||
[Do not have 'strcasestr'.]))
|
||||
|
||||
if test "x$NULL_ROOT_CURSOR" = xyes; then
|
||||
AC_DEFINE(NULL_ROOT_CURSOR, 1, [Use an empty root cursor])
|
||||
|
@ -2028,7 +2030,7 @@ AM_CONDITIONAL(USE_CURSES, [test x$CURSES = xyes])
|
|||
|
||||
AC_ARG_ENABLE(kbd_mode, AS_HELP_STRING([--enable-kbd_mode],
|
||||
[Build kbd_mode utility (default: auto)]),
|
||||
[BUILD_KBD_MODE=$enable_val], [BUILD_KBD_MODE="auto"])
|
||||
[BUILD_KBD_MODE=$enableval], [BUILD_KBD_MODE="auto"])
|
||||
if test x$BUILD_KBD_MODE != xno ; then
|
||||
case $host_os in
|
||||
*bsd*)
|
||||
|
|
|
@ -40,7 +40,8 @@ libdix_la_SOURCES = \
|
|||
swapreq.c \
|
||||
tables.c \
|
||||
window.c \
|
||||
strcasecmp.c
|
||||
strcasecmp.c \
|
||||
strcasestr.c
|
||||
|
||||
libxpstubs_la_SOURCES = \
|
||||
xpstubs.c
|
||||
|
|
|
@ -1,28 +1,31 @@
|
|||
/************************************************************
|
||||
Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
|
||||
|
||||
Permission to use, copy, modify, and distribute this
|
||||
software and its documentation for any purpose and without
|
||||
fee is hereby granted, provided that the above copyright
|
||||
notice appear in all copies and that both that copyright
|
||||
notice and this permission notice appear in supporting
|
||||
documentation, and that the name of Silicon Graphics not be
|
||||
used in advertising or publicity pertaining to distribution
|
||||
of the software without specific prior written permission.
|
||||
Silicon Graphics makes no representation about the suitability
|
||||
of this software for any purpose. It is provided "as is"
|
||||
without any express or implied warranty.
|
||||
|
||||
SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
|
||||
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
|
||||
THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
********************************************************/
|
||||
/*
|
||||
* Copyright (c) 1987, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
|
@ -33,7 +36,7 @@
|
|||
|
||||
#ifdef NEED_STRCASECMP
|
||||
int
|
||||
xstrcasecmp(char *str1,char *str2)
|
||||
xstrcasecmp(const char *str1, const char *str2)
|
||||
{
|
||||
const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2;
|
||||
|
||||
|
@ -46,3 +49,22 @@ xstrcasecmp(char *str1,char *str2)
|
|||
return (tolower(*us1) - tolower(*us2));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NEED_STRNCASECMP
|
||||
int
|
||||
xstrncasecmp(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
if (n != 0) {
|
||||
const u_char *us1 = (const u_char *)s1, *us2 = (const u_char *)s2;
|
||||
|
||||
do {
|
||||
if (tolower(*us1) != tolower(*us2++))
|
||||
return (tolower(*us1) - tolower(*--us2));
|
||||
if (*us1++ == '\0')
|
||||
break;
|
||||
} while (--n != 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
64
dix/strcasestr.c
Normal file
64
dix/strcasestr.c
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Chris Torek.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include "dix.h"
|
||||
|
||||
/*
|
||||
* Find the first occurrence of find in s, ignore case.
|
||||
*/
|
||||
#ifdef NEED_STRCASESTR
|
||||
char *
|
||||
xstrcasestr(const char *s, const char *find)
|
||||
{
|
||||
char c, sc;
|
||||
size_t len;
|
||||
|
||||
if ((c = *find++) != 0) {
|
||||
c = tolower((unsigned char)c);
|
||||
len = strlen(find);
|
||||
do {
|
||||
do {
|
||||
if ((sc = *s++) == 0)
|
||||
return (NULL);
|
||||
} while ((char)tolower((unsigned char)sc) != c);
|
||||
} while (strncasecmp(s, find, len) != 0);
|
||||
s--;
|
||||
}
|
||||
return ((char *)s);
|
||||
}
|
||||
#endif
|
|
@ -164,6 +164,10 @@ createModeFromConfig(const __DRIcoreExtension *core,
|
|||
if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT)
|
||||
config->config.bindToTextureTargets |= GLX_TEXTURE_RECTANGLE_BIT_EXT;
|
||||
break;
|
||||
case __DRI_ATTRIB_FLOAT_MODE:
|
||||
config->config.floatMode = (value ? GL_TRUE : GL_FALSE);
|
||||
break;
|
||||
|
||||
default:
|
||||
setScalar(&config->config, attrib, value);
|
||||
break;
|
||||
|
|
|
@ -199,9 +199,6 @@
|
|||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strcasestr' function. */
|
||||
#undef HAVE_STRCASESTR
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
|
@ -518,4 +515,13 @@
|
|||
/* Define to 64-bit byteswap macro */
|
||||
#undef bswap_64
|
||||
|
||||
/* Need the strcasecmp function. */
|
||||
#undef NEED_STRCASECMP
|
||||
|
||||
/* Need the strncasecmp function. */
|
||||
#undef NEED_STRNCASECMP
|
||||
|
||||
/* Need the strcasestr function. */
|
||||
#undef NEED_STRCASESTR
|
||||
|
||||
#endif /* _DIX_CONFIG_H_ */
|
||||
|
|
|
@ -556,7 +556,17 @@ typedef struct {
|
|||
/* strcasecmp.c */
|
||||
#if NEED_STRCASECMP
|
||||
#define strcasecmp xstrcasecmp
|
||||
extern int xstrcasecmp(char *s1, char *s2);
|
||||
extern int xstrcasecmp(const char *s1, const char *s2);
|
||||
#endif
|
||||
|
||||
#if NEED_STRNCASECMP
|
||||
#define strncasecmp xstrncasecmp
|
||||
extern int xstrncasecmp(const char *s1, const char *s2, size_t n);
|
||||
#endif
|
||||
|
||||
#if NEED_STRCASESTR
|
||||
#define strcasestr xstrcasestr
|
||||
extern char *xstrcasestr(const char *s, const char *find);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user