Skip to content

The function ftplib::sprint_rest() is wrong #31

Description

@Fojtik

Why do you think that only APPLE handles 64 bit variables?

Proese use this fix:
void ftplib::sprint_rest(char *buf, off64_t offset) {
#if sizeof(offset)>4
sprintf(buf,"REST %lld",offset);
#else
sprintf(buf,"REST %ld",offset);
#endif
}

or if you are paranoid enougs and absolutelly sure that thare does not exist 32 bit code on APPLE:
void ftplib::sprint_rest(char *buf, off64_t offset) {
#if defined(APPLE) || sizeof(offset)>4
sprintf(buf,"REST %lld",offset);
#else
sprintf(buf,"REST %ld",offset);
#endif
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions