Added an #ifdef XP_UNIX implementation of _strrev() to fix the

build. No clue if it works.


git-svn-id: svn://10.0.0.236/trunk@23881 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
waterson%netscape.com
1999-03-12 04:41:50 +00:00
parent 5176ae5079
commit c0fd696b5d

View File

@@ -236,6 +236,33 @@ void nsNetFile::GenerateGlobalRandomBytes(void *aDest, size_t aLen) {
#define MAX_PATH_LEN 512
#ifdef XP_UNIX
// Checked this in to fix the build. I have no idea where this lives
// on Unix. I have no idea if this implementation does the right thing
// or even works.
static void
_strrev(char* s)
{
// Find the end of the string.
char* p = s;
while (*p)
++p;
--p; // back to the last character
// Now reverse the string: s and p will eventually meet in the middle.
while (s < p) {
char c = *p;
*p = *s;
*s = c;
++s;
--p;
}
}
#endif
nsresult nsNetFile::GetCacheFileName(char *aDirTok, char **aRes) {
char *file_buf = nsnull;
char *ext = ".MOZ";