From 1ad5c7f8446edf88765b9e48313228b43c23ad7e Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 29 Dec 2009 23:32:31 +0100 Subject: [PATCH] Fix compilation warning --- gnulib/regex_internal.h | 2 +- include/grub/gnulib-wrap.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gnulib/regex_internal.h b/gnulib/regex_internal.h index 977f8b02c..3cdc548d3 100644 --- a/gnulib/regex_internal.h +++ b/gnulib/regex_internal.h @@ -58,7 +58,7 @@ # define SIZE_MAX ((size_t) -1) #endif -#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC +#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || defined (_LIBC) # define RE_ENABLE_I18N #endif diff --git a/include/grub/gnulib-wrap.h b/include/grub/gnulib-wrap.h index 0e9235c18..e3f7b23b0 100644 --- a/include/grub/gnulib-wrap.h +++ b/include/grub/gnulib-wrap.h @@ -22,6 +22,14 @@ #include #include +#define HAVE_ISBLANK 0 +#define HAVE_LIBINTL_H 0 +#define HAVE_LOCALE_H 0 +#define __STRICT_ANSI__ 0 +#define DEBUG 0 +#define _Restrict_ __restrict +#define _Restrict_arr_ __restrict + typedef grub_size_t size_t; typedef int bool; static const bool true = 1; @@ -165,6 +173,12 @@ calloc (grub_size_t size, grub_size_t nelem) return grub_zalloc (size * nelem); } +static inline char *strncpy (char *dest, const char *src, int c) +{ + return grub_strncpy (dest, src, c); +} + + #define ULONG_MAX GRUB_ULONG_MAX #define UCHAR_MAX 0xff