X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_date_api.c;h=91c16766aba994136783995584ccfcb27a77d341;hp=6949df09dc15287294ca6530c047415843df5b4c;hb=f2d0dbf38d7b00455d3dfba8f2de087105ae0f35;hpb=c9869ca0c20c9932cd1f3a8e52702e240d60de99 diff --git a/http_date_api.c b/http_date_api.c index 6949df0..91c1676 100644 --- a/http_date_api.c +++ b/http_date_api.c @@ -1,16 +1,13 @@ /* - +----------------------------------------------------------------------+ - | PECL :: http | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, that | - | is bundled with this package in the file LICENSE, and is available | - | through the world-wide-web at http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Copyright (c) 2004-2005 Michael Wallner | - +----------------------------------------------------------------------+ + +--------------------------------------------------------------------+ + | PECL :: http | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met. | + +--------------------------------------------------------------------+ + | Copyright (c) 2004-2005, Michael Wallner | + +--------------------------------------------------------------------+ */ /* $Id$ */ @@ -18,12 +15,9 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "php.h" #include "php_http.h" -#include "php_http_std_defs.h" - -#include +#include "php_http_date_api.h" static int check_day(char *day, size_t len); static int check_month(char *month); @@ -150,7 +144,7 @@ PHP_HTTP_API char *_http_date(time_t t TSRMLS_DC) { struct tm *gmtime, tmbuf; - if (gmtime = php_gmtime_r(&t, &tmbuf)) { + if ((gmtime = php_gmtime_r(&t, &tmbuf))) { char *date = ecalloc(1, 31); snprintf(date, 30, "%s, %02d %s %04d %02d:%02d:%02d GMT",