]> Git Repo - uclibc-ng.git/commitdiff
buildsys: HAS_UTMP (XPG2, SVr4 compat) knob
authorBernhard Reutner-Fischer <[email protected]>
Mon, 23 Mar 2015 23:11:21 +0000 (00:11 +0100)
committerBernhard Reutner-Fischer <[email protected]>
Mon, 23 Mar 2015 23:11:21 +0000 (00:11 +0100)
Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
Makefile.in
extra/Configs/Config.in
libc/misc/utmp/Makefile.in
libc/misc/utmp/utent.c
libc/misc/utmp/utxent.c
libc/misc/utmp/wtent.c
libutil/Makefile.in

index a64fec956e169e1d5151f5808807829242726226..2233be8b26da1029b39e5d7138da224aa5f00b93 100644 (file)
@@ -294,6 +294,7 @@ HEADERS_RM-$(UCLIBC_HAS_THREADS)             += *thread*.h semaphore.h \
        bits/initspin.h
 HEADERS_RM-$(UCLIBC_HAS_THREADS_NATIVE)      += atomic.h bits/atomic.h
 HEADERS_RM-$(UCLIBC_HAS_OBSTACK)             += obstack.h
+HEADERS_RM-$(UCLIBC_HAS_UTMP)               += bits/utmp.h utmp.h
 HEADERS_RM-$(UCLIBC_HAS_UTMPX)               += bits/utmpx.h utmpx.h
 HEADERS_RM-$(UCLIBC_HAS_WCHAR)               += wchar.h wctype.h
 HEADERS_RM-$(UCLIBC_HAS_WORDEXP)             += wordexp.h
index 35c1cee9a14a9d7676f897ec99939b0f9756c636..7546e96eaa07a7e156f3153aa2d2ed2034e1c590 100644 (file)
@@ -700,6 +700,25 @@ config COMPAT_ATEXIT
          Enable this option if you want to update from 0.9.28 to git/0.9.29,
          else you will be missing atexit() until you rebuild all apps.
 
+config UCLIBC_HAS_UTMPX
+       bool "utmpx based support for tracking login/logouts to/from the system"
+          depends on UCLIBC_HAS_UTMP # TODO, remove this, it's backward
+       help
+         Answer y to enable support for accessing user accounting database.
+         It can be used to track all login/logout to the system.
+
+config UCLIBC_HAS_UTMP
+       bool "utmp support (XPG2, SVr4 compat)"
+       help
+         Answer y to enable legacy SVID support for accessing
+                user accounting database:
+                  getutent(), getutid(), getutline(), pututline(),
+                  setutent(), endutent(), utmpname() in utmp.h
+         It can be used to track all login/logout to the system.
+
+         If unsure, just answer N and use utmpx.h and corresponding
+                POSIX functions.
+
 config UCLIBC_SUSV2_LEGACY
        bool "Enable SuSv2 LEGACY functions"
        help
@@ -2042,14 +2061,6 @@ config UCLIBC_HAS_GNU_GLOB
 
          Most people will answer N.
 
-config UCLIBC_HAS_UTMPX
-       bool "utmpx based support for tracking login/logouts to/from the system"
-       help
-         Answer y to enable support for accessing user accounting database.
-         It can be used to track all login/logout to the system.
-
-         If unsure, just answer N.
-
 endmenu
 
 
index 535efb1505677d02b97a1939fe97e15868fdf1d2..715341c8541a1b8caac1a0577b6fddafd916ff0f 100644 (file)
@@ -7,7 +7,9 @@
 
 subdirs += libc/misc/utmp
 
-CSRC-y := utent.c wtent.c
+CSRC-y :=
+CSRC-$(if $(findstring y,$(UCLIBC_HAS_UTMP)$(UCLIBC_HAS_UTMPX)),y) += wtent.c
+CSRC-$(UCLIBC_HAS_UTMP) += utent.c
 CSRC-$(UCLIBC_HAS_UTMPX) += utxent.c
 
 MISC_UTMP_DIR := $(top_srcdir)libc/misc/utmp
index 07ca44eb2107244283a0146ff5481b7d8e60d630..6e15678658a8ead7d0d412c75dfe1b15c3eb2290 100644 (file)
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /* utent.c <[email protected]> */
 /* Let it be known that this is very possibly the worst standard ever.  HP-UX
    does one thing, someone else does another, linux another... If anyone
index a0e80a662785fa15fbd23c489e0470d698bff618..c32e4da49dd82e7514707545a177f8f8fdb3b24d 100644 (file)
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * utexent.c : Support for accessing user accounting database.
  * Copyright (C) 2010 STMicroelectronics Ltd.
index b5e4ee57608f3d09df6619a3793bbb6eef4c9247..30939ea43b80d0cea48dcefec4c15d3153a4d784 100644 (file)
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Copyright (C) 2000-2006 Erik Andersen <[email protected]>
  *
index f904fc7e1c70e2bfbe8485a58a384eac5aae5fa4..98b178ef99a7d997b8af6467ac8bd60fd20d066a 100644 (file)
@@ -27,6 +27,14 @@ ifneq ($(UCLIBC_HAS_PTY),y)
 libutil_SRC := $(filter-out $(libutil_DIR)/openpty.c $(libutil_DIR)/forkpty.c \
                ,$(libutil_SRC))
 endif
+ifeq ($(UCLIBC_HAS_UTMP)$(UCLIBC_HAS_UTMPX),)
+libutil_SRC := $(filter-out \
+       $(libutil_DIR)/logwtmp.c \
+       $(libutil_DIR)/login.c \
+       $(libutil_DIR)/logout.c \
+               ,$(libutil_SRC))
+endif
+
 libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
 
 ifeq ($(DOPIC),y)
This page took 0.040369 seconds and 4 git commands to generate.