From 99385ee6f79f779c3d841df11d19300353983cba Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 27 Nov 2013 10:57:01 -0500 Subject: [PATCH] Solve some Windows build issues. * main.c (main): Use ONS(), not OSN(). (prepare_mutex_handle_string) [WINDOWS32]: Use %Ix formatting to support both 32bit and 64bit systems. * job.c (free_child, new_job): Use ONS(), not OSN(). * w32/subproc/w32err.c (map_windws32_error_to_string): Use O() when calling fatal(). Copyright-paperwork-exempt: yes --- job.c | 4 ++-- main.c | 4 ++-- w32/subproc/w32err.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/job.c b/job.c index 2b17f428..d3d63b8c 100644 --- a/job.c +++ b/job.c @@ -1012,7 +1012,7 @@ free_child (struct child *child) { DWORD err = GetLastError (); const char *estr = map_windows32_error_to_string (err); - OSN (fatal, NILF, + ONS (fatal, NILF, _("release jobserver semaphore: (Error %ld: %s)"), err, estr); } @@ -1959,7 +1959,7 @@ new_job (struct file *file) { DWORD err = GetLastError (); const char *estr = map_windows32_error_to_string (err); - OSN (fatal, NILF, + ONS (fatal, NILF, _("semaphore or child process wait: (Error %ld: %s)"), err, estr); } diff --git a/main.c b/main.c index 91b6c2d3..541fd1f6 100644 --- a/main.c +++ b/main.c @@ -793,7 +793,7 @@ prepare_mutex_handle_string (sync_handle_t handle) /* Prepare the mutex handle string for our children. */ /* 2 hex digits per byte + 2 characters for "0x" + null. */ sync_mutex = xmalloc ((2 * sizeof (sync_handle_t)) + 2 + 1); - sprintf (sync_mutex, "0x%x", handle); + sprintf (sync_mutex, "0x%Ix", handle); define_makeflags (1, 0); } } @@ -1981,7 +1981,7 @@ main (int argc, char **argv, char **envp) { DWORD err = GetLastError (); const char *estr = map_windows32_error_to_string (err); - OSN (fatal, NILF, + ONS (fatal, NILF, _("creating jobserver semaphore: (Error %ld: %s)"), err, estr); } #else diff --git a/w32/subproc/w32err.c b/w32/subproc/w32err.c index facfabcf..9b0866a7 100644 --- a/w32/subproc/w32err.c +++ b/w32/subproc/w32err.c @@ -67,7 +67,7 @@ map_windows32_error_to_string (DWORD ercode) { FreeLibrary(hModule); } #else - fatal(NILF, szMessageBuffer); + O (fatal, NILF, szMessageBuffer); #endif } else { /*