public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [edk2-libc Patch 0/1] realpath function signature doesn't match standard
@ 2023-10-26 14:17 Jayaprakash, N
  2023-10-26 14:17 ` [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: realpath function signature doesn't match the standard Jayaprakash, N
  0 siblings, 1 reply; 4+ messages in thread
From: Jayaprakash, N @ 2023-10-26 14:17 UTC (permalink / raw)
  To: devel; +Cc: Jayaprakash N

This patch fixes the function signature of realpath to match with the standard
defined signature. This patch bas been extracted from the  below pull request
raised on edk2-libc. 
https://github.com/tianocore/edk2-libc/pull/10

Jayaprakash N (1):
  ek2-libc: realpath function signature doesn't match the standard

 StdLib/Include/stdlib.h       | 4 ++--
 StdLib/LibC/StdLib/realpath.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.40.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110105): https://edk2.groups.io/g/devel/message/110105
Mute This Topic: https://groups.io/mt/102200531/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: realpath function signature doesn't match the standard
  2023-10-26 14:17 [edk2-devel] [edk2-libc Patch 0/1] realpath function signature doesn't match standard Jayaprakash, N
@ 2023-10-26 14:17 ` Jayaprakash, N
  2023-10-26 15:33   ` Jayaprakash, N
  2023-10-26 15:45   ` Laszlo Ersek
  0 siblings, 2 replies; 4+ messages in thread
From: Jayaprakash, N @ 2023-10-26 14:17 UTC (permalink / raw)
  To: devel; +Cc: Jayaprakash N, Rebecca Cran, Michael D Kinney, Kloper Dimitry

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4574

This commit is for processing the below PR on edk2-libc repo
https://github.com/tianocore/edk2-libc/pull/10
The realpath function signature in stdlib of edk2-libc doesn't match
signature as per the standard definition of this function given below
https://pubs.opengroup.org/onlinepubs/009695399/functions/realpath.html
This patch extracted from the above pull request fixes this issue.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jayaprakash N <n.jayaprakash@intel.com>
Signed-off-by: Kloper Dimitry <dimitry.kloper@intel.com>
---
 StdLib/Include/stdlib.h       | 4 ++--
 StdLib/LibC/StdLib/realpath.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/StdLib/Include/stdlib.h b/StdLib/Include/stdlib.h
index 0b9dfd3..022ddbd 100644
--- a/StdLib/Include/stdlib.h
+++ b/StdLib/Include/stdlib.h
@@ -74,7 +74,7 @@
                            const wchar_t * __restrict src, size_t limit);
 
     ################  Miscelaneous functions for *nix compatibility
-    char       *realpath    (char *file_name, char *resolved_name);
+    char       *realpath    (const char *file_name, char *resolved_name);
     const char *getprogname (void);
     void        setprogname (const char *progname);
 
@@ -875,7 +875,7 @@ size_t  wcstombs(char * __restrict Dest, const wchar_t * __restrict Src, size_t
     @retval NULL                    An error occured.
     @retval resolved_name.
 **/
-char * realpath(char *file_name, char *resolved_name);
+char * realpath(const char *file_name, char *resolved_name);
 
 /** The getprogname() function returns the name of the program.  If the name
     has not been set yet, it will return NULL.
diff --git a/StdLib/LibC/StdLib/realpath.c b/StdLib/LibC/StdLib/realpath.c
index 3d4118d..29abe9a 100644
--- a/StdLib/LibC/StdLib/realpath.c
+++ b/StdLib/LibC/StdLib/realpath.c
@@ -34,7 +34,7 @@
 **/
 char *
 realpath(
-  char *file_name,
+  const char *file_name,
   char *resolved_name
   )
 {
-- 
2.40.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110106): https://edk2.groups.io/g/devel/message/110106
Mute This Topic: https://groups.io/mt/102200532/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: realpath function signature doesn't match the standard
  2023-10-26 14:17 ` [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: realpath function signature doesn't match the standard Jayaprakash, N
@ 2023-10-26 15:33   ` Jayaprakash, N
  2023-10-26 15:45   ` Laszlo Ersek
  1 sibling, 0 replies; 4+ messages in thread
From: Jayaprakash, N @ 2023-10-26 15:33 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: Rebecca Cran, Kinney, Michael D, Kloper, Dimitry

Reviewed-by: Jayaprakash Nevara <n.jayaprakash@intel.com>
It's simple fix to align the function signature as per the standards.

Regards,
JP
-----Original Message-----
From: Jayaprakash, N <n.jayaprakash@intel.com> 
Sent: Thursday, October 26, 2023 7:47 PM
To: devel@edk2.groups.io
Cc: Jayaprakash, N <n.jayaprakash@intel.com>; Rebecca Cran <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Kloper, Dimitry <dimitry.kloper@intel.com>
Subject: [edk2-libc Patch 1/1] ek2-libc: realpath function signature doesn't match the standard

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4574

This commit is for processing the below PR on edk2-libc repo
https://github.com/tianocore/edk2-libc/pull/10
The realpath function signature in stdlib of edk2-libc doesn't match signature as per the standard definition of this function given below https://pubs.opengroup.org/onlinepubs/009695399/functions/realpath.html
This patch extracted from the above pull request fixes this issue.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jayaprakash N <n.jayaprakash@intel.com>
Signed-off-by: Kloper Dimitry <dimitry.kloper@intel.com>
---
 StdLib/Include/stdlib.h       | 4 ++--
 StdLib/LibC/StdLib/realpath.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/StdLib/Include/stdlib.h b/StdLib/Include/stdlib.h index 0b9dfd3..022ddbd 100644
--- a/StdLib/Include/stdlib.h
+++ b/StdLib/Include/stdlib.h
@@ -74,7 +74,7 @@
                            const wchar_t * __restrict src, size_t limit);
 
     ################  Miscelaneous functions for *nix compatibility
-    char       *realpath    (char *file_name, char *resolved_name);
+    char       *realpath    (const char *file_name, char *resolved_name);
     const char *getprogname (void);
     void        setprogname (const char *progname);
 
@@ -875,7 +875,7 @@ size_t  wcstombs(char * __restrict Dest, const wchar_t * __restrict Src, size_t
     @retval NULL                    An error occured.
     @retval resolved_name.
 **/
-char * realpath(char *file_name, char *resolved_name);
+char * realpath(const char *file_name, char *resolved_name);
 
 /** The getprogname() function returns the name of the program.  If the name
     has not been set yet, it will return NULL.
diff --git a/StdLib/LibC/StdLib/realpath.c b/StdLib/LibC/StdLib/realpath.c index 3d4118d..29abe9a 100644
--- a/StdLib/LibC/StdLib/realpath.c
+++ b/StdLib/LibC/StdLib/realpath.c
@@ -34,7 +34,7 @@
 **/
 char *
 realpath(
-  char *file_name,
+  const char *file_name,
   char *resolved_name
   )
 {
--
2.40.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110121): https://edk2.groups.io/g/devel/message/110121
Mute This Topic: https://groups.io/mt/102200532/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: realpath function signature doesn't match the standard
  2023-10-26 14:17 ` [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: realpath function signature doesn't match the standard Jayaprakash, N
  2023-10-26 15:33   ` Jayaprakash, N
@ 2023-10-26 15:45   ` Laszlo Ersek
  1 sibling, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2023-10-26 15:45 UTC (permalink / raw)
  To: devel, n.jayaprakash; +Cc: Rebecca Cran, Michael D Kinney, Kloper Dimitry

On 10/26/23 16:17, Jayaprakash, N wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4574
> 
> This commit is for processing the below PR on edk2-libc repo
> https://github.com/tianocore/edk2-libc/pull/10
> The realpath function signature in stdlib of edk2-libc doesn't match
> signature as per the standard definition of this function given below
> https://pubs.opengroup.org/onlinepubs/009695399/functions/realpath.html
> This patch extracted from the above pull request fixes this issue.
> 
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Jayaprakash N <n.jayaprakash@intel.com>
> Signed-off-by: Kloper Dimitry <dimitry.kloper@intel.com>
> ---
>  StdLib/Include/stdlib.h       | 4 ++--
>  StdLib/LibC/StdLib/realpath.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/StdLib/Include/stdlib.h b/StdLib/Include/stdlib.h
> index 0b9dfd3..022ddbd 100644
> --- a/StdLib/Include/stdlib.h
> +++ b/StdLib/Include/stdlib.h
> @@ -74,7 +74,7 @@
>                             const wchar_t * __restrict src, size_t limit);
>  
>      ################  Miscelaneous functions for *nix compatibility
> -    char       *realpath    (char *file_name, char *resolved_name);
> +    char       *realpath    (const char *file_name, char *resolved_name);
>      const char *getprogname (void);
>      void        setprogname (const char *progname);
>  
> @@ -875,7 +875,7 @@ size_t  wcstombs(char * __restrict Dest, const wchar_t * __restrict Src, size_t
>      @retval NULL                    An error occured.
>      @retval resolved_name.
>  **/
> -char * realpath(char *file_name, char *resolved_name);
> +char * realpath(const char *file_name, char *resolved_name);
>  
>  /** The getprogname() function returns the name of the program.  If the name
>      has not been set yet, it will return NULL.
> diff --git a/StdLib/LibC/StdLib/realpath.c b/StdLib/LibC/StdLib/realpath.c
> index 3d4118d..29abe9a 100644
> --- a/StdLib/LibC/StdLib/realpath.c
> +++ b/StdLib/LibC/StdLib/realpath.c
> @@ -34,7 +34,7 @@
>  **/
>  char *
>  realpath(
> -  char *file_name,
> +  const char *file_name,
>    char *resolved_name
>    )
>  {

Reviewed-by: Laszlo Ersek <lersek@redhat.com>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110124): https://edk2.groups.io/g/devel/message/110124
Mute This Topic: https://groups.io/mt/102200532/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-26 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26 14:17 [edk2-devel] [edk2-libc Patch 0/1] realpath function signature doesn't match standard Jayaprakash, N
2023-10-26 14:17 ` [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: realpath function signature doesn't match the standard Jayaprakash, N
2023-10-26 15:33   ` Jayaprakash, N
2023-10-26 15:45   ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox