Skip to content

Commit c32fb16

Browse files
committed
crt headers: add const qualifiers in crt/sys/win32/stat.bi, crt/win32/stdio.bi
1 parent 6183f8a commit c32fb16

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Version 1.09.0
77
- crt headers: guard some definitions in crt/sys/win32/stat.bi to avoid collisions of 'stat' and 'chmod' with some other crt headers
88
- crt headers: add const qualifiers in crt/stdlib.bi
99
- crt headers: add const qualifiers in crt/stdio.bi, crt/sys/stat.bi, crt/wchar.bi
10+
- crt headers: add const qualifiers in crt/sys/win32/stat.bi, crt/win32/stdio.bi
1011

1112
[added]
1213
- fbc: add '-z fbrt' command line option to link against libfbrt*.a instead of libfb*.a

inc/crt/sys/win32/stat.bi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@ extern "C"
6666
declare function _fstat (byval as long, byval as _stat ptr) as long
6767

6868
#ifndef _chmod
69-
declare function _chmod (byval as zstring ptr, byval as long) as long
69+
declare function _chmod (byval as const zstring ptr, byval as long) as long
7070
#endif
7171

72-
declare function _stat (byval as zstring ptr, byval as _stat ptr) as long
72+
declare function _stat (byval as const zstring ptr, byval as _stat ptr) as long
7373
declare function _fstati64 (byval as long, byval as _stati64 ptr) as long
74-
declare function _stati64 (byval as zstring ptr, byval as _stati64 ptr) as long
74+
declare function _stati64 (byval as const zstring ptr, byval as _stati64 ptr) as long
7575

7676
#ifndef _wstat
77-
declare function _wstat (byval as wchar_t ptr, byval as _stat ptr) as long
77+
declare function _wstat (byval as const wchar_t ptr, byval as _stat ptr) as long
7878
#endif
7979

8080
#ifndef _wstati64
81-
declare function _wstati64 (byval as wchar_t ptr, byval as _stati64 ptr) as long
81+
declare function _wstati64 (byval as const wchar_t ptr, byval as _stati64 ptr) as long
8282
#endif
8383

8484
end extern

inc/crt/win32/stdio.bi

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,32 @@ extern "c"
5858

5959
type fpos_t as longint
6060

61-
declare function snprintf (byval as zstring ptr, byval as size_t, byval as zstring ptr, ...) as long
62-
declare function vsnprintf (byval as zstring ptr, byval as size_t, byval as zstring ptr, byval as va_list) as long
63-
declare function popen (byval as zstring ptr, byval as zstring ptr) as FILE ptr
61+
declare function snprintf (byval as zstring ptr, byval as size_t, byval as const zstring ptr, ...) as long
62+
declare function vsnprintf (byval as zstring ptr, byval as size_t, byval as const zstring ptr, byval as va_list) as long
63+
declare function popen (byval as const zstring ptr, byval as const zstring ptr) as FILE ptr
6464
declare function pclose (byval as FILE ptr) as long
6565
declare function _flushall () as long
6666
declare function _fgetchar () as long
6767
declare function _fputchar (byval as long) as long
68-
declare function _fdopen (byval as long, byval as zstring ptr) as FILE ptr
68+
declare function _fdopen (byval as long, byval as const zstring ptr) as FILE ptr
6969
declare function _fileno (byval as FILE ptr) as long
7070
declare function _fcloseall () as long
7171
declare function _getmaxstdio () as long
7272
declare function _setmaxstdio (byval as long) as long
73-
declare function _snwprintf (byval as wchar_t ptr, byval as size_t, byval as wchar_t ptr, ...) as long
74-
declare function _vsnwprintf (byval as wchar_t ptr, byval as size_t, byval as wchar_t ptr, byval as va_list) as long
73+
declare function _snwprintf (byval as wchar_t ptr, byval as size_t, byval as const wchar_t ptr, ...) as long
74+
declare function _vsnwprintf (byval as wchar_t ptr, byval as size_t, byval as const wchar_t ptr, byval as va_list) as long
7575
declare function _getws (byval as wchar_t ptr) as wchar_t ptr
76-
declare function _putws (byval as wchar_t ptr) as long
77-
declare function _wfdopen (byval as long, byval as wchar_t ptr) as FILE ptr
78-
declare function _wfopen (byval as wchar_t ptr, byval as wchar_t ptr) as FILE ptr
79-
declare function _wfreopen (byval as wchar_t ptr, byval as wchar_t ptr, byval as FILE ptr) as FILE ptr
80-
declare function _wfsopen (byval as wchar_t ptr, byval as wchar_t ptr, byval as long) as FILE ptr
76+
declare function _putws (byval as const wchar_t ptr) as long
77+
declare function _wfdopen (byval as long, byval as const wchar_t ptr) as FILE ptr
78+
declare function _wfopen (byval as const wchar_t ptr, byval as const wchar_t ptr) as FILE ptr
79+
declare function _wfreopen (byval as const wchar_t ptr, byval as const wchar_t ptr, byval as FILE ptr) as FILE ptr
80+
declare function _wfsopen (byval as const wchar_t ptr, byval as const wchar_t ptr, byval as long) as FILE ptr
8181
declare function _wtmpnam (byval as wchar_t ptr) as wchar_t ptr
8282
declare function _wtempnam (byval as wchar_t ptr, byval as wchar_t ptr) as wchar_t ptr
83-
declare function _wrename (byval as wchar_t ptr, byval as wchar_t ptr) as long
84-
declare function _wremove (byval as wchar_t ptr) as long
85-
declare sub _wperror (byval as wchar_t ptr)
86-
declare function _wpopen (byval as wchar_t ptr, byval as wchar_t ptr) as FILE ptr
83+
declare function _wrename (byval as const wchar_t ptr, byval as const wchar_t ptr) as long
84+
declare function _wremove (byval as const wchar_t ptr) as long
85+
declare sub _wperror (byval as const wchar_t ptr)
86+
declare function _wpopen (byval as const wchar_t ptr, byval as const wchar_t ptr) as FILE ptr
8787
declare function _fgetwchar () as wint_t
8888
declare function _fputwchar (byval as wint_t) as wint_t
8989
declare function _tempnam (byval as zstring ptr, byval as zstring ptr) as zstring ptr

0 commit comments

Comments
 (0)