[xiph-cvs] cvs commit: vorbis-tools/vorbiscomment vcomment.c
Segher Boessenkool
segher at chello.nl
Sun Jan 27 04:58:53 PST 2002
Okay, I cooled down.
You missed some discussion, Michael. That rename() thing doesn't work
with the semantics you expect, on non-posix systems, so if you want it
to work on win32, for example, you need to add some guarded code.
There are several other things that don't work correctly on win32, as well.
(Like, -c etc.)
Please put the patch back in.
<p>Segher
<p>Michael Smith wrote:
>
> msmith 02/01/26 20:35:46
>
> Modified: vorbiscomment vcomment.c
> Log:
> If it isn't portable, DON'T COMMIT IT TO HEAD.
> Grr.
>
> Revision Changes Path
> 1.19 +1 -10 vorbis-tools/vorbiscomment/vcomment.c
>
> Index: vcomment.c
> ===================================================================
> RCS file: /usr/local/cvsroot/vorbis-tools/vorbiscomment/vcomment.c,v
> retrieving revision 1.18
> retrieving revision 1.19
> diff -u -r1.18 -r1.19
> --- vcomment.c 2002/01/26 11:06:43 1.18
> +++ vcomment.c 2002/01/27 04:35:46 1.19
> @@ -12,9 +12,6 @@
> #include <stdio.h>
> #include <string.h>
> #include <stdlib.h>
> -#include <sys/types.h>
> -#include <sys/stat.h>
> -#include <unistd.h>
> #include <locale.h>
> #include "getopt.h"
> #include "utf8.h"
> @@ -487,12 +484,6 @@
> if (p->out != NULL && p->out != stdout) fclose(p->out);
> if (p->com != NULL && p->com != stdout && p->com != stdin) fclose(p->com);
>
> - if(p->tempoutfile) {
> - /* this is not portable to non-posix systems */
> - struct stat st;
> -
> - stat(p->infilename, &st);
> + if(p->tempoutfile)
> rename(p->outfilename, p->infilename);
> - chmod(p->infilename, st.st_mode);
> - }
> }
>
> --- >8 ----
> List archives: http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
> containing only the word 'unsubscribe' in the body. No subject is needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
<p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list