diff options
author | heretic <heretic@yandex-team.ru> | 2022-02-10 16:45:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:46 +0300 |
commit | 81eddc8c0b55990194e112b02d127b87d54164a9 (patch) | |
tree | 9142afc54d335ea52910662635b898e79e192e49 /contrib/libs/openssl/crypto/armcap.c | |
parent | 397cbe258b9e064f49c4ca575279f02f39fef76e (diff) | |
download | ydb-81eddc8c0b55990194e112b02d127b87d54164a9.tar.gz |
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/openssl/crypto/armcap.c')
-rw-r--r-- | contrib/libs/openssl/crypto/armcap.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/contrib/libs/openssl/crypto/armcap.c b/contrib/libs/openssl/crypto/armcap.c index 1fd177151f..a96804c706 100644 --- a/contrib/libs/openssl/crypto/armcap.c +++ b/contrib/libs/openssl/crypto/armcap.c @@ -1,5 +1,5 @@ /* - * Copyright 2011-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -68,39 +68,39 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor)); # include <sys/auxv.h> # define OSSL_IMPLEMENT_GETAUXVAL # endif -# elif defined(__ANDROID_API__) -/* see https://developer.android.google.cn/ndk/guides/cpu-features */ -# if __ANDROID_API__ >= 18 -# include <sys/auxv.h> -# define OSSL_IMPLEMENT_GETAUXVAL -# endif +# elif defined(__ANDROID_API__) +/* see https://developer.android.google.cn/ndk/guides/cpu-features */ +# if __ANDROID_API__ >= 18 +# include <sys/auxv.h> +# define OSSL_IMPLEMENT_GETAUXVAL +# endif +# endif +# if defined(__FreeBSD__) +# include <sys/param.h> +# if __FreeBSD_version >= 1200000 +# include <sys/auxv.h> +# define OSSL_IMPLEMENT_GETAUXVAL + +static unsigned long getauxval(unsigned long key) +{ + unsigned long val = 0ul; + + if (elf_aux_info((int)key, &val, sizeof(val)) != 0) + return 0ul; + + return val; +} +# endif # endif -# if defined(__FreeBSD__) -# include <sys/param.h> -# if __FreeBSD_version >= 1200000 -# include <sys/auxv.h> -# define OSSL_IMPLEMENT_GETAUXVAL - -static unsigned long getauxval(unsigned long key) -{ - unsigned long val = 0ul; - - if (elf_aux_info((int)key, &val, sizeof(val)) != 0) - return 0ul; - - return val; -} -# endif -# endif - -/* - * Android: according to https://developer.android.com/ndk/guides/cpu-features, - * getauxval is supported starting with API level 18 - */ -# if defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ >= 18 -# include <sys/auxv.h> -# define OSSL_IMPLEMENT_GETAUXVAL -# endif + +/* + * Android: according to https://developer.android.com/ndk/guides/cpu-features, + * getauxval is supported starting with API level 18 + */ +# if defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ >= 18 +# include <sys/auxv.h> +# define OSSL_IMPLEMENT_GETAUXVAL +# endif /* * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas |