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
ae311bd5
Kaydet (Commit)
ae311bd5
authored
Eyl 12, 1994
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Mods for HP-UX dynamic loading.
üst
73b20df9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
1 deletion
+42
-1
import.c
Python/import.c
+42
-1
No files found.
Python/import.c
Dosyayı görüntüle @
ae311bd5
...
...
@@ -62,6 +62,7 @@ extern long getmtime(); /* In getmtime.c */
WITH_MAC_DL -- Mac dynamic linking (highly experimental)
SHORT_EXT -- short extension for dynamic module, e.g. ".so"
LONG_EXT -- long extension, e.g. "module.so"
hpux -- HP-UX Dynamic Linking - defined by the compiler
(The other WITH_* symbols are used only once, to set the
appropriate symbols.)
...
...
@@ -69,6 +70,15 @@ extern long getmtime(); /* In getmtime.c */
/* Configure dynamic linking */
#ifdef hpux
#define DYNAMIC_LINK
#include <errno.h>
typedef
void
(
*
dl_funcptr
)();
#define _DL_FUNCPTR_DEFINED 1
#define SHORT_EXT ".sl"
#define LONG_EXT "module.sl"
#endif
#ifdef NT
#define DYNAMIC_LINK
#include <windows.h>
...
...
@@ -124,7 +134,7 @@ typedef void (*dl_funcptr)();
#define LONG_EXT "module.so"
#endif
/* USE_SHLIB */
#if
def USE_DL
#if
defined(USE_DL) || defined(hpux)
#include "dl.h"
#endif
...
...
@@ -143,8 +153,12 @@ typedef void (*dl_funcptr)();
extern
char
*
getprogramname
();
#ifndef FUNCNAME_PATTERN
#if defined(__hp9000s300)
#define FUNCNAME_PATTERN "_init%s"
#else
#define FUNCNAME_PATTERN "init%s"
#endif
#endif
#if !defined(SHORT_EXT) && !defined(LONG_EXT)
#define SHORT_EXT ".o"
...
...
@@ -316,7 +330,34 @@ load_dynamic_module(name, namebuf, m, m_ret)
return
NULL
;
}
#endif
/* USE_RLD */
#ifdef hpux
{
shl_t
lib
;
int
flags
;
flags
=
BIND_DEFERRED
;
if
(
verbose
)
{
flags
=
BIND_IMMEDIATE
|
BIND_NONFATAL
|
BIND_VERBOSE
;
printf
(
"shl_load %s
\n
"
,
namebuf
);
}
lib
=
shl_load
(
namebuf
,
flags
,
0
);
if
(
lib
==
NULL
)
{
char
buf
[
256
];
if
(
verbose
)
perror
(
namebuf
);
sprintf
(
buf
,
"Failed to load %s"
,
namebuf
);
err_setstr
(
ImportError
,
buf
);
return
NULL
;
}
if
(
verbose
)
printf
(
"shl_findsym %s
\n
"
,
funcname
);
shl_findsym
(
&
lib
,
funcname
,
TYPE_UNDEFINED
,
(
void
*
)
&
p
);
if
(
p
==
NULL
&&
verbose
)
perror
(
funcname
);
}
#endif hpux
if
(
p
==
NULL
)
{
err_setstr
(
ImportError
,
"dynamic module does not define init function"
);
...
...
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