[uim-commit] r2977 - in branches/r5rs/sigscheme: . src

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Jan 22 10:54:04 PST 2006


Author: yamaken
Date: 2006-01-22 10:53:59 -0800 (Sun, 22 Jan 2006)
New Revision: 2977

Added:
   branches/r5rs/sigscheme/src/config-nonstd-string.h
Modified:
   branches/r5rs/sigscheme/configure.in
   branches/r5rs/sigscheme/src/operations.c
Log:
* sigscheme/configure.in
  - Add strcasecmp to AC_CHECK_FUNCS
* sigscheme/src/config-nonstd-string.h
  - New file
* sigscheme/src/operations.c
  - Include config-nonstd-string.h


Modified: branches/r5rs/sigscheme/configure.in
===================================================================
--- branches/r5rs/sigscheme/configure.in	2006-01-22 18:20:26 UTC (rev 2976)
+++ branches/r5rs/sigscheme/configure.in	2006-01-22 18:53:59 UTC (rev 2977)
@@ -64,7 +64,7 @@
 
 # FIXME: provide alternative source code
 # AC_REPLACE_FUNCS([asprintf vasprintf])
-AC_CHECK_FUNCS([strdup fileno asprintf vasprintf posix_memalign getpagesize])
+AC_CHECK_FUNCS([strdup strcasecmp fileno asprintf vasprintf posix_memalign getpagesize])
 
 AX_CHECK_PAGE_ALIGNED_MALLOC
 

Added: branches/r5rs/sigscheme/src/config-nonstd-string.h
===================================================================
--- branches/r5rs/sigscheme/src/config-nonstd-string.h	2006-01-22 18:20:26 UTC (rev 2976)
+++ branches/r5rs/sigscheme/src/config-nonstd-string.h	2006-01-22 18:53:59 UTC (rev 2977)
@@ -0,0 +1,43 @@
+/*===========================================================================
+ *  FileName : config-nonstd-string.h
+ *  About    : Internal configuration to enable non-standard string functions
+ *
+ *  Copyright (C) 2006 YamaKen <yamaken AT bp.iij4u.or.jp>
+ *
+ *  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.
+ *  3. Neither the name of authors 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDERS 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.
+===========================================================================*/
+#ifndef __CONFIG_NONSTD_STRING_H
+#define __CONFIG_NONSTD_STRING_H
+
+#include "config.h"
+
+#if (HAVE_GLIBC && HAVE_STRCASECMP)
+#define _BSD_SOURCE
+#endif
+
+#endif /* __CONFIG_NONSTD_STRING_H */

Modified: branches/r5rs/sigscheme/src/operations.c
===================================================================
--- branches/r5rs/sigscheme/src/operations.c	2006-01-22 18:20:26 UTC (rev 2976)
+++ branches/r5rs/sigscheme/src/operations.c	2006-01-22 18:53:59 UTC (rev 2977)
@@ -33,6 +33,7 @@
 ===========================================================================*/
 
 #include "config.h"
+#include "config-nonstd-string.h"
 /* FIXME: remove this for direct inclusion of operations-srfi6.c and
  * strport.c */
 #include "config-asprintf.h"
@@ -70,7 +71,6 @@
     (string_cmp(SCM_MANGLE(name), (str1), (str2), scm_true))
 
 /* FIXME: support SRFI-75 */
-/* get case insensitive character value */
 #define ICHAR_DOWNCASE(c) ((isascii((int)(c))) ? tolower((int)(c)) : (c))
 #define ICHAR_UPCASE(c)   ((isascii((int)(c))) ? toupper((int)(c)) : (c))
 



More information about the uim-commit mailing list