Skip to content

Commit 0aa0f1f

Browse files
author
andrew.macintyre
committed
build_os2emx.patch in issue 3868 - update OS/2 EMX makefile and config files
Part of source_os2emx.patch in issue 3868: Include/pystrcmp.h: OS/2 has same C APIs as Windows Lib/test/test_io.py: OS/2 has same behaviour as Windows for this test Reviewed by Amaury Forgeot d'Arc git-svn-id: http://svn.python.org/projects/python/trunk@66554 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 412159d commit 0aa0f1f

5 files changed

Lines changed: 19 additions & 9 deletions

File tree

Include/pystrcmp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extern "C" {
88
PyAPI_FUNC(int) PyOS_mystrnicmp(const char *, const char *, Py_ssize_t);
99
PyAPI_FUNC(int) PyOS_mystricmp(const char *, const char *);
1010

11-
#ifdef MS_WINDOWS
11+
#if defined(MS_WINDOWS) || defined(PYOS_OS2)
1212
#define PyOS_strnicmp strnicmp
1313
#define PyOS_stricmp stricmp
1414
#else

Lib/test/test_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def test_large_file_ops(self):
201201
# On Windows and Mac OSX this test comsumes large resources; It takes
202202
# a long time to build the >2GB file and takes >2GB of disk space
203203
# therefore the resource must be enabled to run this test.
204-
if sys.platform[:3] == 'win' or sys.platform == 'darwin':
204+
if sys.platform[:3] in ('win', 'os2') or sys.platform == 'darwin':
205205
if not test_support.is_resource_enabled("largefile"):
206206
print("\nTesting large file ops skipped on %s." % sys.platform,
207207
file=sys.stderr)

PC/os2emx/Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,15 @@ SRC.MODULES= $(addprefix $(TOP), \
287287
Modules/binascii.c \
288288
Modules/cmathmodule.c \
289289
Modules/_codecsmodule.c \
290-
Modules/collectionsmodule.c \
290+
Modules/_collectionsmodule.c \
291291
Modules/cPickle.c \
292292
Modules/cStringIO.c \
293293
Modules/_csv.c \
294294
Modules/datetimemodule.c \
295295
Modules/dlmodule.c \
296296
Modules/errnomodule.c \
297297
Modules/fcntlmodule.c \
298+
Modules/_fileio.c \
298299
Modules/_functoolsmodule.c \
299300
Modules/_heapqmodule.c \
300301
Modules/imageop.c \
@@ -305,7 +306,6 @@ SRC.MODULES= $(addprefix $(TOP), \
305306
Modules/md5module.c \
306307
Modules/operator.c \
307308
Modules/_randommodule.c \
308-
Modules/rgbimgmodule.c \
309309
Modules/shamodule.c \
310310
Modules/sha256module.c \
311311
Modules/sha512module.c \
@@ -343,6 +343,8 @@ SRC.PYTHON= $(addprefix $(TOP), \
343343
Python/compile.c \
344344
Python/codecs.c \
345345
Python/errors.c \
346+
Python/formatter_string.c \
347+
Python/formatter_unicode.c \
346348
Python/frozen.c \
347349
Python/frozenmain.c \
348350
Python/future.c \
@@ -359,8 +361,10 @@ SRC.PYTHON= $(addprefix $(TOP), \
359361
Python/modsupport.c \
360362
Python/mysnprintf.c \
361363
Python/mystrtoul.c \
364+
Python/peephole.c \
362365
Python/pyarena.c \
363366
Python/pyfpe.c \
367+
Python/pymath.c \
364368
Python/pystate.c \
365369
Python/pystrtod.c \
366370
Python/pythonrun.c \
@@ -370,11 +374,14 @@ SRC.PYTHON= $(addprefix $(TOP), \
370374
Python/traceback.c \
371375
Python/getopt.c \
372376
Python/dynload_shlib.c \
373-
Python/thread.c)
377+
Python/thread.c \
378+
Python/_warnings.c)
374379
SRC.OBJECT= $(addprefix $(TOP), \
375380
Objects/abstract.c \
376381
Objects/boolobject.c \
377382
Objects/bufferobject.c \
383+
Objects/bytearrayobject.c \
384+
Objects/bytes_methods.c \
378385
Objects/cellobject.c \
379386
Objects/classobject.c \
380387
Objects/cobject.c \

PC/os2emx/config.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ extern void initarray();
5252
extern void initbinascii();
5353
extern void initcPickle();
5454
extern void initcStringIO();
55-
extern void initcollections();
55+
extern void init_collections();
5656
extern void initcmath();
5757
extern void initdatetime();
5858
extern void initdl();
5959
extern void initerrno();
6060
extern void initfcntl();
61+
extern void init_fileio();
6162
extern void init_functools();
6263
extern void init_heapq();
6364
extern void initimageop();
6465
extern void inititertools();
6566
extern void initmath();
6667
extern void init_md5();
6768
extern void initoperator();
68-
extern void initrgbimg();
6969
extern void init_sha();
7070
extern void init_sha256();
7171
extern void init_sha512();
@@ -118,20 +118,20 @@ struct _inittab _PyImport_Inittab[] = {
118118
{"binascii", initbinascii},
119119
{"cPickle", initcPickle},
120120
{"cStringIO", initcStringIO},
121-
{"collections", initcollections},
121+
{"_collections", init_collections},
122122
{"cmath", initcmath},
123123
{"datetime", initdatetime},
124124
{"dl", initdl},
125125
{"errno", initerrno},
126126
{"fcntl", initfcntl},
127+
{"_fileio", init_fileio},
127128
{"_functools", init_functools},
128129
{"_heapq", init_heapq},
129130
{"imageop", initimageop},
130131
{"itertools", inititertools},
131132
{"math", initmath},
132133
{"_md5", init_md5},
133134
{"operator", initoperator},
134-
{"rgbimg", initrgbimg},
135135
{"_sha", init_sha},
136136
{"_sha256", init_sha256},
137137
{"_sha512", init_sha512},

PC/os2emx/pyconfig.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ typedef long intptr_t;
264264
/* Define if you have the <conio.h> header file. */
265265
#undef HAVE_CONIO_H
266266

267+
/* Define to 1 if you have the `copysign' function. */
268+
#define HAVE_COPYSIGN 1
269+
267270
/* Define if you have the <direct.h> header file. */
268271
#undef HAVE_DIRECT_H
269272

0 commit comments

Comments
 (0)