Changeset 10 for python/trunk/Include


Ignore:
Timestamp:
Sep 3, 2010, 5:33:06 PM (15 years ago)
Author:
Yuri Dario
Message:

python: merged offline changes.

Location:
python/trunk/Include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk/Include/osdefs.h

    r2 r10  
    2020#define MAXPATHLEN 256
    2121#endif
     22#define DRVSEP ':' /* (bird) */
    2223#define DELIM ';'
    2324#endif
     
    3435#ifndef SEP
    3536#define SEP '/'
     37#endif
     38
     39/* Test if `ch' is a filename separator (bird) */
     40#ifdef ALTSEP
     41#define IS_SEP(ch) ((ch) == SEP || (ch) == ALTSEP)
     42#else
     43#define IS_SEP(ch) ((ch) == SEP)
     44#endif
     45
     46/* Test if `path' has a drive letter or not. (bird) */
     47#ifdef DRVSEP
     48#define HAS_DRV(path) (*(path) && (path)[1] == DRVSEP)
     49#else
     50#define HAS_DRV(path) 0
     51#endif
     52
     53/* Test if `path' is absolute or not. (bird) */
     54#ifdef DRVSEP
     55#define IS_ABSPATH(path) (IS_SEP((path)[0]) || HAS_DRV(path))
     56#else
     57#define IS_ABSPATH(path) (IS_SEP((path)[0]))
     58#endif
     59
     60/* Test if `path' contains any of the path separators including drive letter. (bird) */
     61#ifdef ALTSEP
     62#define HAS_ANYSEP(path) ( strchr((path), SEP) || strchr((path), ALTSEP) || HAS_DRV(path) )
     63#else
     64#define HAS_ANYSEP(path) ( strchr((path), SEP) || HAS_DRV(path) )
    3665#endif
    3766
  • python/trunk/Include/pyport.h

    r2 r10  
    550550
    551551  BeOS and cygwin are the only other autoconf platform requiring special
    552   linkage handling and both of these use __declspec().
     552  linkage handling and both of these use __declspec(). Ditto for OS/2.
    553553*/
    554 #if defined(__CYGWIN__) || defined(__BEOS__)
     554#if defined(__CYGWIN__) || defined(__BEOS__) || defined(__OS2__)
    555555#       define HAVE_DECLSPEC_DLL
    556556#endif
     
    564564                        /* module init functions inside the core need no external linkage */
    565565                        /* except for Cygwin to handle embedding (FIXME: BeOS too?) */
    566 #                       if defined(__CYGWIN__)
     566#                       if defined(__CYGWIN__) || defined(__OS2__)
    567567#                               define PyMODINIT_FUNC __declspec(dllexport) void
    568568#                       else /* __CYGWIN__ */
     
    574574                        /* Under Cygwin, auto-import functions to prevent compilation */
    575575                        /* failures similar to http://python.org/doc/FAQ.html#3.24 */
    576 #                       if !defined(__CYGWIN__)
     576#                       if !defined(__CYGWIN__) && !defined(__OS2__)
    577577#                               define PyAPI_FUNC(RTYPE) __declspec(dllimport) RTYPE
    578578#                       endif /* !__CYGWIN__ */
     579#                       if !defined(__OS2__)
    579580#                       define PyAPI_DATA(RTYPE) extern __declspec(dllimport) RTYPE
     581#                       endif /* !__OS2__ */
    580582                        /* module init functions outside the core must be exported */
    581583#                       if defined(__cplusplus)
Note: See TracChangeset for help on using the changeset viewer.