Thank you for confining it! Currently, Python defines PY_FORMAT_SIZE_T as:
#ifndef PY_FORMAT_SIZE_T # if SIZEOF_SIZE_T == SIZEOF_INT && !defined(__APPLE__) # define PY_FORMAT_SIZE_T "" # elif SIZEOF_SIZE_T == SIZEOF_LONG # define PY_FORMAT_SIZE_T "l" # elif defined(MS_WINDOWS) # define PY_FORMAT_SIZE_T "I" # else # error "This platform's pyconfig.h needs to define PY_FORMAT_SIZE_T" # endif #endif https://github.com/python/cpython/blob/1213123005d9f94bb5027c0a5256ea4d3e97b61d/Include/pyport.h#L158-L168 This can be changed to this: #ifndef PY_FORMAT_SIZE_T /* "z" is defined C99 and portable enough. We can use "%zd" instead of "%" PY_FORMAT_SIZE_T "d" for now. */ # define PY_FORMAT_SIZE_T "z" #endif On Mon, Aug 5, 2019 at 6:05 PM Michael <aixto...@felt.demon.nl> wrote: > > OK - a too simple program - run on AIX 5.3 - seems to indicate that XLC > (version 11, so quite old!) accepts "%zd". > > If someone would be kind enough to mail me a better example of what > needs to be verfied - I am happy to compile and publish the results. > > root@x065:[/data/prj/aixtools/tests]cat printf-test.c > #include <stdio.h> > > main() > { > printf("Hello World - testing for %%zd support\n"); > printf("%%zd of 1001 == %zd\n", 1001); > printf("\nTest complete\n"); > } > > oot@x065:[/data/prj/aixtools/tests]./a.out > Hello World - testing for %zd support > %zd of 1001 == 1001 > > Test complete > > fyi: AIX 4.3 > https://sites.ualberta.ca/dept/chemeng/AIX-43/share/man/info/C/a_doc_lib/libs/basetrf2/snprintf.htm > > and AIX 7.2 > https://www.ibm.com/support/knowledgecenter/ssw_aix_72/p_bostechref/printf.html > _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/UIIERFFTJIVQMOOZTZDLAILAAXCU7XSK/