* lib/setenv.c (__add_to_environ): Add a cast. Also, drop use of
register keyword.
Signed-off-by: Eric Blake <eblake@redhat.com>
2010-04-16 Eric Blake <eblake@redhat.com>
+ setenv: allow compilation with C++
+ * lib/setenv.c (__add_to_environ): Add a cast. Also, drop use of
+ register keyword.
+
stdint: allow test to pass with C++
* tests/test-stdint.c: Define __STDC_CONSTANT_MACROS, for glibc.
__add_to_environ (const char *name, const char *value, const char *combined,
int replace)
{
- register char **ep;
- register size_t size;
+ char **ep;
+ size_t size;
const size_t namelen = strlen (name);
const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
if (np == NULL)
#endif
{
- np = malloc (namelen + 1 + vallen);
+ np = (char *) malloc (namelen + 1 + vallen);
if (np == NULL)
{
#if defined USE_TSEARCH && !defined _LIBC