Merge
authorduke
Wed, 05 Jul 2017 19:37:10 +0200
changeset 23877 166fb0e4fe4e
parent 23876 41f447bfbbd7 (current diff)
parent 23838 94afcb4be25e (diff)
child 23941 2b69e3d44dd9
Merge
--- a/.hgtags-top-repo	Thu Apr 17 15:22:41 2014 -0700
+++ b/.hgtags-top-repo	Wed Jul 05 19:37:10 2017 +0200
@@ -251,3 +251,4 @@
 d0b525cd31b87abeb6d5b7e3516953eeb13b323c jdk9-b06
 0ea015c298b201c07fa33990f2445b6d0ef3566d jdk9-b07
 db045d8faa0924b7378102d24a1a0d850c1e3834 jdk9-b08
+4a21dc7d57d1069a01f68e7182c074cb37349dfb jdk9-b09
--- a/common/src/fixpath.c	Thu Apr 17 15:22:41 2014 -0700
+++ b/common/src/fixpath.c	Wed Jul 05 19:37:10 2017 +0200
@@ -109,7 +109,7 @@
 
 void append(char **b, size_t *bl, size_t *u, char *add, size_t addlen)
 {
-  while ( (addlen+*u+1) > *bl) {
+  while ((addlen+*u+1) > *bl) {
     *bl *= 2;
     *b = (char*) realloc(*b, *bl);
   }
@@ -118,7 +118,7 @@
 }
 
 /*
- * Creates a new string from in where the first occurance of sub is
+ * Creates a new string from in where the first occurrence of sub is
  * replaced by rep.
  */
 char *replace_substring(char *in, char *sub, char *rep)
@@ -246,7 +246,7 @@
   }
 
   buffer = (char*) malloc(buflen);
-  while((blocklen = fread(block,1,sizeof(block),atin)) > 0) {
+  while ((blocklen = fread(block, 1, sizeof(block), atin)) > 0) {
     append(&buffer, &buflen, &used, block, blocklen);
   }
   buffer[used] = 0;
@@ -280,16 +280,21 @@
   char *current = quoted;
   int pass;
 
-  if(strpbrk(in_arg, " \t\n\v\r\\\"") == NULL) {
+  if (strlen(in_arg) == 0) {
+     // empty string? explicitly quote it.
+     return _strdup("\"\"");
+  }
+
+  if (strpbrk(in_arg, " \t\n\v\r\\\"") == NULL) {
      return _strdup(in_arg);
   }
 
   // process the arg twice. Once to calculate the size and then to copy it.
-  for(pass=1; pass<=2; pass++) {
+  for (pass=1; pass<=2; pass++) {
     char const *arg = in_arg;
 
     // initial "
-    if(pass == 2) {
+    if (pass == 2) {
       *current = '\"';
     }
     current++;
@@ -328,7 +333,7 @@
         *current = *arg;
       }
       current++;
-    } while( *arg++ != '\0');
+    } while (*arg++ != '\0');
 
     // allocate the buffer
     if (pass == 1) {
@@ -362,7 +367,7 @@
 
     if (getenv("DEBUG_FIXPATH") != NULL) {
       char const * cmdline = GetCommandLine();
-      fprintf(stderr, "fixpath input line >%s<\n", strstr( cmdline , argv[1]));
+      fprintf(stderr, "fixpath input line >%s<\n", strstr(cmdline, argv[1]));
     }
 
     if (argv[1][1] == 'c' && argv[1][2] == '\0') {
@@ -399,7 +404,7 @@
         }
 
         rc = SetEnvironmentVariable(var, val);
-        if(!rc) {
+        if (!rc) {
           // Could not set var for some reason.  Try to report why.
           const int msg_len = 80 + var_len + strlen(val);
           char * msg = (char *) alloca(msg_len);
@@ -422,7 +427,7 @@
     // handle command and it's args.
     while (i < argc) {
       char const *replaced = replace_cygdrive(argv[i]);
-      if(replaced[0] == '@') {
+      if (replaced[0] == '@') {
         // Found at-file! Fix it!
         replaced = fix_at_file(replaced);
       }
@@ -433,7 +438,7 @@
     // determine the length of the line
     line = NULL;
     // args
-    for(i = cmd; i < argc; i++) {
+    for (i = cmd; i < argc; i++) {
       line += (ptrdiff_t) strlen(argv[i]);
     }
     // spaces and null
@@ -443,7 +448,7 @@
 
     // copy in args.
     current = line;
-    for(i = cmd; i < argc; i++) {
+    for (i = cmd; i < argc; i++) {
       ptrdiff_t len = strlen(argv[i]);
       if (i != cmd) {
         *current++ = ' ';
@@ -457,16 +462,16 @@
       fprintf(stderr, "fixpath converted line >%s<\n", line);
     }
 
-    if(cmd == argc) {
+    if (cmd == argc) {
        if (getenv("DEBUG_FIXPATH") != NULL) {
          fprintf(stderr, "fixpath no command provided!\n");
        }
        exit(0);
     }
 
-    ZeroMemory(&si,sizeof(si));
+    ZeroMemory(&si, sizeof(si));
     si.cb=sizeof(si);
-    ZeroMemory(&pi,sizeof(pi));
+    ZeroMemory(&pi, sizeof(pi));
 
     fflush(stderr);
     fflush(stdout);
@@ -481,14 +486,14 @@
                        NULL,
                        &si,
                        &pi);
-    if(!rc) {
+    if (!rc) {
       // Could not start process for some reason.  Try to report why:
       report_error("Could not start process!");
       exit(126);
     }
 
-    WaitForSingleObject(pi.hProcess,INFINITE);
-    GetExitCodeProcess(pi.hProcess,&exitCode);
+    WaitForSingleObject(pi.hProcess, INFINITE);
+    GetExitCodeProcess(pi.hProcess, &exitCode);
 
     if (getenv("DEBUG_FIXPATH") != NULL) {
       for (i=0; i<num_files_to_delete; ++i) {
--- a/make/Javadoc.gmk	Thu Apr 17 15:22:41 2014 -0700
+++ b/make/Javadoc.gmk	Wed Jul 05 19:37:10 2017 +0200
@@ -72,6 +72,7 @@
 TREEAPI_FIRST_COPYRIGHT_YEAR = 2005
 JNLP_FIRST_COPYRIGHT_YEAR = 1998
 PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
+JDKNET_FIRST_COPYRIGHT_YEAR = 2014
 
 # Oracle name
 FULL_COMPANY_NAME = Oracle and/or its affiliates
@@ -1160,6 +1161,57 @@
 
 #############################################################
 #
+# jdk.net docs
+#
+
+ALL_OTHER_TARGETS += jdknetdocs
+
+JDKNET_DOCDIR := $(JRE_API_DOCSDIR)/net/socketoptions/spec
+JDKNET2COREAPI := ../../../$(JDKJRE2COREAPI)
+JDKNET_DOCTITLE := jdk.net API
+JDKNET_WINDOWTITLE := jdk.net API
+JDKNET_HEADER := <strong>jdk.net API</strong>
+JDKNET_BOTTOM := $(call CommonBottom,$(JDKNET_FIRST_COPYRIGHT_YEAR))
+JDKNET_PKGS := jdk.net
+
+JDKNET_INDEX_HTML = $(JDKNET_DOCDIR)/index.html
+JDKNET_OPTIONS_FILE = $(DOCSTMPDIR)/jdknet.options
+JDKNET_PACKAGES_FILE = $(DOCSTMPDIR)/jdknet.packages
+
+jdknetdocs: $(JDKNET_INDEX_HTML)
+
+# Set relative location to core api document root
+$(JDKNET_INDEX_HTML): GET2DOCSDIR=$(JDKNET2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(JDKNET_INDEX_HTML): $(JDKNET_OPTIONS_FILE) $(JDKNET_PACKAGES_FILE) coredocs
+	$(prep-javadoc)
+	$(call JavadocSummary,$(JDKNET_OPTIONS_FILE),$(JDKNET_PACKAGES_FILE))
+	$(JAVADOC_CMD) -d $(@D) \
+	    @$(JDKNET_OPTIONS_FILE) @$(JDKNET_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(JDKNET_OPTIONS_FILE):
+	$(prep-target)
+	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	  $(call OptionOnly,-Xdoclint:none) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionOnly,-nodeprecatedlist) ; \
+	  $(call OptionPair,-doctitle,$(JDKNET_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(JDKNET_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(JDKNET_HEADER)$(DRAFT_HEADER)); \
+	  $(call OptionPair,-bottom,$(JDKNET_BOTTOM)$(DRAFT_BOTTOM)); \
+	  $(call OptionTrip,-linkoffline,$(JDKNET2COREAPI),$(COREAPI_DOCSDIR)/); \
+	) >> $@
+
+# Create a file with the package names in it
+$(JDKNET_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(JDKNET_PKGS))
+	$(prep-target)
+	$(call PackageFilter,$(JDKNET_PKGS))
+
+#############################################################
+#
 # Get a cache of all the directories
 
 $(DIRECTORY_CACHE): $(ALL_EXISTING_SOURCE_DIRS)
--- a/make/common/NON_CORE_PKGS.gmk	Thu Apr 17 15:22:41 2014 -0700
+++ b/make/common/NON_CORE_PKGS.gmk	Wed Jul 05 19:37:10 2017 +0200
@@ -94,7 +94,8 @@
       com.apple.eio
 endif
 
-JDK_PKGS = jdk
+JDK_PKGS = jdk \
+      jdk.net
 
 # non-core packages in rt.jar
 NON_CORE_PKGS = $(DOMAPI_PKGS) \