Re: [PATCH 02/17] Disable host_kernel_version() everywhere but on i386

2024-03-27 Thread Samuel Thibault
Applied, thanks!

Sergey Bugaev, le mer. 27 mars 2024 19:18:26 +0300, a ecrit:
> It's not only x86_64, none of new architectures are going to have it.
> ---
>  include/mach/mach_host.defs | 6 +++---
>  kern/host.c | 4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/mach/mach_host.defs b/include/mach/mach_host.defs
> index a8c40af6..8fd9d6b3 100644
> --- a/include/mach/mach_host.defs
> +++ b/include/mach/mach_host.defs
> @@ -161,9 +161,7 @@ routine task_get_assignment(
>   task: task_t;
>   out assigned_set: processor_set_name_t);
>  
> -#if defined(__x86_64__) && !defined(USER32)
> -skip;
> -#else
> +#if defined(__i386__) || (defined(__x86_64__) && defined(USER32))
>  /*
>   *   Get string describing current kernel version.
>   *   Deprecated, use host_get_kernel_version.
> @@ -171,6 +169,8 @@ skip;
>  routine  host_kernel_version(
>   host: host_t;
>   out kernel_version  : kernel_version_t);
> +#else
> +skip;
>  #endif
>  
>  /*
> diff --git a/kern/host.c b/kern/host.c
> index 69394374..53f8bdbd 100644
> --- a/kern/host.c
> +++ b/kern/host.c
> @@ -219,8 +219,8 @@ kern_return_t host_get_kernel_version(
>   return KERN_SUCCESS;
>  }
>  
> -#if !defined(__x86_64__) || defined(USER32)
> -/* Same as above, but does not exist for x86_64.  */
> +#if defined(__i386__) || (defined(__x86_64__) && defined(USER32))
> +/* Same as above, but only exists on i386.  */
>  kern_return_t host_kernel_version(
>   const host_thost,
>   kernel_version_tout_version)
> -- 
> 2.44.0
> 
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.



[PATCH 02/17] Disable host_kernel_version() everywhere but on i386

2024-03-27 Thread Sergey Bugaev
It's not only x86_64, none of new architectures are going to have it.
---
 include/mach/mach_host.defs | 6 +++---
 kern/host.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/mach/mach_host.defs b/include/mach/mach_host.defs
index a8c40af6..8fd9d6b3 100644
--- a/include/mach/mach_host.defs
+++ b/include/mach/mach_host.defs
@@ -161,9 +161,7 @@ routine task_get_assignment(
task: task_t;
out assigned_set: processor_set_name_t);
 
-#if defined(__x86_64__) && !defined(USER32)
-skip;
-#else
+#if defined(__i386__) || (defined(__x86_64__) && defined(USER32))
 /*
  * Get string describing current kernel version.
  * Deprecated, use host_get_kernel_version.
@@ -171,6 +169,8 @@ skip;
 routinehost_kernel_version(
host: host_t;
out kernel_version  : kernel_version_t);
+#else
+skip;
 #endif
 
 /*
diff --git a/kern/host.c b/kern/host.c
index 69394374..53f8bdbd 100644
--- a/kern/host.c
+++ b/kern/host.c
@@ -219,8 +219,8 @@ kern_return_t host_get_kernel_version(
return KERN_SUCCESS;
 }
 
-#if !defined(__x86_64__) || defined(USER32)
-/* Same as above, but does not exist for x86_64.  */
+#if defined(__i386__) || (defined(__x86_64__) && defined(USER32))
+/* Same as above, but only exists on i386.  */
 kern_return_t host_kernel_version(
const host_thost,
kernel_version_tout_version)
-- 
2.44.0