mirror of
https://github.com/darlinghq/cctools-port.git
synced 2024-11-26 21:50:26 +00:00
This commit is contained in:
parent
4e1faecce8
commit
606eb7dcb2
@ -375,6 +375,15 @@ put_arobj(cfp, sb)
|
||||
size = chdr.size;
|
||||
}
|
||||
|
||||
/* cctools-port */
|
||||
if (strlen(hb) != sizeof(HDR)) {
|
||||
fprintf(stderr, "ar is not working correctly. "
|
||||
"Please report this issue to the cctools-port "
|
||||
"project. Thank you.\n");
|
||||
exit(1);
|
||||
}
|
||||
/* cctools-port end */
|
||||
|
||||
if (write(cfp->wfd, hb, sizeof(HDR)) != sizeof(HDR))
|
||||
error(cfp->wname);
|
||||
/*
|
||||
|
@ -113,12 +113,18 @@ typedef struct {
|
||||
char name[MAXNAMLEN + 1]; /* name */
|
||||
} CHDR;
|
||||
|
||||
/*
|
||||
* cctools-port:
|
||||
* Replaced 'qd' with 'lld' in format strings
|
||||
* https://github.com/tpoechtrager/osxcross/issues/216#issuecomment-599044727
|
||||
* */
|
||||
|
||||
/* Header format strings. */
|
||||
#define HDR1 "%s%-13d%-12ld%-6u%-6u%-8o%-10qd%2s"
|
||||
#define HDR2 "%-16.16s%-12ld%-6u%-6u%-8o%-10qd%2s"
|
||||
#define HDR1 "%s%-13d%-12ld%-6u%-6u%-8o%-10lld%2s"
|
||||
#define HDR2 "%-16.16s%-12ld%-6u%-6u%-8o%-10lld%2s"
|
||||
|
||||
#define OLDARMAXNAME 15
|
||||
#define HDR3 "%-16.15s%-12ld%-6u%-6u%-8o%-10qd%2s"
|
||||
#define HDR3 "%-16.15s%-12ld%-6u%-6u%-8o%-10lld%2s"
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
@ -107,7 +107,8 @@ contents(argv)
|
||||
goto next;
|
||||
if (options & AR_V) {
|
||||
(void)strmode(chdr.mode, buf);
|
||||
(void)printf("%s %6d/%-6d %8qd ",
|
||||
/* cctools-port: replaced 'qd' with 'lld' in format string */
|
||||
(void)printf("%s %6d/%-6d %8lld ",
|
||||
buf + 1, chdr.uid, chdr.gid, chdr.size);
|
||||
tp = localtime(&chdr.date);
|
||||
(void)strftime(buf, sizeof(buf), "%b %e %H:%M %Y", tp);
|
||||
|
@ -236,5 +236,6 @@ const char *format,
|
||||
void
|
||||
sprint_value (char *buf, signed_expr_t val)
|
||||
{
|
||||
sprintf (buf, "%qd", val);
|
||||
/* cctools-port: Replaced 'qd' with 'lld' in format string */
|
||||
sprintf (buf, "%lld", val);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user