#endif
#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
#if HAVE_UNISTD_H
# include <unistd.h>
# include <config.h>
#endif
+#include "sha.h"
+
#include <sys/types.h>
-#if STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-# include <string.h>
-#else
-# ifndef HAVE_MEMCPY
-# define memcpy(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
+#include <stdlib.h>
+#include <string.h>
-#include "md5.h"
-#include "sha.h"
#include "unlocked-io.h"
/*
extern int errno;
#endif
#if defined LSTAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK
+# include <stdlib.h>
# include <string.h>
-# if HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-
# ifdef STAT_MACROS_BROKEN
# undef S_ISLNK
# endif
# endif
# endif
-# ifndef HAVE_DECL_FREE
-"this configure-time declaration test was not run"
-# endif
-# if !HAVE_DECL_FREE
-void free ();
-# endif
-
# include "xalloc.h"
/* lstat works differently on Linux and Solaris systems. POSIX (see
#endif
#include <sys/types.h>
+#include <stdlib.h>
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
# getcwd.m4 - check whether getcwd (NULL, 0) allocates memory for result
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
AC_DEFUN([AC_FUNC_GETCWD_NULL],
[
- AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
+ AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
[ac_cv_func_getcwd_null],
[AC_TRY_RUN(
[
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
+# include <stdlib.h>
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
-# save-cwd.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# save-cwd.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
AC_DEFUN([gl_SAVE_CWD],
[
dnl Prerequisites for lib/save-cwd.c.
- AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS_ONCE(fcntl.h unistd.h)
AC_CHECK_FUNCS(fchdir)
])
-# xgetcwd.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# xgetcwd.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
AC_DEFUN([gl_XGETCWD],
[
dnl Prerequisites of lib/xgetcwd.c.
- AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
+ AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CHECK_FUNCS(getcwd)
AC_FUNC_GETCWD_NULL
])