mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-08 21:00:48 +02:00
Initial devel branch import from bash-3.0-alpha
This commit is contained in:
@@ -70,6 +70,11 @@ extern size_t xmbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *));
|
||||
|
||||
extern char *xstrchr __P((const char *, int));
|
||||
|
||||
#ifndef MB_INVALIDCH
|
||||
#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2)
|
||||
#define MB_NULLWCH(x) ((x) == 0)
|
||||
#endif
|
||||
|
||||
#else /* !HANDLE_MULTIBYTE */
|
||||
|
||||
#undef MB_LEN_MAX
|
||||
@@ -81,6 +86,11 @@ extern char *xstrchr __P((const char *, int));
|
||||
#undef xstrchr
|
||||
#define xstrchr(s, c) strchr(s, c)
|
||||
|
||||
#ifndef MB_INVALIDCH
|
||||
#define MB_INVALIDCH(x) (0)
|
||||
#define MB_NULLWCH(x) (0)
|
||||
#endif
|
||||
|
||||
#endif /* !HANDLE_MULTIBYTE */
|
||||
|
||||
/* Declare and initialize a multibyte state. Call must be terminated
|
||||
@@ -120,6 +130,8 @@ extern char *xstrchr __P((const char *, int));
|
||||
state = state_bak; \
|
||||
(_i)++; \
|
||||
} \
|
||||
else if (mblength == 0) \
|
||||
(_i)++; \
|
||||
else \
|
||||
(_i) += mblength; \
|
||||
} \
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@
|
||||
#endif /* !__STDC__ */
|
||||
|
||||
#ifndef __attribute__
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
|
||||
# define __attribute__(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user