automake commit without merge history
This commit is contained in:
parent
265d68cd10
commit
8c41176882
810 changed files with 4980 additions and 2508 deletions
33
grub-core/lib/posix_wrap/assert.h
Normal file
33
grub-core/lib/posix_wrap/assert.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_ASSERT_H
|
||||
#define GRUB_POSIX_ASSERT_H 1
|
||||
|
||||
#include <grub/misc.h>
|
||||
|
||||
#define assert(x) assert_real(__FILE__, __LINE__, x)
|
||||
|
||||
static inline void
|
||||
assert_real (const char *file, int line, int cond)
|
||||
{
|
||||
if (!cond)
|
||||
grub_fatal ("Assertion failed at %s:%d\n", file, line);
|
||||
}
|
||||
|
||||
#endif
|
103
grub-core/lib/posix_wrap/ctype.h
Normal file
103
grub-core/lib/posix_wrap/ctype.h
Normal file
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_CTYPE_H
|
||||
#define GRUB_POSIX_CTYPE_H 1
|
||||
|
||||
#include <grub/misc.h>
|
||||
|
||||
static inline int
|
||||
toupper (int c)
|
||||
{
|
||||
return grub_toupper (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
isspace (int c)
|
||||
{
|
||||
return grub_isspace (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
isdigit (int c)
|
||||
{
|
||||
return grub_isdigit (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
islower (int c)
|
||||
{
|
||||
return (c >= 'a' && c <= 'z');
|
||||
}
|
||||
|
||||
static inline int
|
||||
isupper (int c)
|
||||
{
|
||||
return (c >= 'A' && c <= 'Z');
|
||||
}
|
||||
|
||||
static inline int
|
||||
isxdigit (int c)
|
||||
{
|
||||
return (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')
|
||||
|| (c >= '0' && c <= '9');
|
||||
}
|
||||
|
||||
static inline int
|
||||
isprint (int c)
|
||||
{
|
||||
return grub_isprint (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
iscntrl (int c)
|
||||
{
|
||||
return !grub_isprint (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
isgraph (int c)
|
||||
{
|
||||
return grub_isprint (c) && !grub_isspace (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
isalnum (int c)
|
||||
{
|
||||
return grub_isalpha (c) || grub_isdigit (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
ispunct (int c)
|
||||
{
|
||||
return grub_isprint (c) && !grub_isspace (c) && !isalnum (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
isalpha (int c)
|
||||
{
|
||||
return grub_isalpha (c);
|
||||
}
|
||||
|
||||
static inline int
|
||||
tolower (int c)
|
||||
{
|
||||
return grub_tolower (c);
|
||||
}
|
||||
|
||||
#endif
|
28
grub-core/lib/posix_wrap/errno.h
Normal file
28
grub-core/lib/posix_wrap/errno.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_ERRNO_H
|
||||
#define GRUB_POSIX_ERRNO_H 1
|
||||
|
||||
#include <grub/err.h>
|
||||
|
||||
#define errno grub_errno
|
||||
#define EINVAL GRUB_ERR_BAD_NUMBER
|
||||
#define ENOMEM GRUB_ERR_OUT_OF_MEMORY
|
||||
|
||||
#endif
|
38
grub-core/lib/posix_wrap/langinfo.h
Normal file
38
grub-core/lib/posix_wrap/langinfo.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_LANGINFO_H
|
||||
#define GRUB_POSIX_LANGINFO_H 1
|
||||
|
||||
#include <localcharset.h>
|
||||
|
||||
typedef enum { CODESET } nl_item;
|
||||
|
||||
static inline char *
|
||||
nl_langinfo (nl_item item)
|
||||
{
|
||||
switch (item)
|
||||
{
|
||||
case CODESET:
|
||||
return locale_charset ();
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
0
grub-core/lib/posix_wrap/limits.h
Normal file
0
grub-core/lib/posix_wrap/limits.h
Normal file
28
grub-core/lib/posix_wrap/localcharset.h
Normal file
28
grub-core/lib/posix_wrap/localcharset.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_LOCALCHARSET_H
|
||||
#define GRUB_POSIX_LOCALCHARSET_H 1
|
||||
|
||||
static inline char *
|
||||
locale_charset (void)
|
||||
{
|
||||
return "UTF-8";
|
||||
}
|
||||
|
||||
#endif
|
0
grub-core/lib/posix_wrap/locale.h
Normal file
0
grub-core/lib/posix_wrap/locale.h
Normal file
1
grub-core/lib/posix_wrap/stdint.h
Normal file
1
grub-core/lib/posix_wrap/stdint.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include <sys/types.h>
|
29
grub-core/lib/posix_wrap/stdio.h
Normal file
29
grub-core/lib/posix_wrap/stdio.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_STDIO_H
|
||||
#define GRUB_POSIX_STDIO_H 1
|
||||
|
||||
#include <grub/misc.h>
|
||||
#include <grub/file.h>
|
||||
|
||||
typedef struct grub_file FILE;
|
||||
|
||||
#define EOF -1
|
||||
|
||||
#endif
|
57
grub-core/lib/posix_wrap/stdlib.h
Normal file
57
grub-core/lib/posix_wrap/stdlib.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_STDLIB_H
|
||||
#define GRUB_POSIX_STDLIB_H 1
|
||||
|
||||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
|
||||
static inline void
|
||||
free (void *ptr)
|
||||
{
|
||||
grub_free (ptr);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
malloc (grub_size_t size)
|
||||
{
|
||||
return grub_malloc (size);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
calloc (grub_size_t size, grub_size_t nelem)
|
||||
{
|
||||
return grub_zalloc (size * nelem);
|
||||
}
|
||||
|
||||
static inline void *
|
||||
realloc (void *ptr, grub_size_t size)
|
||||
{
|
||||
return grub_realloc (ptr, size);
|
||||
}
|
||||
|
||||
static inline void
|
||||
abort (void)
|
||||
{
|
||||
grub_abort ();
|
||||
}
|
||||
|
||||
#define MB_CUR_MAX 6
|
||||
|
||||
#endif
|
42
grub-core/lib/posix_wrap/string.h
Normal file
42
grub-core/lib/posix_wrap/string.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_STRING_H
|
||||
#define GRUB_POSIX_STRING_H 1
|
||||
|
||||
#include <grub/misc.h>
|
||||
|
||||
static inline grub_size_t
|
||||
strlen (const char *s)
|
||||
{
|
||||
return grub_strlen (s);
|
||||
}
|
||||
|
||||
static inline int
|
||||
strcmp (const char *s1, const char *s2)
|
||||
{
|
||||
return grub_strcmp (s1, s2);
|
||||
}
|
||||
|
||||
static inline int
|
||||
strcasecmp (const char *s1, const char *s2)
|
||||
{
|
||||
return grub_strcasecmp (s1, s2);
|
||||
}
|
||||
|
||||
#endif
|
32
grub-core/lib/posix_wrap/sys/types.h
Normal file
32
grub-core/lib/posix_wrap/sys/types.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_SYS_TYPES_H
|
||||
#define GRUB_POSIX_SYS_TYPES_H 1
|
||||
|
||||
#include <grub/misc.h>
|
||||
|
||||
typedef grub_size_t size_t;
|
||||
typedef int bool;
|
||||
static const bool true = 1;
|
||||
static const bool false = 0;
|
||||
|
||||
#define ULONG_MAX GRUB_ULONG_MAX
|
||||
#define UCHAR_MAX 0xff
|
||||
|
||||
#endif
|
0
grub-core/lib/posix_wrap/unistd.h
Normal file
0
grub-core/lib/posix_wrap/unistd.h
Normal file
25
grub-core/lib/posix_wrap/wchar.h
Normal file
25
grub-core/lib/posix_wrap/wchar.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_POSIX_WCHAR_H
|
||||
#define GRUB_POSIX_WCHAR_H 1
|
||||
|
||||
/* UCS-4. */
|
||||
typedef grub_uint32_t wchar_t;
|
||||
|
||||
#endif
|
0
grub-core/lib/posix_wrap/wctype.h
Normal file
0
grub-core/lib/posix_wrap/wctype.h
Normal file
Loading…
Add table
Add a link
Reference in a new issue