New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Собственная версия libzip в SVN

Ветка для общения разработчиков и координации разработки

Собственная версия libzip в SVN

Postby ikm » Fri May 01, 2009 3:33 pm

Выявил тут проблему с zip-файлами, в которых больше 65535 файлов. Поправил в libzip, и, пока upstream не отреагирует, сделал её исходники частью gd. В виндах может с ходу не скомпилироваться. То, что было в winlibs я соответственно снёс, так как оно больше не используется. Там вроде было добавлено #include <stub_msvc.h>, это наверное надо добавить в новый хедер заново. Ну и еще если что-то вылезет.
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: Собственная версия libzip в SVN

Postby Ars » Fri May 01, 2009 11:29 pm

В виндах не компилится из-за этого (zip_dirent.c):

#ifdef HAVE_STRUCT_TM_TM_ZONE
time(&now);
l = localtime(&now);
torrenttime.tm_gmtoff = l->tm_gmtoff;
torrenttime.tm_zone = l->tm_zone;
#endif

в принципе, компилится после замены на

#ifdef HAVE_STRUCT_TM_TM_ZONE
time(&now);
l = localtime(&now);
#ifndef _WIN32
torrenttime.tm_gmtoff = l->tm_gmtoff;
torrenttime.tm_zone = l->tm_zone;
#endif
#endif

но при этом таймзоны выпадают. Насколько это существенно?
Ars
 
Posts: 119
Joined: Sat Feb 21, 2009 11:03 pm

Re: Собственная версия libzip в SVN

Postby ikm » Fri May 01, 2009 11:36 pm

Это несущественно, но лучше для этого поправить config.h. Там есть #define HAVE_STRUCT_TM_TM_ZONE 1, можно его заifndefить для WIN32.
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: Собственная версия libzip в SVN

Postby Ars » Fri May 01, 2009 11:50 pm

кроме того, не видит функций mkstemp, ftello, fseeko.
Ars
 
Posts: 119
Joined: Sat Feb 21, 2009 11:03 pm

Re: Собственная версия libzip в SVN

Postby ikm » Fri May 01, 2009 11:57 pm

Вот config.h из моего старого билда libzip под mingw:

Code: Select all
/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.ac by autoheader.  */

/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
   */
#define HAVE_DECL_TZNAME 1

/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */

/* Define to 1 if you have the `fseeko' function. */
/* #undef HAVE_FSEEKO */

/* Define to 1 if you have the `ftello' function. */
/* #undef HAVE_FTELLO */

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `z' library (-lz). */
#define HAVE_LIBZ 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the `mkstemp' function. */
/* #undef HAVE_MKSTEMP */

/* Define to 1 if you have the `MoveFileExA' function. */
#define HAVE_MOVEFILEEXA 1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if `tm_zone' is member of `struct tm'. */
/* #undef HAVE_STRUCT_TM_TM_ZONE */

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
   `HAVE_STRUCT_TM_TM_ZONE' instead. */
/* #undef HAVE_TM_ZONE */

/* Define to 1 if you don't have `tm_zone' but do have the external array
   `tzname'. */
#define HAVE_TZNAME 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */

/* Name of package */
#define PACKAGE "libzip"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "libzip@nih.at"

/* Define to the full name of this package. */
#define PACKAGE_NAME "libzip"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libzip 0.9"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libzip"

/* Define to the version of this package. */
#define PACKAGE_VERSION "0.9"

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */

/* Version number of package */
#define VERSION "0.9"


Как видим, некоторые пункты закомментированы. Имеет смысл сделать ifdef'ы в новом, текущем config.h
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: Собственная версия libzip в SVN

Postby Ars » Sat May 02, 2009 2:04 pm

ok, done.
Ars
 
Posts: 119
Joined: Sat Feb 21, 2009 11:03 pm


Return to Разработка

Who is online

Users browsing this forum: No registered users and 9 guests