mirror of
https://github.com/php/php-src.git
synced 2024-12-03 23:05:57 +08:00
Expose missing flags from libzip at least >= 0.11.x
These are helpful with reading/writing zips containing non UTF-8
filenames to mitigate possibly changed libzip behaviors.
Partial cherry-pick of 893c2405ff
This commit is contained in:
parent
1690dcb827
commit
2c80459c24
@ -3038,6 +3038,24 @@ static PHP_MINIT_FUNCTION(zip)
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("FL_NODIR", ZIP_FL_NODIR);
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("FL_COMPRESSED", ZIP_FL_COMPRESSED);
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("FL_UNCHANGED", ZIP_FL_UNCHANGED);
|
||||
|
||||
#ifdef ZIP_FL_ENC_GUESS
|
||||
/* Default filename encoding policy. */
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_GUESS", ZIP_FL_ENC_GUESS);
|
||||
#endif
|
||||
#ifdef ZIP_FL_ENC_RAW
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_RAW", ZIP_FL_ENC_RAW);
|
||||
#endif
|
||||
#ifdef ZIP_FL_ENC_STRICT
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_STRICT", ZIP_FL_ENC_STRICT);
|
||||
#endif
|
||||
#ifdef ZIP_FL_ENC_UTF_8
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_UTF_8", ZIP_FL_ENC_UTF_8);
|
||||
#endif
|
||||
#ifdef ZIP_FL_ENC_CP437
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("FL_ENC_CP437", ZIP_FL_ENC_CP437);
|
||||
#endif
|
||||
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("CM_DEFAULT", ZIP_CM_DEFAULT);
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("CM_STORE", ZIP_CM_STORE);
|
||||
REGISTER_ZIP_CLASS_CONST_LONG("CM_SHRINK", ZIP_CM_SHRINK);
|
||||
|
Loading…
Reference in New Issue
Block a user