On 9/25/2012 7:34 AM, Rajagopal Venkat wrote:
On 09/24/2012 06:28 AM, Rajagopal Venkat wrote:
This patch adds following minor changes to prepare powertop to support Android platform.
- Add missing HAVE_CONFIG_H conditional check.
- remove un-used ethtool_cmd_speed_set and ethtool_cmd_speed
functions.
- Minimize dependency on exception handling in catch blocks.
These changes will not affect powertop functionality.
Signed-off-by: Rajagopal Venkat rajagopal.venkat@linaro.org
As discussed in first patch set, android doesn't support exception handling. This
where is this in your commit log?
is the reason powertop had DISABLE_TRYCATCH conditional macro which is removed in recent commit.
Android being braindead about the C++ language should be it's own patch, not snuck in as part of another change.
The patch 2/2 adds stubs for exception handling
#define try if (true) #define catch(x) if (false)
With this, fprintf(stderr, "%s\n", c.what()); in catch block throws undefined reference to c. So added message instead of c.what().
Any better ways of adding stubs are welcome.
#define try(x) if (true) { x; #define catch(x) } else
?