Fix compilation warning

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-29 23:32:31 +01:00
parent 43f9bfc470
commit 1ad5c7f844
2 changed files with 15 additions and 1 deletions

View file

@ -58,7 +58,7 @@
# define SIZE_MAX ((size_t) -1) # define SIZE_MAX ((size_t) -1)
#endif #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 # define RE_ENABLE_I18N
#endif #endif

View file

@ -22,6 +22,14 @@
#include <grub/mm.h> #include <grub/mm.h>
#include <grub/misc.h> #include <grub/misc.h>
#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 grub_size_t size_t;
typedef int bool; typedef int bool;
static const bool true = 1; static const bool true = 1;
@ -165,6 +173,12 @@ calloc (grub_size_t size, grub_size_t nelem)
return grub_zalloc (size * 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 ULONG_MAX GRUB_ULONG_MAX
#define UCHAR_MAX 0xff #define UCHAR_MAX 0xff