[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS gsasl/lib/gl
From: |
gsasl-commit |
Subject: |
CVS gsasl/lib/gl |
Date: |
Sun, 26 Sep 2004 09:19:16 +0200 |
Update of /home/cvs/gsasl/lib/gl
In directory dopio:/tmp/cvs-serv24375/lib/gl
Modified Files:
Makefile.am strdup.c strdup.h
Log Message:
Use Lesser GNULib.
--- /home/cvs/gsasl/lib/gl/Makefile.am 2004/08/16 16:29:45 1.6
+++ /home/cvs/gsasl/lib/gl/Makefile.am 2004/09/26 07:19:16 1.7
@@ -31,5 +31,3 @@
# Makefile.am ends here
-
-libgl_la_SOURCES += gettext.h
--- /home/cvs/gsasl/lib/gl/strdup.c 2004/08/07 15:19:49 1.3
+++ /home/cvs/gsasl/lib/gl/strdup.c 2004/09/26 07:19:16 1.4
@@ -1,44 +1,34 @@
-/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+/* Copyright (C) 1991, 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2004 Simon Josefsson
- This file is part of the GNU C Library.
+ The file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
- 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
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
+ This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser 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,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with this file; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
-#ifndef _LIBC
-/* Get specification. */
-# include "strdup.h"
-#endif
-
+/* Get malloc. */
#include <stdlib.h>
-#include <string.h>
-
-#undef __strdup
-#undef strdup
-#ifndef weak_alias
-# define __strdup strdup
-#endif
+/* Get strlen, memcpy. */
+#include <string.h>
/* Duplicate S, returning an identical malloc'd string. */
char *
-__strdup (const char *s)
+strdup (const char *s)
{
size_t len = strlen (s) + 1;
void *new = malloc (len);
@@ -48,9 +38,3 @@
return (char *) memcpy (new, s, len);
}
-#ifdef libc_hidden_def
-libc_hidden_def (__strdup)
-#endif
-#ifdef weak_alias
-weak_alias (__strdup, strdup)
-#endif
--- /home/cvs/gsasl/lib/gl/strdup.h 2004/08/07 15:19:49 1.3
+++ /home/cvs/gsasl/lib/gl/strdup.h 2004/09/26 07:19:16 1.4
@@ -1,27 +1,27 @@
-/* strdup.h -- duplicate a string
- Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004 Simon Josefsson
- 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
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ The file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser 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,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with this file; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA. */
#ifndef STRDUP_H_
-#define STRDUP_H_
+# define STRDUP_H_
-/* Get strdup declaration, if available. */
+/* Get strdup, if available. */
#include <string.h>
-#if defined HAVE_DECL_STRDUP && !HAVE_DECL_STRDUP && !defined strdup
+#if defined HAVE_DECL_STRDUP && !HAVE_DECL_STRDUP
/* Duplicate S, returning an identical malloc'd string. */
extern char *strdup (const char *s);
#endif
- CVS gsasl/lib/gl,
gsasl-commit <=