diff options
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | def.h | 26 | ||||
-rw-r--r-- | main.c | 14 |
5 files changed, 27 insertions, 21 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 519431f..8a49aae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,8 +30,8 @@ variables: # The tag should be updated each time the list of packages is updated. # Changing a tag forces the associated image to be rebuilt. # Note: the tag has no meaning, we use a date format purely for readability - FDO_DISTRIBUTION_TAG: '2022-01-15.0' - FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake make xorg-util-macros xorgproto' + FDO_DISTRIBUTION_TAG: '2023-02-01.0' + FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake make xorg-util-macros' # diff --git a/Makefile.am b/Makefile.am index 1eb2eb8..4e8e212 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,6 @@ makedepend_SOURCES = include.c \ imakemdep.h AM_CPPFLAGS = -DOBJSUFFIX=\".${OBJEXT}\" -DINCLUDEDIR=\"/usr/include\" -AM_CPPFLAGS += $(X_CFLAGS) AM_CFLAGS = $(CWARNFLAGS) EXTRA_DIST = autogen.sh makedepend.man README.md diff --git a/configure.ac b/configure.ac index 6cf0e3a..424cbcf 100644 --- a/configure.ac +++ b/configure.ac @@ -30,8 +30,5 @@ AC_CHECK_FUNCS([rename fchmod reallocarray]) dnl Use 64-bit file operations on 32-bit systems that support them AC_SYS_LARGEFILE -dnl Check for pkg-config packages -PKG_CHECK_MODULES(X, [xproto >= 7.0.17]) - AC_CONFIG_FILES([Makefile]) AC_OUTPUT @@ -28,8 +28,6 @@ in this Software without prior written authorization from The Open Group. # include "makedepend-config.h" #endif -#include <X11/Xos.h> -#include <X11/Xfuncproto.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -38,6 +36,30 @@ in this Software without prior written authorization from The Open Group. #include <fcntl.h> #include <sys/stat.h> +/* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */ +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif + +#ifndef _X_ATTRIBUTE_PRINTF +#if __has_attribute(__format__) \ + || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203) +# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) +#else /* not gcc >= 2.3 */ +# define _X_ATTRIBUTE_PRINTF(x,y) +#endif +#endif + +#ifndef _X_NORETURN +#if __has_attribute(noreturn) \ + || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ + || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +# define _X_NORETURN __attribute((noreturn)) +#else +# define _X_NORETURN +#endif /* GNUC */ +#endif + #ifndef HAVE_REALLOCARRAY #define reallocarray(ptr, num, size) realloc(ptr, (num) * (size)) #endif @@ -29,21 +29,9 @@ in this Software without prior written authorization from The Open Group. #define sigvec sigvector #endif /* hpux */ -#ifdef X_POSIX_C_SOURCE -#define _POSIX_C_SOURCE X_POSIX_C_SOURCE #include <signal.h> -#undef _POSIX_C_SOURCE -#else -#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE) -#include <signal.h> -#else -#define _POSIX_SOURCE -#include <signal.h> -#undef _POSIX_SOURCE -#endif -#endif - #include <stdarg.h> +#include <unistd.h> #ifdef __sun #include <sys/utsname.h> |