]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Bring file_io up to the new parameter order for APR. I have decided to do
authorRyan Bloom <rbb@apache.org>
Wed, 6 Oct 1999 23:04:16 +0000 (23:04 +0000)
committerRyan Bloom <rbb@apache.org>
Wed, 6 Oct 1999 23:04:16 +0000 (23:04 +0000)
these on a directory by directory basis for the rest of APR.  I hope to
cause fewer problems for other developers by doing it this way.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83937 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_asis.c
modules/generators/mod_autoindex.c
modules/http/http_core.c
modules/mappers/mod_negotiation.c
server/log.c
server/mpm/mpmt_pthread/scoreboard.c
server/mpm/prefork/prefork.c
server/util.c

index 9db8ced4aa8a4a8af5b559158cf551c87d5fa64c..f305b4a95a01fcd6b1bc849414073e4a195b6662 100644 (file)
@@ -86,7 +86,7 @@ static int asis_handler(request_rec *r)
        return FORBIDDEN;
     }
 
-    ap_get_os_file(f, &thefd); 
+    ap_get_os_file(&thefd, f); 
     thefile = fdopen(thefd, "r");
     
     ap_scan_script_header_err(r, thefile, NULL);
index 0b4151bf28ec135525a399c498a842724839e20a..660565d2e36ceb3409e8088b4649566d620df466 100644 (file)
@@ -1513,7 +1513,7 @@ static int index_directory(request_rec *r,
     char keyid;
     char direction;
 
-    if (ap_opendir(&d, r->pool, name) != APR_SUCCESS) {
+    if (ap_opendir(&d, name, r->pool) != APR_SUCCESS) {
        ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
                    "Can't open directory for index: %s", r->filename);
        return HTTP_FORBIDDEN;
index c1b23789b24a8b7347ed32366f3fb3f82db46878..682b08284fcbd4bed7c2c45c9e31393f06ca1dff 100644 (file)
@@ -2521,7 +2521,7 @@ static int default_handler(request_rec *r)
         return FORBIDDEN;
     }
     else
-       ap_get_os_file (fd, &fd_os);
+       ap_get_os_file(&fd_os, fd);
        
     ap_update_mtime(r, r->finfo.st_mtime);
     ap_set_last_modified(r);
index d2d75c5b312c0572be224e89e5c5a59285a095ef..5b6beab74e9c1552361b096b5d011572ee1c22e7 100644 (file)
@@ -644,7 +644,7 @@ static enum header_state get_header_line(char *buffer, int len, ap_file_t *map)
     /* Get a noncommented line */
 
     do {
-        if (ap_fgets(map, buffer, MAX_STRING_LEN) != APR_SUCCESS) {
+        if (ap_fgets(buffer, MAX_STRING_LEN, map) != APR_SUCCESS) {
             return header_eof;
         }
     } while (buffer[0] == '#');
@@ -665,10 +665,10 @@ static enum header_state get_header_line(char *buffer, int len, ap_file_t *map)
 
     cp += strlen(cp);
 
-    while (ap_getc(map, &c) != APR_EOF) {
+    while (ap_getc(&c, map) != APR_EOF) {
         if (c == '#') {
             /* Comment line */
-            while (ap_getc(map, &c) != EOF && c != '\n') {
+            while (ap_getc(&c, map) != EOF && c != '\n') {
                 continue;
             }
         }
@@ -679,11 +679,11 @@ static enum header_state get_header_line(char *buffer, int len, ap_file_t *map)
              */
 
             while (c != '\n' && ap_isspace(c)) {
-                if(ap_getc(map, &c) != APR_SUCCESS)
+                if(ap_getc(&c, map) != APR_SUCCESS)
                    break;
             }
 
-            ap_ungetc(map, c);
+            ap_ungetc(c, map);
 
             if (c == '\n') {
                 return header_seen;     /* Blank line */
@@ -691,7 +691,7 @@ static enum header_state get_header_line(char *buffer, int len, ap_file_t *map)
 
             /* Continuation */
 
-            while (cp < buf_end - 2 && (ap_getc(map, &c)) != EOF && c != '\n') {
+            while (cp < buf_end - 2 && (ap_getc(&c, map)) != EOF && c != '\n') {
                 *cp++ = c;
             }
 
@@ -702,7 +702,7 @@ static enum header_state get_header_line(char *buffer, int len, ap_file_t *map)
 
             /* Line beginning with something other than whitespace */
 
-            ap_ungetc(map, c);
+            ap_ungetc(c, map);
             return header_seen;
         }
     }
@@ -908,7 +908,7 @@ static int read_types_multi(negotiation_state *neg)
     ++filp;
     prefix_len = strlen(filp);
 
-    if (ap_opendir(&dirp, neg->pool, neg->dir_name) != APR_SUCCESS) {
+    if (ap_opendir(&dirp, neg->dir_name, neg->pool) != APR_SUCCESS) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
                     "cannot read directory for multi: %s", neg->dir_name);
         return HTTP_FORBIDDEN;
index f9f7cc844c9d2a9a3149fdfe008ab40775f29771..31d7f3fff04baf077926fbb01651824e7ebbc987 100644 (file)
@@ -258,7 +258,7 @@ void ap_open_logs(server_rec *s_main, ap_context_t *p)
     if (s_main->error_log) {
        /* replace stderr with this new log */
        fflush(stderr);
-        ap_get_os_file(s_main->error_log, &errfile);
+        ap_get_os_file(&errfile, s_main->error_log);
        if (dup2(errfile, STDERR_FILENO) == -1) {
            ap_log_error(APLOG_MARK, APLOG_CRIT, s_main,
                "unable to replace stderr with error_log");
@@ -295,7 +295,7 @@ void ap_open_logs(server_rec *s_main, ap_context_t *p)
 API_EXPORT(void) ap_error_log2stderr(server_rec *s) {
     int errfile;
 
-    ap_get_os_file(s->error_log, &errfile);
+    ap_get_os_file(&errfile, s->error_log);
     if (   s->error_log != NULL
         && errfile != STDERR_FILENO)
         dup2(errfile, STDERR_FILENO);
@@ -458,8 +458,8 @@ static void log_error_core(const char *file, int line, int level,
     if (logf) {
       /* ZZZ let's just use AP funcs to Write to the error log.  If failure,
         can we output a message to the console??? */
-       ap_puts(logf, errstr);
-       ap_putc(logf, '\n');
+       ap_puts(errstr, logf);
+       ap_putc('\n', logf);
        ap_flush(logf);
     }
 #ifdef HAVE_SYSLOG
index 3992439f48a60e7c02b575be721915cda45d3b97..8459af49b7cd3417cf726c104fa0bf3926b397e2 100644 (file)
@@ -454,7 +454,7 @@ API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
     ap_open(p, ap_scoreboard_fname, APR_CREATE | APR_BINARY | APR_READ | APR_WRITE,
             APR_UREAD | APR_UWRITE | APR_GREAD | APR_GWRITE | APR_WREAD | APR_WWRITE,
             &scoreboard_file);
-    ap_get_os_file(scoreboard_file, &scoreboard_fd);
+    ap_get_os_file(&scoreboard_fd, scoreboard_file);
     if (scoreboard_fd == -1) {
        perror(ap_scoreboard_fname);
        fprintf(stderr, "Cannot open scoreboard file:\n");
@@ -482,7 +482,7 @@ void reinit_scoreboard(ap_context_t *p)
 
     ap_open(p, ap_scoreboard_fname, APR_CREATE | APR_BINARY | APR_READ | APR_WRITE,
             APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, &scoreboard_file);
-    ap_get_os_file(scoreboard_file, &scoreboard_fd);
+    ap_get_os_file(&scoreboard_fd, scoreboard_file);
     if (scoreboard_fd == -1) {
        perror(ap_scoreboard_fname);
        fprintf(stderr, "Cannot open scoreboard file:\n");
index 478cacc5fdbe348435de82b5e1ee9829bbb2c672..ef27132e291e224e197eee22c25bd8dae7952d42 100644 (file)
@@ -544,7 +544,7 @@ static void accept_mutex_init(ap_context_t *p)
     expand_lock_fname(p);
     ap_open(&tempfile, p, ap_lock_fname, APR_CREATE | APR_WRITE | APR_EXCL,
             APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD);
-    ap_get_os_file(tempfile, &lock_fd);
+    ap_get_os_file(&lock_fd, tempfile);
     if (lock_fd == -1) {
        perror("open");
        fprintf(stderr, "Cannot open lock file: %s\n", ap_lock_fname);
@@ -611,7 +611,7 @@ static void accept_mutex_child_init(ap_context_t *p)
                    "Child cannot open lock file: %s", ap_lock_fname);
        clean_child_exit(APEXIT_CHILDINIT);
     }
-    ap_get_os_file(tempfile, &lock_fd);
+    ap_get_os_file(&lock_fd, tempfile);
 }
 
 /*
@@ -631,7 +631,7 @@ static void accept_mutex_init(ap_context_t *p)
                    "Parent cannot open lock file: %s", ap_lock_fname);
        exit(APEXIT_INIT);
     }
-    ap_get_os_file(tempfile, &lock_fd);
+    ap_get_os_file(&lock_fd, tempfile);
     ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
 }
 
index 421db3fb07a7d4809e776821a585d4e2a65b2ccc..9900793ee55b19316be91955d4b96d3d6fd76b0e 100644 (file)
@@ -841,7 +841,7 @@ static int cfg_getch(void *param)
 {
     char ch;
     ap_file_t *cfp = (ap_file_t *) param;
-    if (ap_getc(cfp, &ch) == APR_SUCCESS)
+    if (ap_getc(&ch, cfp) == APR_SUCCESS)
         return ch;
     return (int)EOF;
 }
@@ -849,7 +849,7 @@ static int cfg_getch(void *param)
 static void *cfg_getstr(void *buf, size_t bufsiz, void *param)
 {
     ap_file_t *cfp = (ap_file_t *) param;
-    if (ap_fgets(cfp, buf, bufsiz) == APR_SUCCESS)
+    if (ap_fgets(buf, bufsiz, cfp) == APR_SUCCESS)
         return buf;
     return NULL;
 }
@@ -888,7 +888,7 @@ API_EXPORT(configfile_t *) ap_pcfg_openfile(ap_context_t *p, const char *name)
     if (stat != APR_SUCCESS)
         return NULL;
 
-    if (ap_get_filetype(file, &type) == APR_SUCCESS &&
+    if (ap_get_filetype(&type, file) == APR_SUCCESS &&
         type != APR_REG &&
 #if defined(WIN32) || defined(OS2)
         !(strcasecmp(name, "nul") == 0 ||