I am trying to switch from using the transactionReceipt to the receipt returned from the appStoreReceiptURL as in the Apple's: Receipt Validation Programming Guide
Yet I am stuck at compiling the output of the asn1c command. Apart from the host of angled references to header files I had to switch individually to quotes, there are a number of errors connected to features evidently not available on iOS. They seem to be connected to the finite() function and the DEBUG command. Here are two examples:
if(!finite(d)) { //solved with isfinite()
and
/* Debug output function */
static inline void
DEBUG(const char *fmt, ...) {
va_list ap;
if(!opt_debug) return;
fprintf(stderr, "AD: ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
}
What should I substitute them with?
Ok, I managed the whole: the procedure encompassed:
1) changing most '<..>'includes to '"..."' (the compiler gives hints) 2) changing the name of function DEBUG to debug, what prompted "something" to turn it to:
3) And finally remove the sample.c file containing another main function, and two README files.
Done those the program compiles without problems.