This is an automated email from the git hooks/post-receive script.
dgoulet pushed a change to branch main in repository tor.
from c408d0a7f9 Merge branch 'tor-gitlab/mr/657' new dba3090a68 return BSD if tor_libc_get_name sees __BSD_VISIBLE new 9c7f919d6f should we identify __FreeBSD__, return its version new c98ec6d001 return what OpenBSD gives as base system version new 8a879395ab make tor_libc_get_name aware of NetBSD new 2077b880d8 once NetBSD was presented, return its version new 64f8490ede present __DragonFly_version, from DragonFlyBSD new cc95be8e17 fix: we shall not produce warnings compiling tor new bd64e6bd08 fix: %s/param.sh/param.h new 4b23bd8c9c add chagelog file related to MR!652 new 642e56bdb6 perform proper 'OR' while checking defined vars new 21121eb231 Merge branch 'tor-gitlab/mr/652'
The 11 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
Summary of changes: changes/bsd_libc | 3 +++ src/lib/osinfo/libc.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 changes/bsd_libc
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit dba3090a682cbb47d60a44f273c186f668e7d9b7 Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 18:17:12 2022 +0000
return BSD if tor_libc_get_name sees __BSD_VISIBLE
* __BSD_VISIBLE is defined by systems like FreeBSD and OpenBSD; * that also extends to DragonFlyBSD; * it's used on stdlib.h and ctypes.h on those systems. --- src/lib/osinfo/libc.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index f52dea41aa..59a49e5e63 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -31,6 +31,9 @@ const char * tor_libc_get_name(void) { +#ifdef __BSD_VISIBLE + return "BSD"; +#endif /* defined(__BSD_VISIBLE) */ #ifdef __GLIBC__ return "Glibc"; #else /* !defined(__GLIBC__) */
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 9c7f919d6ff71f3c0ec227ab89b017465124055a Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 18:31:46 2022 +0000
should we identify __FreeBSD__, return its version
* we use OSVERSION here (defined by __FreeBSD__); * it's part of the <sys/param.h> include; * that tracks all noteworthy changes made to the base system. --- src/lib/osinfo/libc.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 59a49e5e63..19d089026c 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -52,6 +52,11 @@ tor_libc_get_version_str(void) return "N/A"; return version; #else /* !defined(CHECK_LIBC_VERSION) */ +#ifdef __BSD_VISIBLE +#include <sys/param.sh> +#ifdef __FreeBSD__ + return STR(__FreeBSD__); +#endif return "N/A"; #endif /* defined(CHECK_LIBC_VERSION) */ }
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit c98ec6d00157c7114d1e09e8da39110140809ab9 Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 18:38:04 2022 +0000
return what OpenBSD gives as base system version
* it also uses sys/param.h to track its version; * present that to tor_libc_get_version_str() as libc version;
while here, we also fix the return of FreeBSD version
* __FreeBSD_version is the correct var tracking the OSVERSION --- src/lib/osinfo/libc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 19d089026c..4af8e2f413 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -55,8 +55,11 @@ tor_libc_get_version_str(void) #ifdef __BSD_VISIBLE #include <sys/param.sh> #ifdef __FreeBSD__ - return STR(__FreeBSD__); + return STR(__FreeBSD_version); #endif +#ifdef OpenBSD + return STR(OpenBSD); +#endif /* defined(__BSD_VISIBLE) */ return "N/A"; #endif /* defined(CHECK_LIBC_VERSION) */ }
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 8a879395abcae7037818f2f6d2478b5b0db4c622 Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 18:41:17 2022 +0000
make tor_libc_get_name aware of NetBSD
* __NETBSD_SOURCE was used here to verify if we are running on NetBSD --- src/lib/osinfo/libc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 4af8e2f413..9206b99611 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -31,9 +31,9 @@ const char * tor_libc_get_name(void) { -#ifdef __BSD_VISIBLE +#ifdef __BSD_VISIBLE || __NETBSD_SOURCE return "BSD"; -#endif /* defined(__BSD_VISIBLE) */ +#endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */ #ifdef __GLIBC__ return "Glibc"; #else /* !defined(__GLIBC__) */
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 2077b880d80bb2853e6e505bc02a8637afac57fe Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 18:46:09 2022 +0000
once NetBSD was presented, return its version
* defined by __NetBSD_Version__ on <sys/param.h> too. --- src/lib/osinfo/libc.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 9206b99611..195bd528ba 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -57,6 +57,9 @@ tor_libc_get_version_str(void) #ifdef __FreeBSD__ return STR(__FreeBSD_version); #endif +#ifdef __NetBSD_Version__ + return STR(__NetBSD_Version__); +#endif #ifdef OpenBSD return STR(OpenBSD); #endif /* defined(__BSD_VISIBLE) */
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 64f8490ede1ecab2b36bdc7cf639f0561b6be2c3 Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 18:58:59 2022 +0000
present __DragonFly_version, from DragonFlyBSD --- src/lib/osinfo/libc.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 195bd528ba..d3050fccdb 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -54,6 +54,9 @@ tor_libc_get_version_str(void) #else /* !defined(CHECK_LIBC_VERSION) */ #ifdef __BSD_VISIBLE #include <sys/param.sh> +#ifdef __DragonFly_version + return STR(__DragonFly_version); +#endif #ifdef __FreeBSD__ return STR(__FreeBSD_version); #endif
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit cc95be8e1735344ad40f7d4420aca63b54f44f2a Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 20:49:04 2022 +0000
fix: we shall not produce warnings compiling tor --- src/lib/osinfo/libc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index d3050fccdb..47f667d564 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -46,12 +46,6 @@ tor_libc_get_name(void) const char * tor_libc_get_version_str(void) { -#ifdef CHECK_LIBC_VERSION - const char *version = gnu_get_libc_version(); - if (version == NULL) - return "N/A"; - return version; -#else /* !defined(CHECK_LIBC_VERSION) */ #ifdef __BSD_VISIBLE #include <sys/param.sh> #ifdef __DragonFly_version @@ -65,7 +59,14 @@ tor_libc_get_version_str(void) #endif #ifdef OpenBSD return STR(OpenBSD); +#endif #endif /* defined(__BSD_VISIBLE) */ +#ifdef CHECK_LIBC_VERSION + const char *version = gnu_get_libc_version(); + if (version == NULL) + return "N/A"; + return version; +#else /* !defined(CHECK_LIBC_VERSION) */ return "N/A"; #endif /* defined(CHECK_LIBC_VERSION) */ }
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit bd64e6bd08255a2488c300b171f4947bbd1a374a Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 5 20:51:26 2022 +0000
fix: %s/param.sh/param.h
while here also reflect the check for __NETBSD_SOURCE on tor_libc_get_version_str --- src/lib/osinfo/libc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 47f667d564..452fce676b 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -46,8 +46,8 @@ tor_libc_get_name(void) const char * tor_libc_get_version_str(void) { -#ifdef __BSD_VISIBLE -#include <sys/param.sh> +#ifdef __BSD_VISIBLE || __NETBSD_SOURCE +#include <sys/param.h> #ifdef __DragonFly_version return STR(__DragonFly_version); #endif @@ -60,7 +60,7 @@ tor_libc_get_version_str(void) #ifdef OpenBSD return STR(OpenBSD); #endif -#endif /* defined(__BSD_VISIBLE) */ +#endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */ #ifdef CHECK_LIBC_VERSION const char *version = gnu_get_libc_version(); if (version == NULL)
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 4b23bd8c9c3d386c45a0e9406e8a926a47b4992c Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sat Nov 19 08:02:46 2022 +0000
add chagelog file related to MR!652 --- changes/bsd_libc | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/changes/bsd_libc b/changes/bsd_libc new file mode 100644 index 0000000000..b431b7719f --- /dev/null +++ b/changes/bsd_libc @@ -0,0 +1,3 @@ + o Minor bugfixes (compilation): + - Fix returning something other than "Unknown N/A" as libc version if we + build tor on an O.S. like DragonFlyBSD, FreeBSD, OpenBSD or NetBSD.
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 642e56bdb640150804286d1c60fdae36796bc14b Author: Vinícius Zavam egypcio@googlemail.com AuthorDate: Sun Nov 27 18:41:09 2022 +0000
perform proper 'OR' while checking defined vars
* the || is not possible with #ifdef statement; * here the #ifdef turns into '#if defined()'. --- src/lib/osinfo/libc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/osinfo/libc.c b/src/lib/osinfo/libc.c index 452fce676b..1ca26ff707 100644 --- a/src/lib/osinfo/libc.c +++ b/src/lib/osinfo/libc.c @@ -31,7 +31,7 @@ const char * tor_libc_get_name(void) { -#ifdef __BSD_VISIBLE || __NETBSD_SOURCE +#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) return "BSD"; #endif /* defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) */ #ifdef __GLIBC__ @@ -46,7 +46,7 @@ tor_libc_get_name(void) const char * tor_libc_get_version_str(void) { -#ifdef __BSD_VISIBLE || __NETBSD_SOURCE +#if defined(__BSD_VISIBLE) || defined(__NETBSD_SOURCE) #include <sys/param.h> #ifdef __DragonFly_version return STR(__DragonFly_version);
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 21121eb23103b74692607d7001ad53e871811fd6 Merge: c408d0a7f9 642e56bdb6 Author: David Goulet dgoulet@torproject.org AuthorDate: Mon Nov 28 09:37:12 2022 -0500
Merge branch 'tor-gitlab/mr/652'
changes/bsd_libc | 3 +++ src/lib/osinfo/libc.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+)
tor-commits@lists.torproject.org