[haiku-commits] Change in haiku[master]: POSIX: add utmpx.h and function stubs

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 31 Oct 2020 08:11:50 +0000

From Jérôme Duval <jerome.duval@xxxxxxxxx>:

Jérôme Duval has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3371 ;)


Change subject: POSIX: add utmpx.h and function stubs
......................................................................

POSIX: add utmpx.h and function stubs

OpenJDK 14 assumes symbols and headers are available.
---
A headers/posix/utmpx.h
M src/system/libroot/posix/Jamfile
A src/system/libroot/posix/utmpx.cpp
3 files changed, 97 insertions(+), 0 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/71/3371/1

diff --git a/headers/posix/utmpx.h b/headers/posix/utmpx.h
new file mode 100644
index 0000000..82ac8c0
--- /dev/null
+++ b/headers/posix/utmpx.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2020 Haiku, Inc. All Rights Reserved.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef _UTMPX_H_
+#define _UTMPX_H_
+
+
+#include <sys/time.h>
+#include <sys/types.h>
+
+
+struct utmpx {
+       short                   ut_type;                /* type of entry */
+       struct timeval  ut_tv;                  /* modification time */
+       char                    ut_id[8];               /* entry identifier */
+       pid_t                   ut_pid;                 /* process ID */
+       char                    ut_user[32];    /* user login name */
+       char                    ut_line[16];    /* device name */
+       char                    __ut_reserved[192];
+};
+
+
+#define        EMPTY                   0       /* No valid user accounting 
information. */
+#define        BOOT_TIME               1       /* Identifies time of system 
boot. */
+#define        OLD_TIME                2       /* Identifies time when system 
clock changed. */
+#define        NEW_TIME                3       /* Identifies time after system 
clock changed. */
+#define        USER_PROCESS    4       /* Identifies a process. */
+#define        INIT_PROCESS    5       /* Identifies a process spawned by the 
init process. */
+#define        LOGIN_PROCESS   6       /* Identifies the session leader of a 
logged-in user. */
+#define        DEAD_PROCESS    7       /* Identifies a session leader who has 
exited. */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void endutxent(void);
+struct utmpx* getutxent(void);
+struct utmpx* getutxid(const struct utmpx *);
+struct utmpx* getutxline(const struct utmpx *);
+struct utmpx* pututxline(const struct utmpx *);
+void setutxent(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _UTMPX_H_ */
diff --git a/src/system/libroot/posix/Jamfile b/src/system/libroot/posix/Jamfile
index f0b5949..ae4880d 100644
--- a/src/system/libroot/posix/Jamfile
+++ b/src/system/libroot/posix/Jamfile
@@ -37,6 +37,7 @@
                        syslog.cpp
                        termios.c
                        utime.c
+                       utmpx.cpp
                        ;
        }
 }
diff --git a/src/system/libroot/posix/utmpx.cpp 
b/src/system/libroot/posix/utmpx.cpp
new file mode 100644
index 0000000..ba8e39a
--- /dev/null
+++ b/src/system/libroot/posix/utmpx.cpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2020 Haiku, Inc. All Rights Reserved.
+ * Distributed under the terms of the MIT License.
+ */
+
+#include <utmpx.h>
+
+
+void
+endutxent(void)
+{
+}
+
+
+void
+setutxent(void)
+{
+}
+
+
+struct utmpx*
+getutxent(void)
+{
+       return NULL;
+}
+
+
+struct utmpx*
+getutxid(const struct utmpx *ut)
+{
+       return NULL;
+}
+
+
+struct utmpx*
+getutxline(const struct utmpx *ut)
+{
+       return NULL;
+}
+
+
+struct utmpx*
+pututxline(const struct utmpx *ut)
+{
+       return NULL;
+}
+

--
To view, visit https://review.haiku-os.org/c/haiku/+/3371
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I21038e92afcfd2000ee95712bce874afd29611b6
Gerrit-Change-Number: 3371
Gerrit-PatchSet: 1
Gerrit-Owner: Jérôme Duval <jerome.duval@xxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: POSIX: add utmpx.h and function stubs - Gerrit