Skip to content

Commit

Permalink
fixed fcancel() macro for OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfitzpatrick committed May 11, 2023
1 parent 7828fb4 commit 48b2f61
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions unix/os/zxwhen.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,11 @@
*/
int debug_sig = 0;

#ifdef LINUX
# define fcancel(fp)
#else
# ifdef BSD
# define fcancel(fp) ((fp)->_r = (fp)->_w = 0)
#else
# ifdef MACOSX
# define fcancel(fp) ((fp)->_r = (fp)->_w = 0)
#ifdef MACOSX
#define _IONBF 2 /* No buffering. */
#define fcancel(fp) setvbuf(fp, NULL, _IONBF, 0);
#else
# ifdef SOLARIS
# define fcancel(fp) ((fp)->_cnt=BUFSIZ,(fp)->_ptr=(fp)->_base)
#endif
#endif
#endif
#define fcancel(fp) ((fp)->_r = (fp)->_w = 0)
#endif


Expand Down

0 comments on commit 48b2f61

Please sign in to comment.