krb5: Make heimdal_version and heimdal_long_version const.
Pretty sure it is not useful for applications to be able to write to this. However, caveat: this could break programs that expect to pass around &heimdal_version or &heimdal_long_version to functions that expect pointers to non-const objects even if they don't modify them.
This commit is contained in:

committed by
Nico Williams

parent
426eb46441
commit
997916e3f6
@@ -764,16 +764,16 @@ if test -d "$srcdir/.git"; then
|
||||
#ifndef VERSION_HIDDEN
|
||||
#define VERSION_HIDDEN
|
||||
#endif
|
||||
VERSION_HIDDEN const char *heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ @BRANCH@ @TAG@ ($host) @COMMIT@ @DATE@ \$";
|
||||
VERSION_HIDDEN const char *heimdal_version = "AC_PACKAGE_STRING";
|
||||
VERSION_HIDDEN const char *const heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ @BRANCH@ @TAG@ ($host) @COMMIT@ @DATE@ \$";
|
||||
VERSION_HIDDEN const char *const heimdal_version = "AC_PACKAGE_STRING";
|
||||
EOF
|
||||
else
|
||||
cat > include/newversion.h.in <<EOF
|
||||
#ifndef VERSION_HIDDEN
|
||||
#define VERSION_HIDDEN
|
||||
#endif
|
||||
VERSION_HIDDEN const char *heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$";
|
||||
VERSION_HIDDEN const char *heimdal_version = "AC_PACKAGE_STRING";
|
||||
VERSION_HIDDEN const char *const heimdal_long_version = "@([#])\$Version: $PACKAGE_STRING by @USER@ on @HOST@ ($host) @DATE@ \$";
|
||||
VERSION_HIDDEN const char *const heimdal_version = "AC_PACKAGE_STRING";
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
@@ -111,8 +111,8 @@ while(<>) {
|
||||
|
||||
$(INCDIR)\version.h: ..\windows\NTMakefile.version NTMakefile
|
||||
$(CP) << $@
|
||||
const char *heimdal_long_version = "@(#)$$Version: $(VER_PACKAGE_NAME) $(VER_PACKAGE_VERSION) by $(USERNAME) on $(COMPUTERNAME) ($(CPU)-pc-windows) $$";
|
||||
const char *heimdal_version = "$(VER_PACKAGE_NAME) $(VER_PACKAGE_VERSION)";
|
||||
const char *const heimdal_long_version = "@(#)$$Version: $(VER_PACKAGE_NAME) $(VER_PACKAGE_VERSION) by $(USERNAME) on $(COMPUTERNAME) ($(CPU)-pc-windows) $$";
|
||||
const char *const heimdal_version = "$(VER_PACKAGE_NAME) $(VER_PACKAGE_VERSION)";
|
||||
<<
|
||||
|
||||
all:: $(INCFILES)
|
||||
|
@@ -697,7 +697,7 @@ typedef struct {
|
||||
KRB_ERROR error;
|
||||
} krb5_kdc_rep;
|
||||
|
||||
extern const char *heimdal_version, *heimdal_long_version;
|
||||
extern const char *const heimdal_version, *const heimdal_long_version;
|
||||
|
||||
typedef void (KRB5_CALLCONV * krb5_log_log_func_t)(krb5_context,
|
||||
const char*,
|
||||
|
@@ -39,7 +39,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifdef KRB5
|
||||
extern const char *heimdal_version;
|
||||
extern const char *const heimdal_version;
|
||||
#endif
|
||||
#include <version.h>
|
||||
|
||||
|
Reference in New Issue
Block a user