dnl Check to see if crypt lives in a different library
AC_CHECK_LIB(crypt, crypt, LIB_crypt="-lcrypt")
AC_SUBST(LIB_crypt)
+
+dnl Check to see if the compiler support labels in structs
+AC_MSG_CHECKING(for label support in structs)
+AC_TRY_COMPILE([], [
+extern void osi_UFSOpen(void);
+struct labeltest {
+ void (*open) (void);
+};
+struct labeltest struct_labeltest = {
+ .open = osi_UFSOpen,
+}
+],
+[AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_STRUCT_LABEL_SUPPORT, 1, [Define to 1 if your compiler supports labels in structs.])
+],
+[AC_MSG_RESULT(no)
+])
+
])
int dcacheDisabled = 0;
struct afs_cacheOps afs_UfsCacheOps = {
-#if defined(__SUNPRO_C) || (defined(AFS_SGI_ENV) && !defined(__c99))
+#ifndef HAVE_STRUCT_LABEL_SUPPORT
osi_UFSOpen,
osi_UFSTruncate,
afs_osi_Read,
};
struct afs_cacheOps afs_MemCacheOps = {
-#if defined(__SUNPRO_C) || (defined(AFS_SGI_ENV) && !defined(__c99))
+#ifndef HAVE_STRUCT_LABEL_SUPPORT
afs_MemCacheOpen,
afs_MemCacheTruncate,
afs_MemReadBlk,
static
struct storeOps rxfs_storeUfsOps = {
-#if defined(__SUNPRO_C) || (defined(AFS_SGI_ENV) && !defined(__c99))
+#ifndef HAVE_STRUCT_LABEL_SUPPORT
rxfs_storeUfsPrepare,
rxfs_storeUfsRead,
rxfs_storeUfsWrite,
static
struct storeOps rxfs_storeMemOps = {
-#if defined(__SUNPRO_C) || (defined(AFS_SGI_ENV) && !defined(__c99))
+#ifndef HAVE_STRUCT_LABEL_SUPPORT
rxfs_storeMemPrepare,
rxfs_storeMemRead,
rxfs_storeMemWrite,
}
static struct xdr_ops xdrlen_ops = {
-#if defined(AFS_NT40_ENV) || defined(__SUNPRO_C) || (defined(AFS_SGI_ENV) && !defined(__c99))
+#ifndef HAVE_STRUCT_LABEL_SUPPORT
#ifdef AFS_XDR_64BITOPS
NULL,
NULL,
static void xdrmem_destroy(XDR *);
static struct xdr_ops xdrmem_ops = {
-#if defined(AFS_NT40_ENV) || defined(__SUNPRO_C) || (defined(AFS_SGI_ENV) && !defined(__c99))
+#ifndef HAVE_STRUCT_LABEL_SUPPORT
#ifdef AFS_XDR_64BITOPS
NULL,
NULL,
* Ops vector for stdio type XDR
*/
static struct xdr_ops xdrrx_ops = {
-#if defined(AFS_NT40_ENV) || defined(__SUNPRO_C) || (defined(AFS_SGI_ENV) && !defined(__c99))
+#ifndef HAVE_STRUCT_LABEL_SUPPORT
#ifdef AFS_XDR_64BITOPS
xdrrx_getint64, /* deserialize an afs_int64 */
xdrrx_putint64, /* serialize an afs_int64 */