1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-05 15:30:44 +00:00

xstack bump to 512

This commit is contained in:
rumbledethumps 2024-02-17 15:47:51 -08:00
parent b8b263b38c
commit f42e6a26b2
4 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ int __fastcall__ read (int fildes, void* buf, unsigned count)
{ {
int total = 0; int total = 0;
while (count) { while (count) {
unsigned blockcount = (count > 256) ? 256 : count; unsigned blockcount = (count > 512) ? 512 : count;
int bytes_read = read_xstack (&((char*)buf)[total], blockcount, fildes); int bytes_read = read_xstack (&((char*)buf)[total], blockcount, fildes);
if (bytes_read < 0) { if (bytes_read < 0) {
return bytes_read; return bytes_read;

View File

@ -7,7 +7,7 @@ unsigned char __fastcall__ _sysrename (const char* oldpath, const char* newpath)
size_t oldpathlen, newpathlen; size_t oldpathlen, newpathlen;
oldpathlen = strlen (oldpath); oldpathlen = strlen (oldpath);
newpathlen = strlen (newpath); newpathlen = strlen (newpath);
if (oldpathlen + newpathlen > 254) { if (oldpathlen + newpathlen > 510) {
return _mappederrno (EINVAL); return _mappederrno (EINVAL);
} }
while (oldpathlen) { while (oldpathlen) {

View File

@ -5,7 +5,7 @@ int __fastcall__ write (int fildes, const void* buf, unsigned count)
{ {
int ax, total = 0; int ax, total = 0;
while (count) { while (count) {
int blockcount = (count > 256) ? 256 : count; int blockcount = (count > 512) ? 512 : count;
ax = write_xstack (&((char*)buf)[total], blockcount, fildes); ax = write_xstack (&((char*)buf)[total], blockcount, fildes);
if (ax < 0) { if (ax < 0) {
return ax; return ax;

View File

@ -4,7 +4,7 @@
int __fastcall__ write_xstack (const void* buf, unsigned count, int fildes) int __fastcall__ write_xstack (const void* buf, unsigned count, int fildes)
{ {
unsigned i; unsigned i;
if (count > 256) { if (count > 512) {
return _mappederrno (EINVAL); return _mappederrno (EINVAL);
} }
for (i = count; i;) { for (i = count; i;) {