RE: Feature Branch Windows Build - lib/dup-safer.c & dup
Hi Derek, > From: Derek Price > > >The "dup" function call in "lib/dup-safer.c" has no > >prototype included. Windows Visual C 6.0 does NOT > >implement "dup" but does implement "_dup" as: > > > > int _dup( int handle ); > > > >I've added "#define dup _dup" to "config.h" chain > >but Microsoft provides the prototype in "" > >which is NOT referenced in "lib/dup-safer.c" and > >perhaps should be. > > Are you willing to take this up on GNULIB? Yes, if we still need it but I found another approach. > >I don't know the "m4" stuff and can't provide the > >complete solutions. Suggestions are welcome. > > This won't matter since the configure stuff doesn't run on Windows > anyhow. We just need to get the correct define, in this case probably > HAVE_IO_H, into config.h and only include it when it is present in > dup-safer.c. > > >The warning is below and it could be ignored since > >the assumed and actual return types are the same. > > Alternatively, you could just provide the prototype in > config.h.in.footer too. It turns out these prototypes are expected in "unistd.h" file. The platform doesn't have it so Mark and I created "windows-NT/unistd.h" sometime ago. I committed a patch that dropped prototypes we added in favor of including "direct.h" and "io.h" which is where Microsoft has a lot of what is normally found in "unistd.h" which improved the warning count significantly. > Cheers, Ditto, > Derek Conrad ___ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs
Re: Feature Branch Windows Build - lib/dup-safer.c & dup
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Conrad T. Pino wrote: >Hi All, > >The "dup" function call in "lib/dup-safer.c" has no >prototype included. Windows Visual C 6.0 does NOT >implement "dup" but does implement "_dup" as: > > int _dup( int handle ); > >I've added "#define dup _dup" to "config.h" chain >but Microsoft provides the prototype in "" >which is NOT referenced in "lib/dup-safer.c" and >perhaps should be. Are you willing to take this up on GNULIB? >I don't know the "m4" stuff and can't provide the >complete solutions. Suggestions are welcome. This won't matter since the configure stuff doesn't run on Windows anyhow. We just need to get the correct define, in this case probably HAVE_IO_H, into config.h and only include it when it is present in dup-safer.c. >The warning is below and it could be ignored since >the assumed and actual return types are the same. Alternatively, you could just provide the prototype in config.h.in.footer too. Cheers, Derek -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFClOaWLD1OTBfyMaQRAgeeAKCW+h10H3ycXyKVp6x4c4zNASzlDACfZYuM EKdxgEAkk+A4uJ95YOcxz8g= =0WDE -END PGP SIGNATURE- ___ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs
Feature Branch Windows Build - lib/dup-safer.c & dup
Hi All, The "dup" function call in "lib/dup-safer.c" has no prototype included. Windows Visual C 6.0 does NOT implement "dup" but does implement "_dup" as: int _dup( int handle ); I've added "#define dup _dup" to "config.h" chain but Microsoft provides the prototype in "" which is NOT referenced in "lib/dup-safer.c" and perhaps should be. I don't know the "m4" stuff and can't provide the complete solutions. Suggestions are welcome. The warning is below and it could be ignored since the assumed and actual return types are the same. Best regards, Conrad Pino dup-safer.c h:\conrad\projects\cvs-1.12\lib\dup-safer.c(48) : warning C4013: '_dup' undefined; assuming extern returning int ___ Bug-cvs mailing list Bug-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-cvs