Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:manfred999
djgpp-dosutils
utod.c.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File utod.c.patch of Package djgpp-dosutils
--- utod.c.orig 2020-01-10 12:21:18.657192454 +0100 +++ utod.c 2024-04-27 00:11:41.838225226 +0200 @@ -6,6 +6,11 @@ /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ /* Modified by A.Pavenis to work also in different Unix clones */ + +/* for 32bit applications, we want 64bit */ +#define _LARGEFILE_SOURCE +#define _FILE_OFFSET_BITS 64 + #include <stdio.h> #include <fcntl.h> #include <sys/stat.h> @@ -22,9 +27,11 @@ static int utod(char *fname) { - int i, k, sf, df, l, l2=0, err=0, iscr=0; + int sf, df, err=0, iscr=0; + ssize_t i, k, l, l2 = 0; char buf[16384], buf2[32768]; char tfname[FILENAME_MAX], *bn, *w; + char suffix[20]; struct stat st; struct utimbuf tim1; @@ -44,7 +51,8 @@ utod(char *fname) if (*w=='/' || *w=='\\' || *w==':') bn = w+1; if (bn) *bn=0; - strcat (tfname,"utod.tm$"); + sprintf (suffix, "utod.tm$.%d", getpid()); + strcat (tfname, suffix); df = open(tfname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644); if (df < 0) @@ -62,7 +70,7 @@ utod(char *fname) iscr=(buf[i]==13 ? 1 : 0); buf2[k++]=buf[i]; } - l2=write(df, buf2, k); + l2=write(df, buf2, (size_t)k); if (l2<0) break; if (l2!=k) { err=1; break; } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor