Split version into separate include fio
authorJens Axboe <axboe@kernel.dk>
Fri, 7 Oct 2011 08:10:18 +0000 (10:10 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 7 Oct 2011 08:10:18 +0000 (10:10 +0200)
Include it from the Windows version file, at least we only have
to update the version in two places now instead of three.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.h
fio_version.h [new file with mode: 0644]
init.c
os/windows/version.h
server.c

diff --git a/fio.h b/fio.h
index cfd928cebed4265e2a5bfd0fa684e3afe9b5b704..ba6806757df21601a02eee747a506335e5bdb1f6 100644 (file)
--- a/fio.h
+++ b/fio.h
 
 struct thread_data;
 
 
 struct thread_data;
 
-#define FIO_MAJOR      1
-#define FIO_MINOR      99
-#define FIO_PATCH      1
-
 #include "compiler/compiler.h"
 #include "flist.h"
 #include "fifo.h"
 #include "compiler/compiler.h"
 #include "flist.h"
 #include "fifo.h"
diff --git a/fio_version.h b/fio_version.h
new file mode 100644 (file)
index 0000000..487c9af
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef FIO_VERSION_H
+#define FIO_VERSION_H
+
+#define FIO_MAJOR      1
+#define FIO_MINOR      99
+#define FIO_PATCH      1
+
+#endif
diff --git a/init.c b/init.c
index 5c4441d65f650e51f3c15ef8afccd85b618fb7f3..e3ff39c01d0bdd78c450d9ee2b321982f0b14a4a 100644 (file)
--- a/init.c
+++ b/init.c
@@ -23,6 +23,8 @@
 
 #include "lib/getopt.h"
 
 
 #include "lib/getopt.h"
 
+#include "fio_version.h"
+
 #if FIO_PATCH > 0
 static char fio_version_string[] =     __fio_stringify(FIO_MAJOR) "."  \
                                        __fio_stringify(FIO_MINOR) "."  \
 #if FIO_PATCH > 0
 static char fio_version_string[] =     __fio_stringify(FIO_MAJOR) "."  \
                                        __fio_stringify(FIO_MINOR) "."  \
index 1fd1ab5891ce28edad6b789c723f88e8b47129cb..d8f4602f964dd3d4cb9fc9ddb4c3afd88ecad9d4 100644 (file)
@@ -1,4 +1,6 @@
-#define FIO_VERSION_MAJOR 1\r
-#define FIO_VERSION_MINOR 99\r
-#define FIO_VERSION_BUILD 1\r
+#include "../../fio_version.h"\r
+\r
+#define FIO_VERSION_MAJOR FIO_MAJOR\r
+#define FIO_VERSION_MINOR FIO_MINOR\r
+#define FIO_VERSION_BUILD FIO_PATCH\r
 #define FIO_VERSION_STRING "1.99.1"\r
 #define FIO_VERSION_STRING "1.99.1"\r
index 61bbe44edd245d91d5bd476a8d44d451031b5b04..c3502cd1570907a24ef8e80062631015de91ee4e 100644 (file)
--- a/server.c
+++ b/server.c
@@ -22,6 +22,8 @@
 #include "crc/crc16.h"
 #include "ieee754.h"
 
 #include "crc/crc16.h"
 #include "ieee754.h"
 
+#include "fio_version.h"
+
 int fio_net_port = 8765;
 
 int exit_backend = 0;
 int fio_net_port = 8765;
 
 int exit_backend = 0;