[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patches] Fix glibc_localedef build



I've applied this patch to copy some headers from glibc to glibc_localedef 
to fix the glibc_localedef build after a recent merge.

Index: ChangeLog.eglibc
===================================================================
--- ChangeLog.eglibc	(revision 23422)
+++ ChangeLog.eglibc	(working copy)
@@ -1,3 +1,8 @@
+2013-07-02  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* include/libc-mmap.h: Copy from glibc.
+	* include/libc-internal.h: Copy from glibc (cut down).
+
 2013-03-06  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* include/sys/cdefs.h (__attribute_malloc__): Define if not
Index: include/libc-internal.h
===================================================================
--- include/libc-internal.h	(revision 0)
+++ include/libc-internal.h	(revision 0)
@@ -0,0 +1,27 @@
+/* This file contains a number of internal prototype declarations that
+   don't fit anywhere else.  */
+
+#ifndef _LIBC_INTERNAL
+# define _LIBC_INTERNAL 1
+
+/* Align a value by rounding down to closest size.
+   e.g. Using size of 4096, we get this behavior:
+	{4095, 4096, 4097} = {0, 4096, 4096}.  */
+#define ALIGN_DOWN(base, size)	((base) & -((__typeof__ (base)) (size)))
+
+/* Align a value by rounding up to closest size.
+   e.g. Using size of 4096, we get this behavior:
+	{4095, 4096, 4097} = {4096, 4096, 8192}.
+
+  Note: The size argument has side effects (expanded multiple times).  */
+#define ALIGN_UP(base, size)	ALIGN_DOWN ((base) + (size) - 1, (size))
+
+/* Same as ALIGN_DOWN(), but automatically casts when base is a pointer.  */
+#define PTR_ALIGN_DOWN(base, size) \
+  ((__typeof__ (base)) ALIGN_DOWN ((uintptr_t) (base), (size)))
+
+/* Same as ALIGN_UP(), but automatically casts when base is a pointer.  */
+#define PTR_ALIGN_UP(base, size) \
+  ((__typeof__ (base)) ALIGN_UP ((uintptr_t) (base), (size)))
+
+#endif /* _LIBC_INTERNAL  */
Index: include/libc-mmap.h
===================================================================
--- include/libc-mmap.h	(revision 0)
+++ include/libc-mmap.h	(revision 0)
@@ -0,0 +1,26 @@
+/* Internal logic for dealing with mmap quirks.
+   Copyright (C) 2013 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _LIBC_MMAP_H
+#define _LIBC_MMAP_H 1
+
+/* Using MAP_FIXED with mmap sometimes requires larger alignment.  */
+#include <sys/shm.h>
+#define MAP_FIXED_ALIGNMENT SHMLBA
+
+#endif

-- 
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx
_______________________________________________
Patches mailing list
Patches@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/patches