Merge pull request #3 from stenstorp/master
Fix building on musl and with gcc 10
This commit is contained in:
commit
d5c02ad5bb
@ -1,3 +1,5 @@
|
|||||||
|
AUTOMAKE_OPTIONS = subdir-objects
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS=-I m4
|
ACLOCAL_AMFLAGS=-I m4
|
||||||
|
|
||||||
if DBE
|
if DBE
|
||||||
|
@ -39,13 +39,15 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2)
|
|
||||||
/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */
|
#ifdef __linux__
|
||||||
/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers):
|
# ifdef __GNU_LIBRARY__
|
||||||
Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define
|
# if __GNU_LIBRARY__ < 2 /* libc5 */
|
||||||
PAGE_SIZE. It is defined in <asm/page.h>. */
|
|
||||||
# include <asm/page.h>
|
# include <asm/page.h>
|
||||||
# endif
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
11
configure.ac
11
configure.ac
@ -23,8 +23,10 @@ dnl Process this file with autoconf to create configure.
|
|||||||
|
|
||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
AC_INIT([tinyx], 1.3)
|
AC_INIT([tinyx], 1.3)
|
||||||
|
AC_PREREQ([2.60])
|
||||||
AC_CONFIG_SRCDIR([Makefile.am])
|
AC_CONFIG_SRCDIR([Makefile.am])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall])
|
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall])
|
||||||
|
|
||||||
dnl this gets generated by autoheader, and thus contains all the defines. we
|
dnl this gets generated by autoheader, and thus contains all the defines. we
|
||||||
@ -37,6 +39,7 @@ dnl kdrive-config.h covers the kdrive DDX
|
|||||||
AC_CONFIG_HEADERS(include/kdrive-config.h)
|
AC_CONFIG_HEADERS(include/kdrive-config.h)
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
AM_PROG_AR
|
||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
@ -573,14 +576,6 @@ AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
|
|||||||
dnl and the rest of these are generic, so they're in config.h
|
dnl and the rest of these are generic, so they're in config.h
|
||||||
AC_DEFINE(XResExtension, 1, [Build XRes extension])
|
AC_DEFINE(XResExtension, 1, [Build XRes extension])
|
||||||
|
|
||||||
AC_TRY_COMPILE([
|
|
||||||
#include <features.h>
|
|
||||||
#ifndef __GLIBC__
|
|
||||||
#error not glibc
|
|
||||||
#endif
|
|
||||||
], [], [AC_DEFINE(_GNU_SOURCE, 1,
|
|
||||||
[ Enable GNU and other extensions to the C environment for glibc])])
|
|
||||||
|
|
||||||
dnl ---------- Compiler arguments
|
dnl ---------- Compiler arguments
|
||||||
|
|
||||||
AX_CHECK_COMPILE_FLAG([-flto],
|
AX_CHECK_COMPILE_FLAG([-flto],
|
||||||
|
@ -181,11 +181,11 @@ typedef struct _CallbackList {
|
|||||||
|
|
||||||
/* proc vectors */
|
/* proc vectors */
|
||||||
|
|
||||||
int (* InitialVector[3]) (ClientPtr /*client*/);
|
extern int (* InitialVector[3]) (ClientPtr /*client*/);
|
||||||
|
|
||||||
int (* ProcVector[256]) (ClientPtr /*client*/);
|
extern int (* ProcVector[256]) (ClientPtr /*client*/);
|
||||||
|
|
||||||
int (* SwappedProcVector[256]) (ClientPtr /*client*/);
|
extern int (* SwappedProcVector[256]) (ClientPtr /*client*/);
|
||||||
|
|
||||||
|
|
||||||
extern const ReplySwapPtr ReplySwapVector[256];
|
extern const ReplySwapPtr ReplySwapVector[256];
|
||||||
|
@ -328,6 +328,6 @@ void ProcessInputEvents(void);
|
|||||||
|
|
||||||
void InitInput(
|
void InitInput(
|
||||||
int /*argc*/,
|
int /*argc*/,
|
||||||
char ** /*argv*/);
|
char ** /*argv*/) XFONT_LTO;
|
||||||
|
|
||||||
#endif /* INPUT_H */
|
#endif /* INPUT_H */
|
||||||
|
@ -90,7 +90,7 @@ typedef struct _NewClientRec *NewClientPtr;
|
|||||||
#define SIGVAL void
|
#define SIGVAL void
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void (*OsVendorVErrorFProc)(const char *, va_list args);
|
extern void (*OsVendorVErrorFProc)(const char *, va_list args);
|
||||||
|
|
||||||
int WaitForSomething(
|
int WaitForSomething(
|
||||||
int* /*pClientsReady*/
|
int* /*pClientsReady*/
|
||||||
@ -231,7 +231,7 @@ void OsCleanup(Bool);
|
|||||||
|
|
||||||
void OsVendorFatalError(void);
|
void OsVendorFatalError(void);
|
||||||
|
|
||||||
void OsVendorInit(void);
|
void OsVendorInit(void) XFONT_LTO;
|
||||||
|
|
||||||
void OsBlockSignals (void);
|
void OsBlockSignals (void);
|
||||||
|
|
||||||
@ -320,9 +320,9 @@ XID GenerateAuthorization(
|
|||||||
char ** /* data_return */);
|
char ** /* data_return */);
|
||||||
|
|
||||||
|
|
||||||
int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
|
XFONT_LTO int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
|
||||||
|
|
||||||
void ddxUseMsg(void);
|
void ddxUseMsg(void) XFONT_LTO;
|
||||||
|
|
||||||
/* int ReqLen(xReq *req, ClientPtr client)
|
/* int ReqLen(xReq *req, ClientPtr client)
|
||||||
* Given a pointer to a *complete* request, return its length in bytes.
|
* Given a pointer to a *complete* request, return its length in bytes.
|
||||||
|
@ -527,6 +527,6 @@ extern ScreenInfo screenInfo;
|
|||||||
void InitOutput(
|
void InitOutput(
|
||||||
ScreenInfo * /*pScreenInfo*/,
|
ScreenInfo * /*pScreenInfo*/,
|
||||||
int /*argc*/,
|
int /*argc*/,
|
||||||
char ** /*argv*/);
|
char ** /*argv*/) XFONT_LTO;
|
||||||
|
|
||||||
#endif /* SCREENINTSTRUCT_H */
|
#endif /* SCREENINTSTRUCT_H */
|
||||||
|
@ -34,6 +34,12 @@
|
|||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <linux/apm_bios.h>
|
#include <linux/apm_bios.h>
|
||||||
|
|
||||||
|
/* These symbols are not defined on musl */
|
||||||
|
#if !defined(__uid_t) && !defined(__gid_t)
|
||||||
|
#define __uid_t uid_t
|
||||||
|
#define __gid_t gid_t
|
||||||
|
#endif
|
||||||
|
|
||||||
static int vtno;
|
static int vtno;
|
||||||
int LinuxConsoleFd;
|
int LinuxConsoleFd;
|
||||||
static int LinuxApmFd;
|
static int LinuxApmFd;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
AUTOMAKE_OPTIONS = subdir-objects
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
@KDRIVE_INCS@ \
|
@KDRIVE_INCS@ \
|
||||||
@KDRIVE_CFLAGS@
|
@KDRIVE_CFLAGS@
|
||||||
|
@ -414,6 +414,6 @@ KdShadowSet(ScreenPtr pScreen, int randr, ShadowUpdateProc update,
|
|||||||
void KdShadowUnset(ScreenPtr pScreen);
|
void KdShadowUnset(ScreenPtr pScreen);
|
||||||
|
|
||||||
/* function prototypes to be implemented by the drivers */
|
/* function prototypes to be implemented by the drivers */
|
||||||
void InitCard(char *name);
|
void InitCard(char *name) XFONT_LTO;
|
||||||
|
|
||||||
#endif /* _KDRIVE_H_ */
|
#endif /* _KDRIVE_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user