summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2015-11-14 15:04:42 +0000
committerrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2015-11-14 15:04:42 +0000
commitfdd2067601eea3caa590a4f5e2d8878005db793a (patch)
tree5c8c63bbc3f3687b9487c8695c848fe84090f175
parentc56ef92ea3192d4e3fcc28cfab827741f0603b70 (diff)
Added 6 new units.
git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@197 2592e710-e01b-42a5-8df0-11608a6cc53d
-rw-r--r--MANIFEST6
-rw-r--r--mcon/U/d_clearenv.U38
-rw-r--r--mcon/U/d_getprogname.U40
-rw-r--r--mcon/U/d_proginvocname.U40
-rw-r--r--mcon/U/d_setenv.U38
-rw-r--r--mcon/U/d_setprogname.U40
-rw-r--r--mcon/U/d_unsetenv.U38
7 files changed, 240 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index 3308dda..6bb7092 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -189,6 +189,7 @@ mcon/U/d_chown.U Do we have chown()?
mcon/U/d_chroot.U Do we have chroot()?
mcon/U/d_chsize.U Size of a char
mcon/U/d_ckeypad.U Do we have the curses keypad()?
+mcon/U/d_clearenv.U Do we have clearenv()?
mcon/U/d_clock_getres.U Do we have clock_getres()?
mcon/U/d_clock_gettime.U Do we have clock_gettime()?
mcon/U/d_closedir.U Do we have closedir()?
@@ -258,6 +259,7 @@ mcon/U/d_getpgrp.U Do we have getpgrp()?
mcon/U/d_getpgrp2.U Do we have getpgrp2()? (DG/UX)
mcon/U/d_getppid.U Do we have getppid()?
mcon/U/d_getprior.U Do we have getpriority()?
+mcon/U/d_getprogname.U Do we have getprogname()?
mcon/U/d_getpwent.U How is passwd info gotten?
mcon/U/d_getrlimit.U Do we have getrlimit()?
mcon/U/d_gettext.U Checks whether gettext() is available
@@ -340,6 +342,7 @@ mcon/U/d_posix_fadvise.U Do we have posix_fadvise()?
mcon/U/d_posix_memalign.U Do we have posix_memalign()?
mcon/U/d_pread.U Do we have pread()?
mcon/U/d_preadv.U Do we have preadv()?
+mcon/U/d_proginvocname.U Do we have program_invocation_name variables?
mcon/U/d_psignal.U Do we have psignal()?
mcon/U/d_ptattr_setstack.U Do we have pthread_attr_setstack()?
mcon/U/d_pwrite.U Do we have pwrite()?
@@ -373,6 +376,7 @@ mcon/U/d_semop.U Do we have semop()?
mcon/U/d_sendfile.U Do we have sendfile()?
mcon/U/d_sendmsg.U Do we have sendmsg()?
mcon/U/d_setegid.U Do we have setegid()?
+mcon/U/d_setenv.U Do we have setenv()?
mcon/U/d_seteuid.U Do we have seteuid()?
mcon/U/d_setgrps.U Do we have setgroups()?
mcon/U/d_setlnbuf.U Do we have setlinebuf()?
@@ -382,6 +386,7 @@ mcon/U/d_setpgrp.U Do we have setpgrp()?
mcon/U/d_setpgrp2.U Do we have setpgrp2()? (DG/UX)
mcon/U/d_setprior.U Do we have setpriority()?
mcon/U/d_setproctitle.U Do we have setproctitle()?
+mcon/U/d_setprogname.U Do we have setprogname()?
mcon/U/d_setregid.U Do we have setregid()?
mcon/U/d_setreuid.U Do we have setreuid()?
mcon/U/d_setrgid.U Do we have setrgid()?
@@ -453,6 +458,7 @@ mcon/U/d_uctx_mctx.U Do we have a uc_mcontext field in struct ucontext?
mcon/U/d_uctx_mctx_gregs.U Do we have uc_mcontext.gregs[] in struct ucontext?
mcon/U/d_ulimit.U Do we have ulimit()?
mcon/U/d_umask.U Do we have umask()?
+mcon/U/d_unsetenv.U Do we have unsetenv()?
mcon/U/d_usendir.U Use our own ndir routines?
mcon/U/d_usleep.U Do we have usleep()?
mcon/U/d_uwait.U Is there a 'union wait' declaration around here?
diff --git a/mcon/U/d_clearenv.U b/mcon/U/d_clearenv.U
new file mode 100644
index 0000000..d8e892f
--- /dev/null
+++ b/mcon/U/d_clearenv.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_clearenv: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_clearenv:
+?S: This variable conditionally defines the HAS_CLEARENV
+?S: symbol, which indicates to the C program that clearenv()
+?S: is available to clear the environment.
+?S:.
+?C:HAS_CLEARENV:
+?C: This symbol is defined when clearenv() is there to clear the
+?C: environment.
+?C:.
+?H:#$d_clearenv HAS_CLEARENV
+?H:.
+?LINT: set d_clearenv
+: do we have clearenv?
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ return clearenv();
+}
+EOC
+cyn=clearenv
+set d_clearenv
+eval $trylink
+
diff --git a/mcon/U/d_getprogname.U b/mcon/U/d_getprogname.U
new file mode 100644
index 0000000..a5a6175
--- /dev/null
+++ b/mcon/U/d_getprogname.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2015 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_getprogname: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_getprogname:
+?S: This variable conditionally defines the HAS_GETPROGNAME
+?S: symbol, which indicates to the C program that getprogname()
+?S: is available to get the program name.
+?S:.
+?C:HAS_GETPROGNAME:
+?C: This symbol is defined when getprogname() is there to get the
+?C: program name.
+?C:.
+?H:#$d_getprogname HAS_GETPROGNAME
+?H:.
+?LINT: set d_getprogname
+: can we use getprogname?
+$cat >try.c <<EOC
+#include <stdio.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ printf("%s\n", getprogname());
+ return 0;
+}
+EOC
+cyn=getprogname
+set d_getprogname
+eval $trylink
+
diff --git a/mcon/U/d_proginvocname.U b/mcon/U/d_proginvocname.U
new file mode 100644
index 0000000..1ebd177
--- /dev/null
+++ b/mcon/U/d_proginvocname.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2015 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_proginvocname: Trylink cat
+?MAKE: -pick add $@ %<
+?S:d_proginvocname:
+?S: This variable conditionally defines the HAS_PROGRAM_INVOCATION_NAME
+?S: symbol, which indicates to the C program that the two variables
+?S: program_invocation_name and program_invocation_short_name are set
+?S: at startup time.
+?S:.
+?C:HAS_PROGRAM_INVOCATION_NAME:
+?C: This symbol is defined when the C startup sets the two variables
+?C: program_invocation_name and program_invocation_short_name. To get
+?C: these definitions, <errno.h> must be included with __USE_GNU defined.
+?C:.
+?H:#$d_proginvocname HAS_PROGRAM_INVOCATION_NAME
+?H:.
+?LINT: set d_proginvocname
+: do we have the program_invocation_name variable?
+$cat >try.c <<EOC
+#include <stdio.h>
+#define __USE_GNU
+#include <errno.h>
+int main(void)
+{
+ printf("%s\n%s\n", program_invocation_name, program_invocation_short_name);
+ return 0;
+}
+EOC
+cyn="whether C startup sets program_invocation_name"
+set d_proginvocname
+eval $trylink
+
diff --git a/mcon/U/d_setenv.U b/mcon/U/d_setenv.U
new file mode 100644
index 0000000..9fcfd52
--- /dev/null
+++ b/mcon/U/d_setenv.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_setenv: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_setenv:
+?S: This variable conditionally defines the HAS_SETENV
+?S: symbol, which indicates to the C program that setenv()
+?S: is available to change or add an environment variable.
+?S:.
+?C:HAS_SETENV:
+?C: This symbol is defined when setenv() is available to change or
+?C: add an environment variable.
+?C:.
+?H:#$d_setenv HAS_SETENV
+?H:.
+?LINT: set d_setenv
+: do we have setenv?
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ return setenv("foo", "bar", 1);
+}
+EOC
+cyn=setenv
+set d_setenv
+eval $trylink
+
diff --git a/mcon/U/d_setprogname.U b/mcon/U/d_setprogname.U
new file mode 100644
index 0000000..0e53fdb
--- /dev/null
+++ b/mcon/U/d_setprogname.U
@@ -0,0 +1,40 @@
+?RCS:
+?RCS: Copyright (c) 2015 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_setprogname: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_setprogname:
+?S: This variable conditionally defines the HAS_SETPROGNAME
+?S: symbol, which indicates to the C program that setprogname()
+?S: is available to set the program name.
+?S:.
+?C:HAS_SETPROGNAME:
+?C: This symbol is defined when setprogname() is there to set the
+?C: program name.
+?C:.
+?H:#$d_setprogname HAS_SETPROGNAME
+?H:.
+?LINT: set d_setprogname
+: can we use setprogname?
+$cat >try.c <<EOC
+#include <sys/types.h>
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ setprogname("test");
+ return 0;
+}
+EOC
+cyn=setprogname
+set d_setprogname
+eval $trylink
+
diff --git a/mcon/U/d_unsetenv.U b/mcon/U/d_unsetenv.U
new file mode 100644
index 0000000..8fcd511
--- /dev/null
+++ b/mcon/U/d_unsetenv.U
@@ -0,0 +1,38 @@
+?RCS:
+?RCS: Copyright (c) 2015 Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
+?RCS:
+?MAKE:d_unsetenv: Trylink cat i_stdlib
+?MAKE: -pick add $@ %<
+?S:d_unsetenv:
+?S: This variable conditionally defines the HAS_UNSETENV
+?S: symbol, which indicates to the C program that unsetenv()
+?S: is available to delete an environment variable.
+?S:.
+?C:HAS_UNSETENV:
+?C: This symbol is defined when unsetenv() is available to delete
+?C: an environment variable.
+?C:.
+?H:#$d_unsetenv HAS_UNSETENV
+?H:.
+?LINT: set d_unsetenv
+: do we have unsetenv?
+$cat >try.c <<EOC
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main(void)
+{
+ return unsetenv("foo");
+}
+EOC
+cyn=unsetenv
+set d_unsetenv
+eval $trylink
+