Re: Latest MinGW patch (updated)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:

> Updated patch attached.  Instructions are the same as before, except
> that I've switched over to a slightly more reliable XDR implementation
> which you can download here:
>
> http://www.annexia.org/tmp/xdr-4.0-mingw2-rwmj1.tar.gz
>
> Status: everything compiles.  Final link fails because of some problem
> with the binary GnuTLS library which I got yesterday.

Nice.
+1 with one suggestion:

> Index: src/virsh.c
> ===================================================================
> RCS file: /data/cvs/libvirt/src/virsh.c,v
> retrieving revision 1.118
> diff -u -r1.118 virsh.c
...
> +#ifndef __MINGW32__
> +#define LOGFILE_FLAGS (O_WRONLY | O_APPEND | O_CREAT | O_SYNC)
> +#else
> +#define LOGFILE_FLAGS (O_WRONLY | O_APPEND | O_CREAT)
> +#endif

Instead of that, you can avoid both the duplication and a platform
specific #ifdef:

#ifndef O_SYNC
# define O_SYNC 0
#endif
#define LOGFILE_FLAGS (O_WRONLY | O_APPEND | O_CREAT | O_SYNC)

>      /* log file open */
> -    if ((ctl->log_fd = open(ctl->logfile, O_WRONLY | O_APPEND | O_CREAT | O_SYNC, FILE_MODE)) < 0) {
> +    if ((ctl->log_fd = open(ctl->logfile, LOGFILE_FLAGS, FILE_MODE)) < 0) {
>          vshError(ctl, TRUE, _("failed to open the log file. check the log file path"));

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]