Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header issue: pgno pgno invalid with g++ 4.4.x #24

Closed
woldendans opened this issue Oct 7, 2015 · 1 comment
Closed

Header issue: pgno pgno invalid with g++ 4.4.x #24

woldendans opened this issue Oct 7, 2015 · 1 comment

Comments

@woldendans
Copy link

With g++ 4.4.7, on a Linux system, including "unqlite.h" surrounded by "extern C" instruction in a CPP file, I get the following error:

[exec] unqlite.h:661: error: declaration of `pgno unqlite_page::pgno'
[exec] unqlite.h:651: error: changes meaning of `pgno' from `typedef sxu64 pgno'

This is due to:

typedef sxu64 pgno;
/*
 * A database disk page is represented by an instance
 * of the follwoing structure.
 */
typedef struct unqlite_page unqlite_page;
struct unqlite_page
{
  unsigned char *zData;       /* Content of this page */
  void *pUserData;            /* Extra content */
  pgno pgno;                  /* Page number for this page */ // <------ This
};

The unqlite lib was compiled with a C compiler, but I have to use a C++ one with the public header.

This is due to the g++ version I believe. I reported this so you know and can decide whether it is something you'd like to handle or not.

Cheers!

@symisc
Copy link
Owner

symisc commented Oct 8, 2015

Hi,
The patch is already available here http://unqlite.org/db/g++421patch.diff

@symisc symisc closed this as completed Oct 8, 2015
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

No branches or pull requests

2 participants