Hi

The attached patch adds the paths.h header. This header is common on Unix
systems, and contains defines for common system paths. While the contents
don't appear to be standardised, the patch adds a reduced set of defines
from other platforms that are relevant to UnixLib.

Sources:
https://docs.oracle.com/cd/E36784_01/html/E36873/paths.h-3head.html
https://code.woboq.org/userspace/glibc/sysdeps/unix/sysv/linux/paths.h.html

https://chromium.googlesource.com/native_client/nacl-newlib/+/master/newlib/libc/include/paths.h

Regards
Cameron
Index: recipe/files/gcc/libunixlib/Makefile.am
===================================================================
--- recipe/files/gcc/libunixlib/Makefile.am	(revision 7374)
+++ recipe/files/gcc/libunixlib/Makefile.am	(working copy)
@@ -1357,6 +1357,7 @@
 	netinet/tcp.h \
 	netinet/udp.h \
 	nl_types.h \
+	paths.h \
 	poll.h \
 	pthread.h \
 	pwd.h \
Index: recipe/files/gcc/libunixlib/include/paths.h
===================================================================
--- recipe/files/gcc/libunixlib/include/paths.h	(nonexistent)
+++ recipe/files/gcc/libunixlib/include/paths.h	(working copy)
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2020 UnixLib Developers.
+ */
+
+#ifndef	_PATHS_H
+#define	_PATHS_H	1
+
+#ifndef __TARGET_SCL__
+
+#define _PATH_DEV     "/dev/"
+#define _PATH_CONSOLE "/dev/console"
+#define _PATH_DEVNULL "/dev/null"
+#define _PATH_RANDOM  "/dev/random"
+#define _PATH_TTY     "/dev/tty"
+#define _PATH_URANDOM "/dev/urandom"
+#define _PATH_DEVZERO "/dev/zero"
+
+#endif
+
+#endif
_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to