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
|
||||
|
||||
if DBE
|
||||
|
@ -39,13 +39,15 @@
|
||||
#endif
|
||||
|
||||
#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 */
|
||||
/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers):
|
||||
Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define
|
||||
PAGE_SIZE. It is defined in <asm/page.h>. */
|
||||
#include <asm/page.h>
|
||||
|
||||
#ifdef __linux__
|
||||
# ifdef __GNU_LIBRARY__
|
||||
# if __GNU_LIBRARY__ < 2 /* libc5 */
|
||||
# include <asm/page.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.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_INIT([tinyx], 1.3)
|
||||
AC_PREREQ([2.60])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign -Wall])
|
||||
|
||||
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_PROG_CC
|
||||
AM_PROG_AR
|
||||
AM_PROG_AS
|
||||
AC_PROG_INSTALL
|
||||
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
|
||||
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
|
||||
|
||||
AX_CHECK_COMPILE_FLAG([-flto],
|
||||
|
@ -181,11 +181,11 @@ typedef struct _CallbackList {
|
||||
|
||||
/* 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];
|
||||
|
@ -328,6 +328,6 @@ void ProcessInputEvents(void);
|
||||
|
||||
void InitInput(
|
||||
int /*argc*/,
|
||||
char ** /*argv*/);
|
||||
char ** /*argv*/) XFONT_LTO;
|
||||
|
||||
#endif /* INPUT_H */
|
||||
|
@ -90,7 +90,7 @@ typedef struct _NewClientRec *NewClientPtr;
|
||||
#define SIGVAL void
|
||||
#endif
|
||||
|
||||
void (*OsVendorVErrorFProc)(const char *, va_list args);
|
||||
extern void (*OsVendorVErrorFProc)(const char *, va_list args);
|
||||
|
||||
int WaitForSomething(
|
||||
int* /*pClientsReady*/
|
||||
@ -231,7 +231,7 @@ void OsCleanup(Bool);
|
||||
|
||||
void OsVendorFatalError(void);
|
||||
|
||||
void OsVendorInit(void);
|
||||
void OsVendorInit(void) XFONT_LTO;
|
||||
|
||||
void OsBlockSignals (void);
|
||||
|
||||
@ -320,9 +320,9 @@ XID GenerateAuthorization(
|
||||
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)
|
||||
* Given a pointer to a *complete* request, return its length in bytes.
|
||||
|
@ -527,6 +527,6 @@ extern ScreenInfo screenInfo;
|
||||
void InitOutput(
|
||||
ScreenInfo * /*pScreenInfo*/,
|
||||
int /*argc*/,
|
||||
char ** /*argv*/);
|
||||
char ** /*argv*/) XFONT_LTO;
|
||||
|
||||
#endif /* SCREENINTSTRUCT_H */
|
||||
|
@ -34,6 +34,12 @@
|
||||
#include <X11/keysym.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;
|
||||
int LinuxConsoleFd;
|
||||
static int LinuxApmFd;
|
||||
|
@ -1,3 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
@KDRIVE_INCS@ \
|
||||
@KDRIVE_CFLAGS@
|
||||
|
@ -414,6 +414,6 @@ KdShadowSet(ScreenPtr pScreen, int randr, ShadowUpdateProc update,
|
||||
void KdShadowUnset(ScreenPtr pScreen);
|
||||
|
||||
/* function prototypes to be implemented by the drivers */
|
||||
void InitCard(char *name);
|
||||
void InitCard(char *name) XFONT_LTO;
|
||||
|
||||
#endif /* _KDRIVE_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user