From 1c330177f0575c735f95a8b5a46723b4f209c5bb Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Fri, 25 Aug 2023 11:29:00 +0200 Subject: [PATCH] lib, libmisc: Move source files to lib (where their headers were) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scripted change: $ find lib/ -type f \ | grep '\.h$' \ | sed 's,lib/,libmisc/,' \ | sed 's,\.h$,.c,' \ | xargs find 2>/dev/null \ | xargs mv -t lib/; Plus updating the Makefiles. Closes: Closes: Link: Link: Link: Reported-by: Christian Bricart Reported-by: Robert Marmorstein Cc: Sam James [ jubalh tested the openSUSE package ] Tested-by: Michael Vetter Acked-by: Michael Vetter [ Robert F. tested the Gentoo package ] Tested-by: Robert Förster Cc: David Seifert Signed-off-by: Alejandro Colomar --- lib/Makefile.am | 10 ++++++++++ {libmisc => lib}/alloc.c | 0 {libmisc => lib}/bit.c | 0 {libmisc => lib}/mempcpy.c | 0 {libmisc => lib}/stpecpy.c | 0 {libmisc => lib}/stpeprintf.c | 0 libmisc/Makefile.am | 9 --------- 7 files changed, 10 insertions(+), 9 deletions(-) rename {libmisc => lib}/alloc.c (100%) rename {libmisc => lib}/bit.c (100%) rename {libmisc => lib}/mempcpy.c (100%) rename {libmisc => lib}/stpecpy.c (100%) rename {libmisc => lib}/stpeprintf.c (100%) diff --git a/lib/Makefile.am b/lib/Makefile.am index c8d6dd5f..7f3f7f63 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -14,6 +14,10 @@ libshadow_la_CPPFLAGS += -I$(top_srcdir) libshadow_la_CFLAGS = $(LIBBSD_CFLAGS) libshadow_la_SOURCES = \ + alloc.c \ + alloc.h \ + bit.c \ + bit.h \ commonio.c \ commonio.h \ defines.h \ @@ -34,6 +38,8 @@ libshadow_la_SOURCES = \ groupio.h \ gshadow.c \ lockpw.c \ + mempcpy.c \ + mempcpy.h \ nss.c \ nscd.c \ nscd.h \ @@ -67,6 +73,10 @@ libshadow_la_SOURCES = \ shadowio.h \ shadowmem.c \ spawn.c \ + stpecpy.c \ + stpecpy.h \ + stpeprintf.c \ + stpeprintf.h \ write_full.c if WITH_TCB diff --git a/libmisc/alloc.c b/lib/alloc.c similarity index 100% rename from libmisc/alloc.c rename to lib/alloc.c diff --git a/libmisc/bit.c b/lib/bit.c similarity index 100% rename from libmisc/bit.c rename to lib/bit.c diff --git a/libmisc/mempcpy.c b/lib/mempcpy.c similarity index 100% rename from libmisc/mempcpy.c rename to lib/mempcpy.c diff --git a/libmisc/stpecpy.c b/lib/stpecpy.c similarity index 100% rename from libmisc/stpecpy.c rename to lib/stpecpy.c diff --git a/libmisc/stpeprintf.c b/lib/stpeprintf.c similarity index 100% rename from libmisc/stpeprintf.c rename to lib/stpeprintf.c diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am index 10bf1537..5eba4650 100644 --- a/libmisc/Makefile.am +++ b/libmisc/Makefile.am @@ -16,12 +16,8 @@ libmisc_la_SOURCES = \ addgrps.c \ age.c \ agetpass.c \ - alloc.c \ - ../lib/alloc.h \ audit_help.c \ basename.c \ - bit.c \ - ../lib/bit.h \ chkname.c \ chkname.h \ chowndir.c \ @@ -53,7 +49,6 @@ libmisc_la_SOURCES = \ list.c \ loginprompt.c \ mail.c \ - mempcpy.c \ motd.c \ myname.c \ obscure.c \ @@ -71,10 +66,6 @@ libmisc_la_SOURCES = \ setugid.c \ setupenv.c \ shell.c \ - stpecpy.c \ - ../lib/stpecpy.h \ - stpeprintf.c \ - ../lib/stpeprintf.h \ strtoday.c \ sub.c \ sulog.c \