]> git.proxmox.com Git - mirror_edk2.git/commitdiff
StdLib: Move the declarations for ffs() and bzero() from extern.h to strings.h.
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 3 Nov 2011 00:35:55 +0000 (00:35 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 3 Nov 2011 00:35:55 +0000 (00:35 +0000)
Signed-off-by: darylm503
Reviewed-by: jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12654 6f19259b-4bc3-4df7-8a09-765794883524

StdLib/Include/strings.h [new file with mode: 0644]
StdLib/LibC/Uefi/select.c
StdLibPrivateInternalFiles/Include/extern.h

diff --git a/StdLib/Include/strings.h b/StdLib/Include/strings.h
new file mode 100644 (file)
index 0000000..139bd4a
--- /dev/null
@@ -0,0 +1,56 @@
+/** @file\r
+    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    This program and the accompanying materials are licensed and made available under\r
+    the terms and conditions of the BSD License that accompanies this distribution.\r
+    The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+    Copyright (c) 1998 The NetBSD Foundation, Inc.\r
+    All rights reserved.\r
+\r
+    This code is derived from software contributed to The NetBSD Foundation\r
+    by Klaus Klein.\r
+\r
+    Redistribution and use in source and binary forms, with or without\r
+    modification, are permitted provided that the following conditions\r
+    are met:\r
+    1. Redistributions of source code must retain the above copyright\r
+       notice, this list of conditions and the following disclaimer.\r
+    2. Redistributions in binary form must reproduce the above copyright\r
+       notice, this list of conditions and the following disclaimer in the\r
+       documentation and/or other materials provided with the distribution.\r
+\r
+    THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS\r
+    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\r
+    TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+    PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS\r
+    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
+    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
+    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
+    POSSIBILITY OF SUCH DAMAGE.\r
+\r
+    NetBSD: strings.h,v 1.13 2008/04/28 20:22:54 martin Exp\r
+ */\r
+#ifndef _STRINGS_H_\r
+#define _STRINGS_H_\r
+\r
+#include <machine/ansi.h>\r
+#include <sys/featuretest.h>\r
+\r
+__BEGIN_DECLS\r
+void    bzero(void *, size_t);\r
+int     ffs(int);\r
+__END_DECLS\r
+\r
+#define index(x,y)    strchr((x), (y))\r
+#define rindex(x,y)   strrchr((x), (y))\r
+\r
+#include <string.h>\r
+\r
+#endif /* !defined(_STRINGS_H_) */\r
index 9d0dcc6e4a68d9db53086011b6454791b11505fe..28951856d1b067934171149f779d5fe9225eb45e 100644 (file)
 \r
 #include <stdlib.h>\r
 #include <unistd.h>\r
 \r
 #include <stdlib.h>\r
 #include <unistd.h>\r
-#include <string.h>\r
+#include <strings.h>\r
 #include <sys/poll.h>\r
 #include <sys/param.h>\r
 #include <sys/time.h>\r
 #include <sys/poll.h>\r
 #include <sys/param.h>\r
 #include <sys/time.h>\r
-#include  <extern.h>      /* For ffs() */\r
 #ifndef KERNEL\r
 #define KERNEL\r
 #include <errno.h>\r
 #ifndef KERNEL\r
 #define KERNEL\r
 #include <errno.h>\r
index fc39d529087e203dad832a0ffb87d94bc90eeec1..e0303dca114f4c2af198dace9bc1f11bbee4198e 100644 (file)
@@ -66,6 +66,4 @@ int __sysctl(const int *, unsigned int, void *, size_t *, const void *, size_t);
 void    Efi2Tm( EFI_TIME *ET, struct tm *BT);\r
 time_t  Efi2Time( EFI_TIME *EfiBDtime);\r
 \r
 void    Efi2Tm( EFI_TIME *ET, struct tm *BT);\r
 time_t  Efi2Time( EFI_TIME *EfiBDtime);\r
 \r
-int     ffs(int x);\r
-\r
 __END_DECLS\r
 __END_DECLS\r