(path_concat): Use K&R style function definition.
[gnulib.git] / lib / obstack.h
index 840a63b..790290c 100644 (file)
@@ -12,8 +12,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+along with this program; if not, write to the Free Software Foundation,
+Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Summary:
 
@@ -103,6 +103,10 @@ Summary:
 #ifndef __OBSTACK_H__
 #define __OBSTACK_H__
 \f
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 /* We use subtraction of (char *)0 instead of casting to int
    because on word-addressable machines a simple cast to int
    may ignore the byte-within-word field of the pointer.  */
@@ -138,6 +142,15 @@ Summary:
 #define PTR_INT_TYPE long
 #endif
 
+#if HAVE_STRING_H || STDC_HEADERS
+# include <string.h>
+# ifndef bcopy
+#  define bcopy(s, d, n) memcpy ((d), (s), (n))
+# endif
+#else /* HAVE_STRING_H || STDC_HEADERS */
+# include <strings.h>
+#endif   /* not (HAVE_STRING_H || STDC_HEADERS) */
+
 struct _obstack_chunk          /* Lives at front of each chunk. */
 {
   char  *limit;                        /* 1 past end of this chunk */
@@ -272,7 +285,7 @@ int obstack_chunk_size (struct obstack *obstack);
 /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
    does not implement __extension__.  But that compiler doesn't define
    __GNUC_MINOR__.  */
-#if __GNUC__ < 2 || !__GNUC_MINOR__
+#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
 #define __extension__
 #endif
 
@@ -331,7 +344,7 @@ __extension__                                                               \
 /* These assume that the obstack alignment is good enough for pointers or ints,
    and that the data added so far to the current object
    shares that much alignment.  */
-   
+
 #define obstack_ptr_grow(OBSTACK,datum)                                        \
 __extension__                                                          \
 ({ struct obstack *__o = (OBSTACK);                                    \