[PATCH][libdvdread] remove needless _LIBC checks from libdvdread
Hi, the first attached patch removes preprocessor checks for _LIBC, because libdvdread is not GNU Libc and does never #define _LIBC. The compiled objects stay the same (checked with md5sum (without debugging info: ./configure2 --disable-debug)). I have tested this patch (that is, the md5.[ch] changes) with MPlayer from svn as well, works the same as before. I did not re-indent the nested #if construct in the 2nd and 3rd hunks of the src/md5.h changes to ease review. This should be done after applying this patch. You can use the second attached patch to do this (use patch -p1). Applying this patch results in cleaner code, which should help in maintaining it. Additionally, a -Wundef warning in MPlayer (from svn) compilation is fixed. This is a more comprehensive than my first proposed patch (see http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/2013-January/001862.html) and replaces it. Thanks, Erik
On Saturday 09 February 2013 16:18:50 Erik Auerswald wrote:
the first attached patch removes preprocessor checks for _LIBC, because libdvdread is not GNU Libc and does never #define _LIBC.
the files you're modifying are copied from elsewhere. hacking away at it gains literally nothing. what exactly is the point ? for getopt.c, it's not like you really improved it -- the file is still full of portability hacks from all over. -mike
Hi, On 02/18/2013 05:55 AM, Mike Frysinger wrote:
On Saturday 09 February 2013 16:18:50 Erik Auerswald wrote:
the first attached patch removes preprocessor checks for _LIBC, because libdvdread is not GNU Libc and does never #define _LIBC.
the files you're modifying are copied from elsewhere.
Copied once, there is nobody trying to keep them up to date. They should have been cleaned up back then, of course. To clarify: it is _not_ the question if upstream changed anything in these files since they were copied. The issue is that taking a random code snapshot and keeping it that way without thought is the very definition of bitrot.
hacking away at it gains literally nothing.
I disagree.
what exactly is the point ? for getopt.c, it's not like you really improved it -- the file is still full of portability hacks from all over.
Every simplification is an improvement. Erik
On Friday 22 February 2013 16:57:49 Erik Auerswald wrote:
On 02/18/2013 05:55 AM, Mike Frysinger wrote:
On Saturday 09 February 2013 16:18:50 Erik Auerswald wrote:
the first attached patch removes preprocessor checks for _LIBC, because libdvdread is not GNU Libc and does never #define _LIBC.
the files you're modifying are copied from elsewhere.
Copied once, there is nobody trying to keep them up to date. They should have been cleaned up back then, of course.
To clarify: it is _not_ the question if upstream changed anything in these files since they were copied. The issue is that taking a random code snapshot and keeping it that way without thought is the very definition of bitrot.
is the code not working ? failing to build ? something else ? if the code is still working, then no, it is not rotting at all. if you did hit a bug, then simply grab a newer version from upstream.
hacking away at it gains literally nothing.
I disagree.
what exactly is the point ? for getopt.c, it's not like you really improved it -- the file is still full of portability hacks from all over.
Every simplification is an improvement.
not really. the point of this code is to not be read directly. it's a generated blob maintained elsewhere. -mike
participants (2)
-
Erik Auerswald -
Mike Frysinger