source: rtems/testsuites/libtests/putenvtest/init.c @ 1b22030

4.104.114.84.95
Last change on this file since 1b22030 was 1b22030, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/01/04 at 15:16:12
  • cpuuse/system.h: Include <rtems/confdefs.h> instead of <confdefs.h>.
  • malloctest/system.h: Include <rtems/confdefs.h> instead of <confdefs.h>.
  • monitor/system.h: Include <rtems/confdefs.h> instead of <confdefs.h>.
  • putenvtest/init.c: Include <rtems/confdefs.h> instead of <confdefs.h>.
  • rtems++/System.h: Include <rtems/confdefs.h> instead of <confdefs.h>.
  • rtmonuse/system.h: Include <rtems/confdefs.h> instead of <confdefs.h>.
  • stackchk/system.h: Include <rtems/confdefs.h> instead of <confdefs.h>.
  • termios/init.c: Include <rtems/confdefs.h> instead of <confdefs.h>.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*  Init
2 *
3 *  This routine is the initialization task for this test program.
4 *  It is a user initialization task and has the responsibility for creating
5 *  and starting the tasks that make up the test.  If the time of day
6 *  clock is required for the test, it should also be set to a known
7 *  value by this function.
8 *
9 *  Input parameters:
10 *    argument - task argument
11 *
12 *  Output parameters:  NONE
13 *
14 *  COPYRIGHT (c) 1989-1999.
15 *  On-Line Applications Research Corporation (OAR).
16 *
17 *  The license and distribution terms for this file may be
18 *  found in the file LICENSE in this distribution or at
19 *  http://www.rtems.com/license/LICENSE.
20 *
21 *  $Id$
22 */
23
24#define TEST_INIT
25#include <tmacros.h>
26#include <stdio.h>
27#include <stdlib.h>
28
29/* putenv is beyond ANSI so prototype it here */
30int putenv(const char *string);
31
32rtems_task Init(
33  rtems_task_argument argument
34);
35
36/* configuration information */
37
38#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
39#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
40
41#define TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE*3)
42
43#define CONFIGURE_MAXIMUM_TASKS               1
44
45#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
46
47#include <rtems/confdefs.h>
48
49rtems_task Init(
50  rtems_task_argument argument
51)
52{
53  puts( "\n\n*** PUTENV/GETENV TEST ***" );
54
55  puts( "putenv(\"FOO=BAR\") - expected to work" );
56  putenv ("FOO=BAR");
57  printf ("getenv(\"FOO\") ==> \"%s\"\n", getenv ("FOO"));
58
59  puts( "*** END OF PUTENV/GETENV TEST ***" );
60  rtems_test_exit(0);
61}
Note: See TracBrowser for help on using the repository browser.