From 56d0877f07ac3bdd100df6dda2179c13666bd3c3 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sun, 15 Aug 2010 04:09:01 +0200 Subject: [PATCH] Added copyright define to libssh2.h and use it for binary builds. --- get_ver.awk | 6 +++++- include/libssh2.h | 2 ++ nw/Makefile.netware | 2 +- win32/Makefile.win32 | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/get_ver.awk b/get_ver.awk index 75c411ac..8253168e 100755 --- a/get_ver.awk +++ b/get_ver.awk @@ -1,7 +1,10 @@ # fetch libssh2 version number from input file and write them to STDOUT BEGIN { while ((getline < ARGV[1]) > 0) { - if (match ($0, /^#define LIBSSH2_VERSION[ |\t]+"[^"]+"/)) { + if (match ($0, /^#define LIBSSH2_COPYRIGHT "[^"]+"$/)) { + my_copyright_str = substr($0, 28, length($0)-28); + } + else if (match ($0, /^#define LIBSSH2_VERSION[ |\t]+"[^"]+"/)) { my_ver_str = substr($3, 2, length($3) - 2); split(my_ver_str, v, "."); if (v[3]) @@ -17,4 +20,5 @@ BEGIN { } print "LIBSSH2_VERSION = " my_ver ""; print "LIBSSH2_VERSION_STR = " my_ver_str ""; + print "LIBSSH2_COPYRIGHT_STR = " my_copyright_str ""; } diff --git a/include/libssh2.h b/include/libssh2.h index aafec116..a2444340 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -40,6 +40,8 @@ #ifndef LIBSSH2_H #define LIBSSH2_H 1 +#define LIBSSH2_COPYRIGHT "2004-2010 The libssh2 project and its contributors." + /* We use underscore instead of dash when appending DEV in dev versions just to make the BANNER define (used by src/session.c) be a valid SSH banner. Release versions have no appended strings and may of course not diff --git a/nw/Makefile.netware b/nw/Makefile.netware index cdf37105..26332399 100644 --- a/nw/Makefile.netware +++ b/nw/Makefile.netware @@ -37,7 +37,7 @@ DEVLARC = $(DEVLDIR).zip # Edit the vars below to change NLM target settings. TARGET = libssh2 VERSION = $(LIBSSH2_VERSION) -COPYR = Copyright (c) 2004-2010 The libssh2 project and its contributors. +COPYR = Copyright (c) $(LIBSSH2_COPYRIGHT_STR) WWWURL = http://www.libssh2.org/ DESCR = libssh2 $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL) MTSAFE = YES diff --git a/win32/Makefile.win32 b/win32/Makefile.win32 index 0cbdc5d0..9d4e9a6c 100644 --- a/win32/Makefile.win32 +++ b/win32/Makefile.win32 @@ -34,7 +34,7 @@ DEVLARC = $(DEVLDIR).zip # Edit the vars below to change target settings. TARGET = libssh2 VERSION = $(LIBSSH2_VERSION) -COPYR = (c) 2004-2010 The libssh2 project and its contributors. +COPYR = (c) $(LIBSSH2_COPYRIGHT_STR) WWWURL = http://www.libssh2.org/ DESCR = libssh2 $(LIBSSH2_VERSION_STR) #STACK = 64000