|
From: Brenda L. <asp...@us...> - 2003-05-12 07:39:13
|
Update of /cvsroot/squeak/squeak/platforms/unix/vm
In directory sc8-pr-cvs1:/tmp/cvs-serv6251/vm
Modified Files:
osExports.c sqConfig.h sqPlatformSpecific.h
sqUnixExternalPrims.c sqUnixMozilla.c sqXWindow.c sunos.h
Log Message:
Ian Piumarta's release 3.4.1
Index: osExports.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/osExports.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** osExports.c 13 May 2002 12:47:29 -0000 1.1
--- osExports.c 12 May 2003 07:39:08 -0000 1.2
***************
*** 1,25 ****
#include <stdio.h>
- /* duh ... this is ugly */
! #define XFN(export) {"", #export, (void*)export},
#define XFN2(plugin, export) {#plugin, #export, (void*)plugin##_##export}
! int primitivePluginBrowserReady(void);
! int primitivePluginRequestURLStream(void);
! int primitivePluginRequestURL(void);
! int primitivePluginPostURL(void);
! int primitivePluginRequestFileHandle(void);
! int primitivePluginDestroyRequest(void);
! int primitivePluginRequestState(void);
! void *os_exports[][3] = {
! XFN(primitivePluginBrowserReady)
! XFN(primitivePluginRequestURLStream)
! XFN(primitivePluginRequestURL)
! XFN(primitivePluginPostURL)
! XFN(primitivePluginRequestFileHandle)
! XFN(primitivePluginDestroyRequest)
! XFN(primitivePluginRequestState)
! {NULL, NULL, NULL}
};
-
--- 1,32 ----
#include <stdio.h>
! #define XFN(export) {"", #export, (void*)export}
#define XFN2(plugin, export) {#plugin, #export, (void*)plugin##_##export}
! #if !defined(HEADLESS)
! int primitivePluginBrowserReady(void);
! int primitivePluginRequestURLStream(void);
! int primitivePluginRequestURL(void);
! int primitivePluginPostURL(void);
! int primitivePluginRequestFileHandle(void);
! int primitivePluginDestroyRequest(void);
! int primitivePluginRequestState(void);
! void *ioGetDisplay(void);
! void *ioGetWindow(void);
! #endif
! void *os_exports[][3]=
! {
! #if !defined(HEADLESS)
! XFN(primitivePluginBrowserReady),
! XFN(primitivePluginRequestURLStream),
! XFN(primitivePluginRequestURL),
! XFN(primitivePluginPostURL),
! XFN(primitivePluginRequestFileHandle),
! XFN(primitivePluginDestroyRequest),
! XFN(primitivePluginRequestState),
! XFN(ioGetDisplay),
! XFN(ioGetWindow),
! #endif
! { 0, 0, 0 }
};
Index: sqConfig.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqConfig.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sqConfig.h 24 Oct 2001 23:14:16 -0000 1.1.1.1
--- sqConfig.h 12 May 2003 07:39:08 -0000 1.2
***************
*** 1,9 ****
/* Unix sqConfig.h -- platform identification and configuration */
-
/* This file has been superseded by autoconf for Unix variants. */
! #if defined(HAVE_CONFIG_H)
! # include "sqUnixConfig.h"
! # define SQ_CONFIG_DONE
#endif
--- 1,9 ----
/* Unix sqConfig.h -- platform identification and configuration */
/* This file has been superseded by autoconf for Unix variants. */
! #include "config.h"
!
! #ifndef UNIX
! # define UNIX
#endif
Index: sqPlatformSpecific.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqPlatformSpecific.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** sqPlatformSpecific.h 2 Mar 2002 19:33:09 -0000 1.7
--- sqPlatformSpecific.h 12 May 2003 07:39:08 -0000 1.8
***************
*** 1,81 ****
! /* Unix sqPlatformSpecific.h -- Platform-specific prototypes and definitions */
!
! /* How to use this file:
! This file is for general platform-specific macros and declarations.
! The goal is to keep most of the other header files generic across platforms.
! To override a definition or macro from sq.h, you must first #undef it, then
! provide the new definition.
!
! */
!
!
! #ifndef SQ_PLATFORM_SPECIFIC_H
! #define SQ_PLATFORM_SPECIFIC_H
!
! #ifdef UNIX
! #include <string.h>
! #include <stdio.h>
! #include <unistd.h>
!
!
! /* off_t should be available (XXX though really, we should
! autoconf-check this, and substitute whatever fseeko is using) */
! typedef off_t squeakFileOffsetType;
!
! #undef sqFTruncate
! #undef fseek
! #undef ftell
!
!
! #define sqFTruncate(fp, offs) ftruncate(fileno(fp),offs)
! #define fseek(fp, offs,type) fseeko(fp, offs,type)
! #define ftell(fp) ftello(fp)
! /* unix-specific prototypes and definitions */
! void aioPollForIO(int microSeconds, int extraFd); /* XXX should no longer be needed -lex */
! #define SQ_FORM_FILENAME "squeak-form.ppm"
- /* undefine clock macros that are implemented as functions */
#undef ioMSecs
#undef ioMicroMSecs
#undef ioLowResMSecs
!
!
! /* use non-default heap-allocation functions; see sqUnixMemory.c */
! #undef sqAllocateMemory
! #undef sqGrowMemoryBy
! #undef sqShrinkMemoryBy
! #undef sqMemoryExtraBytesLeft
!
! void * sqAllocateMemory(int minHeapSize, int desiredHeapSize);
! int sqGrowMemoryBy(int oldLimit, int delta);
! int sqShrinkMemoryBy(int oldLimit, int delta);
! int sqMemoryExtraBytesLeft(int includingSwap);
!
!
!
!
!
! #ifdef sqImageFileOpen /* this is horrible, but is necessary because
! plugins don't include sq.h; so, we should
! redefine these macros only when all of sq.h
! is being used */
!
! /* use non-default image IO functions; see sqUnixImage.c */
! #undef sqImageFileOpen
! #undef sqImageFileStartLocation
!
! sqImageFile sqImageFileOpen(const char *fileName, const char *mode);
! int sqImageFileStartLocation(sqImageFile file, const char *fileName, int size);
! #endif
!
!
! #else
!
! #error This sqPlatformSpecific.h file is for Unix; you either have the wrong source code, or you forgot to -DUNIX
!
! #endif /* UNIX */
!
! #endif /* SQ_PLATFORM_SPECIFIC_H */
--- 1,46 ----
! /* sqPlatformSpecific.h -- platform-specific modifications to sq.h
! *
! * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
! * as listed elsewhere in this file.
! * All rights reserved.
! *
! * This file is part of Unix Squeak.
! *
! * This file is distributed in the hope that it will be useful, but WITHOUT
! * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
! * FITNESS FOR A PARTICULAR PURPOSE.
! *
! * You may use and/or distribute this file ONLY as part of Squeak, under
! * the terms of the Squeak License as described in `LICENSE' in the base of
! * this distribution, subject to the following restrictions:
! *
! * 1. The origin of this software must not be misrepresented; you must not
! * claim that you wrote the original software. If you use this software
! * in a product, an acknowledgment to the original author(s) (and any
! * other contributors mentioned herein) in the product documentation
! * would be appreciated but is not required.
! *
! * 2. This notice must not be removed or altered in any source distribution.
! *
! * Using (or modifying this file for use) in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the
! * directory `platforms/unix/doc' before proceeding with any such use.
! *
! * You are not allowed to distribute a modified version of this file
! * under its original name without explicit permission to do so. If
! * you change it, rename it.
! *
! * Author: ian...@in...
! *
! * Last edited: 2002-06-08 02:34:43 by piumarta on emilia.inria.fr
! */
! /* undefine clock macros (these are implemented as functions) */
#undef ioMSecs
#undef ioMicroMSecs
#undef ioLowResMSecs
+ #include <sys/types.h>
! typedef off_t squeakFileOffsetType;
Index: sqUnixExternalPrims.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqUnixExternalPrims.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqUnixExternalPrims.c 5 May 2002 01:21:43 -0000 1.2
--- sqUnixExternalPrims.c 12 May 2003 07:39:09 -0000 1.3
***************
*** 1,6 ****
/* sqUnixExternalPrims.c -- Unix named primitives and loadable modules
*
! * Copyright (C) 1996 1997 1998 1999 2000 2001 Ian Piumarta and individual
! * authors/contributors listed elsewhere in this file.
* All rights reserved.
*
--- 1,6 ----
/* sqUnixExternalPrims.c -- Unix named primitives and loadable modules
*
! * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
! * as listed elsewhere in this file.
* All rights reserved.
*
***************
*** 21,43 ****
* would be appreciated but is not required.
*
! * 2. This notice may not be removed or altered in any source distribution.
*
! * Using or modifying this file for use in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the base
! * of the distribution before proceeding with any such use.
*
! * You are STRONGLY DISCOURAGED from distributing a modified version of
! * this file under its original name without permission. If you must
! * change it, rename it first.
*/
/* Author: Ian...@IN...
*
! * Last edited: 2001-07-23 14:45:39 CEST by piumarta on emilia.inria.fr
*/
#include "sq.h" /* sqUnixConfig.h */
! #ifdef HAVE_LIBDL /* non-starter without this! */
#ifdef HAVE_DLFCN_H
--- 21,55 ----
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
! * Using (or modifying this file for use) in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the
! * directory `platforms/unix/doc' before proceeding with any such use.
*
! * You are not allowed to distribute a modified version of this file
! * under its original name without explicit permission to do so. If
! * you change it, rename it.
*/
/* Author: Ian...@IN...
*
! * Last edited: 2003-01-29 21:51:13 by piumarta on emilia.local.
*/
#include "sq.h" /* sqUnixConfig.h */
! #define DEBUG 0
!
! #if DEBUG
! # define dprintf(ARGS) fprintf ARGS
! #else
! # define dprintf(ARGS)
! #endif
!
! #if defined(HAVE_DYLD)
! # include "dlfcn-dyld.c"
! #endif
!
! #if defined(HAVE_LIBDL) /* non-starter without this! */
#ifdef HAVE_DLFCN_H
***************
*** 46,50 ****
extern void *dlopen (const char *filename, int flag);
extern const char *dlerror(void);
! extern void *dlsym(void *handle, char *symbol);
extern int dlclose (void *handle);
#endif
--- 58,62 ----
extern void *dlopen (const char *filename, int flag);
extern const char *dlerror(void);
! extern void *dlsym(void *handle, const char *symbol);
extern int dlclose (void *handle);
#endif
***************
*** 67,77 ****
# endif
#endif
!
! #undef DEBUG
!
! #ifdef DEBUG
! # define dprintf(ARGS) fprintf ARGS
! #else
! # define dprintf(ARGS)
#endif
--- 79,85 ----
# endif
#endif
!
! #if !defined(RTLD_GLOBAL)
! # define RTLD_GLOBAL 0
#endif
***************
*** 89,92 ****
--- 97,108 ----
+ /*** options ***/
+
+ extern char *squeakPlugins;
+
+ /*** configured variables ***/
+
+ char *vmLibDir= VM_LIBDIR;
+
/*** local functions ***/
***************
*** 96,132 ****
* library could not be loaded.
*/
! static void *tryLoading(char *prefix, char *moduleName, char *suffix)
{
! char libName[NAME_MAX + 32]; /* headroom for prefix/suffix */
! void *handle;
! sprintf(libName, "%s%s%s", prefix, moduleName, suffix);
! dprintf(("tryLoading %s\n", libName));
! handle= dlopen(libName, RTLD_NOW);
! if (handle == 0)
! {
! /* to preserve the humour of Jitter hackers: try to differentiate
! between "file not found" and a genuine load error (which would be
! difficult to diagnose out of context) when the lib is in the CWD */
! struct stat buf;
! if (/*(strcmp(prefix, "./") == 0)
! && (strcmp(suffix, ".so") == 0)
! && */ (stat(libName, &buf) == 0))
! {
! /* insist on the error message: the shared lib really _is_ broken */
! if (!(S_ISDIR(buf.st_mode)))
{
! fprintf(stderr, "ioLoadModule(%s): %s\n", libName, dlerror());
}
! }
! else
{
! dprintf(("not found\n"));
}
}
- else
- {
- dprintf((stderr, "loaded: %s\n", libName));
- }
return handle;
}
--- 112,173 ----
* library could not be loaded.
*/
! static void *tryLoading(char *dirName, char *moduleName)
{
! static char *prefixes[]= { "", "lib", 0 };
! static char *suffixes[]= { "", ".so", ".dylib", 0 };
! void *handle= 0;
! char **prefix= 0, **suffix= 0;
! for (prefix= prefixes; *prefix; ++prefix)
! for (suffix= suffixes; *suffix; ++suffix)
! {
! char libName[NAME_MAX + 32]; /* headroom for prefix/suffix */
! struct stat buf;
! int err;
! sprintf(libName, "%s%s%s%s", dirName, *prefix, moduleName, *suffix);
! if (((err= stat(libName, &buf)) == 0) && (S_ISDIR(buf.st_mode)))
! dprintf((stderr, "ignoring directory: %s\n", libName));
! else
{
! dprintf((stderr, "tryLoading %s\n", libName));
! handle= dlopen(libName, RTLD_NOW | RTLD_GLOBAL);
! if (handle == 0)
! {
! if (err == 0)
! fprintf(stderr, "ioLoadModule(%s):\n %s\n", libName, dlerror());
! }
! else
! {
! dprintf((stderr, "loaded: %s\n", libName));
! return handle;
! }
}
! }
! return 0;
! }
!
!
! static void *tryLoadingPath(char *varName, char *pluginName)
! {
! char *path= getenv(varName);
! void *handle= 0;
!
! if (path)
! {
! char pbuf[MAXPATHLEN];
! dprintf((stderr, "try %s=%s\n", varName, path));
! strncpy(pbuf, path, sizeof(pbuf));
! pbuf[sizeof(pbuf) - 1]= '\0';
! for (path= strtok(pbuf, ":");
! path != 0;
! path= strtok(0, ":"))
{
! char buf[MAXPATHLEN];
! sprintf(buf, "%s/", path);
! dprintf((stderr, " path dir = %s\n", buf));
! if ((handle= tryLoading(buf, pluginName)) != 0)
! break;
}
}
return handle;
}
***************
*** 142,190 ****
if ((pluginName == 0) || (pluginName[0] == '\0'))
{
! handle = dlopen(0, RTLD_NOW);
if (handle == 0)
fprintf(stderr, "ioLoadModule(<intrinsic>): %s\n", dlerror());
else
- dprintf((stderr, "loaded: <intrinsic>\n"));
- }
- else
- {
- (void)(/* these are ordered such that a knowledgeable user can
- override a "system" library with one in the CWD */
- ( handle= tryLoading( "./", pluginName, ".so"))
- /* these are the normal cases: when LD_LIBRARY_PATH is not
- set they search /etc/ld.so.cache, /usr/lib and /lib */
- || (handle= tryLoading( "", pluginName, ".so"))
- || (handle= tryLoading( "", pluginName, ""))
- /* this is the standard location for the plugins */
- || (handle= tryLoading(SQ_LIBDIR"/", pluginName, ".so"))
- || (handle= tryLoading( "lib", pluginName, "" ))
- || (handle= tryLoading( "lib", pluginName, ".so")));
- }
-
- if (handle == 0)
- {
- /* ld.so is broken on some platforms: try LD_LIBRARY_PATH ourselves */
- char *path= getenv("LD_LIBRARY_PATH");
- dprintf(("try LD_LIBRARY_PATH %s\n", path));
- if (path != 0)
{
! char pbuf[MAXPATHLEN];
! strncpy(pbuf, path, sizeof(pbuf));
! pbuf[sizeof(pbuf) - 1]= '\0';
! for (path= strtok(pbuf, ":");
! path != 0;
! path= strtok(0, ":"))
! {
! char buf[MAXPATHLEN];
! sprintf(buf, "%s/", path);
! dprintf(("LD_LIBRARY_PATH dir = %s\n", buf));
! if ((handle= tryLoading(buf, pluginName, ".so")) != 0)
! break;
! }
}
}
! return (int)handle;
}
--- 183,239 ----
if ((pluginName == 0) || (pluginName[0] == '\0'))
{
! handle= dlopen(0, RTLD_NOW | RTLD_GLOBAL);
if (handle == 0)
fprintf(stderr, "ioLoadModule(<intrinsic>): %s\n", dlerror());
else
{
! dprintf((stderr, "loaded: <intrinsic>\n"));
! return (int)handle;
}
}
! if (squeakPlugins)
! {
! char path[NAME_MAX];
! char c, *in= squeakPlugins, *out= path;
! while ((c= *in++))
! {
! if (c == '%' && ((*in == 'n') || (*in == 'N')))
! {
! ++in;
! strcpy(out, pluginName);
! out+= strlen(pluginName);
! }
! else
! *out++= c;
! }
! *out= '\0';
! dprintf((stderr, "ioLoadModule plugins = %s\n path = %s\n",
! squeakPlugins, path));
! if ((handle= tryLoading("", path)))
! return (int)handle;
! *out++= '/';
! *out= '\0';
! if ((handle= tryLoading(path, pluginName)))
! return (int)handle;
! }
!
! /* these are ordered such that a knowledgeable user can override a
! "system" library with one in the CWD */
!
! if (( handle= tryLoading( "./", pluginName))
! /* this is the standard location for the plugins */
! || (handle= tryLoading(VM_LIBDIR"/", pluginName))
! /* this is the default case: when LD_LIBRARY_PATH is not
! it searches /etc/ld.so.cache, /lib and /usr/lib */
! || (handle= tryLoading( "", pluginName))
! /* try SQUEAK_PLUGIN_PATH and LD_LIBRARY_PATH if set */
! || (handle= tryLoadingPath("SQUEAK_PLUGIN_PATH", pluginName))
! || (handle= tryLoadingPath("LD_LIBRARY_PATH", pluginName)))
! return (int)handle;
!
! dprintf(("ioLoadModule: could not load: %s\n", pluginName));
!
! return 0;
}
***************
*** 201,208 ****
if (fn == 0)
! {
! dprintf((stderr, "ioFindExternalFunctionIn(%s, %d):\n %s\n",
! lookupName, moduleHandle, dlerror()));
! }
return (int)fn;
--- 250,257 ----
if (fn == 0)
! dprintf((stderr, "ioFindExternalFunctionIn(%s, %d):\n %s\n",
! lookupName, moduleHandle, dlerror()));
! else
! dprintf((stderr, " => %d (0x%x)\n", (int)fn, (int)fn));
return (int)fn;
***************
*** 213,217 ****
/* Free the module with the associated handle. Answer 0 on error (do
* NOT fail the primitive!).
! */
int ioFreeModule(int moduleHandle)
{
--- 262,266 ----
/* Free the module with the associated handle. Answer 0 on error (do
* NOT fail the primitive!).
! */
int ioFreeModule(int moduleHandle)
{
Index: sqUnixMozilla.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqUnixMozilla.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** sqUnixMozilla.c 7 Mar 2002 23:52:49 -0000 1.5
--- sqUnixMozilla.c 12 May 2003 07:39:09 -0000 1.6
***************
*** 3,7 ****
* Author: Bert Freudenberg <be...@is...>
*
! * Last edited: Tue 05 Mar 2002 09:52:03 by bert on balloon
*
* Originally based on Andreas Raab's sqWin32PluginSupport
--- 3,7 ----
* Author: Bert Freudenberg <be...@is...>
*
! * Last edited: 2002-09-27 19:58:30 by piumarta on emilia.inria.fr
*
* Originally based on Andreas Raab's sqWin32PluginSupport
***************
*** 33,37 ****
debug= (NULL != getenv("NPSQUEAK_DEBUG"));
! if (!debug)
{
return;
--- 33,37 ----
debug= (NULL != getenv("NPSQUEAK_DEBUG"));
! if (!debug)
{
return;
***************
*** 45,49 ****
}
! {
va_list ap;
va_start(ap, format);
--- 45,49 ----
}
! if (file) {
va_list ap;
va_start(ap, format);
***************
*** 55,59 ****
}
#else
! static int DPRINT(char *, ...) { }
#endif
--- 55,59 ----
}
#else
! void DPRINT(char *, ...) { }
#endif
***************
*** 88,94 ****
--- 88,96 ----
static void browserGetURLRequest(int id, char* url, int urlSize,
char* target, int targetSize);
+ #ifdef NOT_USED
static void browserPostURLRequest(int id, char* url, int urlSize,
char* target, int targetSize,
char* postData, int postDataSize);
+ #endif
typedef struct sqStreamRequest {
***************
*** 127,132 ****
int primitivePluginBrowserReady()
{
! pop(1);
! pushBool(inBrowser);
return 1;
}
--- 129,139 ----
int primitivePluginBrowserReady()
{
! if (inBrowser)
! {
! pop(1);
! pushBool(1);
! }
! else
! primitiveFail();
return 1;
}
***************
*** 239,243 ****
sqStreamRequest *req;
int id, fileOop, openFn;
- SQFile* file;
id= stackIntegerValue(0);
--- 246,249 ----
***************
*** 254,272 ****
DPRINT("VM: Creating file handle for %s\n", req->localName);
! fileOop= instantiateClassindexableSize(classByteArray(), sizeof(SQFile));
! if (!isBytes(fileOop)) return primitiveFail();
!
! file= firstIndexableField(fileOop);
!
! /* this opens a file w/o security checks - I wonder if this is a security hole? */
! openFn= ioLoadFunctionFrom("fileOpennamesizewrite", "FilePlugin");
if (!openFn)
! {
! DPRINT("VM: Couldn't load function from FilePlugin!\n");
! return primitiveFail();
! }
!
! ((int (*) (SQFile *, int, int,int)) openFn)
! (firstIndexableField(fileOop), (int)req->localName, strlen(req->localName), 0);
if (failed())
--- 260,280 ----
DPRINT("VM: Creating file handle for %s\n", req->localName);
! openFn= ioLoadFunctionFrom("fileOpenNamesizewritesecure", "FilePlugin");
if (!openFn)
! {
! DPRINT("VM: Couldn't load fileOpenName:size:write:secure: from FilePlugin!\n");
! return primitiveFail();
! }
!
! fileOop= ((int (*) (char *, int, int, int)) openFn)
! (req->localName, strlen(req->localName), 0 /* readonly */, 0 /* insecure */);
!
! /* if file ends in a $, it was a temp link created by the plugin */
! if ('$' == req->localName[strlen(req->localName) - 1])
! {
! DPRINT("VM: unlink %s\n", req->localName);
! if (-1 == unlink(req->localName))
! DPRINT("VM: unlink failed: %s\n", strerror(errno));
! }
if (failed())
***************
*** 424,427 ****
--- 432,436 ----
Notify plugin to post data to the specified url and get result into target
*/
+ #ifdef NOT_USED
static void browserPostURLRequest(int id, char* url, int urlSize,
char* target, int targetSize,
***************
*** 449,452 ****
--- 458,462 ----
browserSend(postData, postDataSize);
}
+ #endif
***************
*** 459,463 ****
Handle commands sent by the plugin.
*/
! void browserProcessCommand()
{
static int firstTime= 1;
--- 469,473 ----
Handle commands sent by the plugin.
*/
! void browserProcessCommand(void)
{
static int firstTime= 1;
Index: sqXWindow.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sqXWindow.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** sqXWindow.c 29 Apr 2002 21:49:17 -0000 1.32
--- sqXWindow.c 12 May 2003 07:39:09 -0000 1.33
***************
*** 1,6 ****
/* sqXWindow.c -- support for Unix and the X Window System.
*
! * Copyright (C) 1996 1997 1998 1999 2000 2001 Ian Piumarta and individual
! * authors/contributors listed elsewhere in this file.
* All rights reserved.
*
--- 1,6 ----
/* sqXWindow.c -- support for Unix and the X Window System.
*
! * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
[...4223 lines suppressed...]
+ #else
+ return 0;
+ #endif
+ }
+
+
+ /* various thinks required by OSProcess when compiled headless */
+
+ #if defined(HEADLESS)
+
+ char *displayName= "";
+ int isConnectedToXServer= 0;
+
+ int openXDisplay(void) { return 0; }
+ int synchronizeXDisplay(void) { return 0; }
+ int disconnectXDisplay(void) { return 0; }
+ int forgetXDisplay(void) { return 0; }
+
+ #endif
+
Index: sunos.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/unix/vm/sunos.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sunos.h 24 Oct 2001 23:14:20 -0000 1.1.1.1
--- sunos.h 12 May 2003 07:39:09 -0000 1.2
***************
*** 1,6 ****
/* It's a mystery to me why they even bothered with /usr/include on SunOS
*
! * Copyright (C) 1996 1997 1998 1999 2000 2001 Ian Piumarta and individual
! * authors/contributors listed elsewhere in this file.
* All rights reserved.
*
--- 1,6 ----
/* It's a mystery to me why they even bothered with /usr/include on SunOS
*
! * Copyright (C) 1996-2002 Ian Piumarta and other authors/contributors
! * as listed elsewhere in this file.
* All rights reserved.
*
***************
*** 21,33 ****
* would be appreciated but is not required.
*
! * 2. This notice may not be removed or altered in any source distribution.
*
! * Using or modifying this file for use in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the base
! * of the distribution before proceeding with any such use.
*
! * You are STRONGLY DISCOURAGED from distributing a modified version of
! * this file under its original name without permission. If you must
! * change it, rename it first.
*/
--- 21,33 ----
* would be appreciated but is not required.
*
! * 2. This notice must not be removed or altered in any source distribution.
*
! * Using (or modifying this file for use) in any context other than Squeak
! * changes these copyright conditions. Read the file `COPYING' in the
! * directory `platforms/unix/doc' before proceeding with any such use.
*
! * You are not allowed to distribute a modified version of this file
! * under its original name without explicit permission to do so. If
! * you change it, rename it.
*/
|