]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - compat/os/next.h
SourceFormat Enforcement
[thirdparty/squid.git] / compat / os / next.h
index 5278f1c3756f80e6a63f91567e0d6235e6727860..27711fad1cad542f56db3173356d8af14124e47d 100644 (file)
@@ -1,11 +1,15 @@
-#ifndef SQUID_CONFIG_H
-#include "config.h"
-#endif
+/*
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
 
 #ifndef SQUID_OS_NEXT_H
 #define SQUID_OS_NEXT_H
 
-#ifdef _SQUID_NEXT_
+#if _SQUID_NEXT_
 
 /****************************************************************************
  *--------------------------------------------------------------------------*
@@ -13,7 +17,6 @@
  *--------------------------------------------------------------------------*
  ****************************************************************************/
 
-
 /*
  * Don't allow inclusion of malloc.h
  */
 
 /*
  * WAS: lots of special wrappers labeled only 'protect NEXTSTEP'
- * I'm assuming its an incomplete definition problem on that OS.
- * Or a missing safety wrapper by the looks of the _SQUID_NETDB_H_
- * 
+ * I'm assuming its an incomplete definition problem on that OS
+ * or a missing safety wrapper by the looks of the original hack.
+ *
  * Anyway, this file is included before all general non-type headers.
  * doing the include here for Next and undefining HAVE_NETDB_H will
  * save us from including it again in general.
  */
-// All the hacks included this first without safety wrapping, then netdb.h.
-#include <netinet/in_systm.h>
 #if HAVE_NETDB_H
 #include <netdb.h>
 #endif
 #undef HAVE_NETDB_H
 #define HAVE_NETDB_H 0
 
+#if !defined(S_ISDIR)
+#define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
+#endif
 
 #endif /* _SQUID_NEXT_ */
 #endif /* SQUID_OS_NEXT_H */
+