mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
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.
This commit is contained in:
parent
06b274c9d9
commit
62d4f0cdad
10 changed files with 13 additions and 14 deletions
|
@ -16,6 +16,8 @@ AC_PROG_CC
|
|||
AC_PROG_CC_STDC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
##
|
||||
# I3 check
|
||||
##
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#ifndef __SIMPLESWITCHER_H__
|
||||
#define __SIMPLESWITCHER_H__
|
||||
#include <config.h>
|
||||
#include <X11/X.h>
|
||||
#include <glib.h>
|
||||
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <X11/X.h>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <config.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue