From patchwork Wed Jan 8 06:34:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 308063 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 109592C007A for ; Wed, 8 Jan 2014 17:34:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A70F52640D; Wed, 8 Jan 2014 06:34:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 131U0gEHAI-E; Wed, 8 Jan 2014 06:34:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 00BE725C9F; Wed, 8 Jan 2014 06:34:41 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 0C3721C2862 for ; Wed, 8 Jan 2014 06:34:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 092AB88219 for ; Wed, 8 Jan 2014 06:34:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZrS3p29nDHGi for ; Wed, 8 Jan 2014 06:34:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by hemlock.osuosl.org (Postfix) with ESMTP id 2D7C888211 for ; Wed, 8 Jan 2014 06:34:36 +0000 (UTC) Received: from sapphire.tkos.co.il (unknown [10.0.4.3]) by mx.tkos.co.il (Postfix) with ESMTPA id 49A7A44001E; Wed, 8 Jan 2014 08:34:33 +0200 (IST) From: Baruch Siach To: uclibc@uclibc.org Subject: [PATCH] spawn: move from librt to libc Date: Wed, 8 Jan 2014 08:34:02 +0200 Message-Id: <7dbb2e43f34f53305d7807018865691c430efe5e.1389162841.git.baruch@tkos.co.il> X-Mailer: git-send-email 1.8.5.2 X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: uclibc-bounces@uclibc.org This makes uClibc compatible with glibc, and allows gnulib autoconf macros to correctly detect posix_spawn support. Cc: Ismael Luceno Signed-off-by: Baruch Siach --- libc/Makefile.in | 1 + libc/spawn/Makefile | 13 +++++++++++++ libc/spawn/Makefile.in | 25 +++++++++++++++++++++++++ {librt => libc/spawn}/spawn.c | 0 {librt => libc/spawn}/spawn_faction_addclose.c | 0 {librt => libc/spawn}/spawn_faction_adddup2.c | 0 {librt => libc/spawn}/spawn_faction_addopen.c | 0 {librt => libc/spawn}/spawn_faction_init.c | 0 {librt => libc/spawn}/spawn_int.h | 0 librt/Makefile.in | 7 ------- 10 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 libc/spawn/Makefile create mode 100644 libc/spawn/Makefile.in rename {librt => libc/spawn}/spawn.c (100%) rename {librt => libc/spawn}/spawn_faction_addclose.c (100%) rename {librt => libc/spawn}/spawn_faction_adddup2.c (100%) rename {librt => libc/spawn}/spawn_faction_addopen.c (100%) rename {librt => libc/spawn}/spawn_faction_init.c (100%) rename {librt => libc/spawn}/spawn_int.h (100%) diff --git a/libc/Makefile.in b/libc/Makefile.in index 3b6a17b..4dd980b 100644 --- a/libc/Makefile.in +++ b/libc/Makefile.in @@ -37,6 +37,7 @@ include $(libc_DIR)/inet/Makefile.in include $(libc_DIR)/signal/Makefile.in include $(libc_DIR)/stdlib/Makefile.in include $(libc_DIR)/unistd/Makefile.in +include $(libc_DIR)/spawn/Makefile.in ifeq ($(DOPIC),y) libc-a-y = $(libc-y:.o=.os) $(libc-static-y:.o=.os) diff --git a/libc/spawn/Makefile b/libc/spawn/Makefile new file mode 100644 index 0000000..11f362a --- /dev/null +++ b/libc/spawn/Makefile @@ -0,0 +1,13 @@ +# Makefile for uClibc +# +# Copyright (C) 2000-2005 Erik Andersen +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +top_srcdir=../../ +top_builddir=../../ +all: objs +include $(top_builddir)Rules.mak +include Makefile.in +include $(top_srcdir)Makerules diff --git a/libc/spawn/Makefile.in b/libc/spawn/Makefile.in new file mode 100644 index 0000000..8a06309 --- /dev/null +++ b/libc/spawn/Makefile.in @@ -0,0 +1,25 @@ +# Makefile for uClibc +# +# Copyright (C) 2000-2008 Erik Andersen +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +subdirs += libc/spawn + +CSRC-y := +CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) := spawn.c spawn_faction_addclose.c \ + spawn_faction_adddup2.c spawn_faction_addopen.c spawn_faction_init.c + +SPAWN_DIR := $(top_srcdir)libc/spawn +SPAWN_OUT := $(top_builddir)libc/spawn + +SPAWN_SRC := $(patsubst %.c,$(SPAWN_DIR)/%.c,$(CSRC-y)) +SPAWN_OBJ := $(patsubst %.c,$(SPAWN_OUT)/%.o,$(CSRC-y)) + +libc-y += $(SPAWN_OBJ) + +objclean-y += CLEAN_libc/spawn + +CLEAN_libc/spawn: + $(do_rm) $(addprefix $(SPAWN_OUT)/*., o os) diff --git a/librt/spawn.c b/libc/spawn/spawn.c similarity index 100% rename from librt/spawn.c rename to libc/spawn/spawn.c diff --git a/librt/spawn_faction_addclose.c b/libc/spawn/spawn_faction_addclose.c similarity index 100% rename from librt/spawn_faction_addclose.c rename to libc/spawn/spawn_faction_addclose.c diff --git a/librt/spawn_faction_adddup2.c b/libc/spawn/spawn_faction_adddup2.c similarity index 100% rename from librt/spawn_faction_adddup2.c rename to libc/spawn/spawn_faction_adddup2.c diff --git a/librt/spawn_faction_addopen.c b/libc/spawn/spawn_faction_addopen.c similarity index 100% rename from librt/spawn_faction_addopen.c rename to libc/spawn/spawn_faction_addopen.c diff --git a/librt/spawn_faction_init.c b/libc/spawn/spawn_faction_init.c similarity index 100% rename from librt/spawn_faction_init.c rename to libc/spawn/spawn_faction_init.c diff --git a/librt/spawn_int.h b/libc/spawn/spawn_int.h similarity index 100% rename from librt/spawn_int.h rename to libc/spawn/spawn_int.h diff --git a/librt/Makefile.in b/librt/Makefile.in index 8555e94..abaa8ca 100644 --- a/librt/Makefile.in +++ b/librt/Makefile.in @@ -35,13 +35,6 @@ librt_filter_SRC += clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c librt_SSRC := endif -librt_filter_SRC += $(if $(UCLIBC_HAS_ADVANCED_REALTIME),, \ - spawn.c \ - spawn_faction_addclose.c \ - spawn_faction_adddup2.c \ - spawn_faction_addopen.c \ - spawn_faction_init.c) - librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC)) librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))