Commit 60b5d7f2 authored by Matt Brubeck's avatar Matt Brubeck
Browse files

Back out c209fea124e1 (bug 754198) because of Win64 build failure

parent 8b134e5d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1234,10 +1234,10 @@ main(int argc, char *argv[])
  
  munmap(mapping, size);

  int result = ftruncate(fd, size - hole_len);
  ftruncate(fd, size - hole_len);
  close(fd);

  return result == -1 ? 1 : 0;
  return 0;
}


+3 −3
Original line number Diff line number Diff line
@@ -1354,12 +1354,12 @@ NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname)

  FILE *file = fopen(fname, "rb");
  if (file) {
    ssize_t unused = fseek(file, 0, SEEK_END);
    fseek(file, 0, SEEK_END);
    size = ftell(file);
    instanceData->fileBuf = malloc((int32_t)size + 1);
    char* buf = reinterpret_cast<char *>(instanceData->fileBuf);
    unused = fseek(file, 0, SEEK_SET);
    unused = fread(instanceData->fileBuf, 1, size, file);
    fseek(file, 0, SEEK_SET);
    fread(instanceData->fileBuf, 1, size, file);
    fclose(file);
    buf[size] = '\0';
    instanceData->fileBufSize = (int32_t)size;
+4 −5
Original line number Diff line number Diff line
@@ -1527,11 +1527,10 @@ wrtmessage(const char *p1, const char *p2, const char *p3, const char *p4)
#if defined(MOZ_MEMORY) && !defined(MOZ_MEMORY_WINDOWS)
#define	_write	write
#endif
	int res;
	res = _write(STDERR_FILENO, p1, (unsigned int) strlen(p1));
	res = _write(STDERR_FILENO, p2, (unsigned int) strlen(p2));
	res = _write(STDERR_FILENO, p3, (unsigned int) strlen(p3));
	res = _write(STDERR_FILENO, p4, (unsigned int) strlen(p4));
	_write(STDERR_FILENO, p1, (unsigned int) strlen(p1));
	_write(STDERR_FILENO, p2, (unsigned int) strlen(p2));
	_write(STDERR_FILENO, p3, (unsigned int) strlen(p3));
	_write(STDERR_FILENO, p4, (unsigned int) strlen(p4));
}

#define _malloc_message malloc_message
+1 −3
Original line number Diff line number Diff line
@@ -126,9 +126,7 @@ int main(int argc, char **argv) {
      break;
    /* -C workingdirectory */
    } else if (argv[1][0] == '-' && argv[1][1] == 'C') {
      int res = chdir(argv[2]);
      if (res == -1)
        return -1;
      chdir(argv[2]);
      argv += 2;
      argc -= 2;
    } 
+2 −6
Original line number Diff line number Diff line
@@ -88,10 +88,6 @@
#include "prlog.h"
#include "prtime.h"

#include "mozilla/unused.h"

using mozilla::unused;

namespace TestProtocols {

#if defined(PR_LOGGING)
@@ -342,7 +338,7 @@ TestAuthPrompt::PromptUsernameAndPassword(const PRUnichar *dialogTitle,
    int n;

    printf("Enter username: ");
    unused << fgets(buf, sizeof(buf), stdin);
    fgets(buf, sizeof(buf), stdin);
    n = strlen(buf);
    buf[n-1] = '\0'; // trim trailing newline
    *user = NS_StringCloneData(NS_ConvertUTF8toUTF16(buf));
@@ -828,7 +824,7 @@ nsresult LoadURLFromConsole()
{
    char buffer[1024];
    printf("Enter URL (\"q\" to start): ");
    unused << scanf("%s", buffer);
    scanf("%s", buffer);
    if (buffer[0]=='q') 
        gAskUserForInput = false;
    else
Loading