00001 /* 00002 * Copyright 2004, 2005, 2006 PathScale, Inc. All Rights Reserved. 00003 */ 00004 00005 /* Copyright (C) 1995 Free Software Foundation, Inc. 00006 This file is part of GNU Fortran libU77 library. 00007 00008 This library is free software; you can redistribute it and/or modify it 00009 under the terms of the GNU Library General Public License as published 00010 by the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 GNU Fortran is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public 00019 License along with GNU Fortran; see the file COPYING.LIB. If 00020 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. */ 00022 00023 #include "config.h" 00024 #if STDC_HEADERS || defined(KEY) /* Bug 1683 */ 00025 # include <stdlib.h> 00026 #endif 00027 00028 #ifdef KEY /* Bug 5019 */ 00029 #include "pathf90_libU_intrin.h" 00030 #endif /* KEY Bug 5019 */ 00031 #include "f2c.h" 00032 00033 /* Subroutine */ 00034 int 00035 G77_srand_0 (const integer * seed) 00036 { 00037 #ifdef KEY /* Bug 1683, 5019 */ 00038 MEM_LOCK(&pathf90_rand_mutex); 00039 srand ((unsigned int) *seed); 00040 MEM_UNLOCK(&pathf90_rand_mutex); 00041 #else 00042 srand ((unsigned int) *seed); 00043 #endif /* KEY Bug 1683, 5019 */ 00044 return 0; 00045 } 00046 00047 #ifdef KEY /* Bug 1683, 5019 */ 00048 int 00049 G77_srand_1 (const long long * seed) 00050 { 00051 MEM_LOCK(&pathf90_rand_mutex); 00052 srand ((unsigned int) *seed); 00053 MEM_UNLOCK(&pathf90_rand_mutex); 00054 return 0; 00055 } 00056 #endif /* KEY Bug 1683, 5019 */
1.5.6