mbspcasecmp: Fix function specification.
[gnulib.git] / lib / canonicalize-lgpl.c
index c71721e..c2164e0 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the canonical absolute name of a given file.
-   Copyright (C) 1996-2009 Free Software Foundation, Inc.
+   Copyright (C) 1996-2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
 
 #if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC
 
+/* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
+   optimizes away the name == NULL test below.  */
+#define _GL_ARG_NONNULL(params)
+
 /* Specification.  */
 #include <stdlib.h>
 
@@ -39,7 +43,7 @@
 # include <shlib-compat.h>
 #else
 # define SHLIB_COMPAT(lib, introduced, obsoleted) 0
-# define versioned_symbol(lib, local, symbol, version)
+# define versioned_symbol(lib, local, symbol, version) extern int dummy
 # define compat_symbol(lib, local, symbol, version)
 # define weak_alias(local, symbol)
 # define __canonicalize_file_name canonicalize_file_name
@@ -58,6 +62,8 @@
 # endif
 # define __readlink readlink
 # define __set_errno(e) errno = (e)
+/* Use the system functions, not the gnulib overrides in this file.  */
+# undef malloc
 # ifndef MAXSYMLINKS
 #  ifdef SYMLOOP_MAX
 #   define MAXSYMLINKS SYMLOOP_MAX