mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
Remove unnecessary global argz functions.
* libltdl/argz.c (argz_add,argz_count): Remove. * libltdl/argz_.h (argz_add,argz_count): Remove. * NEWS: Announce it. * tests/ltdl-api.at: Test so we don't repeat it. * Makefile.am: Add new test.
This commit is contained in:
parent
6c491fda98
commit
300fa580c4
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2008-08-26 Peter O'Gorman <peter@pogma.com>,
|
||||
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Remove unnecessary global argz functions.
|
||||
* libltdl/argz.c (argz_add,argz_count): Remove.
|
||||
* libltdl/argz_.h (argz_add,argz_count): Remove.
|
||||
* NEWS: Announce it.
|
||||
* tests/ltdl-api.at: Test so we don't repeat it.
|
||||
* Makefile.am: Add new test.
|
||||
|
||||
2008-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Initial support for Lahey Fortran on GNU/Linux.
|
||||
|
@ -454,6 +454,7 @@ TESTSUITE_AT = tests/testsuite.at \
|
||||
tests/am-subdir.at \
|
||||
tests/lt_dlexit.at \
|
||||
tests/lt_dladvise.at \
|
||||
tests/ltdl-api.at \
|
||||
tests/need_lib_prefix.at \
|
||||
tests/standalone.at \
|
||||
tests/subproject.at \
|
||||
|
3
NEWS
3
NEWS
@ -21,6 +21,9 @@ New in 2.2.??: 2008-08-??: git version 2.2.5a, Libtool team:
|
||||
|
||||
- Several testsuite issues have been fixed, thanks to user feedback.
|
||||
|
||||
- Fix 2.2 regression that caused argz symbols to be exported from
|
||||
libltdl unrenamed on systems that do not have working argz.
|
||||
|
||||
New in 2.2.4: 2008-05-04: git version 2.2.3a, Libtool team:
|
||||
|
||||
* New features:
|
||||
|
@ -76,14 +76,6 @@ argz_append (char **pargz, size_t *pargz_len, const char *buf, size_t buf_len)
|
||||
}
|
||||
|
||||
|
||||
/* Add a string to the argz vector. */
|
||||
error_t
|
||||
argz_add (char **pargz, size_t *pargz_len, const char *str)
|
||||
{
|
||||
return argz_append (pargz, pargz_len, str, strlen (str) + 1);
|
||||
}
|
||||
|
||||
|
||||
error_t
|
||||
argz_create_sep (const char *str, int delim, char **pargz, size_t *pargz_len)
|
||||
{
|
||||
@ -232,23 +224,3 @@ argz_stringify (char *argz, size_t argz_len, int sep)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Count number of elements (null bytes) in argz vector. */
|
||||
|
||||
size_t
|
||||
argz_count (const char *argz, size_t argz_len)
|
||||
{
|
||||
size_t count = 0;
|
||||
|
||||
assert ((argz && argz_len) || (!argz && !argz_len));
|
||||
|
||||
while (argz_len > 0)
|
||||
{
|
||||
size_t part_len = strlen (argz);
|
||||
argz += part_len + 1;
|
||||
argz_len -= part_len + 1;
|
||||
count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
@ -49,8 +49,6 @@ extern "C" {
|
||||
|
||||
LT_SCOPE error_t argz_append (char **pargz, size_t *pargz_len,
|
||||
const char *buf, size_t buf_len);
|
||||
LT_SCOPE error_t argz_add (char **pargz, size_t *pargz_len,
|
||||
const char *str);
|
||||
LT_SCOPE error_t argz_create_sep(const char *str, int delim,
|
||||
char **pargz, size_t *pargz_len);
|
||||
LT_SCOPE error_t argz_insert (char **pargz, size_t *pargz_len,
|
||||
@ -58,7 +56,6 @@ LT_SCOPE error_t argz_insert (char **pargz, size_t *pargz_len,
|
||||
LT_SCOPE char * argz_next (char *argz, size_t argz_len,
|
||||
const char *entry);
|
||||
LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep);
|
||||
LT_SCOPE size_t argz_count (const char *argz, size_t argz_len);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
39
tests/ltdl-api.at
Normal file
39
tests/ltdl-api.at
Normal file
@ -0,0 +1,39 @@
|
||||
# ltdl-api.at -- test libltdl API -*- Autotest -*-
|
||||
#
|
||||
# Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
# Written by Ralf Wildenhues, 2008.
|
||||
#
|
||||
# This file is part of GNU Libtool.
|
||||
#
|
||||
# GNU Libtool 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 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# GNU Libtool 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.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Libtool; see the file COPYING. If not, a copy
|
||||
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
|
||||
# or obtained by writing to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
####
|
||||
|
||||
AT_SETUP([ltdl API])
|
||||
AT_KEYWORDS([libltdl])
|
||||
|
||||
# Ensure that no symbols from argz are unrenamed.
|
||||
eval `$LIBTOOL --config | $EGREP '^(NM|global_symbol_pipe|objext)='`
|
||||
argz_o=$abs_top_builddir/libltdl/argz.$objext
|
||||
AT_CHECK([test -f "$argz_o" || exit 77])
|
||||
AT_CHECK([eval "$NM \"\$argz_o\" | $global_symbol_pipe"],
|
||||
[], [stdout], [ignore])
|
||||
# Check for global symbols beginning with "argz_"
|
||||
AT_CHECK([grep "^T argz_" stdout], [1])
|
||||
# and also for the _ prefixed version "_argz_"
|
||||
AT_CHECK([grep "^T _argz_" stdout], [1])
|
||||
|
||||
AT_CLEANUP
|
Loading…
Reference in New Issue
Block a user