summaryrefslogtreecommitdiff
path: root/libguile/posix-w32.h
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2023-06-20 15:46:35 -0700
committerMichael Gran <spk121@yahoo.com>2025-03-22 21:57:59 -0700
commitadbf2156ab5939e6909e035017995ba555886dc2 (patch)
tree4dc0d941cd0fb506483e7398d5112304bfe363c1 /libguile/posix-w32.h
parent2e51d3fa26e492c00e88b47005568a4c21582dfe (diff)
downloadguile-adbf2156ab5939e6909e035017995ba555886dc2.tar.gz
Remove posix-w32 subsitutes that require access to process handles
Now that Guile uses the posix_spawn gnulib module, several of Guile's custom w32 functions substitutes no longer work. Some functions relied on populating and maintaining an internal PID-to-Handle database, which is no longer possible. kill, getpriority, setpriority, getaffinity and setaffinity are removed. waitpid is simplified and does not handle ENOHANG. * NEWS: updated * libguile/posix-w32.c (struct proc_record, find_proc, proc_handle): removed (record_proc, delete_proc, prepare_child_handle, compenv): removed (prepare_envblk, lookup_cmd, prepare_cmdline, start_child): removed (kill, getpriority, setpriority, sched_getaffinity): removed (sched_setaffinity): removed (waitpid): modified to just use _cwait. ENOHANG emlation removed. * libguile/posix-w32.h (CPU_ZERO, CPU_ISSET, CPU_SET, CPU_SETSIZE): removed (cpu_set_t, PRIO_PROCESS, PRIO_PGRP, PRIO_USER): removed (HAVE_START_CHILD, HAVE_KILL, HAVE_GETPRIORITY): removed (HAVE_SETPRIORITY, HAVE_SCHED_GETAFFINITY, HAVE_SCHED_SETAFFINITY): removed declarations for waitpid, start_child, kill, getpriority: removed declarations for setpriority, sched_getaffinity, sched_set_affinity: Removed
Diffstat (limited to 'libguile/posix-w32.h')
-rw-r--r--libguile/posix-w32.h29
1 files changed, 1 insertions, 28 deletions
diff --git a/libguile/posix-w32.h b/libguile/posix-w32.h
index 147174420..a3c27f6f9 100644
--- a/libguile/posix-w32.h
+++ b/libguile/posix-w32.h
@@ -1,7 +1,7 @@
#ifndef SCM_POSIX_W32_H
#define SCM_POSIX_W32_H
-/* Copyright 2001,2006,2018,2020
+/* Copyright 2001,2006,2018,2020,2025
Free Software Foundation, Inc.
This file is part of Guile.
@@ -67,30 +67,9 @@ struct utsname
#define WIFSTOPPED(stat_val) ((stat_val) == (stat_val) ? 0 : 0)
#define WSTOPSIG(stat_var) (0)
-#define CPU_ZERO(s) memset(s,0,sizeof(*s))
-#define CPU_ISSET(b,s) ((*s) & (1U << (b))) != 0
-#define CPU_SET(b,s) (*s) |= (1U << (b))
-#define CPU_SETSIZE (8*sizeof(DWORD_PTR))
-typedef DWORD_PTR cpu_set_t;
-
-#define PRIO_PROCESS 1
-#define PRIO_PGRP 2
-#define PRIO_USER 3
-
SCM_INTERNAL int uname (struct utsname * uts);
SCM_INTERNAL int waitpid (intptr_t, int *, int);
SCM_INTERNAL int w32_status_to_termsig (DWORD status);
-
-SCM_INTERNAL pid_t start_child (const char *exec_file, char **argv,
- int reading, int c2p[2], int writing, int p2c[2],
- int infd, int outfd, int errfd);
-
-SCM_INTERNAL int kill (int pid, int sig);
-
-SCM_INTERNAL int getpriority (int which, int who);
-SCM_INTERNAL int setpriority (int which, int who, int nice_val);
-SCM_INTERNAL int sched_getaffinity (int pid, size_t mask_size, cpu_set_t *mask);
-SCM_INTERNAL int sched_setaffinity (int pid, size_t mask_size, cpu_set_t *mask);
SCM_INTERNAL void *dlopen_w32 (const char *name, int flags);
SCM_INTERNAL void *dlsym_w32 (void *handle, const char *name);
SCM_INTERNAL int dlclose_w32 (void *handle);
@@ -99,12 +78,6 @@ SCM_INTERNAL int getpagesize_w32 (void);
#define HAVE_UNAME 1
#define HAVE_WAITPID 1
-#define HAVE_START_CHILD 1
-#define HAVE_KILL 1
-#define HAVE_GETPRIORITY 1
-#define HAVE_SETPRIORITY 1
-#define HAVE_SCHED_GETAFFINITY 1
-#define HAVE_SCHED_SETAFFINITY 1
#define RTLD_NOW 1
#define RTLD_LAZY 2