Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
-
c2a99381
by Raymond Toy at 2023-04-26T21:38:42+00:00
-
acb29d8f
by Raymond Toy at 2023-04-26T21:38:42+00:00
5 changed files:
- src/code/exports.lisp
- src/code/unix.lisp
- src/contrib/unix/unix-glibc2.lisp
- src/contrib/unix/unix.lisp
- src/i18n/locale/cmucl-unix.pot
Changes:
... | ... | @@ -249,9 +249,6 @@ |
249 | 249 | "OPEN-DIR"
|
250 | 250 | "READ-DIR"
|
251 | 251 | |
252 | - ;; linux-os, sunos-os.
|
|
253 | - "UNIX-UNAME"
|
|
254 | - |
|
255 | 252 | ;; filesys.lisp
|
256 | 253 | "UNIX-GETPWUID"
|
257 | 254 | |
... | ... | @@ -411,7 +408,7 @@ |
411 | 408 | "TIOCSETP"
|
412 | 409 | "TTY-IUCLC"
|
413 | 410 | "TTY-OCRNL" "TTY-OFDEL" "TTY-OFILL" "TTY-OLCUC" "TTY-ONLRET" "TTY-ONOCR"
|
414 | - "TTY-XCASE" "UNIX-DUP2" "UNIX-GETITIMER" "UNIX-PID" "UNIX-UNAME"
|
|
411 | + "TTY-XCASE" "UNIX-DUP2" "UNIX-GETITIMER" "UNIX-PID"
|
|
415 | 412 | "UTSNAME"
|
416 | 413 | )
|
417 | 414 | #+solaris
|
... | ... | @@ -2724,27 +2724,6 @@ |
2724 | 2724 | (machine (array char 65))
|
2725 | 2725 | (domainname (array char 65))))
|
2726 | 2726 | |
2727 | -(defun unix-uname ()
|
|
2728 | - _N"Unix-uname returns information from the uname(2) system call.
|
|
2729 | - The return values are
|
|
2730 | - |
|
2731 | - Name of the operating system
|
|
2732 | - Name of this node within some implementation-defined network, if any
|
|
2733 | - Release level of this operating system
|
|
2734 | - Version level of this operating system release
|
|
2735 | - Name of the hardware type on which the system is running"
|
|
2736 | - (with-alien ((names (struct utsname)))
|
|
2737 | - (syscall* (#-(or freebsd (and x86 solaris)) "uname"
|
|
2738 | - #+(and x86 solaris) "nuname" ; See /usr/include/sys/utsname.h
|
|
2739 | - #+freebsd "__xuname" #+freebsd int
|
|
2740 | - (* (struct utsname)))
|
|
2741 | - (values (cast (slot names 'sysname) c-string)
|
|
2742 | - (cast (slot names 'nodename) c-string)
|
|
2743 | - (cast (slot names 'release) c-string)
|
|
2744 | - (cast (slot names 'version) c-string)
|
|
2745 | - (cast (slot names 'machine) c-string))
|
|
2746 | - #+freebsd 256
|
|
2747 | - (addr names))))
|
|
2748 | 2727 | |
2749 | 2728 | ;;; For asdf. Well, only getenv, but might as well make it symmetric.
|
2750 | 2729 |
... | ... | @@ -1908,5 +1908,26 @@ in at a time in poll.") |
1908 | 1908 | :until (zerop (sap-int (alien-sap member)))
|
1909 | 1909 | :collect (string (cast member c-call:c-string))))))))
|
1910 | 1910 | |
1911 | +(defun unix-uname ()
|
|
1912 | + _N"Unix-uname returns information from the uname(2) system call.
|
|
1913 | + The return values are
|
|
1914 | + |
|
1915 | + Name of the operating system
|
|
1916 | + Name of this node within some implementation-defined network, if any
|
|
1917 | + Release level of this operating system
|
|
1918 | + Version level of this operating system release
|
|
1919 | + Name of the hardware type on which the system is running"
|
|
1920 | + (with-alien ((names (struct utsname)))
|
|
1921 | + (syscall* (#-(or freebsd (and x86 solaris)) "uname"
|
|
1922 | + #+(and x86 solaris) "nuname" ; See /usr/include/sys/utsname.h
|
|
1923 | + #+freebsd "__xuname" #+freebsd int
|
|
1924 | + (* (struct utsname)))
|
|
1925 | + (values (cast (slot names 'sysname) c-string)
|
|
1926 | + (cast (slot names 'nodename) c-string)
|
|
1927 | + (cast (slot names 'release) c-string)
|
|
1928 | + (cast (slot names 'version) c-string)
|
|
1929 | + (cast (slot names 'machine) c-string))
|
|
1930 | + #+freebsd 256
|
|
1931 | + (addr names))))
|
|
1911 | 1932 | |
1912 | 1933 | ;; EOF |
... | ... | @@ -929,4 +929,25 @@ |
929 | 929 | _N"Unix-getpagesize returns the number of bytes in a system page."
|
930 | 930 | (int-syscall ("getpagesize")))
|
931 | 931 | |
932 | +(defun unix-uname ()
|
|
933 | + _N"Unix-uname returns information from the uname(2) system call.
|
|
934 | + The return values are
|
|
935 | + |
|
936 | + Name of the operating system
|
|
937 | + Name of this node within some implementation-defined network, if any
|
|
938 | + Release level of this operating system
|
|
939 | + Version level of this operating system release
|
|
940 | + Name of the hardware type on which the system is running"
|
|
941 | + (with-alien ((names (struct utsname)))
|
|
942 | + (syscall* (#-(or freebsd (and x86 solaris)) "uname"
|
|
943 | + #+(and x86 solaris) "nuname" ; See /usr/include/sys/utsname.h
|
|
944 | + #+freebsd "__xuname" #+freebsd int
|
|
945 | + (* (struct utsname)))
|
|
946 | + (values (cast (slot names 'sysname) c-string)
|
|
947 | + (cast (slot names 'nodename) c-string)
|
|
948 | + (cast (slot names 'release) c-string)
|
|
949 | + (cast (slot names 'version) c-string)
|
|
950 | + (cast (slot names 'machine) c-string))
|
|
951 | + #+freebsd 256
|
|
952 | + (addr names))))
|
|
932 | 953 | ;; EOF |
... | ... | @@ -1370,18 +1370,6 @@ msgid "" |
1370 | 1370 | " and its children."
|
1371 | 1371 | msgstr ""
|
1372 | 1372 | |
1373 | -#: src/code/unix.lisp
|
|
1374 | -msgid ""
|
|
1375 | -"Unix-uname returns information from the uname(2) system call.\n"
|
|
1376 | -" The return values are\n"
|
|
1377 | -"\n"
|
|
1378 | -" Name of the operating system\n"
|
|
1379 | -" Name of this node within some implementation-defined network, if any\n"
|
|
1380 | -" Release level of this operating system\n"
|
|
1381 | -" Version level of this operating system release\n"
|
|
1382 | -" Name of the hardware type on which the system is running"
|
|
1383 | -msgstr ""
|
|
1384 | - |
|
1385 | 1373 | #: src/code/unix.lisp
|
1386 | 1374 | msgid ""
|
1387 | 1375 | "Get the value of the environment variable named Name. If no such\n"
|