X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=compat%2Fgetpid.c;h=d6275e7df357a854e6c59ab7d3854fd0c729cfdc;hb=refs%2Fheads%2Fmaster;hp=e5d9315d12c903bd3fbf62d0925222733aa1620c;hpb=f22b0d94f8336eb3c880536bf50edf355ecac451;p=vlc diff --git a/compat/getpid.c b/compat/getpid.c index e5d9315d12..d6275e7df3 100644 --- a/compat/getpid.c +++ b/compat/getpid.c @@ -1,21 +1,21 @@ /***************************************************************************** * getpid.c: POSIX getpid() replacement ***************************************************************************** - * Copyright © 2009 the VideoLAN project + * Copyright © 2009 VLC authors and VideoLAN * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ #ifdef HAVE_CONFIG_H @@ -23,14 +23,16 @@ #endif #include -#ifdef WIN32 +#ifdef _WIN32 # include #endif pid_t getpid (void) { -#ifdef WIN32 +#if defined (_WIN32) return (pid_t) GetCurrentProcessId (); +#elif defined (__native_client__) + return 1; #else # error Unimplemented! #endif