slang-users mailing list

[2015 Date Index] [2015 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] [PATCH 1/3] Rename posix_close() function to posix_close_slfile()


posix_close() is a function that will be implemented as part of an
upcoming of the POSIX standard. For this reason, the musl C library
has already started implementing this function call. Unfortunately,
since slang already defines a function with the same name, it cannot
build properly with the musl C library.

This commit fixes that by renaming the slang function to
posix_close_slfile().

This patch has been taken from the Alpine Linux repository, at
http://git.alpinelinux.org/cgit/aports/plain/main/slang/musl-fix-posix_close-clash.patch.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>
---
 src/slposio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/slposio.c b/src/slposio.c
index 94f20dd..475e2c9 100644
--- a/src/slposio.c
+++ b/src/slposio.c
@@ -372,7 +372,7 @@ static int posix_close_fd (int *fd)
    return 0;
 }
 
-static int posix_close (SLFile_FD_Type *f)
+static int posix_close_slfile (SLFile_FD_Type *f)
 {
    int status = do_close (f);
 
@@ -1011,7 +1011,7 @@ static SLang_Intrin_Fun_Type Fd_Name_Table [] =
    MAKE_INTRINSIC_2("write", posix_write, V, F, B),
    MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F),
    MAKE_INTRINSIC_2("dup2_fd", posix_dup2, I, F, I),
-   MAKE_INTRINSIC_1("close", posix_close, I, F),
+   MAKE_INTRINSIC_1("close", posix_close_slfile, I, F),
    MAKE_INTRINSIC_1("_close", posix_close_fd, I, I),
 #if defined(TTYNAME_R)
    MAKE_INTRINSIC_0("ttyname", posix_ttyname, V),
-- 
2.6.3

_______________________________________________
For list information, visit <http://jedsoft.org/slang/mailinglists.html>.


[2015 date index] [2015 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]