It can be dropped because this code was never actually enabled.
Actually, this implementation *surely* never ever compiled.

Signed-off-by: Gleb Fotengauer-Malinovskiy <gle...@altlinux.org>
---
 misc/Makefile.am    |  1 -
 misc/rpmxprogname.c | 33 ---------------------------------
 misc/rpmxprogname.h | 13 -------------
 system.h            |  6 ++----
 4 files changed, 2 insertions(+), 51 deletions(-)
 delete mode 100644 misc/rpmxprogname.c
 delete mode 100644 misc/rpmxprogname.h

diff --git a/misc/Makefile.am b/misc/Makefile.am
index beb9bee..bea0115 100644
--- a/misc/Makefile.am
+++ b/misc/Makefile.am
@@ -5,7 +5,6 @@ AM_CPPFLAGS += -I$(top_srcdir)/misc
 
 EXTRA_DIST = \
        fnmatch.c       fnmatch.h \
-       rpmxprogname.c  rpmxprogname.h \
        stpcpy.c        stpncpy.c
 
 noinst_LTLIBRARIES = libmisc.la
diff --git a/misc/rpmxprogname.c b/misc/rpmxprogname.c
deleted file mode 100644
index f896006..0000000
--- a/misc/rpmxprogname.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Original author:  Kamil Rytarowski
-   File:             rpmxprogname.c
-   Date of creation: 2013-08-10
-   License:          the same as RPM itself */
-
-#include "rpmxprogname.h"
-
-#include <string.h> /* strrchr */
-
-char *_rpmxprogname = NULL;
-
-char *_rpmxgetprogname(void)
-{
-  const char *empty = "";
-
-  if (_rpmxprognam != NULL) /* never return NULL string */
-    return _rpmxprogname;
-  else
-    return empty;
-}
-
-void _rpmxsetprogname(const char *pn)
-{
-  if (pn != NULL && _rpmxprogname == NULL /* set the value only once */) {
-    char *p = strrchr(pn, '/'); /* locate the last occurrence of '/' */
-    if (p != NULL)
-      _rpmxprogname = p + 1 /* strip beginning '/' */;
-    else
-      _rpmxprogname = pn;
-  }
-}
-
-#endif /* _RPMXPROGNAME_H */
diff --git a/misc/rpmxprogname.h b/misc/rpmxprogname.h
deleted file mode 100644
index 673c84a..0000000
--- a/misc/rpmxprogname.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Original author:  Kamil Rytarowski
-   File:             rpmxprogname.c
-   Date of creation: 2013-08-10
-   License:          the same as RPM itself */
-
-#ifndef _RPMXPROGNAME_H
-#define _RPMXPROGNAME_H
-
-char *_rpmxgetprogname(void);
-void _rpmxsetprogname(const char *pn);
-
-#endif /* _RPMXPROGNAME_H */
-
diff --git a/system.h b/system.h
index b7fafc3..6514d93 100644
--- a/system.h
+++ b/system.h
@@ -114,10 +114,8 @@ extern int fdatasync(int fildes);
 # define xsetprogname(pn) /* No need to implement it in GNU LIBC. */
   extern const char *__progname;
 # define xgetprogname(pn) __progname
-#else /* Reimplement setprogname and getprogname */
-# include "misc/rpmxprogname.h"
-# define xsetprogname(pn) _rpmxsetprogname(pn)
-# define xgetprogname() _rpmxgetprogname()
+#else
+# error "Did not find any sutable implementation of xsetprogname/xgetprogname"
 #endif
 
 /* Take care of NLS matters.  */

-- 
glebfm
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to