[vorbis-dev] Please gix getopt
Jeff Squyres
jsquyres at lsc.nd.edu
Sun Feb 11 15:56:22 PST 2001
On Sun, 11 Feb 2001, Ralph Giles wrote:
> > 2. Summary: getopt.c, getopt.h, and getopt1.c are included in both oggenc
> > and ogg123. It seems that vorbiscomment uses getopt_long(), so it seems
> > that vorbiscomment needs them too. But including them in vorbiscomment is
> > a mistake (IMO); a better solution should be used.
>
> So I've said. A patch would be more helpful. :-)
Actually, I chatted with others on #vorbis today, and there was
more-or-less agreement that this might be a good idea (I won't speak for
anyone specifically -- chime in if you dis/agree).
a) the getopt* files should be moved into vorbis-tools/getopt/
b) all the types and symbols should be renamed to have an "ov_" prefix
c) they should be compiled into libovgetopt.a (no need for shared)
d) oggenc, ogg123, and vorbiscomment should -lovgetopt
This accomplishes several things:
- abolishes the need for multiple copies of the same files
- prevents the possibility of "multiple definition of symbol 'getopt'"
kinds of errors
- the library part is nice, clean, portable, and trivial to do in automake
----------------------------------
I've attached two files. Please try them out; I think I make everything
work properly, but more eyes are better than two.
- ov_getopt.tar.gz. Unzip this in vorbis-tools.
- makes a getopt/ subdirectory
- contains Makefile.am, Makefile.in, ov_getopt.c, ov_getopt.h, and
ov_getopt1.c
- ov_diff.out. Apply this in vorbis-tools (-p0).
- changes all symbols in ogg123, oggenc, and vorbiscomment to have the
"ov_" prefix
- does appropriate Makefile.am frobbing to -lovgetopt
- does appropriate configure.in frobbing to generate getopt/Makefile
Be sure to re-run autoconf and friends, and then re-./configure and
"make".
Comments?
{+} Jeff Squyres
{+} squyres at cse.nd.edu
{+} Perpetual Obsessive Notre Dame Student Craving Utter Madness
{+} "I came to ND for 4 years and ended up staying for a decade"
<HR NOSHADE>
<UL>
<LI>APPLICATION/octet-stream attachment: ov_getopt.tar.gz
</UL>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ov_getopt.tar.gz
Type: application/octet-stream
Size: 13826 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010211/b523a3e4/ov_getopt.tar.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ov_diff.out
Type: application/octet-stream
Size: 8930 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20010211/b523a3e4/ov_diff.obj
More information about the Vorbis-dev
mailing list