| 1 |
|
|---|
| 2 | /*
|
|---|
| 3 | * Copyright © 2001 Novell, Inc. All Rights Reserved.
|
|---|
| 4 | *
|
|---|
| 5 | * You may distribute under the terms of either the GNU General Public
|
|---|
| 6 | * License or the Artistic License, as specified in the README file.
|
|---|
| 7 | *
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | /*
|
|---|
| 11 | * FILENAME : perllib.c
|
|---|
| 12 | * DESCRIPTION : Library functions for parsing and running Perl.
|
|---|
| 13 | * This is based on the perllib.c file of Win32 port.
|
|---|
| 14 | * Author : SGP
|
|---|
| 15 | * Date : January 2001.
|
|---|
| 16 | *
|
|---|
| 17 | */
|
|---|
| 18 |
|
|---|
| 19 | /*
|
|---|
| 20 | * "The Road goes ever on and on, down from the door where it began."
|
|---|
| 21 | */
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 | #include "EXTERN.h"
|
|---|
| 26 | #include "perl.h"
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | #ifdef PERL_OBJECT
|
|---|
| 30 | #define NO_XSLOCKS
|
|---|
| 31 | #endif
|
|---|
| 32 |
|
|---|
| 33 | //CHKSGP
|
|---|
| 34 | //Including this is giving premature end-of-file error during compilation
|
|---|
| 35 | //#include "XSUB.h"
|
|---|
| 36 |
|
|---|
| 37 | #ifdef PERL_IMPLICIT_SYS
|
|---|
| 38 |
|
|---|
| 39 | #include "nw5iop.h"
|
|---|
| 40 | #include <fcntl.h>
|
|---|
| 41 |
|
|---|
| 42 | #endif //PERL_IMPLICIT_SYS
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 | #ifdef PERL_IMPLICIT_SYS
|
|---|
| 46 |
|
|---|
| 47 | #include "nwperlhost.h"
|
|---|
| 48 | #define w32_internal_host (PL_sys_intern.internal_host) // (J)
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 | EXTERN_C void
|
|---|
| 52 | perl_get_host_info(struct IPerlMemInfo* perlMemInfo,
|
|---|
| 53 | struct IPerlMemInfo* perlMemSharedInfo,
|
|---|
| 54 | struct IPerlMemInfo* perlMemParseInfo,
|
|---|
| 55 | struct IPerlEnvInfo* perlEnvInfo,
|
|---|
| 56 | struct IPerlStdIOInfo* perlStdIOInfo,
|
|---|
| 57 | struct IPerlLIOInfo* perlLIOInfo,
|
|---|
| 58 | struct IPerlDirInfo* perlDirInfo,
|
|---|
| 59 | struct IPerlSockInfo* perlSockInfo,
|
|---|
| 60 | struct IPerlProcInfo* perlProcInfo)
|
|---|
| 61 | {
|
|---|
| 62 | if (perlMemInfo) {
|
|---|
| 63 | Copy(&perlMem, &perlMemInfo->perlMemList, perlMemInfo->nCount, void*);
|
|---|
| 64 | perlMemInfo->nCount = (sizeof(struct IPerlMem)/sizeof(void*));
|
|---|
| 65 | }
|
|---|
| 66 | if (perlMemSharedInfo) {
|
|---|
| 67 | Copy(&perlMem, &perlMemSharedInfo->perlMemList, perlMemSharedInfo->nCount, void*);
|
|---|
| 68 | perlMemSharedInfo->nCount = (sizeof(struct IPerlMem)/sizeof(void*));
|
|---|
| 69 | }
|
|---|
| 70 | if (perlMemParseInfo) {
|
|---|
| 71 | Copy(&perlMem, &perlMemParseInfo->perlMemList, perlMemParseInfo->nCount, void*);
|
|---|
| 72 | perlMemParseInfo->nCount = (sizeof(struct IPerlMem)/sizeof(void*));
|
|---|
|
|---|