~ubuntu-branches/ubuntu/quantal/nspr/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/tests/op_filok.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2011-01-11 14:55:23 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20110111145523-hb3ap33jpgf838lt
Tags: 4.8.7-0ubuntu1
* New upstream release v4.8.7 (NSPR_4_8_7_RTM)
* Refresh patches
  - update debian/patches/30_config_64bits.patch
  - update debian/patches/99_configure.patch
* Drop the link shuffeling now, as all upgraders to this version will be
  using a fixed package anyway
  - remove debian/libnspr4-0d.postinst
  - remove debian/libnspr4-0d.postrm
  - remove debian/libnspr4-0d.preinst
  - remove debian/libnspr4-0d.prerm
* Drop arch-specific symbols files for architectures we don't support
  - remove debian/libnspr4-0d.symbols.hurd_i386
  - remove debian/libnspr4-0d.symbols.ia64
  - remove debian/libnspr4-0d.symbols.lpia
* Ship the main SO files in an unversioned binary, as we don't have
  versioned SO's in Ubuntu. Maintain a transitional versioned binary
  package containing the versioned symlinks, to maintain compatibility with
  Debian
  - update debian/control
  - mass rename debian/libnspr4-0d* => debian/libnspr4*
  - update debian/rules
* Fix postinst-must-call-ldconfig - dh_makeshlibs doesn't seem to add
  the maintainer script hooks with the unversioned SO files, so add them
  manually
  - add debian/libnspr4.postinst
  - add debian/libnspr4.postrm

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
#include "prerror.h"
56
56
#include <stdio.h>
57
57
 
58
 
/*
59
 
 * The name of a file that is guaranteed to exist
60
 
 * on every machine of a particular OS.
61
 
 */
62
 
#if defined(SYMBIAN)
63
 
#define EXISTING_FILENAME "z:\\system\\install\\Series60v3.0.sis"
64
 
#elif defined (XP_UNIX)
65
 
#define EXISTING_FILENAME "/bin/sh"
66
 
#elif defined(WINCE)
67
 
#define EXISTING_FILENAME "/Windows/services.exe"
68
 
#elif defined(WIN32)
69
 
#define EXISTING_FILENAME "c:/autoexec.bat"
70
 
#elif defined(OS2)
71
 
#define EXISTING_FILENAME "c:/config.sys"
72
 
#elif defined(BEOS)
73
 
#define EXISTING_FILENAME "/boot/beos/bin/sh"
74
 
#else
75
 
#error "Unknown OS"
76
 
#endif
77
 
 
78
58
static PRFileDesc *t1;
79
59
 
80
60
int main(int argc, char **argv)
81
61
{
82
62
    PR_STDIO_INIT();
83
63
 
84
 
        t1 = PR_Open(EXISTING_FILENAME, PR_RDONLY, 0666);
 
64
        t1 = PR_Open(argv[0], PR_RDONLY, 0666);
85
65
 
86
66
        if (t1 == NULL) {
87
67
                printf ("error code is %d \n", PR_GetError());
88
 
                printf ("File %s should be found\n",
89
 
                                EXISTING_FILENAME);
 
68
                printf ("File %s should be found\n", argv[0]);
90
69
                return 1;
91
70
        } else {
92
71
                if (PR_Close(t1) == PR_SUCCESS) {