1 /* $OpenBSD: ctors.c,v 1.3 2003/07/31 21:48:02 deraadt Exp $ */ 2 /* 3 * Written by Artur Grabowski <art@openbsd.org>, 2002 Public Domain. 4 */ 5 void foo(void) __attribute__((constructor)); 6 7 int constructed = 0; 8 9 void foo(void)10foo(void) 11 { 12 constructed = 1; 13 } 14 15 int main(int argc,char * argv[])16main(int argc, char *argv[]) 17 { 18 return !constructed; 19 } 20