Removing OS/2 support from nsinstall. OS/2 will use a system installed version of nsinstall like the win32 builds.
Thanks to Javier Pedemonte <pedemont@us.ibm.com> for the patch. Bug #177200 r=cls a=roc+moz git-svn-id: svn://10.0.0.236/trunk@132685 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -26,7 +26,7 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
ifneq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
ifdef CROSS_COMPILE
|
||||
HOST_PROGRAM = nsinstall$(BIN_SUFFIX)
|
||||
else
|
||||
|
||||
@@ -764,7 +764,7 @@ ifeq (,$(filter-out WINNT OS2, $(OS_ARCH)))
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
NSINSTALL = $(CYGWIN_WRAPPER) $(MOZ_TOOLS_DIR)/bin/nsinstall
|
||||
else
|
||||
NSINSTALL = nsinstall
|
||||
NSINSTALL = $(MOZ_TOOLS_DIR)/nsinstall
|
||||
endif
|
||||
INSTALL = $(NSINSTALL)
|
||||
else
|
||||
|
||||
@@ -40,31 +40,19 @@
|
||||
**
|
||||
** Brendan Eich, 7/20/95
|
||||
*/
|
||||
#ifdef XP_OS2_VACPP
|
||||
#include "getopt.c"
|
||||
#include "dirent.c"
|
||||
#endif
|
||||
#include <stdio.h> /* OSF/1 requires this before grp.h, so put it first */
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef XP_OS2_VACPP
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef XP_OS2_VACPP
|
||||
#include <unistd.h>
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "pathsub.h"
|
||||
@@ -73,15 +61,6 @@
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_OS2_VACPP
|
||||
int getopt(int nargc, char **nargv, char *ostr);
|
||||
#include <dirent.h>
|
||||
#include <direct.h>
|
||||
#include <io.h>
|
||||
#include <sys\utime.h>
|
||||
#include <sys\types.h>
|
||||
#endif
|
||||
|
||||
#ifdef SUNOS4
|
||||
#include "sunos4.h"
|
||||
#endif
|
||||
@@ -101,40 +80,13 @@ int getopt(int nargc, char **nargv, char *ostr);
|
||||
#endif
|
||||
|
||||
#ifndef _DIRECTORY_SEPARATOR
|
||||
#ifdef XP_OS2
|
||||
#define _DIRECTORY_SEPARATOR "\\"
|
||||
#else
|
||||
#define _DIRECTORY_SEPARATOR "/"
|
||||
#endif
|
||||
#endif /* _DIRECTORY_SEPARATOR */
|
||||
|
||||
#ifdef NEED_FCHMOD_PROTO
|
||||
extern int fchmod(int fildes, mode_t mode);
|
||||
#endif
|
||||
|
||||
#ifdef XP_OS2
|
||||
/*Note: OS/2 has no concept of users or groups, or symbolic links...*/
|
||||
#define lstat stat
|
||||
/*looks reasonably safe based on OS/2's stat.h...*/
|
||||
#define S_ISLNK(mode) 0 /*no way in hell on a file system that doesn't support it*/
|
||||
#ifdef XP_OS2_VACPP
|
||||
#define mkdir(path, mode) mkdir(path)
|
||||
#define W_OK 1
|
||||
#endif /* XP_OS2_VACPP */
|
||||
#define touid(spam) 0
|
||||
#define togid(spam) 0
|
||||
#define access(spam, spam2) 0
|
||||
#define chown(spam1, spam2, spam3) 0
|
||||
#define lchown(spam1, spam2, spam3) 0
|
||||
#define fchown(spam1, spam2, spam3) 0
|
||||
#define readlink(spam1, spam2, spam3) -1
|
||||
#define symlink(spam1, spam2) -1
|
||||
#ifndef XP_OS2_VACPP
|
||||
unsigned long DosSetFileSize(int, int);
|
||||
#endif /* XP_OS2_VACPP */
|
||||
#define ftruncate(spam1, spam2) (DosSetFileSize(spam1, spam2)?-1:0)
|
||||
#endif /* XP_OS2 */
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
@@ -155,11 +107,6 @@ mkdirs(char *path, mode_t mode)
|
||||
|
||||
/* strip trailing "/." */
|
||||
l = strlen(path);
|
||||
#ifdef XP_OS2
|
||||
/* if path is nothing but drive letter, return successfully */
|
||||
if( l == 2 && path[1] == ':' )
|
||||
return 0;
|
||||
#endif
|
||||
if(l > 1 && path[l - 1] == '.' && path[l - 2] == '/')
|
||||
path[l - 2] = 0;
|
||||
|
||||
@@ -183,7 +130,6 @@ mkdirs(char *path, mode_t mode)
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifndef XP_OS2
|
||||
static uid_t
|
||||
touid(char *owner)
|
||||
{
|
||||
@@ -215,7 +161,6 @@ togid(char *group)
|
||||
fail("cannot find gid for %s", group);
|
||||
return gid;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
copyfile( char *name, char *toname, mode_t mode, char *group, char *owner,
|
||||
@@ -228,23 +173,12 @@ copyfile( char *name, char *toname, mode_t mode, char *group, char *owner,
|
||||
|
||||
exists = (lstat(toname, &tosb) == 0);
|
||||
|
||||
#ifdef XP_OS2_FIX
|
||||
fromfd = open(name, O_RDONLY | O_BINARY);
|
||||
#else
|
||||
fromfd = open(name, O_RDONLY);
|
||||
#endif
|
||||
if (fromfd < 0 || fstat(fromfd, &sb) < 0)
|
||||
fail("cannot access %s", name);
|
||||
if (exists && (!S_ISREG(tosb.st_mode) || access(toname, W_OK) < 0))
|
||||
(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
|
||||
#ifdef XP_OS2
|
||||
chmod(toname, S_IREAD | S_IWRITE);
|
||||
#endif
|
||||
#ifdef XP_OS2_FIX
|
||||
tofd = open(toname, O_CREAT | O_WRONLY | O_BINARY, 0666);
|
||||
#else
|
||||
tofd = open(toname, O_CREAT | O_WRONLY, 0666);
|
||||
#endif
|
||||
if (tofd < 0)
|
||||
fail("cannot create %s", toname);
|
||||
|
||||
@@ -265,7 +199,6 @@ copyfile( char *name, char *toname, mode_t mode, char *group, char *owner,
|
||||
|
||||
if (ftruncate(tofd, sb.st_size) < 0)
|
||||
fail("cannot truncate %s", toname);
|
||||
#ifndef XP_OS2
|
||||
if (dotimes)
|
||||
{
|
||||
utb.actime = sb.st_atime;
|
||||
@@ -279,7 +212,6 @@ copyfile( char *name, char *toname, mode_t mode, char *group, char *owner,
|
||||
if (chmod(toname, mode) < 0)
|
||||
#endif
|
||||
fail("cannot change mode of %s", toname);
|
||||
#endif
|
||||
if ((owner || group) && fchown(tofd, uid, gid) < 0)
|
||||
fail("cannot change owner of %s", toname);
|
||||
|
||||
@@ -287,17 +219,6 @@ copyfile( char *name, char *toname, mode_t mode, char *group, char *owner,
|
||||
if (close(tofd) < 0)
|
||||
fail("cannot write to %s", toname);
|
||||
close(fromfd);
|
||||
#ifdef XP_OS2
|
||||
if (dotimes)
|
||||
{
|
||||
utb.actime = sb.st_atime;
|
||||
utb.modtime = sb.st_mtime;
|
||||
if (utime(toname, &utb) < 0)
|
||||
fail("cannot set times of %s", toname);
|
||||
}
|
||||
if (chmod(toname, (mode & (S_IREAD | S_IWRITE))) < 0)
|
||||
fail("cannot change mode of %s", toname);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -333,11 +254,7 @@ copydir( char *from, char *to, mode_t mode, char *group, char *owner,
|
||||
sprintf(direntry, "%s/%s", from, ep->d_name);
|
||||
sprintf(destentry, "%s%s%s", destdir, _DIRECTORY_SEPARATOR, ep->d_name);
|
||||
|
||||
#ifdef XP_OS2_VACPP
|
||||
if (ep->d_attribute & A_DIR)
|
||||
#else
|
||||
if (stat(direntry, &sb) == 0 && S_ISDIR(sb.st_mode))
|
||||
#endif
|
||||
copydir( direntry, destdir, mode, group, owner, dotimes, uid, gid );
|
||||
else
|
||||
copyfile( direntry, destentry, mode, group, owner, dotimes, uid, gid );
|
||||
@@ -383,12 +300,7 @@ main(int argc, char **argv)
|
||||
dolink = 1;
|
||||
break;
|
||||
case 'R':
|
||||
#ifdef XP_OS2
|
||||
/* treat like -t since no symbolic links on OS2 */
|
||||
dotimes = 1;
|
||||
#else
|
||||
dolink = dorelsymlink = 1;
|
||||
#endif
|
||||
break;
|
||||
case 'm':
|
||||
mode = strtoul(optarg, &cp, 8);
|
||||
@@ -415,12 +327,6 @@ main(int argc, char **argv)
|
||||
usage();
|
||||
|
||||
todir = argv[argc-1];
|
||||
#ifdef XP_OS2_VACPP
|
||||
/* The stat() function in OS/2 Visual Age C++ doesn't like a path with
|
||||
a trailing backslash. */
|
||||
if (todir[strlen(todir)-1] == '/')
|
||||
todir[strlen(todir)-1] = '\0';
|
||||
#endif
|
||||
if ((stat(todir, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
|
||||
mkdirs(todir, 0777) < 0) {
|
||||
fail("cannot make directory %s", todir);
|
||||
@@ -513,17 +419,11 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Check for a pre-existing symlink with identical content. */
|
||||
#ifdef XP_OS2_VACPP
|
||||
#pragma info(nocnd)
|
||||
#endif
|
||||
if ((exists && (!S_ISLNK(tosb.st_mode) ||
|
||||
readlink(toname, buf, sizeof buf) != len ||
|
||||
strncmp(buf, name, (unsigned int)len) != 0)) ||
|
||||
((stat(name, &fromsb) == 0) &&
|
||||
(fromsb.st_mtime > tosb.st_mtime))) {
|
||||
#ifdef XP_OS2_VACPP
|
||||
#pragma info(restore)
|
||||
#endif
|
||||
(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
|
||||
exists = 0;
|
||||
}
|
||||
|
||||
761
mozilla/configure
vendored
761
mozilla/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -1152,6 +1152,15 @@ case "$target" in
|
||||
RC=rc.exe
|
||||
RCFLAGS='-n -x2'
|
||||
|
||||
if test "$MOZTOOLS"; then
|
||||
MOZ_TOOLS_DIR=`cd $MOZTOOLS && pwd`
|
||||
if test "$?" != "0" || test -z "$MOZ_TOOLS_DIR"; then
|
||||
AC_MSG_ERROR([cd \$MOZTOOLS failed. MOZTOOLS ==? $MOZTOOLS])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([MOZTOOLS is not set])
|
||||
fi
|
||||
|
||||
# EMX/GCC build
|
||||
if test "$GNU_CC"; then
|
||||
_PEDANTIC=''
|
||||
@@ -4737,7 +4746,6 @@ dnl ========================================================
|
||||
if test "$OS_ARCH" = "OS2"; then
|
||||
AC_DEFINE(XP_PC)
|
||||
AC_DEFINE(XP_OS2)
|
||||
AC_DEFINE(XP_OS2_FIX)
|
||||
if test "$VACPP" = "yes"; then
|
||||
LIBS='so32dll.lib tcp32dll.lib'
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user