Don't restart ioctl(2) calls automatically
[iolib.git] / src / base / debug.lisp
blobaf1053d63cbda9a9d96769d752e82b4f18c06c4b
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Debug helpers.
4 ;;;
6 (in-package :iolib.base)
8 (defvar *safety-checks*
9 #+iolib-debug t #-iolib-debug nil
10 "Enables safety checks throught the IOLib codebase.")
12 (defmacro debug-only (&body body)
13 (when *safety-checks*
14 `(progn ,@body)))
16 (defmacro debug-only* (&body body)
17 `(when *safety-checks*
18 (progn ,@body)))
20 (defmacro production-only (&body body)
21 (unless *safety-checks*
22 `(progn ,@body)))
24 (defmacro production-only* (&body body)
25 `(unless *safety-checks*
26 ,@body))