equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
27 #include <sys/stat.h> |
27 #include <sys/stat.h> |
28 #include <fcntl.h> |
28 #include <fcntl.h> |
29 #include <stdio.h> |
29 #include <stdio.h> |
30 #include <stdlib.h> |
30 #include <stdlib.h> |
31 #include <string.h> |
31 #include <string.h> |
|
32 #include "jni.h" |
32 #include "jli_util.h" |
33 #include "jli_util.h" |
33 |
34 |
34 #include <zlib.h> |
35 #include <zlib.h> |
35 #include "manifest_info.h" |
36 #include "manifest_info.h" |
36 |
37 |
674 * 0 Success |
675 * 0 Success |
675 * -1 Unable to open jarfile |
676 * -1 Unable to open jarfile |
676 * -2 Error accessing the manifest from within the jarfile (most likely |
677 * -2 Error accessing the manifest from within the jarfile (most likely |
677 * this means a manifest is not present, or it isn't a valid zip/jar file). |
678 * this means a manifest is not present, or it isn't a valid zip/jar file). |
678 */ |
679 */ |
679 int |
680 JNIEXPORT int |
680 JLI_ManifestIterate(const char *jarfile, attribute_closure ac, void *user_data) |
681 JLI_ManifestIterate(const char *jarfile, attribute_closure ac, void *user_data) |
681 { |
682 { |
682 int fd; |
683 int fd; |
683 zentry entry; |
684 zentry entry; |
684 char *mp; /* manifest pointer */ |
685 char *mp; /* manifest pointer */ |