X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/64fd357d12215eea696478dd3d8993a572935a3d..b7fcf94152e4c1938fbca55d13b1e6a64b694bd6:/src/class-output.lisp diff --git a/src/class-output.lisp b/src/class-output.lisp index b47f6ba..b2d1ec8 100644 --- a/src/class-output.lisp +++ b/src/class-output.lisp @@ -139,6 +139,11 @@ ;; We need each message's method entry type for this, so we need to dig it ;; out of the vtmsgs structure. Indeed, the vtmsgs for this class contains ;; entries for precisely the messages we want to make macros for. + (when (some #'varargs-message-p (sod-class-messages class)) + (one-off-output 'varargs-macros sequencer :early-decls + (lambda (stream) + (format stream + "~%SOD__VARARGS_MACROS_PREAMBLE~%")))) (when (sod-class-messages class) (sequence-output (stream sequencer) ((class :message-macros) @@ -174,7 +179,7 @@ (push name in-names) (push name out-names))))) (when varargsp - (format stream "#if __STDC_VERSION__ >= 199901~%")) + (format stream "#ifdef SOD__HAVE_VARARGS_MACROS~%")) (format stream "#define ~A(~{~A~^, ~}) ~ ~A->_vt->~A.~A(~{~A~^, ~})~%" (message-macro-name class entry)