Skip to content

Commit

Permalink
vm: magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
nomennescio committed May 15, 2024
1 parent 90ef8e1 commit 234cab9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vm/factor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ void factor_vm::init_factor(vm_parameters* p) {
special_objects[OBJ_EMBEDDED] = false_object;

#ifdef WINDOWS
#define VALID_HANDLE(handle,mode) (_fileno (handle)!=-2 ? handle : fopen ("nul",(mode)))
#define NO_ASSOCIATED_STREAM -2
#define VALID_HANDLE(handle,mode) (_fileno (handle)!= NO_ASSOCIATED_STREAM ? handle : fopen ("nul",(mode)))
#else
#define VALID_HANDLE(handle,mode) (handle)
#endif
Expand Down

0 comments on commit 234cab9

Please sign in to comment.