- Wrap change of entries in an InitChange/ExitChange pair (without this,
[AROS.git] / compiler / stdc / stdcio_startup.c
blob7b222026a20c8f89b6d1bdc7f1c29ec7cdf51e20
1 /*
2 Copyright © 2010-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Additional startup code for stdcio.library that is executed during
6 init of a program that uses the library.
7 This file is thus not part of stdcio.library but is used by the
8 startup section in stdcio.conf
9 */
11 #include <proto/stdc.h>
12 #include <proto/stdcio.h>
13 #include <libraries/stdcio.h>
15 #define DEBUG 0
16 #include <aros/debug.h>
18 static int __stdcio_startup(void)
20 struct StdCIOBase *StdCIOBase = __aros_getbase_StdCIOBase();
22 StdCIOBase->StdCBase = __aros_getbase_StdCBase();
24 D(bug("[__stdcio_startup]StdCIOBase->StdCBase = %p\n",
25 StdCIOBase->StdCBase
26 ));
28 return StdCIOBase->StdCBase != NULL;
31 ADD2INIT(__stdcio_startup, -50);