diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 02:52:20 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-27 02:52:20 +0000 |
commit | defc1ea34074e7882724c460260d307cdf981a70 (patch) | |
tree | fca9b9a5fe243f9c0c76b84824ea2ff92ea8e589 /archival/libunarchive | |
parent | 26bc57d8b26425f23f4be974cce7bf35c95c9a1a (diff) |
*: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text data bss dec hex filename
808035 611 6868 815514 c719a busybox_old
804472 611 6868 811951 c63af busybox_unstripped
Diffstat (limited to 'archival/libunarchive')
29 files changed, 36 insertions, 36 deletions
diff --git a/archival/libunarchive/archive_xread_all_eof.c b/archival/libunarchive/archive_xread_all_eof.c index c93dfa282..f11a7fd32 100644 --- a/archival/libunarchive/archive_xread_all_eof.c +++ b/archival/libunarchive/archive_xread_all_eof.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, +ssize_t FAST_FUNC archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *buf, size_t count) { ssize_t size; diff --git a/archival/libunarchive/data_align.c b/archival/libunarchive/data_align.c index d98dc5764..9f2e8432f 100644 --- a/archival/libunarchive/data_align.c +++ b/archival/libunarchive/data_align.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -void data_align(archive_handle_t *archive_handle, unsigned boundary) +void FAST_FUNC data_align(archive_handle_t *archive_handle, unsigned boundary) { unsigned skip_amount = (boundary - (archive_handle->offset % boundary)) % boundary; diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index 29a224bbc..1b4876799 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -void data_extract_all(archive_handle_t *archive_handle) +void FAST_FUNC data_extract_all(archive_handle_t *archive_handle) { file_header_t *file_header = archive_handle->file_header; int dst_fd; diff --git a/archival/libunarchive/data_extract_to_buffer.c b/archival/libunarchive/data_extract_to_buffer.c index d8fcdf3d3..1d74e0335 100644 --- a/archival/libunarchive/data_extract_to_buffer.c +++ b/archival/libunarchive/data_extract_to_buffer.c @@ -8,7 +8,7 @@ #include "libbb.h" #include "unarchive.h" -void data_extract_to_buffer(archive_handle_t *archive_handle) +void FAST_FUNC data_extract_to_buffer(archive_handle_t *archive_handle) { unsigned int size = archive_handle->file_header->size; diff --git a/archival/libunarchive/data_extract_to_stdout.c b/archival/libunarchive/data_extract_to_stdout.c index c8895ed65..a3efea16d 100644 --- a/archival/libunarchive/data_extract_to_stdout.c +++ b/archival/libunarchive/data_extract_to_stdout.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -void data_extract_to_stdout(archive_handle_t *archive_handle) +void FAST_FUNC data_extract_to_stdout(archive_handle_t *archive_handle) { bb_copyfd_exact_size(archive_handle->src_fd, STDOUT_FILENO, diff --git a/archival/libunarchive/data_skip.c b/archival/libunarchive/data_skip.c index d9778da2e..438750fe5 100644 --- a/archival/libunarchive/data_skip.c +++ b/archival/libunarchive/data_skip.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -void data_skip(archive_handle_t *archive_handle) +void FAST_FUNC data_skip(archive_handle_t *archive_handle) { archive_handle->seek(archive_handle, archive_handle->file_header->size); } diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c index f5050449a..106a08b54 100644 --- a/archival/libunarchive/decompress_bunzip2.c +++ b/archival/libunarchive/decompress_bunzip2.c @@ -526,7 +526,7 @@ static int get_next_block(bunzip_data *bd) are ignored, data is written to out_fd and return is RETVAL_OK or error. */ -int read_bunzip(bunzip_data *bd, char *outbuf, int len) +int FAST_FUNC read_bunzip(bunzip_data *bd, char *outbuf, int len) { const unsigned *dbuf; int pos, current, previous, gotcount; @@ -643,7 +643,7 @@ int read_bunzip(bunzip_data *bd, char *outbuf, int len) should work for NOFORK applets too, we must be extremely careful to not leak any allocations! */ -int start_bunzip(bunzip_data **bdp, int in_fd, const unsigned char *inbuf, +int FAST_FUNC start_bunzip(bunzip_data **bdp, int in_fd, const unsigned char *inbuf, int len) { bunzip_data *bd; @@ -699,7 +699,7 @@ int start_bunzip(bunzip_data **bdp, int in_fd, const unsigned char *inbuf, return RETVAL_OK; } -void dealloc_bunzip(bunzip_data *bd) +void FAST_FUNC dealloc_bunzip(bunzip_data *bd) { free(bd->dbuf); free(bd); @@ -708,7 +708,7 @@ void dealloc_bunzip(bunzip_data *bd) /* Decompress src_fd to dst_fd. Stops at end of bzip data, not end of file. */ -USE_DESKTOP(long long) int +USE_DESKTOP(long long) int FAST_FUNC unpack_bz2_stream(int src_fd, int dst_fd) { USE_DESKTOP(long long total_written = 0;) diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c index 8c3c65d1a..161570040 100644 --- a/archival/libunarchive/decompress_uncompress.c +++ b/archival/libunarchive/decompress_uncompress.c @@ -70,7 +70,7 @@ * be stored in the compressed file. */ -USE_DESKTOP(long long) int +USE_DESKTOP(long long) int FAST_FUNC uncompress(int fd_in, int fd_out) { USE_DESKTOP(long long total_written = 0;) diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c index c32040075..79df70179 100644 --- a/archival/libunarchive/decompress_unlzma.c +++ b/archival/libunarchive/decompress_unlzma.c @@ -229,7 +229,7 @@ enum { }; -USE_DESKTOP(long long) int +USE_DESKTOP(long long) int FAST_FUNC unpack_lzma_stream(int src_fd, int dst_fd) { USE_DESKTOP(long long total_written = 0;) diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c index 9036fabf2..3b0ca846a 100644 --- a/archival/libunarchive/decompress_unzip.c +++ b/archival/libunarchive/decompress_unzip.c @@ -1033,7 +1033,7 @@ inflate_unzip_internal(STATE_PARAM int in, int out) /* For unzip */ -USE_DESKTOP(long long) int +USE_DESKTOP(long long) int FAST_FUNC inflate_unzip(inflate_unzip_result *res, off_t compr_size, int in, int out) { USE_DESKTOP(long long) int n; @@ -1176,7 +1176,7 @@ static int check_header_gzip(STATE_PARAM_ONLY) return 1; } -USE_DESKTOP(long long) int +USE_DESKTOP(long long) int FAST_FUNC unpack_gz_stream(int in, int out) { uint32_t v32; diff --git a/archival/libunarchive/filter_accept_all.c b/archival/libunarchive/filter_accept_all.c index 47d771e43..21f9c5c9e 100644 --- a/archival/libunarchive/filter_accept_all.c +++ b/archival/libunarchive/filter_accept_all.c @@ -9,7 +9,7 @@ #include "unarchive.h" /* Accept any non-null name, its not really a filter at all */ -char filter_accept_all(archive_handle_t *archive_handle) +char FAST_FUNC filter_accept_all(archive_handle_t *archive_handle) { if (archive_handle->file_header->name) return EXIT_SUCCESS; diff --git a/archival/libunarchive/filter_accept_list.c b/archival/libunarchive/filter_accept_list.c index 6e571ad4e..afa0b4cbf 100644 --- a/archival/libunarchive/filter_accept_list.c +++ b/archival/libunarchive/filter_accept_list.c @@ -11,7 +11,7 @@ /* * Accept names that are in the accept list, ignoring reject list. */ -char filter_accept_list(archive_handle_t *archive_handle) +char FAST_FUNC filter_accept_list(archive_handle_t *archive_handle) { if (find_list_entry(archive_handle->accept, archive_handle->file_header->name)) return EXIT_SUCCESS; diff --git a/archival/libunarchive/filter_accept_list_reassign.c b/archival/libunarchive/filter_accept_list_reassign.c index 969dd1e3e..4f2d4cde5 100644 --- a/archival/libunarchive/filter_accept_list_reassign.c +++ b/archival/libunarchive/filter_accept_list_reassign.c @@ -13,7 +13,7 @@ * e.g. if its a .tar.gz modify archive_handle->sub_archive to process a .tar.gz * or if its a .tar.bz2 make archive_handle->sub_archive handle that */ -char filter_accept_list_reassign(archive_handle_t *archive_handle) +char FAST_FUNC filter_accept_list_reassign(archive_handle_t *archive_handle) { /* Check the file entry is in the accept list */ if (find_list_entry(archive_handle->accept, archive_handle->file_header->name)) { diff --git a/archival/libunarchive/filter_accept_reject_list.c b/archival/libunarchive/filter_accept_reject_list.c index 439ba20ca..aa601e137 100644 --- a/archival/libunarchive/filter_accept_reject_list.c +++ b/archival/libunarchive/filter_accept_reject_list.c @@ -11,7 +11,7 @@ /* * Accept names that are in the accept list and not in the reject list */ -char filter_accept_reject_list(archive_handle_t *archive_handle) +char FAST_FUNC filter_accept_reject_list(archive_handle_t *archive_handle) { const char *key; const llist_t *reject_entry; diff --git a/archival/libunarchive/find_list_entry.c b/archival/libunarchive/find_list_entry.c index 754058953..bc7bc6471 100644 --- a/archival/libunarchive/find_list_entry.c +++ b/archival/libunarchive/find_list_entry.c @@ -10,7 +10,7 @@ #include "unarchive.h" /* Find a string in a shell pattern list */ -const llist_t *find_list_entry(const llist_t *list, const char *filename) +const llist_t* FAST_FUNC find_list_entry(const llist_t *list, const char *filename) { while (list) { if (fnmatch(list->data, filename, 0) == 0) { @@ -24,7 +24,7 @@ const llist_t *find_list_entry(const llist_t *list, const char *filename) /* Same, but compares only path components present in pattern * (extra trailing path components in filename are assumed to match) */ -const llist_t *find_list_entry2(const llist_t *list, const char *filename) +const llist_t* FAST_FUNC find_list_entry2(const llist_t *list, const char *filename) { char buf[PATH_MAX]; int pattern_slash_cnt; diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c index 88c0220ad..05222992d 100644 --- a/archival/libunarchive/get_header_ar.c +++ b/archival/libunarchive/get_header_ar.c @@ -7,7 +7,7 @@ #include "libbb.h" #include "unarchive.h" -char get_header_ar(archive_handle_t *archive_handle) +char FAST_FUNC get_header_ar(archive_handle_t *archive_handle) { int err; file_header_t *typed = archive_handle->file_header; diff --git a/archival/libunarchive/get_header_cpio.c b/archival/libunarchive/get_header_cpio.c index b97b53b20..4ed18c68f 100644 --- a/archival/libunarchive/get_header_cpio.c +++ b/archival/libunarchive/get_header_cpio.c @@ -17,7 +17,7 @@ typedef struct hardlinks_s { char name[1]; } hardlinks_t; -char get_header_cpio(archive_handle_t *archive_handle) +char FAST_FUNC get_header_cpio(archive_handle_t *archive_handle) { static hardlinks_t *saved_hardlinks = NULL; static hardlinks_t *saved_hardlinks_created = NULL; diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c index 187552c28..a0a53c908 100644 --- a/archival/libunarchive/get_header_tar.c +++ b/archival/libunarchive/get_header_tar.c @@ -43,7 +43,7 @@ static unsigned long long getOctal(char *str, int len) #define GET_OCTAL(a) getOctal((a), sizeof(a)) void BUG_tar_header_size(void); -char get_header_tar(archive_handle_t *archive_handle) +char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) { static smallint end; #if ENABLE_FEATURE_TAR_AUTODETECT @@ -133,7 +133,7 @@ char get_header_tar(archive_handle_t *archive_handle) || memcmp(tar.magic, "\0\0\0\0", 5) != 0) ) { #if ENABLE_FEATURE_TAR_AUTODETECT - char (*get_header_ptr)(archive_handle_t *); + char FAST_FUNC (*get_header_ptr)(archive_handle_t *); /* tar gz/bz autodetect: check for gz/bz2 magic. * If it is the very first block, and we see the magic, diff --git a/archival/libunarchive/get_header_tar_bz2.c b/archival/libunarchive/get_header_tar_bz2.c index c2cbaff5f..cfdc016d6 100644 --- a/archival/libunarchive/get_header_tar_bz2.c +++ b/archival/libunarchive/get_header_tar_bz2.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -char get_header_tar_bz2(archive_handle_t *archive_handle) +char FAST_FUNC get_header_tar_bz2(archive_handle_t *archive_handle) { /* Can't lseek over pipes */ archive_handle->seek = seek_by_read; diff --git a/archival/libunarchive/get_header_tar_gz.c b/archival/libunarchive/get_header_tar_gz.c index 9772e33fb..33c62729e 100644 --- a/archival/libunarchive/get_header_tar_gz.c +++ b/archival/libunarchive/get_header_tar_gz.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -char get_header_tar_gz(archive_handle_t *archive_handle) +char FAST_FUNC get_header_tar_gz(archive_handle_t *archive_handle) { #if BB_MMU unsigned char magic[2]; diff --git a/archival/libunarchive/get_header_tar_lzma.c b/archival/libunarchive/get_header_tar_lzma.c index c859dcc58..4ae125f4a 100644 --- a/archival/libunarchive/get_header_tar_lzma.c +++ b/archival/libunarchive/get_header_tar_lzma.c @@ -9,7 +9,7 @@ #include "libbb.h" #include "unarchive.h" -char get_header_tar_lzma(archive_handle_t * archive_handle) +char FAST_FUNC get_header_tar_lzma(archive_handle_t * archive_handle) { /* Can't lseek over pipes */ archive_handle->seek = seek_by_read; diff --git a/archival/libunarchive/header_list.c b/archival/libunarchive/header_list.c index 8cb8f40d9..6ec2df363 100644 --- a/archival/libunarchive/header_list.c +++ b/archival/libunarchive/header_list.c @@ -5,7 +5,7 @@ #include "libbb.h" #include "unarchive.h" -void header_list(const file_header_t *file_header) +void FAST_FUNC header_list(const file_header_t *file_header) { puts(file_header->name); } diff --git a/archival/libunarchive/header_skip.c b/archival/libunarchive/header_skip.c index ef2172bb3..ba4c0ab4b 100644 --- a/archival/libunarchive/header_skip.c +++ b/archival/libunarchive/header_skip.c @@ -5,6 +5,6 @@ #include "libbb.h" #include "unarchive.h" -void header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED) +void FAST_FUNC header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED) { } diff --git a/archival/libunarchive/header_verbose_list.c b/archival/libunarchive/header_verbose_list.c index ea623ed85..f059dd981 100644 --- a/archival/libunarchive/header_verbose_list.c +++ b/archival/libunarchive/header_verbose_list.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -void header_verbose_list(const file_header_t *file_header) +void FAST_FUNC header_verbose_list(const file_header_t *file_header) { struct tm *mtime = localtime(&(file_header->mtime)); diff --git a/archival/libunarchive/init_handle.c b/archival/libunarchive/init_handle.c index 309d329ea..ff7d484e5 100644 --- a/archival/libunarchive/init_handle.c +++ b/archival/libunarchive/init_handle.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -archive_handle_t *init_handle(void) +archive_handle_t* FAST_FUNC init_handle(void) { archive_handle_t *archive_handle; diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c index 86415c749..a6bc62321 100644 --- a/archival/libunarchive/open_transformer.c +++ b/archival/libunarchive/open_transformer.c @@ -11,8 +11,8 @@ * On MMU machine, the transform_prog is removed by macro magic * in include/unarchive.h. On NOMMU, transformer is removed. */ -int open_transformer(int src_fd, - USE_DESKTOP(long long) int (*transformer)(int src_fd, int dst_fd), +int FAST_FUNC open_transformer(int src_fd, + USE_DESKTOP(long long) int FAST_FUNC (*transformer)(int src_fd, int dst_fd), const char *transform_prog) { struct fd_pair fd_pipe; diff --git a/archival/libunarchive/seek_by_jump.c b/archival/libunarchive/seek_by_jump.c index 5288c1d73..031598e7a 100644 --- a/archival/libunarchive/seek_by_jump.c +++ b/archival/libunarchive/seek_by_jump.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -void seek_by_jump(const archive_handle_t *archive_handle, unsigned amount) +void FAST_FUNC seek_by_jump(const archive_handle_t *archive_handle, unsigned amount) { if (lseek(archive_handle->src_fd, (off_t) amount, SEEK_CUR) == (off_t) -1) { if (errno == ESPIPE) diff --git a/archival/libunarchive/seek_by_read.c b/archival/libunarchive/seek_by_read.c index 1f2b80571..2326a7512 100644 --- a/archival/libunarchive/seek_by_read.c +++ b/archival/libunarchive/seek_by_read.c @@ -9,7 +9,7 @@ /* If we are reading through a pipe, or from stdin then we can't lseek, * we must read and discard the data to skip over it. */ -void seek_by_read(const archive_handle_t *archive_handle, unsigned jump_size) +void FAST_FUNC seek_by_read(const archive_handle_t *archive_handle, unsigned jump_size) { if (jump_size) bb_copyfd_exact_size(archive_handle->src_fd, -1, jump_size); diff --git a/archival/libunarchive/unpack_ar_archive.c b/archival/libunarchive/unpack_ar_archive.c index fc1820b97..9c2f68b14 100644 --- a/archival/libunarchive/unpack_ar_archive.c +++ b/archival/libunarchive/unpack_ar_archive.c @@ -6,7 +6,7 @@ #include "libbb.h" #include "unarchive.h" -void unpack_ar_archive(archive_handle_t *ar_archive) +void FAST_FUNC unpack_ar_archive(archive_handle_t *ar_archive) { char magic[7]; |