Skip to content

Commit 56d0877

Browse files
committed
Added copyright define to libssh2.h and use it for binary builds.
1 parent 51a8335 commit 56d0877

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

get_ver.awk

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# fetch libssh2 version number from input file and write them to STDOUT
22
BEGIN {
33
while ((getline < ARGV[1]) > 0) {
4-
if (match ($0, /^#define LIBSSH2_VERSION[ |\t]+"[^"]+"/)) {
4+
if (match ($0, /^#define LIBSSH2_COPYRIGHT "[^"]+"$/)) {
5+
my_copyright_str = substr($0, 28, length($0)-28);
6+
}
7+
else if (match ($0, /^#define LIBSSH2_VERSION[ |\t]+"[^"]+"/)) {
58
my_ver_str = substr($3, 2, length($3) - 2);
69
split(my_ver_str, v, ".");
710
if (v[3])
@@ -17,4 +20,5 @@ BEGIN {
1720
}
1821
print "LIBSSH2_VERSION = " my_ver "";
1922
print "LIBSSH2_VERSION_STR = " my_ver_str "";
23+
print "LIBSSH2_COPYRIGHT_STR = " my_copyright_str "";
2024
}

include/libssh2.h

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
#ifndef LIBSSH2_H
4141
#define LIBSSH2_H 1
4242

43+
#define LIBSSH2_COPYRIGHT "2004-2010 The libssh2 project and its contributors."
44+
4345
/* We use underscore instead of dash when appending DEV in dev versions just
4446
to make the BANNER define (used by src/session.c) be a valid SSH
4547
banner. Release versions have no appended strings and may of course not

nw/Makefile.netware

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ DEVLARC = $(DEVLDIR).zip
3737
# Edit the vars below to change NLM target settings.
3838
TARGET = libssh2
3939
VERSION = $(LIBSSH2_VERSION)
40-
COPYR = Copyright (c) 2004-2010 The libssh2 project and its contributors.
40+
COPYR = Copyright (c) $(LIBSSH2_COPYRIGHT_STR)
4141
WWWURL = http://www.libssh2.org/
4242
DESCR = libssh2 $(LIBSSH2_VERSION_STR) ($(LIBARCH)) - $(WWWURL)
4343
MTSAFE = YES

win32/Makefile.win32

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ DEVLARC = $(DEVLDIR).zip
3434
# Edit the vars below to change target settings.
3535
TARGET = libssh2
3636
VERSION = $(LIBSSH2_VERSION)
37-
COPYR = (c) 2004-2010 The libssh2 project and its contributors.
37+
COPYR = (c) $(LIBSSH2_COPYRIGHT_STR)
3838
WWWURL = http://www.libssh2.org/
3939
DESCR = libssh2 $(LIBSSH2_VERSION_STR)
4040
#STACK = 64000

0 commit comments

Comments
 (0)