OpenVMS port; checkin for "Colin R. Blake" <colin@theblakes.com>.
This commit is contained in:
Родитель
336aa9974a
Коммит
e95ed455cf
|
@ -37,4 +37,4 @@ CPU_ARCH_TAG = _$(CPU_ARCH)
|
|||
OS_CFLAGS = -DVMS
|
||||
|
||||
# The command to build a shared library in POSIX on OpenVMS.
|
||||
XXXMKSHLIB = c89 -Wl,share
|
||||
MKSHLIB = vmsld $(OPTIMIZER)
|
||||
|
|
|
@ -287,7 +287,7 @@ ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
|
|||
| sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms
|
||||
$(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
|
||||
-bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS)
|
||||
else
|
||||
else # AIX 4.1
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
ifeq ($(OS_TARGET), WIN16)
|
||||
echo system windows dll initinstance >w16link
|
||||
|
@ -305,7 +305,7 @@ ifeq ($(OS_TARGET), WIN16)
|
|||
echo libfile libentry >>w16link
|
||||
$(LINK) @w16link.
|
||||
rm w16link
|
||||
else
|
||||
else # WIN16
|
||||
ifeq ($(OS_TARGET), OS2)
|
||||
# append ( >> ) doesn't seem to be working under OS/2 gmake. Run through OS/2 shell instead.
|
||||
@cmd /C "echo LIBRARY $(notdir $(basename $(SHARED_LIBRARY))) INITINSTANCE TERMINSTANCE >$@.def"
|
||||
|
@ -317,12 +317,22 @@ ifeq ($(OS_TARGET), OS2)
|
|||
$(LINK_DLL) $(DLLBASE) $(OBJS) $(OS_LIBS) $(EXTRA_LIBS) $@.def
|
||||
else
|
||||
$(LINK_DLL) -MAP $(DLLBASE) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
endif # OS2
|
||||
endif # WIN16
|
||||
else # WINNT
|
||||
ifeq ($(OS_TARGET), OpenVMS)
|
||||
@if test ! -f $(OBJDIR)/VMSuni.opt; then \
|
||||
echo "Creating universal symbol option file $(OBJDIR)/VMSuni.opt";\
|
||||
create_opt_uni $(OBJS); \
|
||||
mv VMSuni.opt $(OBJDIR); \
|
||||
fi
|
||||
$(MKSHLIB) -o $@ $(OBJS) $(EXTRA_LIBS) $(OS_LIBS) $(OBJDIR)/VMSuni.opt
|
||||
@echo "`translate $@`" > $(@:.$(DLL_SUFFIX)=.vms)
|
||||
else # OpenVMS
|
||||
$(MKSHLIB) -o $@ $(OBJS) $(EXTRA_LIBS) $(OS_LIBS)
|
||||
endif
|
||||
endif
|
||||
endif # OpenVMS
|
||||
endif # WINNT
|
||||
endif # AIX 4.1
|
||||
|
||||
$(PURE_LIBRARY):
|
||||
rm -f $@
|
||||
|
|
|
@ -160,6 +160,9 @@ export:: $(TARGETS)
|
|||
$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
|
||||
ifdef SHARED_LIBRARY
|
||||
$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
|
||||
ifeq ($(OS_ARCH), OpenVMS)
|
||||
$(INSTALL) -m 444 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(DIST)/lib
|
||||
endif
|
||||
endif
|
||||
ifeq ($(MOZ_BITS),16)
|
||||
$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)
|
||||
|
|
|
@ -52,6 +52,17 @@ typedef MPARAM WPARAM,LPARAM;
|
|||
|
||||
#if defined(VMS)
|
||||
/*
|
||||
** If MOTIF is being used then XtAppAddInput is used as the notification
|
||||
** method and so event flags must be used, so you need to define
|
||||
** VMS_EVENTS_USE_EF. If gdk is being used then select is used for
|
||||
** notification, and then VMS_EVENTS_USE_SOCKETS should be defined.
|
||||
*/
|
||||
#undef VMS_EVENTS_USE_EF
|
||||
#define VMS_EVENTS_USE_SOCKETS
|
||||
#endif
|
||||
|
||||
#if defined(VMS_EVENTS_USE_EF)
|
||||
/*
|
||||
** On OpenVMS, XtAppAddInput doesn't want a regular fd, instead it
|
||||
** wants an event flag. So, we don't create and use a pipe for
|
||||
** notification of when an event queue has something ready, instead
|
||||
|
@ -61,7 +72,12 @@ typedef MPARAM WPARAM,LPARAM;
|
|||
#include <lib$routines.h>
|
||||
#include <starlet.h>
|
||||
#include <stsdef.h>
|
||||
#endif /* VMS */
|
||||
#endif /* VMS_EVENTS_USE_EF */
|
||||
|
||||
#if defined(VMS_EVENTS_USE_SOCKETS)
|
||||
#include <socket.h>
|
||||
#endif /* VMS_EVENTS_USE_SOCKETS */
|
||||
|
||||
|
||||
static PRLogModuleInfo *event_lm = NULL;
|
||||
|
||||
|
@ -87,7 +103,7 @@ struct PLEventQueue {
|
|||
PRThread* handlerThread;
|
||||
EventQueueType type;
|
||||
PRBool processingEvents;
|
||||
#if defined(VMS)
|
||||
#if defined(VMS_EVENTS_USE_EF)
|
||||
int efn;
|
||||
int notifyCount;
|
||||
#elif defined(XP_UNIX)
|
||||
|
@ -602,7 +618,7 @@ _pl_SetupNativeNotifier(PLEventQueue* self)
|
|||
#pragma unused (self)
|
||||
#endif
|
||||
|
||||
#if defined(VMS)
|
||||
#if defined(VMS_EVENTS_USE_EF)
|
||||
{
|
||||
#ifdef VMS_USE_GETEF
|
||||
unsigned int status;
|
||||
|
@ -625,7 +641,11 @@ _pl_SetupNativeNotifier(PLEventQueue* self)
|
|||
int err;
|
||||
int flags;
|
||||
|
||||
#if defined(VMS_EVENTS_USE_SOCKETS)
|
||||
err = socketpair(AF_INET,SOCK_STREAM,0,self->eventPipe);
|
||||
#else
|
||||
err = pipe(self->eventPipe);
|
||||
#endif
|
||||
if (err != 0) {
|
||||
return PR_FAILURE;
|
||||
}
|
||||
|
@ -687,7 +707,7 @@ _pl_CleanupNativeNotifier(PLEventQueue* self)
|
|||
#pragma unused (self)
|
||||
#endif
|
||||
|
||||
#if defined(VMS)
|
||||
#if defined(VMS_EVENTS_USE_EF)
|
||||
#ifdef VMS_USE_GETEF
|
||||
{
|
||||
unsigned int status;
|
||||
|
@ -720,7 +740,7 @@ _pl_NativeNotify(PLEventQueue* self)
|
|||
}/* --- end _pl_NativeNotify() --- */
|
||||
#endif /* XP_OS2 */
|
||||
|
||||
#if defined(VMS)
|
||||
#if defined(VMS_EVENTS_USE_EF)
|
||||
/* Just set the event flag */
|
||||
static PRStatus
|
||||
_pl_NativeNotify(PLEventQueue* self)
|
||||
|
@ -779,7 +799,7 @@ _pl_NativeNotify(PLEventQueue* self)
|
|||
static PRStatus
|
||||
_pl_AcknowledgeNativeNotify(PLEventQueue* self)
|
||||
{
|
||||
#if defined(VMS)
|
||||
#if defined(VMS_EVENTS_USE_EF)
|
||||
/* Clear the event flag if we're all done */
|
||||
/* NOTE that we might want to always clear the event flag, even if the */
|
||||
/* notifyCount says we shouldn't. */
|
||||
|
@ -822,7 +842,7 @@ PL_GetEventQueueSelectFD(PLEventQueue* self)
|
|||
if (self == NULL)
|
||||
return -1;
|
||||
|
||||
#if defined(VMS)
|
||||
#if defined(VMS_EVENTS_USE_EF)
|
||||
return self->efn;
|
||||
#elif defined(XP_UNIX)
|
||||
return self->eventPipe[0];
|
||||
|
|
|
@ -158,6 +158,9 @@ export:: $(TARGETS)
|
|||
$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
|
||||
ifdef SHARED_LIBRARY
|
||||
$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
|
||||
ifeq ($(OS_ARCH), OpenVMS)
|
||||
$(INSTALL) -m 444 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(DIST)/lib
|
||||
endif
|
||||
endif
|
||||
ifeq ($(MOZ_BITS),16)
|
||||
$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
|
||||
|
|
|
@ -177,5 +177,11 @@ endif
|
|||
export:: $(TARGETS) $(HEADERS)
|
||||
$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
|
||||
$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
|
||||
ifeq ($(OS_ARCH),OpenVMS)
|
||||
$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/lib
|
||||
ifdef SHARED_LIBRARY
|
||||
$(INSTALL) -m 444 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(DIST)/lib
|
||||
endif
|
||||
endif
|
||||
|
||||
install:: export
|
||||
|
|
|
@ -73,8 +73,8 @@ struct ip_mreq {
|
|||
|
||||
#define NEED_TIME_R
|
||||
|
||||
#undef HAVE_DLL
|
||||
#undef USE_DLFCN
|
||||
#define HAVE_DLL
|
||||
#define USE_DLFCN
|
||||
|
||||
#define _PR_POLL_AVAILABLE
|
||||
#define _PR_USE_POLL
|
||||
|
|
|
@ -91,10 +91,6 @@ endif
|
|||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OpenVMS)
|
||||
OS_LIBS = -lvms_jackets
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OSF1)
|
||||
ifeq ($(USE_PTHREADS), 1)
|
||||
OS_LIBS = -lpthread -lrt
|
||||
|
@ -395,6 +391,9 @@ export:: $(TARGETS)
|
|||
$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
|
||||
ifdef SHARED_LIBRARY
|
||||
$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
|
||||
ifeq ($(OS_ARCH), OpenVMS)
|
||||
$(INSTALL) -m 444 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(DIST)/lib
|
||||
endif
|
||||
endif
|
||||
ifeq ($(MOZ_BITS),16)
|
||||
$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
|
||||
|
|
|
@ -187,3 +187,30 @@ int thread_resume(PRThread *thr_id) {
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef AS_IS
|
||||
/*
|
||||
** These are here because of the problems we have when
|
||||
** compiling AS_IS. After much trying to fix this problem
|
||||
** with macro definitions in _pth.h, I finally gave up
|
||||
** and put these jackets here. So now these two calls both
|
||||
** map onto their lowercase version, and the lowercase
|
||||
** version here just calls the uppercase version.
|
||||
*/
|
||||
|
||||
#undef PTHREAD_MUTEX_INIT
|
||||
#undef PTHREAD_COND_INIT
|
||||
|
||||
int pthread_mutex_init (
|
||||
pthread_mutex_t *mutex,
|
||||
const pthread_mutexattr_t *attr) {
|
||||
return PTHREAD_MUTEX_INIT(mutex,attr);
|
||||
}
|
||||
|
||||
int pthread_cond_init (
|
||||
pthread_cond_t *cond,
|
||||
const pthread_condattr_t *attr){
|
||||
return PTHREAD_COND_INIT (cond,attr);
|
||||
}
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче