src/windows/native/java/net/net_util_md.c

Print this page
rev 8822 : 8024854: PPC64: Basic changes and files to build the class library on AIX
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan, art
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com


 108 {
 109     WSADATA wsadata;
 110 
 111     switch (reason) {
 112         case DLL_PROCESS_ATTACH:
 113             if (WSAStartup(MAKEWORD(2,2), &wsadata) != 0) {
 114                 return FALSE;
 115             }
 116             break;
 117 
 118         case DLL_PROCESS_DETACH:
 119             WSACleanup();
 120             break;
 121 
 122         default:
 123             break;
 124     }
 125     return TRUE;
 126 }
 127 
 128 void initLocalAddrTable () {}
 129 void parseExclusiveBindProperty (JNIEnv *env) {}
 130 
 131 /*
 132  * Since winsock doesn't have the equivalent of strerror(errno)
 133  * use table to lookup error text for the error.
 134  */
 135 JNIEXPORT void JNICALL
 136 NET_ThrowNew(JNIEnv *env, int errorNum, char *msg)
 137 {
 138     int i;
 139     int table_size = sizeof(winsock_errors) /
 140                      sizeof(winsock_errors[0]);
 141     char exc[256];
 142     char fullMsg[256];
 143     char *excP = NULL;
 144 
 145     /*
 146      * If exception already throw then don't overwrite it.
 147      */
 148     if ((*env)->ExceptionOccurred(env)) {
 149         return;




 108 {
 109     WSADATA wsadata;
 110 
 111     switch (reason) {
 112         case DLL_PROCESS_ATTACH:
 113             if (WSAStartup(MAKEWORD(2,2), &wsadata) != 0) {
 114                 return FALSE;
 115             }
 116             break;
 117 
 118         case DLL_PROCESS_DETACH:
 119             WSACleanup();
 120             break;
 121 
 122         default:
 123             break;
 124     }
 125     return TRUE;
 126 }
 127 
 128 void platformInit() {}
 129 void parseExclusiveBindProperty(JNIEnv *env) {}
 130 
 131 /*
 132  * Since winsock doesn't have the equivalent of strerror(errno)
 133  * use table to lookup error text for the error.
 134  */
 135 JNIEXPORT void JNICALL
 136 NET_ThrowNew(JNIEnv *env, int errorNum, char *msg)
 137 {
 138     int i;
 139     int table_size = sizeof(winsock_errors) /
 140                      sizeof(winsock_errors[0]);
 141     char exc[256];
 142     char fullMsg[256];
 143     char *excP = NULL;
 144 
 145     /*
 146      * If exception already throw then don't overwrite it.
 147      */
 148     if ((*env)->ExceptionOccurred(env)) {
 149         return;