chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH 0/1] Include <windows.h> directly from chicken.


From: Evan Hanson
Subject: [Chicken-hackers] [PATCH 0/1] Include <windows.h> directly from chicken.h for access to Sleep()
Date: Wed, 1 Mar 2017 22:59:46 +1300

Hi hackers,

Here's a small patch for chicken-5 that fixes a build issue on MinGW
introduced by, I think, 0493e29:

  In file included from library.c:11:0:
  library.c: In function 'f_26703':
  chicken.h:1602:30: warning: implicit declaration of function 'Sleep' 
[-Wimplicit-function-declaration]
   # define C_process_sleep(n) (Sleep(C_unfix(n) * 1000), C_fix(0))
                                ^
  library.c:62092:8: note: in expansion of macro 'C_process_sleep'
   av2[1]=C_process_sleep(t2);
            ^~~~~~~~~~~~~~~

This patch takes the less invasive of two approaches to fix the problem,
but the other option is to make C_process_sleep an extern'd function in
runtime.c (rather than a macro), which would avoid the need to move any
include statements around. So, if anyone feels that it would be better
not to change these includes, I'd also be OK with that approach.

Cheers,

Evan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]