+
+ ;; Check for allegro v7 & v8 bug with ODBC calls returning
+ ;; 32-bit unsigned ints, not 16-bit signed ints
+ #+(and allegro mswindows)
+ (when (> ,result-code #xFFFF)
+ (warn (format nil "16-bit return bug: result-code #x~X for expression ~S"
+ ,result-code (quote ,odbc-call)))
+ (setq ,result-code (logand ,result-code #xFFFF))
+ (when (> ,result-code #x7FFF)
+ (setq ,result-code (- ,result-code #x10000))))
+