Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
603c6831
Kaydet (Commit)
603c6831
authored
Kas 05, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF patch 473749 compile under OS/2 VA C++, from Michael Muller.
Changes enabling Python to compile under OS/2 Visual Age C++.
üst
c4440399
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
36 deletions
+68
-36
socketmodule.c
Modules/socketmodule.c
+4
-1
config.c
PC/os2vacpp/config.c
+0
-2
makefile
PC/os2vacpp/makefile
+42
-29
pyconfig.h
PC/os2vacpp/pyconfig.h
+10
-2
python.def
PC/os2vacpp/python.def
+7
-2
bltinmodule.c
Python/bltinmodule.c
+4
-0
importdl.h
Python/importdl.h
+1
-0
No files found.
Modules/socketmodule.c
Dosyayı görüntüle @
603c6831
...
@@ -142,13 +142,16 @@ Socket methods:
...
@@ -142,13 +142,16 @@ Socket methods:
#include <netdb.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/in.h>
#if !(defined(__BEOS__) || defined(__CYGWIN__))
#if !(defined(__BEOS__) || defined(__CYGWIN__)
|| (defined(PYOS_OS2) && defined(PYCC_VACPP))
)
#include <netinet/tcp.h>
#include <netinet/tcp.h>
#endif
#endif
/* Headers needed for inet_ntoa() and inet_addr() */
/* Headers needed for inet_ntoa() and inet_addr() */
#ifdef __BEOS__
#ifdef __BEOS__
#include <net/netdb.h>
#include <net/netdb.h>
#elif defined(PYOS_OS2) && defined(PYCC_VACPP)
#include <netdb.h>
typedef
size_t
socklen_t
;
#else
#else
#ifndef USE_GUSI1
#ifndef USE_GUSI1
#include <arpa/inet.h>
#include <arpa/inet.h>
...
...
PC/os2vacpp/config.c
Dosyayı görüntüle @
603c6831
...
@@ -34,7 +34,6 @@ extern void initrotor(void);
...
@@ -34,7 +34,6 @@ extern void initrotor(void);
extern
void
initsignal
(
void
);
extern
void
initsignal
(
void
);
extern
void
initselect
(
void
);
extern
void
initselect
(
void
);
extern
void
init_socket
(
void
);
extern
void
init_socket
(
void
);
extern
void
initsoundex
(
void
);
extern
void
initstrop
(
void
);
extern
void
initstrop
(
void
);
extern
void
initstruct
(
void
);
extern
void
initstruct
(
void
);
extern
void
inittime
(
void
);
extern
void
inittime
(
void
);
...
@@ -82,7 +81,6 @@ struct _inittab _PyImport_Inittab[] = {
...
@@ -82,7 +81,6 @@ struct _inittab _PyImport_Inittab[] = {
{
"_socket"
,
init_socket
},
{
"_socket"
,
init_socket
},
{
"select"
,
initselect
},
{
"select"
,
initselect
},
#endif
#endif
{
"soundex"
,
initsoundex
},
{
"strop"
,
initstrop
},
{
"strop"
,
initstrop
},
{
"struct"
,
initstruct
},
{
"struct"
,
initstruct
},
{
"time"
,
inittime
},
{
"time"
,
inittime
},
...
...
PC/os2vacpp/makefile
Dosyayı görüntüle @
603c6831
...
@@ -65,8 +65,7 @@ MKMF_SRCS = $(PY_MODULES)\*.c $(PY_OBJECTS)\*.c $(PY_PARSER)\*.c $(PY_PYTHON)\*.
...
@@ -65,8 +65,7 @@ MKMF_SRCS = $(PY_MODULES)\*.c $(PY_OBJECTS)\*.c $(PY_PARSER)\*.c $(PY_PYTHON)\*.
#.HDRPATH.c := $(PROJINCLUDE,;= ) $(.HDRPATH.c)
#.HDRPATH.c := $(PROJINCLUDE,;= ) $(.HDRPATH.c)
#.PATH.c = .;$(PY_MODULES);$(PY_OBJECTS);$(PY_PARSER);$(PY_PYTHON)
#.PATH.c = .;$(PY_MODULES);$(PY_OBJECTS);$(PY_PARSER);$(PY_PYTHON)
OTHERLIBS
=
$(OS2TCPIP)
\l
ib
\s
o32dll.lib
$(OS2TCPIP)
\l
ib
\t
cp32dll.lib
\
OTHERLIBS
=
so32dll.lib tcp32dll.lib
# Tcl76.lib Tk42.lib
$(TCLTK)
\L
ib
\T
cl76.lib
$(TCLTK)
\L
ib
\T
k42.lib
#################
#################
# Inference Rules
# Inference Rules
...
@@ -121,7 +120,14 @@ PYTHON = \
...
@@ -121,7 +120,14 @@ PYTHON = \
$(PATHOBJ)
\S
ysModule.obj
\
$(PATHOBJ)
\S
ysModule.obj
\
$(PATHOBJ)
\T
hread.obj
\
$(PATHOBJ)
\T
hread.obj
\
$(PATHOBJ)
\T
raceBack.obj
\
$(PATHOBJ)
\T
raceBack.obj
\
$(PATHOBJ)
\F
rozenMain.obj
$(PATHOBJ)
\F
rozenMain.obj
\
$(PATHOBJ)
\e
xceptions.obj
\
$(PATHOBJ)
\s
ymtable.obj
\
$(PATHOBJ)
\c
odecs.obj
\
$(PATHOBJ)
\f
uture.obj
\
$(PATHOBJ)
\d
ynload_os2.obj
\
$(PATHOBJ)
\m
ysnprintf.obj
\
$(PATHOBJ)
\i
terobject.obj
# Python's Internal Parser
# Python's Internal Parser
PARSER
=
\
PARSER
=
\
...
@@ -154,7 +160,13 @@ OBJECTS = \
...
@@ -154,7 +160,13 @@ OBJECTS = \
$(PATHOBJ)
\S
liceObject.obj
\
$(PATHOBJ)
\S
liceObject.obj
\
$(PATHOBJ)
\S
tringObject.obj
\
$(PATHOBJ)
\S
tringObject.obj
\
$(PATHOBJ)
\T
upleObject.obj
\
$(PATHOBJ)
\T
upleObject.obj
\
$(PATHOBJ)
\T
ypeObject.obj
$(PATHOBJ)
\T
ypeObject.obj
\
$(PATHOBJ)
\u
nicodeobject.obj
\
$(PATHOBJ)
\u
nicodectype.obj
\
$(PATHOBJ)
\c
ellobject.obj
\
$(PATHOBJ)
\d
escrobject.obj
\
$(PATHOBJ)
\w
eakrefobject.obj
\
$(PATHOBJ)
\s
tructseq.obj
# Extension Modules (Built-In or as Separate DLLs)
# Extension Modules (Built-In or as Separate DLLs)
MODULES
=
\
MODULES
=
\
...
@@ -181,12 +193,13 @@ MODULES = \
...
@@ -181,12 +193,13 @@ MODULES = \
$(PATHOBJ)
\S
electModule.obj
\
$(PATHOBJ)
\S
electModule.obj
\
$(PATHOBJ)
\S
ignalModule.obj
\
$(PATHOBJ)
\S
ignalModule.obj
\
$(PATHOBJ)
\S
ocketModule.obj
\
$(PATHOBJ)
\S
ocketModule.obj
\
$(PATHOBJ)
\S
oundEx.obj
\
$(PATHOBJ)
\S
tropModule.obj
\
$(PATHOBJ)
\S
tropModule.obj
\
$(PATHOBJ)
\S
tructModule.obj
\
$(PATHOBJ)
\S
tructModule.obj
\
$(PATHOBJ)
\T
imeModule.obj
\
$(PATHOBJ)
\T
imeModule.obj
\
$(PATHOBJ)
\T
hreadModule.obj
\
$(PATHOBJ)
\T
hreadModule.obj
\
$(PATHOBJ)
\Y
UVConvert.obj
$(PATHOBJ)
\Y
UVConvert.obj
\
$(PATHOBJ)
\b
ufferobject.obj
\
$(PATHOBJ)
\g
cmodule.obj
# Standalone Parser Generator Program (Shares Some of Python's Modules)
# Standalone Parser Generator Program (Shares Some of Python's Modules)
PGEN
=
\
PGEN
=
\
...
@@ -211,7 +224,7 @@ _GEN = /G4 /Gm /Gd-
...
@@ -211,7 +224,7 @@ _GEN = /G4 /Gm /Gd-
# /Gm = Use Multithread Runtime
# /Gm = Use Multithread Runtime
# /Gd = Dynamically Load Runtime
# /Gd = Dynamically Load Runtime
# /Ms = Use _System Calling Convention (vs _Optlink)
# /Ms = Use _System Calling Convention (vs _Optlink)
# (to allow non-VAC++ code to call into Python
15
.dll)
# (to allow non-VAC++ code to call into Python
22
.dll)
_OPT
=
/O /Gl
_OPT
=
/O /Gl
# /O = Enable Speed-Optimizations
# /O = Enable Speed-Optimizations
...
@@ -246,8 +259,8 @@ CFLAGS = $(_BASE) $(_GEN) $(_OPT) $(_DBG) $(_OUT) $(_EXE) /Ss
...
@@ -246,8 +259,8 @@ CFLAGS = $(_BASE) $(_GEN) $(_OPT) $(_DBG) $(_OUT) $(_EXE) /Ss
###################
###################
# Primary Target(s)
# Primary Target(s)
###################
###################
All
:
obj noise PyCore.lib Python
15
.lib PGen.exe
\
All
:
obj noise PyCore.lib Python
22
.lib PGen.exe
\
Python.exe PythonPM.exe Python
15.dll
_tkinter.dll
Python.exe PythonPM.exe Python
22.dll
#
_tkinter.dll
Modules
:
$(MODULES)
Modules
:
$(MODULES)
Objects
:
$(OBJECTS)
Objects
:
$(OBJECTS)
...
@@ -267,43 +280,43 @@ noise:
...
@@ -267,43 +280,43 @@ noise:
##############
##############
# Python Extension DLL: Tcl/Tk Interface
# Python Extension DLL: Tcl/Tk Interface
_tkinter.dll
:
$(PATHOBJ)
\_
tkinter.obj Python15
.lib _tkinter.def
#_tkinter.dll: $(PATHOBJ)\_tkinter.obj Python22
.lib _tkinter.def
@
Echo Linking
$@
As DLL
#
@ Echo Linking $@ As DLL
@
$(CC)
$(CFLAGS)
/B
"/NOE"
$(_DLL)
/Fe
$@
$(_MAP)
$*
*
$(OTHERLIBS)
>>
$(ERRS)
#
@ $(CC) $(CFLAGS) /B"/NOE" $(_DLL) /Fe$@ $(_MAP) $** $(OTHERLIBS) >>$(ERRS)
$(PATHOBJ)\_tkinter.obj
:
$(PY_MODULES)
\_
tkinter.c
#
$(PATHOBJ)\_tkinter.obj: $(PY_MODULES)\_tkinter.c
@
Echo Compiling
$*
*
#
@ Echo Compiling $**
@
$(CC)
-c
$(CFLAGS)
$(_DLL)
-Fo
$@
$*
*
>>
$(ERRS)
#
@ $(CC) -c $(CFLAGS) $(_DLL) -Fo$@ $** >>$(ERRS)
# Object Library of All Essential Python Routines
# Object Library of All Essential Python Routines
PyCore.lib
:
$(MODULES) $(OBJECTS) $(PARSER) $(PYTHON) $(PATHOBJ)
\C
onfig.obj
PyCore.lib
:
$(MODULES) $(OBJECTS) $(PARSER) $(PYTHON) $(PATHOBJ)
\C
onfig.obj
@
Echo Adding Updated Object Files to Link Library
$@
@
Echo Adding Updated Object Files to Link Library
$@
@
!
ILIB
$@
/NOLOGO /NOBACKUP -+
$?
;
>>
$(ERRS)
@
!
ILIB
$@
/NOLOGO /NOBACKUP -+
$?
;
>>
$(ERRS)
Python
15
.dll
:
$(PATHOBJ)
\C
ompile.obj PyCore.lib Python.def
Python
22
.dll
:
$(PATHOBJ)
\C
ompile.obj PyCore.lib Python.def
@
Echo Linking
$@
As DLL
@
Echo Linking
$@
As DLL
@
$(CC)
$(CFLAGS)
/B
"/NOE"
$(_DLL)
/Fe
$@
$(_MAP)
$*
*
$(OTHERLIBS)
>>
$(ERRS)
@
$(CC)
$(CFLAGS)
/B
"/NOE"
$(_DLL)
/Fe
$@
$(_MAP)
$*
*
$(OTHERLIBS)
>>
$(ERRS)
@
Echo Compressing
$@
with LxLite
#
@ Echo Compressing $@ with LxLite
@
lxlite
$@
#
@ lxlite $@
# IBM Linker Requires One Explicit .OBJ To Build a .DLL from a .LIB
# IBM Linker Requires One Explicit .OBJ To Build a .DLL from a .LIB
$(PATHOBJ)\Compile.obj
:
$(PY_PYTHON)
\C
ompile.c
$(PATHOBJ)\Compile.obj
:
$(PY_PYTHON)
\C
ompile.c
@
Echo Compiling
$*
*
@
Echo Compiling
$*
*
@
$(CC)
-c
$(CFLAGS)
$(_DLL)
-Fo
$@
$*
*
>>
$(ERRS)
@
$(CC)
-c
$(CFLAGS)
$(_DLL)
-Fo
$@
$*
*
>>
$(ERRS)
# Import Library for Using the Python
15
.dll
# Import Library for Using the Python
22
.dll
Python
15
.lib
:
Python.def
Python
22
.lib
:
Python.def
@
Echo Making
$@
@
Echo Making
$@
@
IMPLIB /NOLOGO /NOIGNORE
$@
$*
*
>>
$(ERRS)
@
IMPLIB /NOLOGO /NOIGNORE
$@
$*
*
>>
$(ERRS)
@
ILIB /NOLOGO /CONVFORMAT /NOEXTDICTIONARY /NOBROWSE /NOBACKUP
$@
;
>>
$(ERRS)
@
ILIB /NOLOGO /CONVFORMAT /NOEXTDICTIONARY /NOBROWSE /NOBACKUP
$@
;
>>
$(ERRS)
# Small Command-Line Program to Start Interpreter in Python
15
.dll
# Small Command-Line Program to Start Interpreter in Python
22
.dll
Python.exe
:
$(PATHOBJ)
\P
ython.obj Python
15
.lib
Python.exe
:
$(PATHOBJ)
\P
ython.obj Python
22
.lib
@
Echo Linking
$@
As EXE
@
Echo Linking
$@
As EXE
@
$(CC)
$(CFLAGS)
$(_EXE)
/B
"/PM:VIO /STACK:360000"
/Fe
$@
$(_MAP)
$*
*
$(OTHERLIBS)
>>
$(ERRS)
@
$(CC)
$(CFLAGS)
$(_EXE)
/B
"/PM:VIO /STACK:360000"
/Fe
$@
$(_MAP)
$*
*
$(OTHERLIBS)
>>
$(ERRS)
# Small PM-GUI Program to Start Interpreter in Python
15
.dll
# Small PM-GUI Program to Start Interpreter in Python
22
.dll
PythonPM.exe
:
$(PATHOBJ)
\P
ython.obj Python
15
.lib
PythonPM.exe
:
$(PATHOBJ)
\P
ython.obj Python
22
.lib
@
Echo Linking
$@
As EXE
@
Echo Linking
$@
As EXE
@
$(CC)
$(CFLAGS)
$(_EXE)
/B
"/PM:PM /STACK:360000"
/Fe
$@
$(_MAP)
$*
*
$(OTHERLIBS)
>>
$(ERRS)
@
$(CC)
$(CFLAGS)
$(_EXE)
/B
"/PM:PM /STACK:360000"
/Fe
$@
$(_MAP)
$*
*
$(OTHERLIBS)
>>
$(ERRS)
...
@@ -323,13 +336,13 @@ clean:
...
@@ -323,13 +336,13 @@ clean:
# Remove All Targets, Including Final Binaries
# Remove All Targets, Including Final Binaries
distclean
:
clean
distclean
:
clean
--
Del
/Q
PyCore.lib
Python
15
.lib
>NUL
2>&1
--
Del
/Q
PyCore.lib
Python
22
.lib
>NUL
2>&1
--
Del
/Q
Python
15
.dll
Python.exe
PGen.exe
>NUL
2>&1
--
Del
/Q
Python
22
.dll
Python.exe
PGen.exe
>NUL
2>&1
release
:
Python.exe Python
15.dll Python15
.lib
release
:
Python.exe Python
22.dll Python22
.lib
-
- @Echo Y | copy /U Python.exe D:
\E
XEs
-
- @Echo Y | copy /U Python.exe D:
\E
XEs
-
- @Echo Y | copy /U Python
15
.dll D:
\D
LLs
-
- @Echo Y | copy /U Python
22
.dll D:
\D
LLs
-
- @Echo Y | copy /U Python
15
.lib E:
\T
au
\L
ib
-
- @Echo Y | copy /U Python
22
.lib E:
\T
au
\L
ib
-
- @Echo Y | copy /U _tkinter.dll D:
\P
ython
-
- @Echo Y | copy /U _tkinter.dll D:
\P
ython
test
:
test
:
...
...
PC/os2vacpp/pyconfig.h
Dosyayı görüntüle @
603c6831
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
/* Provide a default library so writers of extension modules
/* Provide a default library so writers of extension modules
* won't have to explicitly specify it anymore
* won't have to explicitly specify it anymore
*/
*/
#pragma library("Python
15
.lib")
#pragma library("Python
22
.lib")
/***************************************************/
/***************************************************/
/* 32-Bit IBM VisualAge C/C++ v3.0 for OS/2 */
/* 32-Bit IBM VisualAge C/C++ v3.0 for OS/2 */
...
@@ -79,6 +79,14 @@
...
@@ -79,6 +79,14 @@
/* #define HAVE_LONG_LONG 1 */
/* VAC++ does not support (long long) */
/* #define HAVE_LONG_LONG 1 */
/* VAC++ does not support (long long) */
/* #define SIZEOF_LONG_LONG 8 */
/* Count of Bytes in a (long long) */
/* #define SIZEOF_LONG_LONG 8 */
/* Count of Bytes in a (long long) */
/* unicode definines */
#define Py_USING_UNICODE
#define PY_UNICODE_TYPE wchar_t
#define Py_UNICODE_SIZE SIZEOF_SHORT
/* dynamic loading */
#define HAVE_DYNAMIC_LOADING 1
/* Define if type char is unsigned and you are not using gcc. */
/* Define if type char is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
#ifndef __CHAR_UNSIGNED__
/* #undef __CHAR_UNSIGNED__ */
/* #undef __CHAR_UNSIGNED__ */
...
@@ -188,7 +196,7 @@ typedef int pid_t;
...
@@ -188,7 +196,7 @@ typedef int pid_t;
/* #define HAVE_GETUID 1 */
/* #define HAVE_GETUID 1 */
/* Unix-Specific */
/* Unix-Specific */
#define HAVE_SYS_UN_H 1
/* #include <sys/un.h> */
/*
#define HAVE_SYS_UN_H 1 /* #include <sys/un.h> */
/* #define HAVE_SYS_UTSNAME_H 1 */
/* #include <sys/utsname.h> */
/* #define HAVE_SYS_UTSNAME_H 1 */
/* #include <sys/utsname.h> */
/* #define HAVE_SYS_WAIT_H 1 */
/* #include <sys/wait.h> */
/* #define HAVE_SYS_WAIT_H 1 */
/* #include <sys/wait.h> */
/* #define HAVE_UNISTD_H 1 */
/* #include <unistd.h> */
/* #define HAVE_UNISTD_H 1 */
/* #include <unistd.h> */
...
...
PC/os2vacpp/python.def
Dosyayı görüntüle @
603c6831
LIBRARY PYTHON
15
INITINSTANCE TERMINSTANCE
LIBRARY PYTHON
22
INITINSTANCE TERMINSTANCE
DESCRIPTION 'Python
1.5
Core DLL'
DESCRIPTION 'Python
2.2
Core DLL'
PROTMODE
PROTMODE
DATA MULTIPLE NONSHARED
DATA MULTIPLE NONSHARED
...
@@ -472,4 +472,9 @@ EXPORTS
...
@@ -472,4 +472,9 @@ EXPORTS
_Py_re_search
_Py_re_search
_Py_re_set_syntax
_Py_re_set_syntax
; _Py_samebitset
; _Py_samebitset
PyBuffer_Type
PyBuffer_FromObject
PyBuffer_FromMemory
PyBuffer_FromReadWriteMemory
PyBuffer_New
Python/bltinmodule.c
Dosyayı görüntüle @
603c6831
...
@@ -567,7 +567,11 @@ builtin_execfile(PyObject *self, PyObject *args)
...
@@ -567,7 +567,11 @@ builtin_execfile(PyObject *self, PyObject *args)
#ifndef RISCOS
#ifndef RISCOS
if
(
!
stat
(
filename
,
&
s
))
{
if
(
!
stat
(
filename
,
&
s
))
{
if
(
S_ISDIR
(
s
.
st_mode
))
if
(
S_ISDIR
(
s
.
st_mode
))
#if defined(PYOS_OS2) && defined(PYCC_VACPP)
errno
=
EOS2ERR
;
#else
errno
=
EISDIR
;
errno
=
EISDIR
;
#endif
else
else
exists
=
1
;
exists
=
1
;
}
}
...
...
Python/importdl.h
Dosyayı görüntüle @
603c6831
...
@@ -38,6 +38,7 @@ extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
...
@@ -38,6 +38,7 @@ extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
typedef
FARPROC
dl_funcptr
;
typedef
FARPROC
dl_funcptr
;
#else
#else
#ifdef PYOS_OS2
#ifdef PYOS_OS2
#include <os2def.h>
typedef
int
(
*
APIENTRY
dl_funcptr
)();
typedef
int
(
*
APIENTRY
dl_funcptr
)();
#else
#else
typedef
void
(
*
dl_funcptr
)(
void
);
typedef
void
(
*
dl_funcptr
)(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment