Re: НА: НА: Smoke [ebcdic] v5.21.8-419 -gaa57d5a FAIL(X) os/390 23.00 (2817/)
[email protected] (Karl Williamson)
| Newsgroups | perl.mvs,perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
On 02/12/2015 12:58 AM, Yaroslav Kuzmin wrote: >> That file is attached. Please compile it and run it and post the results. > > > (02:46) RS12 : PDKUZM | ~/ussport/perl/test :> c99 -qlanglvl=extended:extc89:extc99 -qlongname -qxplink -qdll -DOEMVS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -D_POSIX_SOURCE=1 -c stat.c -o stat.o > (02:50) RS12 : PDKUZM | ~/ussport/perl/test :> c99 -qxplink -qdll -o stat stat.o > IEW2456E 9207 SYMBOL dirfd UNRESOLVED. MEMBER COULD NOT BE INCLUDED FROM THE > DESIGNATED CALL LIBRARY. > FSUM3065 The LINKEDIT step ended with return code 8. > (02:50) RS12 : PDKUZM | ~/ussport/perl/test :> > > in z/OS does not function dirfd(); > > http://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/keyword.htm?lang=en > If I had been thinking, I would have realized that. Attached is a revised file, that I hope works for you. It won't compile on my system since things are different here. The difference is that your system has an element in the DIR structure called dd_fd which should contain the same information as what dirfd() returns. If it doesn't compile, maybe you could tweak it so it does. Thanks. > > ------------------------------------------------------------------------ > Yaroslav Kuzmin > Developer C/C++ ,z/OS , Linux > 3 Zhukovskiy Street · Miass, Chelyabinsk region 456318 · Russia > Tel: +7.922.2.38.33.38 > Email: [email protected] > Web: www.rocketsoftware.com > > ================================ > Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ +1 800.966.3270 ■ +1 781.577.4321 > Unsubscribe From Commercial Email – [email protected] > Manage Your Subscription Preferences - http://info.rocketsoftware.com/GlobalSubscriptionManagementEmailFooter_SubscriptionCenter.html > Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy > ================================ > > This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy all copies of this communication. Thank you. >
stat.c
(text/x-csrc, 518 B)
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#ifdef I_STDLIB
#include <stdlib.h>
#endif
int main(int argc, char *argv[])
{
DIR *stream;
struct stat stat_buf;
errno = 0;
if (! (stream = opendir("."))) {
perror("opendir");
}
else {
errno = 0;
if (fstat(stream->dd_fd, &stat_buf) == -1) {
perror("fstat");
}
else {
printf("Success\n");
}
}
}