Merge "Replace .align with .balign for clarity"
diff --git a/libc/NOTICE b/libc/NOTICE
index 706040c..a2f2b0a 100644
--- a/libc/NOTICE
+++ b/libc/NOTICE
@@ -2854,7 +2854,7 @@
-------------------------------------------------------------------
Copyright (c) 1997 Mark Brinicombe
-Copyright (c) 2010 Android Open Source Project.
+Copyright (C) 2010 The Android Open Source Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -4583,40 +4583,6 @@
-------------------------------------------------------------------
-Copyright (c) 2008 Android Open Source Project (query id randomization)
-Copyright (c) 1985, 1993
- The Regents of the University of California. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement:
- This product includes software developed by the University of
- California, Berkeley and its contributors.
-4. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
--------------------------------------------------------------------
-
Copyright (c) 2008 David Schultz <das@FreeBSD.ORG>
All rights reserved.
@@ -5571,31 +5537,6 @@
-------------------------------------------------------------------
-Copyright (c) 2014, Intel Corporation
-All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * Neither the name of Intel Corporation nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--------------------------------------------------------------------
-
Copyright (c) 2014, Linaro Limited
All rights reserved.
@@ -5795,56 +5736,6 @@
-------------------------------------------------------------------
-Copyright 2008 Android Open Source Project (source port randomization)
-Copyright (c) 1985, 1989, 1993
- The Regents of the University of California. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
- must display the following acknowledgement:
- This product includes software developed by the University of
- California, Berkeley and its contributors.
-4. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
--------------------------------------------------------------------
-
-Copyright 2016 The Android Open Source Project
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--------------------------------------------------------------------
-
From: @(#)s_ilogb.c 5.1 93/09/24
====================================================
Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
diff --git a/libc/arch-arm/bionic/__bionic_clone.S b/libc/arch-arm/bionic/__bionic_clone.S
index 8836748..6669b93 100644
--- a/libc/arch-arm/bionic/__bionic_clone.S
+++ b/libc/arch-arm/bionic/__bionic_clone.S
@@ -29,7 +29,7 @@
#include <private/bionic_asm.h>
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
-ENTRY(__bionic_clone)
+ENTRY_PRIVATE(__bionic_clone)
mov ip, sp
# save registers to parent stack
stmfd sp!, {r4, r5, r6, r7}
@@ -67,4 +67,3 @@
pop {r0, r1}
b __start_thread
END(__bionic_clone)
-.hidden __bionic_clone
diff --git a/libc/arch-arm/bionic/setjmp.S b/libc/arch-arm/bionic/setjmp.S
index 91d158a..6ee162e 100644
--- a/libc/arch-arm/bionic/setjmp.S
+++ b/libc/arch-arm/bionic/setjmp.S
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997 Mark Brinicombe
- * Copyright (c) 2010 Android Open Source Project.
+ * Copyright (C) 2010 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/libc/arch-arm64/bionic/__bionic_clone.S b/libc/arch-arm64/bionic/__bionic_clone.S
index 27e44e7..c3ff0e5 100644
--- a/libc/arch-arm64/bionic/__bionic_clone.S
+++ b/libc/arch-arm64/bionic/__bionic_clone.S
@@ -30,7 +30,7 @@
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
-ENTRY(__bionic_clone)
+ENTRY_PRIVATE(__bionic_clone)
# Push 'fn' and 'arg' onto the child stack.
stp x5, x6, [x1, #-16]!
@@ -57,4 +57,3 @@
ldp x0, x1, [sp], #16
b __start_thread
END(__bionic_clone)
-.hidden __bionic_clone
diff --git a/libc/arch-mips/bionic/__bionic_clone.S b/libc/arch-mips/bionic/__bionic_clone.S
index b216efe..a3cacd1 100644
--- a/libc/arch-mips/bionic/__bionic_clone.S
+++ b/libc/arch-mips/bionic/__bionic_clone.S
@@ -31,7 +31,7 @@
#include <linux/sched.h>
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
-ENTRY(__bionic_clone)
+ENTRY_PRIVATE(__bionic_clone)
.set noreorder
.cpload t9
.set reorder
@@ -69,4 +69,3 @@
la t9,__set_errno_internal
j t9
END(__bionic_clone)
-.hidden __bionic_clone
diff --git a/libc/arch-x86/bionic/__bionic_clone.S b/libc/arch-x86/bionic/__bionic_clone.S
index 1a6f642..b682b48 100644
--- a/libc/arch-x86/bionic/__bionic_clone.S
+++ b/libc/arch-x86/bionic/__bionic_clone.S
@@ -1,7 +1,7 @@
#include <private/bionic_asm.h>
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
-ENTRY(__bionic_clone)
+ENTRY_PRIVATE(__bionic_clone)
pushl %ebx
.cfi_adjust_cfa_offset 4
.cfi_rel_offset ebx, 0
@@ -62,4 +62,3 @@
.cfi_restore ebx
ret
END(__bionic_clone)
-.hidden __bionic_clone
diff --git a/libc/arch-x86_64/bionic/__bionic_clone.S b/libc/arch-x86_64/bionic/__bionic_clone.S
index 0c73e5f..a4245b8 100644
--- a/libc/arch-x86_64/bionic/__bionic_clone.S
+++ b/libc/arch-x86_64/bionic/__bionic_clone.S
@@ -29,7 +29,7 @@
#include <private/bionic_asm.h>
// pid_t __bionic_clone(int flags, void* child_stack, pid_t* parent_tid, void* tls, pid_t* child_tid, int (*fn)(void*), void* arg);
-ENTRY(__bionic_clone)
+ENTRY_PRIVATE(__bionic_clone)
# Copy 'fn' and 'arg' onto the child stack.
movq %r9, -16(%rsi) # fn
movq 8(%rsp), %rax # Read 'arg'.
@@ -74,4 +74,3 @@
# We're the parent; nothing to do.
ret
END(__bionic_clone)
-.hidden __bionic_clone
diff --git a/libc/bionic/locale.cpp b/libc/bionic/locale.cpp
index e51b38c..113118d 100644
--- a/libc/bionic/locale.cpp
+++ b/libc/bionic/locale.cpp
@@ -37,7 +37,8 @@
#include "private/bionic_macros.h"
-// We currently support a single locale, the "C" locale (also known as "POSIX").
+// We only support two locales, the "C" locale (also known as "POSIX"),
+// and the "C.UTF-8" locale (also known as "en_US.UTF-8").
static bool __bionic_current_locale_is_utf8 = true;
@@ -100,12 +101,16 @@
g_locale.int_n_sign_posn = CHAR_MAX;
}
-static bool __is_supported_locale(const char* locale) {
- return (strcmp(locale, "") == 0 ||
- strcmp(locale, "C") == 0 ||
- strcmp(locale, "C.UTF-8") == 0 ||
- strcmp(locale, "en_US.UTF-8") == 0 ||
- strcmp(locale, "POSIX") == 0);
+static bool __is_supported_locale(const char* locale_name) {
+ return (strcmp(locale_name, "") == 0 ||
+ strcmp(locale_name, "C") == 0 ||
+ strcmp(locale_name, "C.UTF-8") == 0 ||
+ strcmp(locale_name, "en_US.UTF-8") == 0 ||
+ strcmp(locale_name, "POSIX") == 0);
+}
+
+static bool __is_utf8_locale(const char* locale_name) {
+ return (*locale_name == '\0' || strstr(locale_name, "UTF-8"));
}
lconv* localeconv() {
@@ -133,7 +138,7 @@
return NULL;
}
- return new __locale_t(strstr(locale_name, "UTF-8") != NULL ? 4 : 1);
+ return new __locale_t(__is_utf8_locale(locale_name) ? 4 : 1);
}
char* setlocale(int category, const char* locale_name) {
@@ -150,7 +155,7 @@
errno = ENOENT;
return NULL;
}
- __bionic_current_locale_is_utf8 = (strstr(locale_name, "UTF-8") != NULL);
+ __bionic_current_locale_is_utf8 = __is_utf8_locale(locale_name);
}
return const_cast<char*>(__bionic_current_locale_is_utf8 ? "C.UTF-8" : "C");
diff --git a/libc/bionic/wchar.cpp b/libc/bionic/wchar.cpp
index d28888d..7717e10 100644
--- a/libc/bionic/wchar.cpp
+++ b/libc/bionic/wchar.cpp
@@ -61,7 +61,7 @@
static mbstate_t __private_state;
mbstate_t* state = (ps == NULL) ? &__private_state : ps;
- // Our wchar_t is UTF-32
+ // Our wchar_t is UTF-32.
return mbrtoc32(reinterpret_cast<char32_t*>(pwc), s, n, state);
}
diff --git a/libc/dns/resolv/res_mkquery.c b/libc/dns/resolv/res_mkquery.c
index 3736aa1..6fb1957 100644
--- a/libc/dns/resolv/res_mkquery.c
+++ b/libc/dns/resolv/res_mkquery.c
@@ -1,7 +1,6 @@
/* $NetBSD: res_mkquery.c,v 1.6 2006/01/24 17:40:32 christos Exp $ */
/*
- * Copyright (c) 2008 Android Open Source Project (query id randomization)
* Copyright (c) 1985, 1993
* The Regents of the University of California. All rights reserved.
*
diff --git a/libc/dns/resolv/res_send.c b/libc/dns/resolv/res_send.c
index 4c4b953..f53da5f 100644
--- a/libc/dns/resolv/res_send.c
+++ b/libc/dns/resolv/res_send.c
@@ -1,7 +1,6 @@
/* $NetBSD: res_send.c,v 1.9 2006/01/24 17:41:25 christos Exp $ */
/*
- * Copyright 2008 Android Open Source Project (source port randomization)
* Copyright (c) 1985, 1989, 1993
* The Regents of the University of California. All rights reserved.
*
diff --git a/libc/include/android/versioning.h b/libc/include/android/versioning.h
index 196c28e..4e1a185 100644
--- a/libc/include/android/versioning.h
+++ b/libc/include/android/versioning.h
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h
index b8824d9..94ea153 100644
--- a/libc/include/fcntl.h
+++ b/libc/include/fcntl.h
@@ -78,7 +78,7 @@
#if defined(__USE_FILE_OFFSET64)
int fallocate(int, int, off_t, off_t) __RENAME(fallocate64) __INTRODUCED_IN(21);
int posix_fadvise(int, off_t, off_t, int) __RENAME(posix_fadvise64) __INTRODUCED_IN(21);
-int posix_fallocate(int, off_t, off_t) __RENAME(posix_fallocate) __INTRODUCED_IN(21);
+int posix_fallocate(int, off_t, off_t) __RENAME(posix_fallocate64) __INTRODUCED_IN(21);
#else
int fallocate(int, int, off_t, off_t) __INTRODUCED_IN(21);
int posix_fadvise(int, off_t, off_t, int) __INTRODUCED_IN(21);
diff --git a/libc/tools/generate-NOTICE.py b/libc/tools/generate-NOTICE.py
index 79b4ea9..6573644 100755
--- a/libc/tools/generate-NOTICE.py
+++ b/libc/tools/generate-NOTICE.py
@@ -16,7 +16,7 @@
def IsUninteresting(path):
path = path.lower()
- if path.endswith(".mk") or path.endswith(".py") or path.endswith(".pyc") or path.endswith(".txt") or path.endswith(".3"):
+ if path.endswith(".mk") or path.endswith(".py") or path.endswith(".pyc") or path.endswith(".txt") or path.endswith(".3") or path.endswith(".swp"):
return True
if path.endswith("/notice") or path.endswith("/readme") or path.endswith("/caveats"):
return True
diff --git a/libc/zoneinfo/tzdata b/libc/zoneinfo/tzdata
index 57bff7b..abfe234 100644
--- a/libc/zoneinfo/tzdata
+++ b/libc/zoneinfo/tzdata
Binary files differ
diff --git a/libm/x86/lrint.S b/libm/x86/lrint.S
index 48d71dd..df26b30 100644
--- a/libm/x86/lrint.S
+++ b/libm/x86/lrint.S
@@ -1,16 +1,21 @@
/*
Copyright (c) 2014, Intel Corporation
All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+
* Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
diff --git a/libm/x86/lrintf.S b/libm/x86/lrintf.S
index bc8fcb3..d2dae03 100644
--- a/libm/x86/lrintf.S
+++ b/libm/x86/lrintf.S
@@ -1,16 +1,21 @@
/*
Copyright (c) 2014, Intel Corporation
All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+
* Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
diff --git a/libm/x86/rint.S b/libm/x86/rint.S
index 85635f2..282d3ed 100644
--- a/libm/x86/rint.S
+++ b/libm/x86/rint.S
@@ -1,16 +1,21 @@
/*
Copyright (c) 2014, Intel Corporation
All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+
* Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
diff --git a/libm/x86/rintf.S b/libm/x86/rintf.S
index 9f82400..d5cbe78 100644
--- a/libm/x86/rintf.S
+++ b/libm/x86/rintf.S
@@ -1,16 +1,21 @@
/*
Copyright (c) 2014, Intel Corporation
All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+
* Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
diff --git a/libm/x86_64/lrint.S b/libm/x86_64/lrint.S
index f809a1f..d678761 100644
--- a/libm/x86_64/lrint.S
+++ b/libm/x86_64/lrint.S
@@ -1,16 +1,21 @@
/*
Copyright (c) 2014, Intel Corporation
All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+
* Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
diff --git a/libm/x86_64/lrintf.S b/libm/x86_64/lrintf.S
index a661cbc..3d3acfb 100644
--- a/libm/x86_64/lrintf.S
+++ b/libm/x86_64/lrintf.S
@@ -1,16 +1,21 @@
/*
Copyright (c) 2014, Intel Corporation
All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+
* Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
diff --git a/libm/x86_64/rint.S b/libm/x86_64/rint.S
index 098fdc5..9731daa 100644
--- a/libm/x86_64/rint.S
+++ b/libm/x86_64/rint.S
@@ -1,16 +1,21 @@
/*
Copyright (c) 2014, Intel Corporation
All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+
* Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
diff --git a/libm/x86_64/rintf.S b/libm/x86_64/rintf.S
index 09f5e9c..c3e98bf 100644
--- a/libm/x86_64/rintf.S
+++ b/libm/x86_64/rintf.S
@@ -1,16 +1,21 @@
/*
Copyright (c) 2014, Intel Corporation
All rights reserved.
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
+
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
+
* Neither the name of Intel Corporation nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
diff --git a/tests/locale_test.cpp b/tests/locale_test.cpp
index f308af5..8b38c40 100644
--- a/tests/locale_test.cpp
+++ b/tests/locale_test.cpp
@@ -59,9 +59,10 @@
EXPECT_EQ(EINVAL, errno);
#if defined(__BIONIC__)
- // The "" locale is implementation-defined. For bionic, it's the C locale.
+ // The "" locale is implementation-defined. For bionic, it's the C.UTF-8 locale, which is
+ // pretty much all we support anyway.
// glibc will give us something like "en_US.UTF-8", depending on the user's configuration.
- EXPECT_STREQ("C", setlocale(LC_ALL, ""));
+ EXPECT_STREQ("C.UTF-8", setlocale(LC_ALL, ""));
#endif
EXPECT_STREQ("C", setlocale(LC_ALL, "C"));
EXPECT_STREQ("C", setlocale(LC_ALL, "POSIX"));
diff --git a/tools/versioner/src/Arch.cpp b/tools/versioner/src/Arch.cpp
index 49dad8a..8d1d41e 100644
--- a/tools/versioner/src/Arch.cpp
+++ b/tools/versioner/src/Arch.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/Arch.h b/tools/versioner/src/Arch.h
index fbf7773..0c6f514 100644
--- a/tools/versioner/src/Arch.h
+++ b/tools/versioner/src/Arch.h
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/DeclarationDatabase.cpp b/tools/versioner/src/DeclarationDatabase.cpp
index 02383bb..9c9bc83 100644
--- a/tools/versioner/src/DeclarationDatabase.cpp
+++ b/tools/versioner/src/DeclarationDatabase.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/DeclarationDatabase.h b/tools/versioner/src/DeclarationDatabase.h
index 8f43d79..e957019 100644
--- a/tools/versioner/src/DeclarationDatabase.h
+++ b/tools/versioner/src/DeclarationDatabase.h
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/Preprocessor.cpp b/tools/versioner/src/Preprocessor.cpp
index 3c86486..da5d250 100644
--- a/tools/versioner/src/Preprocessor.cpp
+++ b/tools/versioner/src/Preprocessor.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/Preprocessor.h b/tools/versioner/src/Preprocessor.h
index 7be018b..2a17534 100644
--- a/tools/versioner/src/Preprocessor.h
+++ b/tools/versioner/src/Preprocessor.h
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/SymbolDatabase.cpp b/tools/versioner/src/SymbolDatabase.cpp
index b5d2abb..90c0c9f 100644
--- a/tools/versioner/src/SymbolDatabase.cpp
+++ b/tools/versioner/src/SymbolDatabase.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -37,25 +37,26 @@
std::unordered_set<std::string> getSymbols(const std::string& filename) {
std::unordered_set<std::string> result;
- auto binary = createBinary(filename);
- if (std::error_code ec = binary.getError()) {
- errx(1, "failed to open library at %s: %s\n", filename.c_str(), ec.message().c_str());
+ auto binaryOrError = createBinary(filename);
+ if (!binaryOrError) {
+ errx(1, "failed to open library at %s: %s\n", filename.c_str(),
+ llvm::toString(binaryOrError.takeError()).c_str());
}
- ELFObjectFileBase* elf = dyn_cast_or_null<ELFObjectFileBase>(binary.get().getBinary());
+ ELFObjectFileBase* elf = dyn_cast_or_null<ELFObjectFileBase>(binaryOrError.get().getBinary());
if (!elf) {
errx(1, "failed to parse %s as ELF", filename.c_str());
}
for (const ELFSymbolRef symbol : elf->getDynamicSymbolIterators()) {
- ErrorOr<StringRef> symbol_name = symbol.getName();
+ Expected<StringRef> symbolNameOrError = symbol.getName();
- if (std::error_code ec = binary.getError()) {
+ if (!symbolNameOrError) {
errx(1, "failed to get symbol name for symbol in %s: %s", filename.c_str(),
- ec.message().c_str());
+ llvm::toString(symbolNameOrError.takeError()).c_str());
}
- result.insert(symbol_name.get().str());
+ result.insert(symbolNameOrError.get().str());
}
return result;
diff --git a/tools/versioner/src/SymbolDatabase.h b/tools/versioner/src/SymbolDatabase.h
index 3f41b98..09948f5 100644
--- a/tools/versioner/src/SymbolDatabase.h
+++ b/tools/versioner/src/SymbolDatabase.h
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/Utils.cpp b/tools/versioner/src/Utils.cpp
index 8dcadd1..dd087a5 100644
--- a/tools/versioner/src/Utils.cpp
+++ b/tools/versioner/src/Utils.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/Utils.h b/tools/versioner/src/Utils.h
index 8d8415f..d49fc88 100644
--- a/tools/versioner/src/Utils.h
+++ b/tools/versioner/src/Utils.h
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/versioner.cpp b/tools/versioner/src/versioner.cpp
index 535eef8..74650d5 100644
--- a/tools/versioner/src/versioner.cpp
+++ b/tools/versioner/src/versioner.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/tools/versioner/src/versioner.h b/tools/versioner/src/versioner.h
index 986c25f..9547f2c 100644
--- a/tools/versioner/src/versioner.h
+++ b/tools/versioner/src/versioner.h
@@ -1,11 +1,11 @@
/*
- * Copyright 2016 The Android Open Source Project
+ * Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,