2002-06-18 Jeff Johnston <jjohnstn@redhat.com>
* testsuite/newlib.stdlib/atexit.c: New file. * testsuite/newlib.stdlib/atexit.exp: Ditto. * testsuite/newlib.string/tstring.c: Change default start size to something more reasonable for embedded platforms.
This commit is contained in:
parent
8cb1442e10
commit
4e04fa902a
|
@ -1,3 +1,10 @@
|
|||
2002-06-18 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* testsuite/newlib.stdlib/atexit.c: New file.
|
||||
* testsuite/newlib.stdlib/atexit.exp: Ditto.
|
||||
* testsuite/newlib.string/tstring.c: Change default start size
|
||||
to something more reasonable for embedded platforms.
|
||||
|
||||
2002-06-14 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||
|
||||
* libc/sys/linux/sys/errno.h (EFTYPE): Add macro.
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void a(void);
|
||||
void b(void);
|
||||
void c(int, void *);
|
||||
static void newline(void);
|
||||
|
||||
void a (void)
|
||||
{
|
||||
printf("a");
|
||||
}
|
||||
|
||||
void b (void)
|
||||
{
|
||||
printf("b");
|
||||
}
|
||||
|
||||
void c (int code, void *k)
|
||||
{
|
||||
char *x = (char *)k;
|
||||
printf("%d%c",code,x[0]);
|
||||
}
|
||||
|
||||
static void newline (void)
|
||||
{
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
if (atexit(newline) != 0)
|
||||
abort();
|
||||
|
||||
if (atexit(a) != 0)
|
||||
abort();
|
||||
|
||||
if (atexit(b) != 0)
|
||||
abort();
|
||||
|
||||
if (on_exit(c,(void *)"c") != 0)
|
||||
abort();
|
||||
|
||||
if (atexit(a) != 0)
|
||||
abort();
|
||||
|
||||
exit(0);
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software
|
||||
# is freely granted, provided that this notice is preserved.
|
||||
#
|
||||
|
||||
load_lib checkoutput.exp
|
||||
|
||||
set output {
|
||||
"a0cba"
|
||||
}
|
||||
|
||||
newlib_check_output "atexit.c" "$output"
|
|
@ -10,7 +10,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#ifndef MAX_1
|
||||
#define MAX_1 66000
|
||||
#define MAX_1 33000
|
||||
#endif
|
||||
|
||||
#define MAX_2 (2 * MAX_1 + MAX_1 / 10)
|
||||
|
|
Loading…
Reference in New Issue