diff options
| author | Brent Cook <busterb@gmail.com> | 2023-10-30 22:49:47 -0500 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2023-10-30 22:57:33 -0500 |
| commit | dd1d96f643b01a5edbe7e0db8399f3c88f5f0c8b (patch) | |
| tree | 1e8f3392c3f1f82fe0103f0ac4d3333a3ce18719 /crypto | |
| parent | 98a5122bc6b6efc2729b5c29a570500311310ca0 (diff) | |
| download | portable-dd1d96f643b01a5edbe7e0db8399f3c88f5f0c8b.tar.gz portable-dd1d96f643b01a5edbe7e0db8399f3c88f5f0c8b.tar.bz2 portable-dd1d96f643b01a5edbe7e0db8399f3c88f5f0c8b.zip | |
fix cross-compilation on Windows 11 Arm64
signal.h is less populated in this environment, remove stub signal
handlers
Diffstat (limited to 'crypto')
| -rw-r--r-- | crypto/compat/ui_openssl_win.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/crypto/compat/ui_openssl_win.c b/crypto/compat/ui_openssl_win.c index c245111..b6a621f 100644 --- a/crypto/compat/ui_openssl_win.c +++ b/crypto/compat/ui_openssl_win.c | |||
| @@ -139,9 +139,6 @@ static int is_a_tty; | |||
| 139 | 139 | ||
| 140 | /* Declare static functions */ | 140 | /* Declare static functions */ |
| 141 | static int read_till_nl(FILE *); | 141 | static int read_till_nl(FILE *); |
| 142 | static void recsig(int); | ||
| 143 | static void pushsig(void); | ||
| 144 | static void popsig(void); | ||
| 145 | static int read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl); | 142 | static int read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl); |
| 146 | 143 | ||
| 147 | static int read_string(UI *ui, UI_STRING *uis); | 144 | static int read_string(UI *ui, UI_STRING *uis); |
| @@ -236,8 +233,6 @@ read_till_nl(FILE *in) | |||
| 236 | return 1; | 233 | return 1; |
| 237 | } | 234 | } |
| 238 | 235 | ||
| 239 | static volatile sig_atomic_t intr_signal; | ||
| 240 | |||
| 241 | static int | 236 | static int |
| 242 | read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl) | 237 | read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl) |
| 243 | { | 238 | { |
| @@ -247,12 +242,9 @@ read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl) | |||
| 247 | int maxsize = BUFSIZ - 1; | 242 | int maxsize = BUFSIZ - 1; |
| 248 | char *p; | 243 | char *p; |
| 249 | 244 | ||
| 250 | intr_signal = 0; | ||
| 251 | ok = 0; | 245 | ok = 0; |
| 252 | ps = 0; | 246 | ps = 0; |
| 253 | 247 | ||
| 254 | pushsig(); | ||
| 255 | |||
| 256 | ps = 1; | 248 | ps = 1; |
| 257 | 249 | ||
| 258 | if (!echo && !noecho_console(ui)) | 250 | if (!echo && !noecho_console(ui)) |
| @@ -276,16 +268,11 @@ read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl) | |||
| 276 | ok = 1; | 268 | ok = 1; |
| 277 | 269 | ||
| 278 | error: | 270 | error: |
| 279 | if (intr_signal == SIGINT) | ||
| 280 | ok = -1; | ||
| 281 | if (!echo) | 271 | if (!echo) |
| 282 | fprintf(tty_out, "\n"); | 272 | fprintf(tty_out, "\n"); |
| 283 | if (ps >= 2 && !echo && !echo_console(ui)) | 273 | if (ps >= 2 && !echo && !echo_console(ui)) |
| 284 | ok = 0; | 274 | ok = 0; |
| 285 | 275 | ||
| 286 | if (ps >= 1) | ||
| 287 | popsig(); | ||
| 288 | |||
| 289 | explicit_bzero(result, BUFSIZ); | 276 | explicit_bzero(result, BUFSIZ); |
| 290 | return ok; | 277 | return ok; |
| 291 | } | 278 | } |
| @@ -348,32 +335,3 @@ close_console(UI *ui) | |||
| 348 | 335 | ||
| 349 | return 1; | 336 | return 1; |
| 350 | } | 337 | } |
| 351 | |||
| 352 | /* Internal functions to handle signals and act on them */ | ||
| 353 | static void | ||
| 354 | pushsig(void) | ||
| 355 | { | ||
| 356 | savsig[SIGABRT] = signal(SIGABRT, recsig); | ||
| 357 | savsig[SIGFPE] = signal(SIGFPE, recsig); | ||
| 358 | savsig[SIGILL] = signal(SIGILL, recsig); | ||
| 359 | savsig[SIGINT] = signal(SIGINT, recsig); | ||
| 360 | savsig[SIGSEGV] = signal(SIGSEGV, recsig); | ||
| 361 | savsig[SIGTERM] = signal(SIGTERM, recsig); | ||
| 362 | } | ||
| 363 | |||
| 364 | static void | ||
| 365 | popsig(void) | ||
| 366 | { | ||
| 367 | signal(SIGABRT, savsig[SIGABRT]); | ||
| 368 | signal(SIGFPE, savsig[SIGFPE]); | ||
| 369 | signal(SIGILL, savsig[SIGILL]); | ||
| 370 | signal(SIGINT, savsig[SIGINT]); | ||
| 371 | signal(SIGSEGV, savsig[SIGSEGV]); | ||
| 372 | signal(SIGTERM, savsig[SIGTERM]); | ||
| 373 | } | ||
| 374 | |||
| 375 | static void | ||
| 376 | recsig(int i) | ||
| 377 | { | ||
| 378 | intr_signal = i; | ||
| 379 | } | ||
