This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: libgloss/arm/libcfunc.c: alarm [PATCH]
- From: Shaun Jackman <sjackman at gmail dot com>
- To: newlib at sources dot redhat dot com
- Date: Sun, 10 Jul 2005 23:12:03 -0700
- Subject: Re: libgloss/arm/libcfunc.c: alarm [PATCH]
- References: <7f45d9390505191414271badb2@mail.gmail.com>
- Reply-to: Shaun Jackman <sjackman at gmail dot com>
Ping?
I feel that stubs should not be linked in by default and silently, and
should not be provided in the same object file as useful functions.
Should the alarm(2) stub be removed from libgloss/arm/libcfunc.c?
Cheers,
Shaun
On 5/19/05, Shaun Jackman <sjackman@gmail.com> wrote:
> The definition of alarm in libgloss/arm/libcfunc.c is a stub, but
> overriding the alarm stub also required overriding abort, which is not
> a stub but a useful function.
>
> In this patch I've moved it to libnosys. Although, libnosys has only
> been used for system call (i.e. underscore prefixed) functions, so I'm
> not sure this is the best home. Perhaps a new library, libstubs, would
> be useful for these sort of non-syscall stub functions.
>
> Cheers,
> Shaun
>
> 2005-05-19 Shaun Jackman <sjackman@gmail.com>
>
> * libgloss/arm/libcfunc.c (alarm): Remove.
> * libgloss/libnosys/alarm.c: New file.
>
> --- libgloss/arm/libcfunc.c- 2004-06-09 12:06:50.000000000 -0700
> +++ libgloss/arm/libcfunc.c 2005-05-19 14:02:01.000000000 -0700
> @@ -33,8 +33,3 @@
> asm ("mov r0,#17\nswi %a0" :: "i" (SWI_Exit));
> #endif
> }
> -
> -void
> -alarm (void)
> -{
> -}
> --- /dev/null 2005-05-18 14:50:21.000000000 -0700
> +++ libgloss/libnosys/alarm.c 2005-05-19 14:05:56.000000000 -0700
> @@ -0,0 +1,13 @@
> +/*
> + * Stub version of alarm.
> + */
> +
> +#include "config.h"
> +#include "warning.h"
> +
> +void
> +alarm (void)
> +{
> +}
> +
> +stub_warning (alarm)
>