From: <Lar...@ao...> - 2004-05-17 19:43:22
|
The stdio.h in the includes library for MinGW does not contain definitions for large file system file verbs like fseeko and ftello. The CYGWIN version does, however. Can I simply insert the cygwin version of the include directory in PATH before the MinGW version of the include directory? If not, are there plans for porting the LFS I/O verb set to MSYS? |
From: Luke D. <cod...@ho...> - 2004-05-18 02:18:12
|
----- Original Message ----- From: <Lar...@ao...> To: <min...@li...> Sent: Tuesday, May 18, 2004 3:43 AM Subject: [Mingw-users] LFS - use of fseeko vs fseek > The stdio.h in the includes library for MinGW does not contain definitions for large file system file verbs like fseeko and ftello. The CYGWIN version does, however. Can I simply insert the cygwin version of the include directory in PATH before the MinGW version of the include directory? No. Headers are usually no use without the corresponding libraries. > If not, are there plans for porting the LFS I/O verb set to MSYS? I assume you meant to say "porting ... to MinGW" and are using MinGW GCC not msysDVLPR, so the answer is no. If it is possible to implement fseeko() without either access to the fseek() source code or reimplementing fseek() then a patch to support it would probably be accepted. Google found this though: http://gnuwin32.sourceforge.net/packages/libgw32c.htm Luke |
From: Kees Z. <kz...@us...> - 2004-05-18 07:32:40
|
It is easy to implement fseeko64 and ftello64 by means of fsetpos and fgetpos, which work with 64-bit integers. This is how gw32c has implemented them. For lseek64, msvcrt has already _lseeki64. int fseeko64 (fp, offset, whence) FILE* fp; __int64 offset; int whence; { fpos_t pos; if (whence == SEEK_CUR) { fgetpos(fp, &pos); pos += (fpos_t) offset; } else if (whence == SEEK_END) pos = (fpos_t) (_filelengthi64(fileno(fp)) + offset); else if (whence == SEEK_SET) pos = (fpos_t) offset; return fsetpos(fp, &pos); } __int64 ftello64 (fp) FILE *fp; { fpos_t pos; if (fgetpos(fp, &pos)) return (__int64) -1LL; else return ((__int64) pos); } Kees Zeelenberg ----- Oorspronkelijk bericht ----- Van: "Luke Dunstan" <cod...@ho...> Aan: <min...@li...> Verzonden: dinsdag 18 mei 2004 4:18 Onderwerp: Re: [Mingw-users] LFS - use of fseeko vs fseek > > ----- Original Message ----- > From: <Lar...@ao...> > To: <min...@li...> > Sent: Tuesday, May 18, 2004 3:43 AM > Subject: [Mingw-users] LFS - use of fseeko vs fseek > > > > The stdio.h in the includes library for MinGW does not contain definitions > for large file system file verbs like fseeko and ftello. The CYGWIN version > does, however. Can I simply insert the cygwin version of the include > directory in PATH before the MinGW version of the include directory? > > No. Headers are usually no use without the corresponding libraries. > > > If not, are there plans for porting the LFS I/O verb set to MSYS? > > I assume you meant to say "porting ... to MinGW" and are using MinGW GCC not > msysDVLPR, so the answer is no. If it is possible to implement fseeko() > without either access to the fseek() source code or reimplementing fseek() > then a patch to support it would probably be accepted. Google found this > though: > > http://gnuwin32.sourceforge.net/packages/libgw32c.htm > > Luke > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! > http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > > |
From: Earnie B. <ea...@us...> - 2004-05-18 10:33:58
|
So Kees, would you mind putting together a patch to mingwex from the official CVS at sources.redhat.com? Earnie Kees Zeelenberg wrote: >It is easy to implement fseeko64 and ftello64 by means of fsetpos and >fgetpos, >which work with 64-bit integers. This is how gw32c has implemented them. >For lseek64, msvcrt has already _lseeki64. > >int >fseeko64 (fp, offset, whence) > FILE* fp; > __int64 offset; > int whence; >{ > fpos_t pos; > if (whence == SEEK_CUR) { > fgetpos(fp, &pos); > pos += (fpos_t) offset; > } > else if (whence == SEEK_END) > pos = (fpos_t) (_filelengthi64(fileno(fp)) + offset); > else if (whence == SEEK_SET) > pos = (fpos_t) offset; > return fsetpos(fp, &pos); >} > >__int64 >ftello64 (fp) > FILE *fp; >{ > fpos_t pos; > if (fgetpos(fp, &pos)) > return (__int64) -1LL; > else > return ((__int64) pos); >} > >Kees Zeelenberg > > >----- Oorspronkelijk bericht ----- >Van: "Luke Dunstan" <cod...@ho...> >Aan: <min...@li...> >Verzonden: dinsdag 18 mei 2004 4:18 >Onderwerp: Re: [Mingw-users] LFS - use of fseeko vs fseek > > > > >>----- Original Message ----- >>From: <Lar...@ao...> >>To: <min...@li...> >>Sent: Tuesday, May 18, 2004 3:43 AM >>Subject: [Mingw-users] LFS - use of fseeko vs fseek >> >> >> >> >>>The stdio.h in the includes library for MinGW does not contain >>> >>> >definitions > > >>for large file system file verbs like fseeko and ftello. The CYGWIN >> >> >version > > >>does, however. Can I simply insert the cygwin version of the include >>directory in PATH before the MinGW version of the include directory? >> >>No. Headers are usually no use without the corresponding libraries. >> >> >> >>>If not, are there plans for porting the LFS I/O verb set to MSYS? >>> >>> >>I assume you meant to say "porting ... to MinGW" and are using MinGW GCC >> >> >not > > >>msysDVLPR, so the answer is no. If it is possible to implement fseeko() >>without either access to the fseek() source code or reimplementing fseek() >>then a patch to support it would probably be accepted. Google found this >>though: >> >>http://gnuwin32.sourceforge.net/packages/libgw32c.htm >> >>Luke >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: SourceForge.net Broadband >>Sign-up now for SourceForge Broadband and get the fastest >>6.0/768 connection for only $19.95/mo for the first 3 months! >>http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click >>_______________________________________________ >>MinGW-users mailing list >>Min...@li... >> >>You may change your MinGW Account Options or unsubscribe at: >>https://lists.sourceforge.net/lists/listinfo/mingw-users >> >> >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by: SourceForge.net Broadband >Sign-up now for SourceForge Broadband and get the fastest >6.0/768 connection for only $19.95/mo for the first 3 months! >http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click >_______________________________________________ >MinGW-users mailing list >Min...@li... > >You may change your MinGW Account Options or unsubscribe at: >https://lists.sourceforge.net/lists/listinfo/mingw-users > > > > > -- http://www.mingw.org http://sourceforge.net/projects/mingw https://sourceforge.net/donate/index.php?user_id=15438 |
From: Kees Z. <kz...@us...> - 2004-05-18 13:03:28
|
Yes, I will. Should the patch be sent to the Cygwin patches list or the Mingw patches list? Kees ----- Oorspronkelijk bericht ----- Van: "Earnie Boyd" <ea...@us...> Aan: <min...@li...> Verzonden: dinsdag 18 mei 2004 12:33 Onderwerp: Re: [Mingw-users] LFS - use of fseeko vs fseek > So Kees, would you mind putting together a patch to mingwex from the > official CVS at sources.redhat.com? > > Earnie > > Kees Zeelenberg wrote: > > >It is easy to implement fseeko64 and ftello64 by means of fsetpos and > >fgetpos, > >which work with 64-bit integers. This is how gw32c has implemented them. > >For lseek64, msvcrt has already _lseeki64. > > > >int > >fseeko64 (fp, offset, whence) > > FILE* fp; > > __int64 offset; > > int whence; > >{ > > fpos_t pos; > > if (whence == SEEK_CUR) { > > fgetpos(fp, &pos); > > pos += (fpos_t) offset; > > } > > else if (whence == SEEK_END) > > pos = (fpos_t) (_filelengthi64(fileno(fp)) + offset); > > else if (whence == SEEK_SET) > > pos = (fpos_t) offset; > > return fsetpos(fp, &pos); > >} > > > >__int64 > >ftello64 (fp) > > FILE *fp; > >{ > > fpos_t pos; > > if (fgetpos(fp, &pos)) > > return (__int64) -1LL; > > else > > return ((__int64) pos); > >} > > > >Kees Zeelenberg > > > > > >----- Oorspronkelijk bericht ----- > >Van: "Luke Dunstan" <cod...@ho...> > >Aan: <min...@li...> > >Verzonden: dinsdag 18 mei 2004 4:18 > >Onderwerp: Re: [Mingw-users] LFS - use of fseeko vs fseek > > > > > > > > > >>----- Original Message ----- > >>From: <Lar...@ao...> > >>To: <min...@li...> > >>Sent: Tuesday, May 18, 2004 3:43 AM > >>Subject: [Mingw-users] LFS - use of fseeko vs fseek > >> > >> > >> > >> > >>>The stdio.h in the includes library for MinGW does not contain > >>> > >>> > >definitions > > > > > >>for large file system file verbs like fseeko and ftello. The CYGWIN > >> > >> > >version > > > > > >>does, however. Can I simply insert the cygwin version of the include > >>directory in PATH before the MinGW version of the include directory? > >> > >>No. Headers are usually no use without the corresponding libraries. > >> > >> > >> > >>>If not, are there plans for porting the LFS I/O verb set to MSYS? > >>> > >>> > >>I assume you meant to say "porting ... to MinGW" and are using MinGW GCC > >> > >> > >not > > > > > >>msysDVLPR, so the answer is no. If it is possible to implement fseeko() > >>without either access to the fseek() source code or reimplementing fseek() > >>then a patch to support it would probably be accepted. Google found this > >>though: > >> > >>http://gnuwin32.sourceforge.net/packages/libgw32c.htm > >> > >>Luke > >> > >> > >>------------------------------------------------------- > >>This SF.Net email is sponsored by: SourceForge.net Broadband > >>Sign-up now for SourceForge Broadband and get the fastest > >>6.0/768 connection for only $19.95/mo for the first 3 months! > >>http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > >>_______________________________________________ > >>MinGW-users mailing list > >>Min...@li... > >> > >>You may change your MinGW Account Options or unsubscribe at: > >>https://lists.sourceforge.net/lists/listinfo/mingw-users > >> > >> > >> > >> > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by: SourceForge.net Broadband > >Sign-up now for SourceForge Broadband and get the fastest > >6.0/768 connection for only $19.95/mo for the first 3 months! > >http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > >_______________________________________________ > >MinGW-users mailing list > >Min...@li... > > > >You may change your MinGW Account Options or unsubscribe at: > >https://lists.sourceforge.net/lists/listinfo/mingw-users > > > > > > > > > > > > -- > http://www.mingw.org > http://sourceforge.net/projects/mingw > https://sourceforge.net/donate/index.php?user_id=15438 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! > http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > > |
From: Earnie B. <ea...@us...> - 2004-05-18 13:32:42
|
You should submit it here: https://sourceforge.net/tracker/?group_id=2435&atid=302435 Earnie. Kees Zeelenberg wrote: >Yes, I will. Should the patch be sent to the Cygwin patches list or the >Mingw patches list? > >Kees > >----- Oorspronkelijk bericht ----- >Van: "Earnie Boyd" <ea...@us...> >Aan: <min...@li...> >Verzonden: dinsdag 18 mei 2004 12:33 >Onderwerp: Re: [Mingw-users] LFS - use of fseeko vs fseek > > > > >>So Kees, would you mind putting together a patch to mingwex from the >>official CVS at sources.redhat.com? >> >>Earnie >> >>Kees Zeelenberg wrote: >> >> >> >>>It is easy to implement fseeko64 and ftello64 by means of fsetpos and >>>fgetpos, >>>which work with 64-bit integers. This is how gw32c has implemented them. >>>For lseek64, msvcrt has already _lseeki64. >>> >>>int >>>fseeko64 (fp, offset, whence) >>> FILE* fp; >>> __int64 offset; >>> int whence; >>>{ >>> fpos_t pos; >>> if (whence == SEEK_CUR) { >>> fgetpos(fp, &pos); >>> pos += (fpos_t) offset; >>> } >>> else if (whence == SEEK_END) >>> pos = (fpos_t) (_filelengthi64(fileno(fp)) + offset); >>> else if (whence == SEEK_SET) >>> pos = (fpos_t) offset; >>> return fsetpos(fp, &pos); >>>} >>> >>>__int64 >>>ftello64 (fp) >>> FILE *fp; >>>{ >>> fpos_t pos; >>> if (fgetpos(fp, &pos)) >>> return (__int64) -1LL; >>> else >>> return ((__int64) pos); >>>} >>> >>>Kees Zeelenberg >>> >>> >>>----- Oorspronkelijk bericht ----- >>>Van: "Luke Dunstan" <cod...@ho...> >>>Aan: <min...@li...> >>>Verzonden: dinsdag 18 mei 2004 4:18 >>>Onderwerp: Re: [Mingw-users] LFS - use of fseeko vs fseek >>> >>> >>> >>> >>> >>> >>>>----- Original Message ----- >>>>From: <Lar...@ao...> >>>>To: <min...@li...> >>>>Sent: Tuesday, May 18, 2004 3:43 AM >>>>Subject: [Mingw-users] LFS - use of fseeko vs fseek >>>> >>>> >>>> >>>> >>>> >>>> >>>>>The stdio.h in the includes library for MinGW does not contain >>>>> >>>>> >>>>> >>>>> >>>definitions >>> >>> >>> >>> >>>>for large file system file verbs like fseeko and ftello. The CYGWIN >>>> >>>> >>>> >>>> >>>version >>> >>> >>> >>> >>>>does, however. Can I simply insert the cygwin version of the include >>>>directory in PATH before the MinGW version of the include directory? >>>> >>>>No. Headers are usually no use without the corresponding libraries. >>>> >>>> >>>> >>>> >>>> >>>>>If not, are there plans for porting the LFS I/O verb set to MSYS? >>>>> >>>>> >>>>> >>>>> >>>>I assume you meant to say "porting ... to MinGW" and are using MinGW GCC >>>> >>>> >>>> >>>> >>>not >>> >>> >>> >>> >>>>msysDVLPR, so the answer is no. If it is possible to implement fseeko() >>>>without either access to the fseek() source code or reimplementing >>>> >>>> >fseek() > > >>>>then a patch to support it would probably be accepted. Google found this >>>>though: >>>> >>>>http://gnuwin32.sourceforge.net/packages/libgw32c.htm >>>> >>>>Luke >>>> >>>> >>>>------------------------------------------------------- >>>>This SF.Net email is sponsored by: SourceForge.net Broadband >>>>Sign-up now for SourceForge Broadband and get the fastest >>>>6.0/768 connection for only $19.95/mo for the first 3 months! >>>>http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click >>>>_______________________________________________ >>>>MinGW-users mailing list >>>>Min...@li... >>>> >>>>You may change your MinGW Account Options or unsubscribe at: >>>>https://lists.sourceforge.net/lists/listinfo/mingw-users >>>> >>>> >>>> >>>> >>>> >>>> >>> >>>------------------------------------------------------- >>>This SF.Net email is sponsored by: SourceForge.net Broadband >>>Sign-up now for SourceForge Broadband and get the fastest >>>6.0/768 connection for only $19.95/mo for the first 3 months! >>>http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click >>>_______________________________________________ >>>MinGW-users mailing list >>>Min...@li... >>> >>>You may change your MinGW Account Options or unsubscribe at: >>>https://lists.sourceforge.net/lists/listinfo/mingw-users >>> >>> >>> >>> >>> >>> >>> >>-- >>http://www.mingw.org >>http://sourceforge.net/projects/mingw >>https://sourceforge.net/donate/index.php?user_id=15438 >> >> >> >>------------------------------------------------------- >>This SF.Net email is sponsored by: SourceForge.net Broadband >>Sign-up now for SourceForge Broadband and get the fastest >>6.0/768 connection for only $19.95/mo for the first 3 months! >>http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click >>_______________________________________________ >>MinGW-users mailing list >>Min...@li... >> >>You may change your MinGW Account Options or unsubscribe at: >>https://lists.sourceforge.net/lists/listinfo/mingw-users >> >> >> >> > > > >------------------------------------------------------- >This SF.Net email is sponsored by: SourceForge.net Broadband >Sign-up now for SourceForge Broadband and get the fastest >6.0/768 connection for only $19.95/mo for the first 3 months! >http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click >_______________________________________________ >MinGW-users mailing list >Min...@li... > >You may change your MinGW Account Options or unsubscribe at: >https://lists.sourceforge.net/lists/listinfo/mingw-users > > > > > -- http://www.mingw.org http://sourceforge.net/projects/mingw https://sourceforge.net/donate/index.php?user_id=15438 |
From: Luke D. <cod...@ho...> - 2004-05-18 14:20:20
|
Preferably the patch tracker on the MinGW SourceForge page. Luke ----- Original Message ----- From: "Kees Zeelenberg" <kz...@us...> To: <min...@li...> Sent: Tuesday, May 18, 2004 9:03 PM Subject: Re: [Mingw-users] LFS - use of fseeko vs fseek > Yes, I will. Should the patch be sent to the Cygwin patches list or the > Mingw patches list? > > Kees > > ----- Oorspronkelijk bericht ----- > Van: "Earnie Boyd" <ea...@us...> > Aan: <min...@li...> > Verzonden: dinsdag 18 mei 2004 12:33 > Onderwerp: Re: [Mingw-users] LFS - use of fseeko vs fseek > > > > So Kees, would you mind putting together a patch to mingwex from the > > official CVS at sources.redhat.com? > > > > Earnie > > > > Kees Zeelenberg wrote: > > > > >It is easy to implement fseeko64 and ftello64 by means of fsetpos and > > >fgetpos, > > >which work with 64-bit integers. This is how gw32c has implemented them. > > >For lseek64, msvcrt has already _lseeki64. > > > |