Author: diego Date: Thu Feb 28 19:31:35 2008 New Revision: 26111 Log: TARGET_OS2 is never set, use __OS2__ instead. Modified: trunk/mp_msg.h Modified: trunk/mp_msg.h ============================================================================== --- trunk/mp_msg.h (original) +++ trunk/mp_msg.h Thu Feb 28 19:31:35 2008 @@ -111,7 +111,7 @@ int mp_msg_test(int mod, int lev); #include "config.h" -#ifdef TARGET_OS2 +#ifdef __OS2__ // va_start/vsnprintf seems to be broken under OS2 :( #define mp_msg(mod,lev, fmt, args... ) do{if((lev)<=mp_msg_levels[mod]) printf( fmt, ## args );}while(0) #define mp_dbg(mod,lev, args... ) @@ -135,6 +135,6 @@ void mp_msg(int mod, int lev, const char const char* filename_recode(const char* filename); -#endif /* TARGET_OS2 */ +#endif /* __OS2__ */ #endif /* MPLAYER_MP_MSG_H */
On Thu, Feb 28, 2008 at 07:31:35PM +0100, diego wrote:
Author: diego Date: Thu Feb 28 19:31:35 2008 New Revision: 26111
Log: TARGET_OS2 is never set, use __OS2__ instead.
Modified: trunk/mp_msg.h
Modified: trunk/mp_msg.h ============================================================================== --- trunk/mp_msg.h (original) +++ trunk/mp_msg.h Thu Feb 28 19:31:35 2008 @@ -111,7 +111,7 @@ int mp_msg_test(int mod, int lev);
#include "config.h"
-#ifdef TARGET_OS2 +#ifdef __OS2__
Again, I'm against this general class of change. I've explained the reasoning many times! Would you please honor that or at least discuss it rather than continuing these bad commits? Rich
On Thu, Feb 28, 2008 at 10:53:06PM -0500, Rich Felker wrote:
On Thu, Feb 28, 2008 at 07:31:35PM +0100, diego wrote:
Log: TARGET_OS2 is never set, use __OS2__ instead.
--- trunk/mp_msg.h (original) +++ trunk/mp_msg.h Thu Feb 28 19:31:35 2008 @@ -111,7 +111,7 @@ int mp_msg_test(int mod, int lev);
-#ifdef TARGET_OS2 +#ifdef __OS2__
Again, I'm against this general class of change. I've explained the reasoning many times! Would you please honor that or at least discuss it rather than continuing these bad commits?
I've discussed it before, I get tired of repeating it: I have little interest in discussing your theories. There is no practical alternative to what I committed. If you disagree: Patches welcome. Diego
On Sat, Mar 01, 2008 at 11:38:23AM +0100, Diego Biurrun wrote:
On Thu, Feb 28, 2008 at 10:53:06PM -0500, Rich Felker wrote:
On Thu, Feb 28, 2008 at 07:31:35PM +0100, diego wrote:
Log: TARGET_OS2 is never set, use __OS2__ instead.
--- trunk/mp_msg.h (original) +++ trunk/mp_msg.h Thu Feb 28 19:31:35 2008 @@ -111,7 +111,7 @@ int mp_msg_test(int mod, int lev);
-#ifdef TARGET_OS2 +#ifdef __OS2__
Again, I'm against this general class of change. I've explained the reasoning many times! Would you please honor that or at least discuss it rather than continuing these bad commits?
I've discussed it before, I get tired of repeating it: I have little interest in discussing your theories. There is no practical alternative to what I committed.
If you disagree: Patches welcome.
I could write the code to detect OS2 and add #define TARGET_OS2 in configure, but I figure you're more qualified as the configure script maintainer and someone familiar with it... While you're fixing the problem described in this commit, you might as well fix it right.. Rich
On Sat, Mar 01, 2008 at 11:35:08PM -0500, Rich Felker wrote:
On Sat, Mar 01, 2008 at 11:38:23AM +0100, Diego Biurrun wrote:
On Thu, Feb 28, 2008 at 10:53:06PM -0500, Rich Felker wrote:
On Thu, Feb 28, 2008 at 07:31:35PM +0100, diego wrote:
Log: TARGET_OS2 is never set, use __OS2__ instead.
--- trunk/mp_msg.h (original) +++ trunk/mp_msg.h Thu Feb 28 19:31:35 2008 @@ -111,7 +111,7 @@ int mp_msg_test(int mod, int lev);
-#ifdef TARGET_OS2 +#ifdef __OS2__
Again, I'm against this general class of change. I've explained the reasoning many times! Would you please honor that or at least discuss it rather than continuing these bad commits?
I've discussed it before, I get tired of repeating it: I have little interest in discussing your theories. There is no practical alternative to what I committed.
If you disagree: Patches welcome.
I could write the code to detect OS2 and add #define TARGET_OS2 in configure, but I figure you're more qualified as the configure script maintainer and someone familiar with it... While you're fixing the problem described in this commit, you might as well fix it right..
Most of these are hacks anyway, they are not only specific to OS2 but possibly as well to the compiler and libc. I can not really see why Diego should waste his time writing a configure check that likely isn't any more reliable than this. I'm sure there are quite a few things that could need a real configure check and would actually provide an advantage, like a way to disable asm without unsetting ARCH completely and other things. Greetings, Reimar Döffinger
On Sat, Mar 01, 2008 at 11:35:08PM -0500, Rich Felker wrote:
On Sat, Mar 01, 2008 at 11:38:23AM +0100, Diego Biurrun wrote:
On Thu, Feb 28, 2008 at 10:53:06PM -0500, Rich Felker wrote:
On Thu, Feb 28, 2008 at 07:31:35PM +0100, diego wrote:
Log: TARGET_OS2 is never set, use __OS2__ instead.
--- trunk/mp_msg.h (original) +++ trunk/mp_msg.h Thu Feb 28 19:31:35 2008 @@ -111,7 +111,7 @@ int mp_msg_test(int mod, int lev);
-#ifdef TARGET_OS2 +#ifdef __OS2__
Again, I'm against this general class of change. I've explained the reasoning many times! Would you please honor that or at least discuss it rather than continuing these bad commits?
I've discussed it before, I get tired of repeating it: I have little interest in discussing your theories. There is no practical alternative to what I committed.
If you disagree: Patches welcome.
I could write the code to detect OS2 and add #define TARGET_OS2 in configure, but I figure you're more qualified as the configure script maintainer and someone familiar with it... While you're fixing the problem described in this commit, you might as well fix it right..
I don't see what we would gain by using TARGET_OS2 instead of __OS2__. Also, if we would want to start going down that route, we have a hell of a lot of stuff to fix. Anyway, the code we are talking about here is gone now. Diego
On Sun, Mar 02, 2008 at 07:32:57PM +0100, Diego Biurrun wrote:
On Sat, Mar 01, 2008 at 11:35:08PM -0500, Rich Felker wrote:
On Sat, Mar 01, 2008 at 11:38:23AM +0100, Diego Biurrun wrote:
On Thu, Feb 28, 2008 at 10:53:06PM -0500, Rich Felker wrote:
On Thu, Feb 28, 2008 at 07:31:35PM +0100, diego wrote:
Log: TARGET_OS2 is never set, use __OS2__ instead.
--- trunk/mp_msg.h (original) +++ trunk/mp_msg.h Thu Feb 28 19:31:35 2008 @@ -111,7 +111,7 @@ int mp_msg_test(int mod, int lev);
-#ifdef TARGET_OS2 +#ifdef __OS2__
Again, I'm against this general class of change. I've explained the reasoning many times! Would you please honor that or at least discuss it rather than continuing these bad commits?
I've discussed it before, I get tired of repeating it: I have little interest in discussing your theories. There is no practical alternative to what I committed.
If you disagree: Patches welcome.
I could write the code to detect OS2 and add #define TARGET_OS2 in configure, but I figure you're more qualified as the configure script maintainer and someone familiar with it... While you're fixing the problem described in this commit, you might as well fix it right..
I don't see what we would gain by using TARGET_OS2 instead of __OS2__.
What we gain is that we don't suffer from bitrot. That is, if someone tries to use an old MPlayer, or if MPlayer eventually goes unmaintained (or at least the code specific to some obscure OS like OS2 is unmaintained) for a long period, someone trying to fix it doesn't have to hunt down all the implementation-specific assumptions (which may no longer be correct) in preprocessor conditionals all over the source. Instead they just need to adapt a few lines in configure. I've seen plenty of this crap in other code that's gone unmaintained (or poorly maintained) and fixing it retroactively is a nightmare. This is why I strongly object to writing such ugliness in the first place. Policy for preprocessor conditionals should be: 1. Preprocessor conditionals must always be based on a condition determined by configure, not symbols defined by the particular compiler, kernel headers, libc headers, etc. in use at the time the code was written. 2. Preprocessor symbols defined by configure for conditional compilation must always indicate the presence or absence of a particular feature/API, and must not reflect assumptions that a particular compiler/OS/kernel/etc. does (or does not) have certain properties. Examples: - Inline asm should not be dependent on gcc version but instead on ability to compile asm and suitability of that asm for the target machine. - Use of OSS sound (or locations of the headers) should not be dependent on the detected "OS name" but instead on tests for the headers. Maybe someday (sadly...I sure hope not) Linux will remove OSS API support, etc. - WinAPI stuff should not be dependent on OS being Windows, because as we've seen, OS/2 has some of the same features. etc.etc.etc.
Also, if we would want to start going down that route, we have a hell of a lot of stuff to fix.
Most of which was added over my objection..
Anyway, the code we are talking about here is gone now.
:) Rich
On Sun, Mar 02, 2008 at 03:15:57PM -0500, Rich Felker wrote:
On Sun, Mar 02, 2008 at 07:32:57PM +0100, Diego Biurrun wrote:
On Sat, Mar 01, 2008 at 11:35:08PM -0500, Rich Felker wrote:
On Sat, Mar 01, 2008 at 11:38:23AM +0100, Diego Biurrun wrote:
On Thu, Feb 28, 2008 at 10:53:06PM -0500, Rich Felker wrote:
On Thu, Feb 28, 2008 at 07:31:35PM +0100, diego wrote:
Log: TARGET_OS2 is never set, use __OS2__ instead.
--- trunk/mp_msg.h (original) +++ trunk/mp_msg.h Thu Feb 28 19:31:35 2008 @@ -111,7 +111,7 @@ int mp_msg_test(int mod, int lev);
-#ifdef TARGET_OS2 +#ifdef __OS2__
Again, I'm against this general class of change. I've explained the reasoning many times! Would you please honor that or at least discuss it rather than continuing these bad commits?
I've discussed it before, I get tired of repeating it: I have little interest in discussing your theories. There is no practical alternative to what I committed.
If you disagree: Patches welcome.
I could write the code to detect OS2 and add #define TARGET_OS2 in configure, but I figure you're more qualified as the configure script maintainer and someone familiar with it... While you're fixing the problem described in this commit, you might as well fix it right..
I don't see what we would gain by using TARGET_OS2 instead of __OS2__.
What we gain is that we don't suffer from bitrot. That is, if someone tries to use an old MPlayer, or if MPlayer eventually goes unmaintained (or at least the code specific to some obscure OS like OS2 is unmaintained) for a long period, someone trying to fix it doesn't have to hunt down all the implementation-specific assumptions (which may no longer be correct) in preprocessor conditionals all over the source. Instead they just need to adapt a few lines in configure.
I've seen plenty of this crap in other code that's gone unmaintained (or poorly maintained) and fixing it retroactively is a nightmare. This is why I strongly object to writing such ugliness in the first place. Policy for preprocessor conditionals should be:
1. Preprocessor conditionals must always be based on a condition determined by configure, not symbols defined by the particular compiler, kernel headers, libc headers, etc. in use at the time the code was written.
2. Preprocessor symbols defined by configure for conditional compilation must always indicate the presence or absence of a particular feature/API, and must not reflect assumptions that a particular compiler/OS/kernel/etc. does (or does not) have certain properties.
Examples:
- Inline asm should not be dependent on gcc version but instead on ability to compile asm and suitability of that asm for the target machine.
- Use of OSS sound (or locations of the headers) should not be dependent on the detected "OS name" but instead on tests for the headers. Maybe someday (sadly...I sure hope not) Linux will remove OSS API support, etc.
- WinAPI stuff should not be dependent on OS being Windows, because as we've seen, OS/2 has some of the same features.
etc.etc.etc.
OK, let's get this clarified: We do not disagree at all. However, MPlayer is still quite a long way from this ideal, even though it has progressed quite a bit in the right direction. None of this applies in this case, though. configure does not set TARGET_OS2, so any code contained in this conditional is likely forgotten cruft. As we have seen enabling the code is a good way to have this confirmed. Also, we already have __OS2__ in several places, so adding it in one more place will not make the situation worse, just more consistent. Diego
participants (4)
-
diego -
Diego Biurrun -
Reimar Döffinger -
Rich Felker