< prev index next >

src/java.base/unix/native/libjava/UnixFileSystem_md.c

Print this page
rev 59383 : [mq]: final
   1 /*
   2  * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  44 
  45 #include "jni.h"
  46 #include "jni_util.h"
  47 #include "jlong.h"
  48 #include "jdk_util.h"
  49 #include "io_util.h"
  50 #include "io_util_md.h"
  51 #include "java_io_FileSystem.h"
  52 #include "java_io_UnixFileSystem.h"
  53 
  54 #if defined(_AIX)
  55   #if !defined(NAME_MAX)
  56     #define NAME_MAX MAXNAMLEN
  57   #endif
  58   #define DIR DIR64
  59   #define dirent dirent64
  60   #define opendir opendir64
  61   #define readdir readdir64
  62   #define closedir closedir64
  63   #define stat stat64
  64 #endif
  65 
  66 #if defined(__solaris__) && !defined(NAME_MAX)
  67   #define NAME_MAX MAXNAMLEN
  68 #endif
  69 
  70 #if defined(_ALLBSD_SOURCE)
  71   #ifndef MACOSX
  72     #define statvfs64 statvfs
  73     #define stat64 stat
  74   #endif
  75 #endif
  76 
  77 /* -- Field IDs -- */
  78 
  79 static struct {
  80     jfieldID path;
  81 } ids;
  82 
  83 
  84 JNIEXPORT void JNICALL
  85 Java_java_io_UnixFileSystem_initIDs(JNIEnv *env, jclass cls)
  86 {
  87     jclass fileClass = (*env)->FindClass(env, "java/io/File");


   1 /*
   2  * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  44 
  45 #include "jni.h"
  46 #include "jni_util.h"
  47 #include "jlong.h"
  48 #include "jdk_util.h"
  49 #include "io_util.h"
  50 #include "io_util_md.h"
  51 #include "java_io_FileSystem.h"
  52 #include "java_io_UnixFileSystem.h"
  53 
  54 #if defined(_AIX)
  55   #if !defined(NAME_MAX)
  56     #define NAME_MAX MAXNAMLEN
  57   #endif
  58   #define DIR DIR64
  59   #define dirent dirent64
  60   #define opendir opendir64
  61   #define readdir readdir64
  62   #define closedir closedir64
  63   #define stat stat64




  64 #endif
  65 
  66 #if defined(_ALLBSD_SOURCE)
  67   #ifndef MACOSX
  68     #define statvfs64 statvfs
  69     #define stat64 stat
  70   #endif
  71 #endif
  72 
  73 /* -- Field IDs -- */
  74 
  75 static struct {
  76     jfieldID path;
  77 } ids;
  78 
  79 
  80 JNIEXPORT void JNICALL
  81 Java_java_io_UnixFileSystem_initIDs(JNIEnv *env, jclass cls)
  82 {
  83     jclass fileClass = (*env)->FindClass(env, "java/io/File");


< prev index next >