grub-devel
[Top][All Lists]
Advanced

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

[PATCH] Do not mess with libc's prototypes


From: lkundrak
Subject: [PATCH] Do not mess with libc's prototypes
Date: Thu, 7 Aug 2008 16:42:14 -0400 (EDT)
User-agent: SquirrelMail/1.4.8-4.0.1.el5.centos.2

According to POSIX memmove and memcpy can actually be macros or whatever
(IIRC). We'd better not play with those in code that uses libc's headers
and is to be linked with libc.

2008-08-07  Lubomir Rintel  <address@hidden>

        * include/grub/misc.h: Surround memmove and memcpy prototypes with
#ifndef GRUB_UTIL

Index: include/grub/misc.h
===================================================================
--- include/grub/misc.h (revision 1791)
+++ include/grub/misc.h (working copy)
@@ -39,8 +39,10 @@
 char *EXPORT_FUNC(grub_strncat) (char *dest, const char *src, int c);

 /* Prototypes for aliases.  */
+#ifndef GRUB_UTIL
 void *EXPORT_FUNC(memmove) (void *dest, const void *src, grub_size_t n);
 void *EXPORT_FUNC(memcpy) (void *dest, const void *src, grub_size_t n);
+#endif

 int EXPORT_FUNC(grub_memcmp) (const void *s1, const void *s2, grub_size_t
n);
 int EXPORT_FUNC(grub_strcmp) (const char *s1, const char *s2);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]