< prev index next >

src/java.base/unix/native/libnet/ResolverConfigurationImpl.c

Print this page
rev 12856 : 8139037: [aix] Crash in ResolverConfigurationImpl.c - pointer shearing


  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
  23  * questions.
  24  */
  25 
  26 #include <stdio.h>
  27 #include <stdlib.h>
  28 #include <unistd.h>
  29 #include <errno.h>
  30 
  31 #ifdef __solaris__
  32 #include <sys/systeminfo.h>
  33 #include <strings.h>
  34 #endif
  35 
  36 #if defined(__linux__) || defined(_ALLBSD_SOURCE)
  37 #include <string.h>
  38 #endif
  39 
  40 #include "jni.h"
  41 
  42 #ifndef MAXDNAME
  43 #define MAXDNAME                1025
  44 #endif
  45 
  46 
  47 /*
  48  * Class:     sun_net_dns_ResolverConfgurationImpl
  49  * Method:    localDomain0
  50  * Signature: ()Ljava/lang/String;
  51  */
  52 JNIEXPORT jstring JNICALL
  53 Java_sun_net_dns_ResolverConfigurationImpl_localDomain0(JNIEnv *env, jclass cls)
  54 {
  55     /*
  56      * On Solaris the LOCALDOMAIN environment variable has absolute
  57      * priority.
  58      */




  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
  23  * questions.
  24  */
  25 
  26 #include <stdio.h>
  27 #include <stdlib.h>
  28 #include <unistd.h>
  29 #include <errno.h>
  30 
  31 #ifdef __solaris__
  32 #include <sys/systeminfo.h>

  33 #endif
  34 

  35 #include <string.h>

  36 
  37 #include "jni.h"
  38 
  39 #ifndef MAXDNAME
  40 #define MAXDNAME                1025
  41 #endif
  42 
  43 
  44 /*
  45  * Class:     sun_net_dns_ResolverConfgurationImpl
  46  * Method:    localDomain0
  47  * Signature: ()Ljava/lang/String;
  48  */
  49 JNIEXPORT jstring JNICALL
  50 Java_sun_net_dns_ResolverConfigurationImpl_localDomain0(JNIEnv *env, jclass cls)
  51 {
  52     /*
  53      * On Solaris the LOCALDOMAIN environment variable has absolute
  54      * priority.
  55      */


< prev index next >