[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3] lib: Add realpath stub.
From: |
Janneke Nieuwenhuizen |
Subject: |
Re: [PATCH v3] lib: Add realpath stub. |
Date: |
Fri, 24 May 2024 11:43:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Andrius tikonas writes:
> lib/stub/realpath.c: New file.
Added:
* build-aux/configure-lib.sh (libc_tcc_SOURCES): Add it.
* include/stdlib.h (realpath): New declaration.
> ---
> build-aux/configure-lib.sh | 1 +
> include/stdlib.h | 1 +
> lib/stub/realpath.c | 34 ++++++++++++++++++++++++++++++++++
> 3 files changed, 36 insertions(+)
> create mode 100644 lib/stub/realpath.c
>
> diff --git a/build-aux/configure-lib.sh b/build-aux/configure-lib.sh
> index 386ebf88..72ac470d 100644
> --- a/build-aux/configure-lib.sh
> +++ b/build-aux/configure-lib.sh
Added your copyright.
> diff --git a/include/stdlib.h b/include/stdlib.h
> index 592a387b..75a32768 100644
> --- a/include/stdlib.h
> +++ b/include/stdlib.h
Likewise.
> void qsort (void *base, size_t nmemb, size_t size, int (*compar) (void const
> *, void const *));
> int rand (void);
> void *realloc (void *p, size_t size);
> +char* realpath(const char *restrict filename, char *restrict resolved);
As discussed on IRC, removed RESTRICT; changed to
char * realpath (char const *filename, char *resolved);
> diff --git a/lib/stub/realpath.c b/lib/stub/realpath.c
> new file mode 100644
> index 00000000..dab3a524
> --- /dev/null
> +++ b/lib/stub/realpath.c
> @@ -0,0 +1,34 @@
> +/* -*-comment-start: "//";comment-end:""-*-
> + * GNU Mes --- Maxwell Equations of Software
> + * Copyright © 2024 Andrius Štikonas <andrius@stikonas.eu>
> + *
> + * This file is part of GNU Mes.
> + *
> + * GNU Mes is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 3 of the License, or (at
> + * your option) any later version.
> + *
> + * GNU Mes is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include <mes/lib.h>
> +#include <errno.h>
> +#include <stdlib.h>
> +
> +char*
> +realpath(const char *filename, char *resolved)
Changed to
char *
realpath (char const *filename, char *resolved)
Thanks!
Greetings,
Janneke
--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com