# include <abi-versions.h>
-#ifdef SHARED
-
/* The file abi-versions.h (generated by scripts/abi-versions.awk) defines
symbols like `ABI_libm_GLIBC_2_0' for each version set in the source
code for each library. For a version set that is subsumed by a later
when the two version sets named are in fact two different ABIs we are
supporting. If these do not differ, then there is no need to compile in
extra code to support this version set where it has been superseded by a
- newer version. The compatibility code should be conditionalized with
- e.g. `#if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_2)' for code introduced
- in the GLIBC_2.0 version and obsoleted in the GLIBC_2.2 version. */
-
-# define SHLIB_COMPAT(lib, introduced, obsoleted) \
- _SHLIB_COMPAT (lib, introduced, obsoleted)
-# define _SHLIB_COMPAT(lib, introduced, obsoleted) \
+ newer version. */
+#define LIB_COMPAT(lib, introduced, obsoleted) \
+ _LIB_COMPAT (lib, introduced, obsoleted)
+#define _LIB_COMPAT(lib, introduced, obsoleted) \
(IS_IN (lib) \
&& (!(ABI_##lib##_##obsoleted - 0) \
|| ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0))))
+#ifdef SHARED
+
+/* Similar to LIB_COMPAT, but evaluate to 0 for static build. The
+ compatibility code should be conditionalized with e.g.
+ `#if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_2)' for code introduced
+ in the GLIBC_2.0 version and obsoleted in the GLIBC_2.2 version. */
+
+# define SHLIB_COMPAT(lib, introduced, obsoleted) \
+ _LIB_COMPAT (lib, introduced, obsoleted)
+
/* That header also defines symbols like `VERSION_libm_GLIBC_2_1' to
the version set name to use for e.g. symbols first introduced into
libm in the GLIBC_2.1 version. Definitions of symbols with explicit
#include <hurd.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file descriptor FD in BUF. */
int
}
weak_alias (__fxstat, _fxstat)
-#endif
+#endif /* LIB_COMPAT */
#include <hurd.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
/* Get information about the file descriptor FD in BUF. */
int
#include <hurd.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
int
__fxstatat (int vers, int fd, const char *filename, struct stat *buf, int flag)
return __fstatat (fd, filename, buf, flag);
}
-
#endif
#include <hurd.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Get information about the file descriptor FD in BUF. */
int
return __fstatat64 (fd, filename, buf, flag);
}
-
#endif
#include <hurd.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
int
__lxstat (int vers, const char *file, struct stat *buf)
#include <hurd.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
/* Get information about the file descriptor FD in BUF. */
int
return __lstat64 (file, buf);
}
-
#endif
#include <hurd.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get file information about FILE in BUF. */
int
#include <hurd.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
/* Get information about the file descriptor FD in BUF. */
int
# include <xstatover.h>
# include <shlib-compat.h>
-# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+# if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file FD in BUF. */
int
}
}
-# endif /* SHLIB_COMPAT */
+# endif /* LIB_COMPAT */
#endif /* XSTAT_IS_XSTAT64 */
#include <statx_cp.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file FD in BUF. */
strong_alias (___fxstat64, __fxstat)
#endif
-#endif /* SHLIB_COMPAT */
+#endif /* LIB_COMPAT */
# include <xstatover.h>
# include <shlib-compat.h>
-# if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
+# if LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Get information about the file FD in BUF. */
int
#endif
}
-# endif /* SHLIB_COMPAT */
+# endif /* LIB_COMPAT */
#endif /* XSTAT_IS_XSTAT64 */
#include <statx_cp.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33)
/* Get information about the file FD in BUF. */
strong_alias (__fxstatat64, __fxstatat)
#endif
-#endif /* SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) */
+#endif /* LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) */
# include <xstatconv.h>
# include <xstatover.h>
-# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+# if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
#include <statx_cp.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
strong_alias (___lxstat64,__lxstat)
#endif
-#endif /* SHLIB_COMPAT */
+#endif /* LIB_COMPAT */
#include <fcntl.h>
#include <kernel_stat.h>
#include <sysdep.h>
-#include <shlib-compat.h>
#if !XSTAT_IS_XSTAT64
# include <xstatconv.h>
# include <xstatover.h>
+# include <shlib-compat.h>
-# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+# if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
}
}
-# endif /* SHLIB_COMPAT */
+# endif /* LIB_COMPAT */
#endif /* XSTAT_IS_XSTAT64 */
#include <statx_cp.h>
#include <shlib-compat.h>
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
+#if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
strong_alias (___xstat64, __xstat64)
#endif
-#endif /* SHLIB_COMPAT */
+
+#endif /* LIB_COMPAT */