diff options
Diffstat (limited to 'Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-03-programname')
-rw-r--r-- | Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-03-programname | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-03-programname b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-03-programname new file mode 100644 index 00000000000..f80ff0a5e40 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.14-PATCHES/patch-03-programname @@ -0,0 +1,32 @@ +diff -ur dvipng-1.14.orig/misc.c dvipng-1.14/misc.c +--- dvipng-1.14.orig/misc.c 2010-09-30 12:13:40.000000000 +0200 ++++ dvipng-1.14/misc.c 2010-12-30 17:41:20.000000000 +0100 +@@ -34,7 +34,7 @@ + #endif + #include <sys/stat.h> + +-static char *programname; ++static const char *programname = PACKAGE_NAME; /* just in case */ + + /*-->DecodeArgs*/ + /*********************************************************************/ +@@ -50,17 +50,13 @@ + + if (argv[0]) { + #ifdef HAVE_GDIMAGEGIF +- programname=strrchr(argv[0],'/'); +- if (programname!=NULL) +- programname++; +- else +- programname=argv[0]; ++ programname=basename(argv[0]); + if (strncmp(programname,"dvigif",6)==0) + option_flags |= GIF_OUTPUT; + #endif + programname=argv[0]; + Message(BE_NONQUIET,"This is %s",programname); +- if (strcmp(basename(programname),PACKAGE_NAME)!=0) ++ if (strcmp(basename(argv[0]),PACKAGE_NAME)!=0) + Message(BE_NONQUIET," (%s)", PACKAGE_NAME); + Message(BE_NONQUIET," %s Copyright 2002-2010 Jan-Ake Larsson\n", + PACKAGE_VERSION); |