diff options
author | Dave Davenport <qball@gmpclient.org> | 2014-08-22 09:26:46 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2014-08-22 09:27:45 +0200 |
commit | 62d4f0cdad8ce1bbac6ad2279c707a92e36ee57e (patch) | |
tree | 91a2028208926846101a9594fb10e60cd090b2f3 /source | |
parent | 06b274c9d907b334656a467a0510dd88309d575d (diff) |
Make rofi compile happily under clang.
* Set features in configure.ac
* use config.h file, instead of hardcoded _GNU_SOURCE
in each c file.
* Fix mix up unsigned/signed.
Diffstat (limited to 'source')
-rw-r--r-- | source/dmenu-dialog.c | 3 | ||||
-rw-r--r-- | source/history.c | 3 | ||||
-rw-r--r-- | source/rofi.c | 3 | ||||
-rw-r--r-- | source/run-dialog.c | 3 | ||||
-rw-r--r-- | source/script-dialog.c | 2 | ||||
-rw-r--r-- | source/ssh-dialog.c | 2 | ||||
-rw-r--r-- | source/textbox.c | 2 | ||||
-rw-r--r-- | source/xrmoptions.c | 6 |
8 files changed, 11 insertions, 13 deletions
diff --git a/source/dmenu-dialog.c b/source/dmenu-dialog.c index 0d6833d8..b18de68e 100644 --- a/source/dmenu-dialog.c +++ b/source/dmenu-dialog.c @@ -25,8 +25,7 @@ * */ - -#define _GNU_SOURCE +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/source/history.c b/source/history.c index 49c6c393..faacb001 100644 --- a/source/history.c +++ b/source/history.c @@ -24,9 +24,10 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#include <config.h> +#include <stdlib.h> #include <stdio.h> #include <string.h> -#include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <errno.h> diff --git a/source/rofi.c b/source/rofi.c index 9a9513cd..6dab655f 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -25,8 +25,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ - -#define _GNU_SOURCE +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/source/run-dialog.c b/source/run-dialog.c index bd692d03..1b7c5e90 100644 --- a/source/run-dialog.c +++ b/source/run-dialog.c @@ -24,8 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ - -#define _GNU_SOURCE +#include <config.h> #include <stdlib.h> #include <stdio.h> #include <X11/X.h> diff --git a/source/script-dialog.c b/source/script-dialog.c index 940f394a..acd5d4c9 100644 --- a/source/script-dialog.c +++ b/source/script-dialog.c @@ -26,7 +26,7 @@ */ -#define _GNU_SOURCE +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> diff --git a/source/ssh-dialog.c b/source/ssh-dialog.c index 348c9502..fc510159 100644 --- a/source/ssh-dialog.c +++ b/source/ssh-dialog.c @@ -25,7 +25,7 @@ * */ -#define _GNU_SOURCE +#include <config.h> #include <stdlib.h> #include <stdio.h> #include <X11/X.h> diff --git a/source/textbox.c b/source/textbox.c index 878f0c5a..5641a2bb 100644 --- a/source/textbox.c +++ b/source/textbox.c @@ -25,7 +25,7 @@ */ -#define _GNU_SOURCE +#include <config.h> #include <X11/X.h> #include <X11/Xatom.h> #include <X11/Xlib.h> diff --git a/source/xrmoptions.c b/source/xrmoptions.c index cad69158..b0e02850 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -24,7 +24,7 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -#define _GNU_SOURCE +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -144,10 +144,10 @@ void parse_xresource_options ( Display *display ) xrmOptions[i].mem = ( *xrmOptions[i].str ); } else if ( xrmOptions[i].type == xrm_Number ) { - *xrmOptions[i].num = (unsigned int) g_ascii_strtoll ( xrmValue.addr, NULL, 10 ); + *xrmOptions[i].num = (unsigned int) strtoul ( xrmValue.addr, NULL, 10 ); } else if ( xrmOptions[i].type == xrm_SNumber ) { - *xrmOptions[i].num = (int) g_ascii_strtoull ( xrmValue.addr, NULL, 10 ); + *xrmOptions[i].snum = (int) strtol ( xrmValue.addr, NULL, 10 ); } else if ( xrmOptions[i].type == xrm_Boolean ) { if ( xrmValue.size > 0 && g_ascii_strncasecmp ( xrmValue.addr, "true", xrmValue.size ) == 0 ) { |