Skip to content

Making mairix work with mbox files over 2GB.#19

Open
viric wants to merge 1 commit intorc0:masterfrom
viric:mbox_2gb
Open

Making mairix work with mbox files over 2GB.#19
viric wants to merge 1 commit intorc0:masterfrom
viric:mbox_2gb

Conversation

@viric
Copy link

@viric viric commented Jan 15, 2016

Should fix #12

I pick the patch proposed there by @taviso, but I improve it so it
fixes not only the db update, but also db search (tested with mairix -x).

Should fix rc0#12

I pick the patch proposed there by @taviso, but I improve it so it
fixes not only the db update, but also db search (tested with mairix -x).
viric added a commit to NixOS/nixpkgs that referenced this pull request Jan 15, 2016
@viric
Copy link
Author

viric commented Jan 15, 2016

Oh I just noticed this: https://github.com/rc0/mairix/pull/16/files

@martinetd
Copy link

This is included in nixpkgs and breaks build with gcc 14, because some arguments no longer match function prototype for example:

search.c:1351:74: error: passing argument 3 of 'create_ro_mapping' from incompatible pointer type [-Wincompatible-pointer-types]
 1351 |                 create_ro_mapping(db->data + db->path_offsets[i], &data, &len);
      |                                                                          ^~~~
      |                                                                          |
      |                                                                          int *
In file included from search.c:44:
mairix.h:336:76: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *'
  336 | void create_ro_mapping(const char *filename, unsigned char **data, size_t *len);
      |                                                                    ~~~~~~~~^~~
search.c:1369:60: error: passing argument 5 of 'get_validated_mbox_msg' from incompatible pointer type [-Wincompatible-pointer-types]
 1369 |                 get_validated_mbox_msg(db, i, &mbi, &data, &mbox_len, &start, &msg_len);
      |                                                            ^~~~~~~~~
      |                                                            |
      |                                                            int *
search.c:722:71: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *'
  722 |                                    unsigned char **mbox_data, size_t *mbox_len,
      |                                                               ~~~~~~~~^~~~~~~~
search.c:1369:79: error: passing argument 7 of 'get_validated_mbox_msg' from incompatible pointer type [-Wincompatible-pointer-types]
 1369 |                 get_validated_mbox_msg(db, i, &mbi, &data, &mbox_len, &start, &msg_len);
      |                                                                               ^~~~~~~~
      |                                                                               |
      |                                                                               int *
search.c:723:71: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *'
  723 |                                    unsigned char **msg_data,  size_t *msg_len)
      |                                                               ~~~~~~~~^~~~~~~

(probably ought to open that error as a new issue in nixpkgs but you're the one that added mairix there, and your packages have been orphaned, so here is as good as anything else... I'll drop the package from my machine for now)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rfc822:mmap '/home/XX/Mail/outbox': Cannot allocate memory

2 participants