aboutsummaryrefslogtreecommitdiff
path: root/readline/rldefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'readline/rldefs.h')
-rw-r--r--readline/rldefs.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/readline/rldefs.h b/readline/rldefs.h
index 0257754..dab1beb 100644
--- a/readline/rldefs.h
+++ b/readline/rldefs.h
@@ -2,7 +2,7 @@
for readline. This should be included after any files that define
system-specific constants like _POSIX_VERSION or USG. */
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2011 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -79,8 +79,8 @@ extern char *strchr (), *strrchr ();
#define _rl_stricmp strcasecmp
#define _rl_strnicmp strncasecmp
#else
-extern int _rl_stricmp PARAMS((char *, char *));
-extern int _rl_strnicmp PARAMS((char *, char *, int));
+extern int _rl_stricmp PARAMS((const char *, const char *));
+extern int _rl_strnicmp PARAMS((const char *, const char *, int));
#endif
#if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE)
@@ -148,6 +148,10 @@ extern char *_rl_strpbrk PARAMS((const char *, const char *));
: ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0))
#endif
+#if !defined (RL_STRLEN)
+# define RL_STRLEN(s) (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0)
+#endif
+
#if !defined (FREE)
# define FREE(x) if (x) free (x)
#endif