source: rtems/testsuites/libtests/dl02/dl-o2.c @ 62119d2

5
Last change on this file since 62119d2 was 62119d2, checked in by Sebastian Huber <sebastian.huber@…>, on 11/15/17 at 06:55:43

dl01, dl02, dl05: Fix unresolved printf symbol

The link time wrap of printf leads to unresolved symbols in the loadable
modules. This resulted in infinite loops and test timeouts. Use
rtems_printf() for output.

Update #3199.

  • Property mode set to 100644
File size: 736 bytes
Line 
1/*
2 * Copyright (c) 2014 Chris Johns <chrisj@rtems.org>.  All rights reserved.
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
8
9#include "dl-o2.h"
10
11#include <rtems/test.h>
12
13#define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__);
14
15int dl_o2_func1 (int argc, char* argv[])
16{
17  int arg;
18  printf("Loaded module: argc:%d [%s]\n", argc, __FILE__);
19  for (arg = 0; arg < argc; ++arg)
20    printf("  %d: %s\n", arg, argv[arg]);
21  return argc;
22}
23
24double dl_o2_func2 (double d1, double d2)
25{
26  return d1 * d2;
27}
28
29int dl_o2_func3 (dl_o2_call_t callback, int count)
30{
31  return callback ("string in dl_o2", count + 1);
32}
33
Note: See TracBrowser for help on using the repository browser.