]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib, libmisc: Move source files to lib (where their headers were)
authorAlejandro Colomar <alx@kernel.org>
Fri, 25 Aug 2023 09:29:00 +0000 (11:29 +0200)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Wed, 30 Aug 2023 15:22:38 +0000 (17:22 +0200)
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: <https://github.com/shadow-maint/shadow/issues/791>
Closes: <https://bugs.gentoo.org/912446>
Link: <https://github.com/shadow-maint/shadow/issues/763#issuecomment-1664383425>
Link: <https://github.com/shadow-maint/shadow/pull/776>
Link: <https://github.com/shadow-maint/shadow/commit/d0518cc250afeaceb772a7f50a900cfc9b3ab937>
Reported-by: Christian Bricart <christian@bricart.de>
Reported-by: Robert Marmorstein <robert@marmorstein.org>
Cc: Sam James <sam@gentoo.org>
[ jubalh tested the openSUSE package ]
Tested-by: Michael Vetter <jubalh@iodoru.org>
Acked-by: Michael Vetter <jubalh@iodoru.org>
[ Robert F. tested the Gentoo package ]
Tested-by: Robert Förster <Dessa@gmake.de>
Cc: David Seifert <soap@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/Makefile.am
lib/alloc.c [moved from libmisc/alloc.c with 100% similarity]
lib/bit.c [moved from libmisc/bit.c with 100% similarity]
lib/mempcpy.c [moved from libmisc/mempcpy.c with 100% similarity]
lib/stpecpy.c [moved from libmisc/stpecpy.c with 100% similarity]
lib/stpeprintf.c [moved from libmisc/stpeprintf.c with 100% similarity]
libmisc/Makefile.am

index c8d6dd5fbb90fc4867bfee7f061c7cd3cfd44b3b..7f3f7f6390e903f5ccedc34851071def86e087b8 100644 (file)
@@ -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
similarity index 100%
rename from libmisc/alloc.c
rename to lib/alloc.c
similarity index 100%
rename from libmisc/bit.c
rename to lib/bit.c
similarity index 100%
rename from libmisc/mempcpy.c
rename to lib/mempcpy.c
similarity index 100%
rename from libmisc/stpecpy.c
rename to lib/stpecpy.c
similarity index 100%
rename from libmisc/stpeprintf.c
rename to lib/stpeprintf.c
index 10bf1537f2f0ea961433f7589d3666a303610efc..5eba4650a31cb6400dec60c43afbbde33788012f 100644 (file)
@@ -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 \