diff options
author | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2015-11-14 15:04:42 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2015-11-14 15:04:42 +0000 |
commit | fdd2067601eea3caa590a4f5e2d8878005db793a (patch) | |
tree | 5c8c63bbc3f3687b9487c8695c848fe84090f175 /mcon/U | |
parent | c56ef92ea3192d4e3fcc28cfab827741f0603b70 (diff) |
Added 6 new units.
git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@197 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U')
-rw-r--r-- | mcon/U/d_clearenv.U | 38 | ||||
-rw-r--r-- | mcon/U/d_getprogname.U | 40 | ||||
-rw-r--r-- | mcon/U/d_proginvocname.U | 40 | ||||
-rw-r--r-- | mcon/U/d_setenv.U | 38 | ||||
-rw-r--r-- | mcon/U/d_setprogname.U | 40 | ||||
-rw-r--r-- | mcon/U/d_unsetenv.U | 38 |
6 files changed, 234 insertions, 0 deletions
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 + |