projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
[gnulib.git]
/
lib
/
addext.c
diff --git
a/lib/addext.c
b/lib/addext.c
index
571e3c2
..
7753c60
100644
(file)
--- a/
lib/addext.c
+++ b/
lib/addext.c
@@
-1,5
+1,7
@@
/* addext.c -- add an extension to a file name
/* addext.c -- add an extension to a file name
- Copyright 1990, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+
+ Copyright (C) 1990, 1997, 1998, 1999, 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
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
@@
-29,14
+31,12
@@
# define HAVE_LONG_FILE_NAMES 0
#endif
# define HAVE_LONG_FILE_NAMES 0
#endif
-#if HAVE_LIMITS_H
-# include <limits.h>
-#endif
+#include <limits.h>
#ifndef _POSIX_NAME_MAX
# define _POSIX_NAME_MAX 14
#endif
#ifndef _POSIX_NAME_MAX
# define _POSIX_NAME_MAX 14
#endif
-#include <s
ys/types
.h>
+#include <s
tddef
.h>
#if HAVE_STRING_H
# include <string.h>
#else
#if HAVE_STRING_H
# include <string.h>
#else
@@
-83,7
+83,11
@@
addext (char *filename, char const *ext, int e)
*s = c;
}
if (0 <= name_max || errno == 0)
*s = c;
}
if (0 <= name_max || errno == 0)
- slen_max = name_max == (size_t) name_max ? name_max : -1;
+ {
+ long size = slen_max = name_max;
+ if (name_max != size)
+ slen_max = -1;
+ }
}
#endif
}
#endif