[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108735: * configure.in (AC_CHECK_FUN
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108735: * configure.in (AC_CHECK_FUNCS): Detect library functions |
Date: |
Mon, 25 Jun 2012 18:07:04 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108735
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2012-06-25 18:07:04 +0400
message:
* configure.in (AC_CHECK_FUNCS): Detect library functions
strcasecmp and strncasecmp.
* lib-src/etags.c (etags_strcasecmp, etags_strncasecmp): Define to
library functions strcasecmp and strncasecmp if available.
* lwlib/lwlib.c (my_strcasecmp): Rename to lwlib_strcasecmp, which
may be defined to library function strcasecmp if available.
* src/dispextern.c (xstrcasecmp): Define to library function
strcasecmp if available.
* src/xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
modified:
ChangeLog
configure.in
lib-src/ChangeLog
lib-src/etags.c
lwlib/ChangeLog
lwlib/lwlib.c
src/ChangeLog
src/dispextern.h
src/xfaces.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-06-24 17:39:14 +0000
+++ b/ChangeLog 2012-06-25 14:07:04 +0000
@@ -1,3 +1,8 @@
+2012-06-25 Dmitry Antipov <address@hidden>
+
+ * configure.in (AC_CHECK_FUNCS): Detect library functions
+ strcasecmp and strncasecmp.
+
2012-06-24 Paul Eggert <address@hidden>
Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
=== modified file 'configure.in'
--- a/configure.in 2012-06-24 17:39:14 +0000
+++ b/configure.in 2012-06-25 14:07:04 +0000
@@ -2671,6 +2671,7 @@
difftime posix_memalign \
getpwent endpwent getgrent endgrent \
touchlock \
+strcasecmp strncasecmp \
cfmakeraw cfsetspeed copysign __executable_start)
dnl Cannot use AC_CHECK_FUNCS
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2012-06-24 17:39:14 +0000
+++ b/lib-src/ChangeLog 2012-06-25 14:07:04 +0000
@@ -1,3 +1,8 @@
+2012-06-25 Dmitry Antipov <address@hidden>
+
+ * etags.c (etags_strcasecmp, etags_strncasecmp): Define to
+ library functions strcasecmp and strncasecmp if available.
+
2012-06-24 Paul Eggert <address@hidden>
Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
=== modified file 'lib-src/etags.c'
--- a/lib-src/etags.c 2012-06-24 17:39:14 +0000
+++ b/lib-src/etags.c 2012-06-25 14:07:04 +0000
@@ -389,8 +389,16 @@
static char *savestr (const char *);
static char *etags_strchr (const char *, int);
static char *etags_strrchr (const char *, int);
+#ifdef HAVE_STRCASECMP
+#define etags_strcasecmp(x,y) strcasecmp ((x), (y))
+#else
static int etags_strcasecmp (const char *, const char *);
+#endif
+#ifdef HAVE_STRNCASECMP
+#define etags_strncasecmp(x,y,z) strncasecmp ((x), (y), (z))
+#else
static int etags_strncasecmp (const char *, const char *, int);
+#endif
static char *etags_getcwd (void);
static char *relative_filename (char *, char *);
static char *absolute_filename (char *, char *);
@@ -6320,6 +6328,7 @@
return NULL;
}
+#ifndef HAVE_STRCASECMP
/*
* Compare two strings, ignoring case for alphabetic characters.
*
@@ -6338,7 +6347,9 @@
? lowcase (*s1) - lowcase (*s2)
: *s1 - *s2);
}
+#endif /* HAVE_STRCASECMP */
+#ifndef HAVE_STRNCASECMP
/*
* Compare two strings, ignoring case for alphabetic characters.
* Stop after a given number of characters
@@ -6361,6 +6372,7 @@
? lowcase (*s1) - lowcase (*s2)
: *s1 - *s2);
}
+#endif /* HAVE_STRCASECMP */
/* Skip spaces (end of string is not space), return new pointer. */
static char *
=== modified file 'lwlib/ChangeLog'
--- a/lwlib/ChangeLog 2012-06-24 17:39:14 +0000
+++ b/lwlib/ChangeLog 2012-06-25 14:07:04 +0000
@@ -1,3 +1,8 @@
+2012-06-25 Dmitry Antipov <address@hidden>
+
+ * lwlib.c (my_strcasecmp): Rename to lwlib_strcasecmp, which
+ may be defined to library function strcasecmp if available.
+
2012-06-24 Paul Eggert <address@hidden>
Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
=== modified file 'lwlib/lwlib.c'
--- a/lwlib/lwlib.c 2012-01-19 07:21:25 +0000
+++ b/lwlib/lwlib.c 2012-06-25 14:07:04 +0000
@@ -75,7 +75,6 @@
widget_value *,
int, int *);
static void instantiate_widget_instance (widget_instance *);
-static int my_strcasecmp (const char *, const char *);
static void safe_free_str (char *);
static void free_widget_value_tree (widget_value *);
static widget_value *copy_widget_value_tree (widget_value *,
@@ -115,10 +114,14 @@
return result;
}
+#ifdef HAVE_STRCASECMP
+#define lwlib_strcasecmp(x,y) strcasecmp ((x), (y))
+#else
+
/* Like strcmp but ignore differences in case. */
static int
-my_strcasecmp (const char *s1, const char *s2)
+lwlib_strcasecmp (const char *s1, const char *s2)
{
while (1)
{
@@ -134,6 +137,7 @@
return 0;
}
}
+#endif /* HAVE_STRCASECMP */
static void
safe_free_str (char *s)
@@ -731,7 +735,7 @@
{
const widget_creation_entry* cur;
for (cur = table; cur->type; cur++)
- if (!my_strcasecmp (type, cur->type))
+ if (!lwlib_strcasecmp (type, cur->type))
return cur->function;
return NULL;
}
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-06-25 10:28:47 +0000
+++ b/src/ChangeLog 2012-06-25 14:07:04 +0000
@@ -1,3 +1,9 @@
+2012-06-25 Dmitry Antipov <address@hidden>
+
+ * dispextern.c (xstrcasecmp): Define to library function
+ strcasecmp if available.
+ * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
+
2012-06-25 Andreas Schwab <address@hidden>
* keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
=== modified file 'src/dispextern.h'
--- a/src/dispextern.h 2012-06-22 21:17:42 +0000
+++ b/src/dispextern.h 2012-06-25 14:07:04 +0000
@@ -3216,7 +3216,11 @@
char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
int *);
void prepare_face_for_display (struct frame *, struct face *);
+#ifdef HAVE_STRCASECMP
+#define xstrcasecmp(x,y) strcasecmp ((x), (y))
+#else
int xstrcasecmp (const char *, const char *);
+#endif
int lookup_named_face (struct frame *, Lisp_Object, int);
int lookup_basic_face (struct frame *, int);
int smaller_face (struct frame *, int, int);
=== modified file 'src/xfaces.c'
--- a/src/xfaces.c 2012-06-17 00:32:36 +0000
+++ b/src/xfaces.c 2012-06-25 14:07:04 +0000
@@ -716,6 +716,7 @@
}
#endif /* HAVE_NS */
+#ifndef HAVE_STRCASECMP
/* Like strcasecmp/stricmp. Used to compare parts of font names which
are in ISO8859-1. */
@@ -737,7 +738,7 @@
return *s2 == 0 ? 0 : -1;
return 1;
}
-
+#endif /* HAVE_STRCASECMP */
/* If FRAME is nil, return a pointer to the selected frame.
Otherwise, check that FRAME is a live frame, and return a pointer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108735: * configure.in (AC_CHECK_FUNCS): Detect library functions,
Dmitry Antipov <=