]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR modula2/118010 m2 libc lseek procedure interface correction
authorGaius Mulley <gaiusmod2@gmail.com>
Sat, 25 Jan 2025 02:28:13 +0000 (02:28 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Sat, 25 Jan 2025 02:28:13 +0000 (02:28 +0000)
This patch corrects a typo in the definition of lseek in libc.
The second offset parameter should have been declared as COFF_T.
No errors are seen when bootstrapping using -Werror=odr
-Werror=lto-type-mismatch.

gcc/m2/ChangeLog:

PR modula2/118010
* gm2-compiler/P2SymBuild.mod (Debug): Comment out unused
procedure.
* gm2-libs/libc.def (lseek): Declare second parameter offset
as COFF_T.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/P2SymBuild.mod
gcc/m2/gm2-libs/libc.def

index 1b59f3d631b6fae109e4ecc39e306899ce50febb..8f3b4995ac88a1ad5ad50e3861216621d08bfb1b 100644 (file)
@@ -182,6 +182,7 @@ PROCEDURE stop ; BEGIN END stop ;
    Debug - call stop if symbol name is name.
 *)
 
+(*
 PROCEDURE Debug (tok: CARDINAL; sym: CARDINAL; name: ARRAY OF CHAR) ;
 BEGIN
    IF MakeKey (name) = GetSymName (sym)
@@ -190,6 +191,7 @@ BEGIN
    END ;
    MetaErrorT1 (tok, 'procedure {%1Wa}', sym)
 END Debug ;
+*)
 
 
 (*
index f1f13ddd9aebb6ace9f9f02d409b502788dd57c7..525d016459001af64319b104f134384206f904f8 100644 (file)
@@ -311,7 +311,7 @@ PROCEDURE creat (filename: ADDRESS; mode: CARDINAL) : INTEGER;
            off_t lseek(int fildes, off_t offset, int whence);
 *)
 
-PROCEDURE lseek (fd: INTEGER; offset: CSSIZE_T; whence: INTEGER) : [ COFF_T ] ;
+PROCEDURE lseek (fd: INTEGER; offset: COFF_T; whence: INTEGER) : [ COFF_T ] ;
 
 
 (*