2020-03-10 Juan Manuel Guerrero  <juan.guerrero@gmx.de>


	* lib/getprogname.c (getprogname) [__DJGPP__]:  Implementation of
	DJGPP support.





diff -aprNU3 libidn-1.35.orig/gl/getprogname.c libidn-1.35/gl/getprogname.c
--- libidn-1.35.orig/gl/getprogname.c	2018-03-22 03:31:06 +0000
+++ libidn-1.35/gl/getprogname.c	2020-03-10 20:33:42 +0000
@@ -51,6 +51,10 @@
 # include <sys/procfs.h>
 #endif
 
+#ifdef __DJGPP__
+# include <crt0.h>
+#endif
+
 #include "dirname.h"
 
 #ifndef HAVE_GETPROGNAME             /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
@@ -176,6 +180,8 @@ getprogname (void)
         }
     }
   return NULL;
+# elif __DJGPP__
+  return last_component (__crt0_argv ? __crt0_argv[0] : __dos_argv0);
 # else
 #  error "getprogname module not ported to this OS"
 # endif
