From: John Hodge Date: Sat, 10 May 2014 02:54:30 +0000 (+0800) Subject: Modules/UDI - Add check for UDI_VERSION to udi.h X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=b5ef69daf12844e475918acf7e6a7fbe2ccb30b2;p=tpg%2Facess2.git Modules/UDI - Add check for UDI_VERSION to udi.h --- diff --git a/KernelLand/Modules/Interfaces/UDI/Makefile b/KernelLand/Modules/Interfaces/UDI/Makefile index 3b1387be..d149bff3 100644 --- a/KernelLand/Modules/Interfaces/UDI/Makefile +++ b/KernelLand/Modules/Interfaces/UDI/Makefile @@ -1,7 +1,7 @@ # # -CPPFLAGS = -I../../../../UDI/include -Iinclude +CPPFLAGS = -I../../../../UDI/include -Iinclude -D UDI_VERSION=0x101 # - UDI Library Files LIB_OBJS := core/logging.o core/strmem.o core/imc.o core/mem.o core/buf.o diff --git a/UDI/include/udi.h b/UDI/include/udi.h index 50c7077a..76dac7ba 100644 --- a/UDI/include/udi.h +++ b/UDI/include/udi.h @@ -4,6 +4,16 @@ #ifndef _UDI_H_ #define _UDI_H_ +#ifndef UDI_VERSION +# error "Please define UDI_VERSION before including" +#endif +#if UDI_VERSION < 0x100 +# error "Requesting an unsupported UDI version (pre 1.0)" +#endif +#if UDI_VERSION > 0x101 +# error "Requesting an unsupported UDI version (post 1.01)" +#endif + #include #include